|
@@ -7,14 +7,12 @@
|
|
|
<div
|
|
|
@click="isChildMenu = !isChildMenu"
|
|
|
class="menu-modal"
|
|
|
- style="font-size: 12px"
|
|
|
>
|
|
|
功能导览
|
|
|
-
|
|
|
</div>
|
|
|
</li>
|
|
|
|
|
|
- <li class="nav-li" v-for="i in barData" :key="i.id">
|
|
|
+ <li class="nav-li active" v-for="i in barData" :key="i.id">
|
|
|
<span>{{ i.name }}</span>
|
|
|
</li>
|
|
|
<div
|
|
@@ -149,7 +147,12 @@ const sidebarRouters = ref([])
|
|
|
const input1 = ref('')
|
|
|
const isChildMenu = ref(false)
|
|
|
const menuData = ref([])
|
|
|
-const barData = ref([])
|
|
|
+const barData = ref([
|
|
|
+ {name:'首页1',id:1},
|
|
|
+ {name:'首页2',id:2},
|
|
|
+ {name:'首页3',id:3},
|
|
|
+ {name:'首页4',id:4},
|
|
|
+])
|
|
|
const userData = ref(Cookies.get('username') || '')
|
|
|
|
|
|
const routerInit = () => {
|
|
@@ -172,7 +175,6 @@ const routerInit = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- let num = 0
|
|
|
//添加剩余子元素,补齐一列
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
const element = arr[i]
|
|
@@ -181,19 +183,17 @@ const routerInit = () => {
|
|
|
if (
|
|
|
element.children &&
|
|
|
element.children.length > 0 &&
|
|
|
- (num % 11) + element.children.length + 1 > 11 &&
|
|
|
+ ((i) % 11) + element.children.length + 1 > 11 &&
|
|
|
element.children.length < 11
|
|
|
) {
|
|
|
-
|
|
|
- for (let j = 0; j < 11 - (num % 11); j++) {
|
|
|
+ let num = 11 - ((i) % 11)
|
|
|
+ for (let j = 0; j < num; j++) {
|
|
|
arr.splice(i, 0, { ...element, isNone: true })
|
|
|
i++
|
|
|
}
|
|
|
- num++
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- num++
|
|
|
}
|
|
|
sidebarRouters.value = arr
|
|
|
}
|
|
@@ -265,8 +265,7 @@ onMounted(() => {
|
|
|
}
|
|
|
.menu-modal {
|
|
|
cursor: pointer;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 300;
|
|
|
+ font-weight: 400;
|
|
|
}
|
|
|
.header-bar-hover {
|
|
|
position: fixed;
|
|
@@ -392,12 +391,13 @@ onMounted(() => {
|
|
|
.nav-li {
|
|
|
width: 130px;
|
|
|
height: 50px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 700;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
text-align: center;
|
|
|
line-height: 50px;
|
|
|
list-style: none;
|
|
|
color: #fff;
|
|
|
+ cursor: pointer;
|
|
|
a {
|
|
|
color: #fff;
|
|
|
}
|