首页+侧边栏
This commit is contained in:
@@ -53,8 +53,6 @@ export default {
|
||||
return {
|
||||
// 顶部栏初始数
|
||||
visibleNumber: 5,
|
||||
// 当前激活菜单的 index
|
||||
// currentIndex: undefined,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -140,10 +138,10 @@ export default {
|
||||
methods: {
|
||||
// 根据宽度计算设置显示栏数
|
||||
setVisibleNumber() {
|
||||
const width = window.innerWidth - 800;
|
||||
const width = window.innerWidth - 700;
|
||||
console.log(width);
|
||||
console.log('window.innerWidth:', window.innerWidth);
|
||||
this.visibleNumber = parseInt(width / 100);
|
||||
this.visibleNumber = parseInt(width / 120);
|
||||
console.log('this.visibleNumber:', this.visibleNumber);
|
||||
},
|
||||
// 菜单选择事件
|
||||
@@ -181,6 +179,7 @@ export default {
|
||||
},
|
||||
// 当前激活的路由
|
||||
activeRoutes(key) {
|
||||
this.$store.dispatch('app/setChoicepart', key);
|
||||
const routes = [];
|
||||
if (this.childrenMenus && this.childrenMenus.length > 0) {
|
||||
this.childrenMenus.map((item) => {
|
||||
|
||||
Reference in New Issue
Block a user