1.1.9 • Published 2 years ago
js-gy-head
引入文件
<header
:themeType="['#ddd', '#000']"
:headerType="1"
defaultTheme="blue"
spaceTitle=""
@logout="logout"
>
<div slot="spaceTitle">我是插槽</div>
</header>
<footer>
<div slot="spaceFooter">这是底部</div>
</footer>
<script>
import base from "js-gy-head";
import "js-gy-head/js-header/js-header.css";
Vue.use(base);
export default {
methods: {
logout(e) {
// do something
},
},
};
</script>
参数
参数 | 说明 | 类型 | 默认值 |
---|
defaultTheme | 默认主题( 优先级最高 ) | string | red,bule,yellow,pink,black,green,gray |
themeType | 主题颜色, | array背景色,字体色 | '#f33', '#000' |
spaceTitle | 头部左侧标题 | string | '我是标题' |
事件
事件名称 | 说明 | 回调参数 |
---|
toUserCenter | 点击个人中心触发 | Function |
toUserPage | 点击个人主页触发 | Function |
logout | 点击退出账号触发 | Function |
版本更新日志
版本 v1.1.9(2021 年 12 月 15 日)
1. 右侧用户操作
2. 底部插槽
版本 v1.1.8(2021 年 12 月 15 日)
1. 标题
2. 插槽
版本 v1.1.7(2021 年 12 月 15 日)
1. 主题色