@jx3box/jx3box-common-ui 7.0.2 → 7.0.3
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/assets/css/tag-by2.less +19 -0
- package/package.json +3 -3
- package/src/App.vue +8 -0
- package/src/author/AuthorFollow.vue +3 -1
- package/src/filters/tagBy2.vue +106 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.w-filter-tags {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
.u-toggle {
|
|
4
|
+
color: #606266;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
.pointer;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.w-filter-tag__pop {
|
|
11
|
+
.u-group-title {
|
|
12
|
+
color: #606266;
|
|
13
|
+
padding-bottom: 10px;
|
|
14
|
+
}
|
|
15
|
+
.u-tag {
|
|
16
|
+
margin: 0 10px 10px 0;
|
|
17
|
+
.pointer;
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@jx3box/jx3box-comment-ui": "^1.7.8",
|
|
34
|
-
"@jx3box/jx3box-common": "^7.7.
|
|
34
|
+
"@jx3box/jx3box-common": "^7.7.3",
|
|
35
35
|
"@jx3box/jx3box-data": "^3.0.4",
|
|
36
|
-
"@jx3box/jx3box-editor": "^1.7.
|
|
36
|
+
"@jx3box/jx3box-editor": "^1.7.4",
|
|
37
37
|
"axios": "^0.26.1",
|
|
38
38
|
"dayjs": "^1.11.0",
|
|
39
39
|
"element-ui": "^2.13.2",
|
package/src/App.vue
CHANGED
|
@@ -66,6 +66,8 @@
|
|
|
66
66
|
<clientBy type="" />
|
|
67
67
|
<zlpBy />
|
|
68
68
|
|
|
69
|
+
<tagBy2 v-model="tag2" :tags="post_topics" />
|
|
70
|
+
|
|
69
71
|
<hr />
|
|
70
72
|
<uploadImage
|
|
71
73
|
v-model="upload"
|
|
@@ -171,6 +173,7 @@ import orderBy from "./filters/orderBy.vue";
|
|
|
171
173
|
import tagBy from "./filters/tagBy.vue";
|
|
172
174
|
import clientBy from "./filters/clientBy.vue";
|
|
173
175
|
import zlpBy from "./filters/zlpBy.vue";
|
|
176
|
+
import tagBy2 from "./filters/tagBy2.vue";
|
|
174
177
|
|
|
175
178
|
import uploadImage from "./upload/upload_banner.vue";
|
|
176
179
|
import AuthorMedal from "./medal/medal.vue";
|
|
@@ -181,6 +184,7 @@ import WikiComments from "./wiki/WikiComments.vue";
|
|
|
181
184
|
import axios from "axios";
|
|
182
185
|
import { __server } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
183
186
|
import { wiki } from "@jx3box/jx3box-common/js/wiki";
|
|
187
|
+
import post_topics from "@jx3box/jx3box-common/data/post_topics.json";
|
|
184
188
|
|
|
185
189
|
export default {
|
|
186
190
|
name: "App",
|
|
@@ -223,6 +227,7 @@ export default {
|
|
|
223
227
|
tagBy,
|
|
224
228
|
clientBy,
|
|
225
229
|
zlpBy,
|
|
230
|
+
tagBy2,
|
|
226
231
|
|
|
227
232
|
uploadImage,
|
|
228
233
|
AuthorMedal,
|
|
@@ -249,6 +254,9 @@ export default {
|
|
|
249
254
|
|
|
250
255
|
upload: "",
|
|
251
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
|
+
|
|
258
|
+
post_topics,
|
|
259
|
+
tag2: ''
|
|
252
260
|
};
|
|
253
261
|
},
|
|
254
262
|
created: function () {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-filter-tags" ref="tagBy">
|
|
3
|
+
<el-popover
|
|
4
|
+
v-model="visible"
|
|
5
|
+
trigger="manual"
|
|
6
|
+
ref="pop"
|
|
7
|
+
:width="400"
|
|
8
|
+
popper-class="w-filter-tag__pop"
|
|
9
|
+
:popper-options="{ boundariesElement: 'parent' }"
|
|
10
|
+
>
|
|
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>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<template #reference>
|
|
28
|
+
<span @click="onToggle" class="u-toggle" :class="{ active: !!value }">{{ activeText }}</span>
|
|
29
|
+
</template>
|
|
30
|
+
</el-popover>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
export default {
|
|
36
|
+
name: "tagBy2",
|
|
37
|
+
props: {
|
|
38
|
+
tags: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => {},
|
|
41
|
+
},
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: "",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
emits: ["update:modelValue"],
|
|
48
|
+
model: {
|
|
49
|
+
prop: "modelValue",
|
|
50
|
+
event: "update:modelValue",
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
visible: false,
|
|
55
|
+
value: "",
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
computed: {
|
|
59
|
+
activeText() {
|
|
60
|
+
const { value } = this;
|
|
61
|
+
return value ? value : "主题";
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
watch: {
|
|
65
|
+
modelValue: {
|
|
66
|
+
immediate: true,
|
|
67
|
+
handler(val) {
|
|
68
|
+
this.value = val;
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
value(val) {
|
|
72
|
+
this.$emit("update:modelValue", val);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
mounted() {
|
|
76
|
+
document.addEventListener("click", this.clickOutside);
|
|
77
|
+
},
|
|
78
|
+
beforeDestroy() {
|
|
79
|
+
document.removeEventListener("click", this.clickOutside);
|
|
80
|
+
},
|
|
81
|
+
methods: {
|
|
82
|
+
onToggle() {
|
|
83
|
+
this.visible = !this.visible;
|
|
84
|
+
},
|
|
85
|
+
onTagClick(item) {
|
|
86
|
+
this.value = item;
|
|
87
|
+
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
this.visible = false;
|
|
90
|
+
}, 100);
|
|
91
|
+
},
|
|
92
|
+
clickOutside(e) {
|
|
93
|
+
const tagBy = this.$refs.tagBy;
|
|
94
|
+
const pop = this.$refs.pop;
|
|
95
|
+
|
|
96
|
+
if (tagBy && !tagBy.contains(e.target) && pop && !pop.$el.contains(e.target)) {
|
|
97
|
+
this.visible = false;
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style lang="less">
|
|
105
|
+
@import "../../assets/css/tag-by2.less";
|
|
106
|
+
</style>
|