@jx3box/jx3box-common-ui 5.5.12 → 5.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/header/nav.vue +42 -44
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.5.12",
3
+ "version": "5.5.13",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,48 +1,49 @@
1
1
  <template>
2
2
  <nav class="c-header-nav" v-if="finalNav">
3
3
  <div class="u-item-box" v-for="item in finalNav" :key="'header-nav-' + item.key">
4
- <template
5
- v-if="item.status && item.children && item.children.length"
6
- >
7
- <el-dropdown class="u-menu" :show-timeout="0" trigger="hover">
4
+ <template v-if="item.status && matchedClient(item.client)">
5
+ <template
6
+ v-if="item.children && item.children.length"
7
+ >
8
+ <el-dropdown class="u-menu" :show-timeout="0" trigger="hover">
9
+ <a
10
+ class="u-item el-dropdown-link"
11
+ :class="{ on: isFocus(item.link) }"
12
+ :href="item.link"
13
+ :target="isSelf(item.link)"
14
+ >{{ item.label
15
+ }}<i class="el-icon-arrow-down el-icon--right"></i
16
+ ></a>
17
+ <el-dropdown-menu slot="dropdown" class="c-header-menu">
18
+ <el-dropdown-item
19
+ v-for="(subitem, subIndex) in item.children"
20
+ :key="'header-nav-drop-' + subitem.key + subIndex"
21
+ class="u-menu-item"
22
+ >
23
+ <a
24
+ :href="subitem.link"
25
+ :target="isSelf(subitem.link)"
26
+ v-if="
27
+ subitem.status &&
28
+ matchedClient(subitem.client)
29
+ "
30
+ >{{ subitem.label }}
31
+ <span v-if="subitem.desc">{{
32
+ subitem.desc
33
+ }}</span></a
34
+ ></el-dropdown-item
35
+ >
36
+ </el-dropdown-menu>
37
+ </el-dropdown>
38
+ </template>
39
+ <template v-else>
8
40
  <a
9
- class="u-item el-dropdown-link"
41
+ class="u-item"
10
42
  :class="{ on: isFocus(item.link) }"
11
43
  :href="item.link"
12
- :target="isSelf(item.link)"
13
- >{{ item.label
14
- }}<i class="el-icon-arrow-down el-icon--right"></i
15
- ></a>
16
- <el-dropdown-menu slot="dropdown" class="c-header-menu">
17
- <el-dropdown-item
18
- v-for="(subitem, subIndex) in item.children"
19
- :key="'header-nav-drop-' + subitem.key + subIndex"
20
- class="u-menu-item"
21
- >
22
- <a
23
- :href="subitem.link"
24
- :target="isSelf(subitem.link)"
25
- v-if="
26
- subitem.status &&
27
- matchedClient(subitem.client)
28
- "
29
- >{{ subitem.label }}
30
- <span v-if="subitem.desc">{{
31
- subitem.desc
32
- }}</span></a
33
- ></el-dropdown-item
34
- >
35
- </el-dropdown-menu>
36
- </el-dropdown>
37
- </template>
38
- <template v-else>
39
- <a
40
- class="u-item"
41
- :class="{ on: isFocus(item.link) }"
42
- :href="item.link"
43
- v-if="item.status && matchedClient(item.client)"
44
- >{{ item.label }}</a
45
- >
44
+ >{{ item.label }}</a
45
+ >
46
+ </template>
46
47
  </template>
47
48
  </div>
48
49
  </nav>
@@ -68,16 +69,13 @@ export default {
68
69
  navChildren.forEach((child) => {
69
70
  const parentKey = child.parentKey;
70
71
  // 匹配客户端
71
- const parent = finalNav.find((n) => n.key === parentKey && this.client === n.client);
72
+ const parent = finalNav.find((n) => n.key === parentKey)
72
73
 
73
74
  if (parent) {
74
75
  if (!parent.children) {
75
76
  parent.children = [];
76
77
  }
77
- // 区分客户端
78
- if (child.client === this.client) {
79
- parent.children.push(child);
80
- }
78
+ parent.children.push(child);
81
79
  }
82
80
  });
83
81