@jx3box/jx3box-common-ui 5.5.12 → 5.5.16

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.
@@ -2,4 +2,4 @@
2
2
  "std": ["北天药宗", "奉天证道"],
3
3
  "origin": ["藏剑山庄", "物华天宝"],
4
4
  "all": ["北天药宗", "奉天证道", "藏剑山庄", "物华天宝"]
5
- }
5
+ }
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.16",
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
 
@@ -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: {
@@ -51,7 +51,7 @@ export default {
51
51
  },
52
52
  computed: {
53
53
  id: function () {
54
- return ~~this.postId;
54
+ return this.postId;
55
55
  },
56
56
  visible: function () {
57
57
  return this.other_authors && this.other_authors?.length;
@@ -62,7 +62,7 @@ export default {
62
62
  immediate : true,
63
63
  deep:true,
64
64
  handler : function (){
65
- this.postType && !!~~this.postId && this.loadBoxcoinConfig()
65
+ this.postType && this.postId && this.loadBoxcoinConfig()
66
66
  }
67
67
  }
68
68
  },
@@ -25,17 +25,18 @@ export default {
25
25
  props: ["price"],
26
26
  components: {},
27
27
  data: function () {
28
- return {};
28
+ return {
29
+ };
29
30
  },
30
31
  computed: {},
31
32
  watch: {},
32
33
  methods: {
33
- formartPrice(price, unit) {
34
+ formartPrice(price = 0, unit) {
34
35
  let result = {
35
- zhuan: parseInt(price / 100 / 100 / 10000) || 0,
36
- jin: parseInt((price / 100 / 100) % 10000) || 0,
37
- yin: parseInt((price / 100) % 100) || 0,
38
- tong: parseInt(price % 100) || 0,
36
+ zhuan: Math.floor(price * 0.01 * 0.01 * 0.0001) || 0,
37
+ jin: Math.floor((price * 0.01 * 0.01) % 10000) || 0,
38
+ yin: Math.floor((price * 0.01) % 100) || 0,
39
+ tong: Math.floor(price % 100) || 0,
39
40
  };
40
41
  return result[unit];
41
42
  },