@jx3box/jx3box-common-ui 7.0.4 → 7.0.6
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/index.js +3 -1
- package/package.json +3 -3
- package/src/App.vue +4 -4
- package/src/author/AuthorFans.vue +2 -2
- package/src/author/AuthorFollow.vue +20 -27
- package/src/author/AuthorGift.vue +8 -9
- package/src/author/AuthorHonor.vue +13 -15
- package/src/filters/{tagBy2.vue → topicBy.vue} +45 -10
- package/assets/css/tag-by2.less +0 -23
package/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import orderBy from "./src/filters/orderBy.vue";
|
|
|
27
27
|
import menuBy from "./src/filters/menuBy.vue";
|
|
28
28
|
import clientBy from "./src/filters/clientBy.vue";
|
|
29
29
|
import zlpBy from "./src/filters/zlpBy.vue";
|
|
30
|
+
import topicBy from "./src/filters/topicBy.vue";
|
|
30
31
|
|
|
31
32
|
import Thx from './src/single/Thx.vue'
|
|
32
33
|
import WikiPanel from './src/wiki/WikiPanel.vue'
|
|
@@ -46,7 +47,7 @@ const components = {
|
|
|
46
47
|
RightSideMsg,
|
|
47
48
|
Author,
|
|
48
49
|
Avatar,
|
|
49
|
-
|
|
50
|
+
|
|
50
51
|
Thx,
|
|
51
52
|
Like,
|
|
52
53
|
Down,
|
|
@@ -63,6 +64,7 @@ const components = {
|
|
|
63
64
|
menuBy,
|
|
64
65
|
clientBy,
|
|
65
66
|
zlpBy,
|
|
67
|
+
topicBy,
|
|
66
68
|
|
|
67
69
|
WikiPanel,
|
|
68
70
|
}
|
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.6",
|
|
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.4",
|
|
35
35
|
"@jx3box/jx3box-data": "^3.0.4",
|
|
36
|
-
"@jx3box/jx3box-editor": "^1.7.
|
|
36
|
+
"@jx3box/jx3box-editor": "^1.7.5",
|
|
37
37
|
"axios": "^0.26.1",
|
|
38
38
|
"dayjs": "^1.11.0",
|
|
39
39
|
"element-ui": "^2.13.2",
|
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
|
-
<
|
|
69
|
+
<topicBy v-model="tag2" :topics="post_topics" />
|
|
70
70
|
|
|
71
71
|
<hr />
|
|
72
72
|
<uploadImage
|
|
@@ -173,7 +173,7 @@ import orderBy from "./filters/orderBy.vue";
|
|
|
173
173
|
import tagBy from "./filters/tagBy.vue";
|
|
174
174
|
import clientBy from "./filters/clientBy.vue";
|
|
175
175
|
import zlpBy from "./filters/zlpBy.vue";
|
|
176
|
-
import
|
|
176
|
+
import topicBy from "./filters/topicBy.vue";
|
|
177
177
|
|
|
178
178
|
import uploadImage from "./upload/upload_banner.vue";
|
|
179
179
|
import AuthorMedal from "./medal/medal.vue";
|
|
@@ -227,7 +227,7 @@ export default {
|
|
|
227
227
|
tagBy,
|
|
228
228
|
clientBy,
|
|
229
229
|
zlpBy,
|
|
230
|
-
|
|
230
|
+
topicBy,
|
|
231
231
|
|
|
232
232
|
uploadImage,
|
|
233
233
|
AuthorMedal,
|
|
@@ -6,14 +6,12 @@
|
|
|
6
6
|
:class="{ 'is-follow': isFollow, 'u-fans-box': isSelf }"
|
|
7
7
|
size="mini"
|
|
8
8
|
plain
|
|
9
|
-
|
|
9
|
+
icon="el-icon-plus"
|
|
10
10
|
@click="follow"
|
|
11
11
|
:loading="loading"
|
|
12
12
|
:disabled="isSelf"
|
|
13
|
+
>{{ btnText }}</el-button
|
|
13
14
|
>
|
|
14
|
-
{{ btnText }}
|
|
15
|
-
<!-- <span class="u-follow-count">{{ formatFansNum(fansNum) }} </span> -->
|
|
16
|
-
</el-button>
|
|
17
15
|
<el-popover
|
|
18
16
|
v-else
|
|
19
17
|
placement="bottom"
|
|
@@ -26,11 +24,9 @@
|
|
|
26
24
|
{{ item.label }}
|
|
27
25
|
</div>
|
|
28
26
|
</div>
|
|
29
|
-
<el-button class="u-trigger" size="mini" :type="btnType" slot="reference"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<!-- <span class="u-follow-count">{{ formatFansNum(fansNum) }}</span> -->
|
|
33
|
-
</el-button>
|
|
27
|
+
<el-button class="u-trigger" size="mini" :type="btnType" plain slot="reference" icon="el-icon-check">{{
|
|
28
|
+
btnText
|
|
29
|
+
}}</el-button>
|
|
34
30
|
</el-popover>
|
|
35
31
|
</div>
|
|
36
32
|
</template>
|
|
@@ -55,10 +51,7 @@ export default {
|
|
|
55
51
|
},
|
|
56
52
|
computed: {
|
|
57
53
|
btnText() {
|
|
58
|
-
return this.isFollow ? "
|
|
59
|
-
},
|
|
60
|
-
btnIcon() {
|
|
61
|
-
return this.isSelf ? "el-icon-plus" : this.isFollow ? "" : "el-icon-plus";
|
|
54
|
+
return this.isFollow ? "已粉" : "关注";
|
|
62
55
|
},
|
|
63
56
|
btnType() {
|
|
64
57
|
return this.isFollow ? "info" : "warning";
|
|
@@ -158,9 +151,9 @@ export default {
|
|
|
158
151
|
cursor: default;
|
|
159
152
|
&:hover {
|
|
160
153
|
cursor: pointer;
|
|
161
|
-
background:
|
|
154
|
+
background-color: @light-pink;
|
|
162
155
|
color: #fff;
|
|
163
|
-
border-color:
|
|
156
|
+
border-color: darken(@light-pink, 2%);
|
|
164
157
|
}
|
|
165
158
|
}
|
|
166
159
|
|
|
@@ -178,21 +171,21 @@ export default {
|
|
|
178
171
|
}
|
|
179
172
|
.c-author-follow-popover {
|
|
180
173
|
//.u-follow-popover {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
174
|
+
&.el-popover {
|
|
175
|
+
min-width: 100px;
|
|
176
|
+
padding: 0;
|
|
177
|
+
margin-top: 5px;
|
|
178
|
+
.u-action-list {
|
|
179
|
+
.u-action-item {
|
|
180
|
+
text-align: center;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
padding: 8px 10px;
|
|
183
|
+
&:hover {
|
|
184
|
+
background: rgb(248, 248, 251);
|
|
193
185
|
}
|
|
194
186
|
}
|
|
195
187
|
}
|
|
188
|
+
}
|
|
196
189
|
//}
|
|
197
190
|
.u-follow-count {
|
|
198
191
|
margin-left: 5px;
|
|
@@ -69,7 +69,7 @@ export default {
|
|
|
69
69
|
return {
|
|
70
70
|
loading: false,
|
|
71
71
|
visible: false,
|
|
72
|
-
fitPoints: [50,100, 250, 520, 666, 888, 1314, 2288, 3344, 6666, 8888, 28888, 36888, 68888],
|
|
72
|
+
fitPoints: [50, 100, 250, 520, 666, 888, 1314, 2288, 3344, 6666, 8888, 28888, 36888, 68888],
|
|
73
73
|
|
|
74
74
|
left: 0, //剩余量
|
|
75
75
|
status: true, //默认可打赏
|
|
@@ -201,16 +201,15 @@ export default {
|
|
|
201
201
|
<style scoped lang="less">
|
|
202
202
|
.c-author-gift {
|
|
203
203
|
.u-btn {
|
|
204
|
-
@color: #f9afd4;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
color: darken(@color, 10%);
|
|
208
|
-
border-color: darken(@color, 10%);
|
|
204
|
+
// @color: #f9afd4;
|
|
205
|
+
// background-color: #fff;
|
|
206
|
+
// color: darken(@color, 10%);
|
|
207
|
+
// border-color: darken(@color, 10%);
|
|
209
208
|
|
|
210
209
|
&:hover {
|
|
211
|
-
background-color: @
|
|
210
|
+
background-color: @light-pink;
|
|
212
211
|
color: #fff;
|
|
213
|
-
border-color: darken(@
|
|
212
|
+
border-color: darken(@light-pink, 2%);
|
|
214
213
|
}
|
|
215
214
|
|
|
216
215
|
&.is-disabled {
|
|
@@ -246,7 +245,7 @@ export default {
|
|
|
246
245
|
.y;
|
|
247
246
|
vertical-align: text-bottom;
|
|
248
247
|
}
|
|
249
|
-
.u-charge{
|
|
248
|
+
.u-charge {
|
|
250
249
|
.ml(8px);
|
|
251
250
|
}
|
|
252
251
|
.el-progress {
|
|
@@ -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>
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="w-filter-
|
|
2
|
+
<div class="w-filter-topic" ref="tagBy">
|
|
3
3
|
<el-popover
|
|
4
4
|
v-model="visible"
|
|
5
5
|
trigger="manual"
|
|
6
6
|
ref="pop"
|
|
7
|
-
:width="
|
|
7
|
+
:width="380"
|
|
8
8
|
popper-class="w-filter-topic__pop"
|
|
9
9
|
:popper-options="{ boundariesElement: 'parent' }"
|
|
10
10
|
>
|
|
11
|
-
<div class="w-filter-
|
|
11
|
+
<div class="w-filter-topic__content">
|
|
12
12
|
<div class="u-group">
|
|
13
13
|
<el-tag
|
|
14
|
-
v-for="item in computedTopics"
|
|
14
|
+
v-for="item in computedTopics"
|
|
15
|
+
:key="item"
|
|
15
16
|
@click="onTagClick(item)"
|
|
16
|
-
class="u-group-item u-
|
|
17
|
-
:effect="item === value ? 'dark' : '
|
|
17
|
+
class="u-group-item u-topic"
|
|
18
|
+
:effect="item === value ? 'dark' : 'light'"
|
|
19
|
+
size="small"
|
|
18
20
|
>{{ item }}</el-tag
|
|
19
21
|
>
|
|
20
22
|
</div>
|
|
@@ -61,18 +63,18 @@ export default {
|
|
|
61
63
|
return value === "全部" ? "主题" : value;
|
|
62
64
|
},
|
|
63
65
|
computedTopics() {
|
|
64
|
-
return [
|
|
66
|
+
return ["全部", ...this.topics];
|
|
65
67
|
},
|
|
66
68
|
},
|
|
67
69
|
watch: {
|
|
68
70
|
modelValue: {
|
|
69
71
|
immediate: true,
|
|
70
72
|
handler(val) {
|
|
71
|
-
this.value = val ===
|
|
73
|
+
this.value = val === "" ? "全部" : val;
|
|
72
74
|
},
|
|
73
75
|
},
|
|
74
76
|
value(val) {
|
|
75
|
-
if (val ===
|
|
77
|
+
if (val === "全部") val = "";
|
|
76
78
|
this.$emit("update:modelValue", val);
|
|
77
79
|
},
|
|
78
80
|
},
|
|
@@ -106,5 +108,38 @@ export default {
|
|
|
106
108
|
</script>
|
|
107
109
|
|
|
108
110
|
<style lang="less">
|
|
109
|
-
|
|
111
|
+
.w-filter-topic {
|
|
112
|
+
display: inline-block;
|
|
113
|
+
.u-toggle {
|
|
114
|
+
color: #606266;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
.pointer;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
.w-filter-topic__content {
|
|
120
|
+
padding: 5px;
|
|
121
|
+
}
|
|
122
|
+
.w-filter-topic__pop {
|
|
123
|
+
.u-group-title {
|
|
124
|
+
color: #606266;
|
|
125
|
+
padding-bottom: 10px;
|
|
126
|
+
}
|
|
127
|
+
.u-group {
|
|
128
|
+
.flex;
|
|
129
|
+
flex-wrap: wrap;
|
|
130
|
+
gap: 10px;
|
|
131
|
+
}
|
|
132
|
+
.u-topic {
|
|
133
|
+
.pointer;
|
|
134
|
+
border: 1px solid transparent;
|
|
135
|
+
line-height: 26px;
|
|
136
|
+
height: 28px;
|
|
137
|
+
&:not(.el-tag--dark) {
|
|
138
|
+
background-color: #f1f8ff;
|
|
139
|
+
}
|
|
140
|
+
&:hover {
|
|
141
|
+
border: 1px solid @color-link;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
110
145
|
</style>
|
package/assets/css/tag-by2.less
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.w-filter-topics {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
.u-toggle {
|
|
4
|
-
color: #606266;
|
|
5
|
-
font-size: 12px;
|
|
6
|
-
.pointer;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.w-filter-topic__pop {
|
|
11
|
-
.u-group-title {
|
|
12
|
-
color: #606266;
|
|
13
|
-
padding-bottom: 10px;
|
|
14
|
-
}
|
|
15
|
-
.u-group {
|
|
16
|
-
.flex;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
gap: 10px;
|
|
19
|
-
}
|
|
20
|
-
.u-tag {
|
|
21
|
-
.pointer;
|
|
22
|
-
}
|
|
23
|
-
}
|