@jx3box/jx3box-common-ui 7.0.3 → 7.0.5
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 +8 -4
- package/package.json +1 -1
- package/src/App.vue +3 -3
- package/src/author/AuthorHonor.vue +13 -15
- package/src/filters/tagBy2.vue +25 -21
package/assets/css/tag-by2.less
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
.w-filter-
|
|
1
|
+
.w-filter-topics {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
.u-toggle {
|
|
4
4
|
color: #606266;
|
|
5
|
-
font-size:
|
|
5
|
+
font-size: 12px;
|
|
6
6
|
.pointer;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.w-filter-
|
|
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
package/src/App.vue
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<LeftSidebar :open="true" :uid="8">
|
|
17
17
|
<LeftSideToggle :mobileOnly="true" />
|
|
18
|
-
<Author :author="author" :uid="
|
|
18
|
+
<Author :author="author" :uid="37" />
|
|
19
19
|
</LeftSidebar>
|
|
20
20
|
|
|
21
21
|
<Main :withoutLeft="false" :withoutRight="false">
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<clientBy type="" />
|
|
67
67
|
<zlpBy />
|
|
68
68
|
|
|
69
|
-
<tagBy2 v-model="tag2" :
|
|
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,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="c-honor" :style="{ backgroundImage: `url(${imgUrl()})` }" v-if="honor">
|
|
2
|
+
<div class="c-author-honor" :style="{ backgroundImage: `url(${imgUrl()})` }" v-if="honor">
|
|
3
3
|
<span :style="{ color: honor.color }">{{ honor.honor }}</span>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -58,31 +58,29 @@ export default {
|
|
|
58
58
|
getHonorStyle(data) {
|
|
59
59
|
getHonorJson().then((res) => {
|
|
60
60
|
let honorList = res.data;
|
|
61
|
-
//过滤称号信息
|
|
62
61
|
let honorConfig = honorList[data.val];
|
|
63
|
-
//正则取出前缀
|
|
64
62
|
let prefix = honorConfig.prefix;
|
|
65
|
-
let regPrefix = honorConfig.prefix.match(
|
|
63
|
+
let regPrefix = honorConfig.prefix.match(/\{([^{}]+?)\}/g);
|
|
66
64
|
let ranking = honorConfig.ranking;
|
|
67
65
|
let honorStr = honorConfig.year || "";
|
|
68
66
|
if (regPrefix) {
|
|
69
|
-
honorStr = honorStr + (data[regPrefix[0]] || "");
|
|
67
|
+
honorStr = honorStr + (data[regPrefix[0].slice(1, -1)] || "");
|
|
70
68
|
} else {
|
|
71
69
|
honorStr = honorStr + prefix;
|
|
72
70
|
}
|
|
73
|
-
//排名处理
|
|
74
71
|
if (ranking.length > 0) {
|
|
75
72
|
data.imgIndex = 0;
|
|
76
73
|
for (let i = 0; i < ranking.length; i++) {
|
|
77
|
-
|
|
78
|
-
if (data.ranking != undefined && inRange(Number(data.ranking), ranking[i][0], ranking[i][1])) {
|
|
74
|
+
if (data.ranking !== undefined && inRange(Number(data.ranking), ranking[i][0], ranking[i][1])) {
|
|
79
75
|
data.imgIndex = i;
|
|
80
76
|
let str = ranking[i][2];
|
|
81
|
-
|
|
82
|
-
let regStr = str.match(/(?<=\{)(.+?)(?=\})/g);
|
|
77
|
+
let regStr = str.match(/\{([^{}]+?)\}/g);
|
|
83
78
|
if (regStr) {
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
honorStr =
|
|
80
|
+
honorStr +
|
|
81
|
+
str.replace(/\{([^{}]+?)\}/g, function (match, p1) {
|
|
82
|
+
return data[p1] || "";
|
|
83
|
+
});
|
|
86
84
|
} else {
|
|
87
85
|
honorStr = honorStr + str;
|
|
88
86
|
}
|
|
@@ -94,7 +92,7 @@ export default {
|
|
|
94
92
|
data.color = honorConfig.color;
|
|
95
93
|
data.ext = honorConfig.ext;
|
|
96
94
|
data.isHave = true;
|
|
97
|
-
data.isImgIndex =
|
|
95
|
+
data.isImgIndex = ranking.length > 0;
|
|
98
96
|
sessionStorage.setItem(HONOR_IMG_KEY + this.uid, JSON.stringify(data));
|
|
99
97
|
this.honor = data;
|
|
100
98
|
});
|
|
@@ -103,14 +101,14 @@ export default {
|
|
|
103
101
|
};
|
|
104
102
|
</script>
|
|
105
103
|
<style lang="less">
|
|
106
|
-
.c-honor {
|
|
104
|
+
.c-author-honor {
|
|
107
105
|
.dbi;
|
|
108
106
|
text-align: center;
|
|
109
107
|
.mb(10px);
|
|
110
108
|
.size(220px,45px);
|
|
111
|
-
// background-color: #494038;
|
|
112
109
|
color: #ffffff;
|
|
113
110
|
.fz(10px,45px);
|
|
114
111
|
.r(2px);
|
|
112
|
+
background-size: 100% 100%;
|
|
115
113
|
}
|
|
116
114
|
</style>
|
package/src/filters/tagBy2.vue
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="w-filter-
|
|
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-
|
|
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
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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 }">
|
|
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
|
-
|
|
39
|
-
type:
|
|
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
|
|
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
|
},
|