@jx3box/jx3box-common-ui 5.5.10 → 5.5.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.5.10",
3
+ "version": "5.5.14",
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>
@@ -55,21 +56,20 @@ export default {
55
56
  props: [],
56
57
  data: function () {
57
58
  return {
58
- nav: default_nav,
59
- client: location.href.includes("origin") ? "origin" : "std",
59
+ nav: default_nav
60
60
  };
61
61
  },
62
62
  computed: {
63
63
  finalNav: function ({ nav }) {
64
-
64
+ // 父节点
65
65
  const finalNav = nav.filter((d) => !d.parentKey);
66
-
66
+ // 子节点
67
67
  const navChildren = nav.filter((c) => c.parentKey);
68
68
 
69
69
  navChildren.forEach((child) => {
70
70
  const parentKey = child.parentKey;
71
-
72
- const parent = finalNav.find((n) => n.key === parentKey);
71
+ // 匹配客户端
72
+ const parent = finalNav.find((n) => n.key === parentKey)
73
73
 
74
74
  if (parent) {
75
75
  if (!parent.children) {
@@ -80,6 +80,9 @@ export default {
80
80
  });
81
81
 
82
82
  return finalNav
83
+ },
84
+ client() {
85
+ return location.href.includes("origin") ? "origin" : "std"
83
86
  }
84
87
  },
85
88
  methods: {
@@ -98,7 +98,7 @@ export default {
98
98
  immediate : true,
99
99
  deep : true,
100
100
  handler : function (){
101
- this.postType && !!~~this.postId && this.loadData();
101
+ this.postType && !!this.postId && this.loadData();
102
102
  }
103
103
  },
104
104
  params: {
@@ -32,7 +32,7 @@ export default {
32
32
  methods: {
33
33
  formartPrice(price, unit) {
34
34
  let result = {
35
- zhuan: parseInt(price / 100 / 100 / 10000) || 0,
35
+ zhuan: parseInt(price / 100 / 100 % 10000) || 0,
36
36
  jin: parseInt((price / 100 / 100) % 10000) || 0,
37
37
  yin: parseInt((price / 100) % 100) || 0,
38
38
  tong: parseInt(price % 100) || 0,