@jx3box/jx3box-common-ui 7.0.3 → 7.0.4

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.
@@ -1,19 +1,23 @@
1
- .w-filter-tags {
1
+ .w-filter-topics {
2
2
  display: inline-block;
3
3
  .u-toggle {
4
4
  color: #606266;
5
- font-size: 14px;
5
+ font-size: 12px;
6
6
  .pointer;
7
7
  }
8
8
  }
9
9
 
10
- .w-filter-tag__pop {
10
+ .w-filter-topic__pop {
11
11
  .u-group-title {
12
12
  color: #606266;
13
13
  padding-bottom: 10px;
14
14
  }
15
+ .u-group {
16
+ .flex;
17
+ flex-wrap: wrap;
18
+ gap: 10px;
19
+ }
15
20
  .u-tag {
16
- margin: 0 10px 10px 0;
17
21
  .pointer;
18
22
  }
19
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -66,7 +66,7 @@
66
66
  <clientBy type="" />
67
67
  <zlpBy />
68
68
 
69
- <tagBy2 v-model="tag2" :tags="post_topics" />
69
+ <tagBy2 v-model="tag2" :topics="post_topics" />
70
70
 
71
71
  <hr />
72
72
  <uploadImage
@@ -255,7 +255,7 @@ export default {
255
255
  upload: "",
256
256
  text: `<Text>text="使用:<BUFF 3222 1 desc>,持续<BUFF 3222 1 time>。\\\n" font=105 </text><Text>text="红豆沙做馅儿,精致细腻的广式月饼。" font=100 </text><Text>text="使用:能在唐门套装供应商处换取如下装备。\\\n" font=105 </text><Text>text="[燕云·重泉靴]" name="iteminfolink" eventid=513 script="this.nVersion=0 this.dwTabType=7 this.dwIndex=35244 this.OnItemLButtonDown=function() OnItemLinkDown(this) end" font=100 r=255 g=40 b=255 </text><Text>text="," font=105 </text><Text>text="[燕云·铭松靴]" name="iteminfolink" eventid=513 script="this.nVersion=0 this.dwTabType=7 this.dwIndex=35245 this.OnItemLButtonDown=function() OnItemLinkDown(this) end" font=100 r=255 g=40 b=255 </text><Text>text="。" font=100 </text>`,
257
257
 
258
- post_topics,
258
+ post_topics: post_topics['pve'],
259
259
  tag2: ''
260
260
  };
261
261
  },
@@ -1,31 +1,31 @@
1
1
  <template>
2
- <div class="w-filter-tags" ref="tagBy">
2
+ <div class="w-filter-topics" ref="tagBy">
3
3
  <el-popover
4
4
  v-model="visible"
5
5
  trigger="manual"
6
6
  ref="pop"
7
7
  :width="400"
8
- popper-class="w-filter-tag__pop"
8
+ popper-class="w-filter-topic__pop"
9
9
  :popper-options="{ boundariesElement: 'parent' }"
10
10
  >
11
11
  <div class="w-filter-tag__content">
12
- <div v-for="(group, key) in tags" :key="key">
13
- <div class="u-group-title">{{ key }}</div>
14
- <div class="u-group">
15
- <el-tag
16
- v-for="item in group"
17
- :key="item"
18
- @click="onTagClick(item)"
19
- class="u-tag"
20
- :effect="item === value ? 'dark' : 'plain'"
21
- >{{ item }}</el-tag
22
- >
23
- </div>
12
+ <div class="u-group">
13
+ <el-tag
14
+ v-for="item in computedTopics" :key="item"
15
+ @click="onTagClick(item)"
16
+ class="u-group-item u-tag"
17
+ :effect="item === value ? 'dark' : 'plain'"
18
+ >{{ item }}</el-tag
19
+ >
24
20
  </div>
25
21
  </div>
26
22
 
27
23
  <template #reference>
28
- <span @click="onToggle" class="u-toggle" :class="{ active: !!value }">{{ activeText }}</span>
24
+ <span @click="onToggle" class="u-toggle" :class="{ active: !!value }">
25
+ <i class="el-icon-s-operation"></i>
26
+ {{ activeText }}
27
+ <i class="el-icon-arrow-down el-icon--right"></i>
28
+ </span>
29
29
  </template>
30
30
  </el-popover>
31
31
  </div>
@@ -35,9 +35,9 @@
35
35
  export default {
36
36
  name: "tagBy2",
37
37
  props: {
38
- tags: {
39
- type: Object,
40
- default: () => {},
38
+ topics: {
39
+ type: Array,
40
+ default: () => [],
41
41
  },
42
42
  modelValue: {
43
43
  type: String,
@@ -52,23 +52,27 @@ export default {
52
52
  data() {
53
53
  return {
54
54
  visible: false,
55
- value: "",
55
+ value: "全部",
56
56
  };
57
57
  },
58
58
  computed: {
59
59
  activeText() {
60
60
  const { value } = this;
61
- return value ? value : "主题";
61
+ return value === "全部" ? "主题" : value;
62
+ },
63
+ computedTopics() {
64
+ return ['全部', ...this.topics]
62
65
  },
63
66
  },
64
67
  watch: {
65
68
  modelValue: {
66
69
  immediate: true,
67
70
  handler(val) {
68
- this.value = val;
71
+ this.value = val === '' ? '全部' : val;
69
72
  },
70
73
  },
71
74
  value(val) {
75
+ if (val === '全部') val = ''
72
76
  this.$emit("update:modelValue", val);
73
77
  },
74
78
  },