ykc-header 的基础用法。
ykc-header
<template> <ykc-header class="ykc-header-demo" :title="title" username="张三" @overview="handleOverview" @change-password="handleChangePassword" @logout="handleLogout"></ykc-header> </template> <script> export default { data() { return { title: 'title', }; }, methods: { handleOverview() { this.title = '总览'; this.$message.success('总览'); }, handleChangePassword() { this.title = '修改密码'; this.$message.warning('修改密码'); }, handleLogout() { this.title = '退出登录'; this.$message.error('退出登录'); }, }, }; </script> <style> .ykc-header-demo { border: 1px solid #ccc; } </style>
theme →