Appearance
面包屑
效果展示
注意点
每个页面都需要配置面包屑
首页点击会回到项目首页
当前页面的面包屑不能点击,其他页面点击跳到对应页面且移入带有小手
使用
引入store
定义面包屑数据 注意:当前页面不需要传路径,其他页面必须传路径,如果有参数,写在params中
commit变更面包屑state数据
import { useStore } from "vuex";
// 面包屑配置
const breadcrumbs = {
title: "账户列表",
children: [{
title: "定制列表",
path: '/diy/config/diylist'
}, {
title: '选择模板',
path: '/diy/config/choice'
}, {
title: '页面设置',
path: '/diy/config/share',
params: {
templateId: 443
}
}, {
title: '设置模板'
}]
}
const store = new useStore();
store.commit('changeBread', breadcrumbs)