@jx3box/jx3box-vue3-ui 0.9.9 → 0.9.11
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/package.json +2 -2
- package/src/App.vue +3 -0
- package/src/filters/versionBy.vue +49 -0
- package/src/interact/Fav.vue +5 -5
- package/src/interact/Rss.vue +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-vue3-ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"description": "JX3BOX Vue3 UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@element-plus/icons-vue": "^2.1.0",
|
|
29
|
-
"@jx3box/jx3box-common": "^8.
|
|
29
|
+
"@jx3box/jx3box-common": "^8.5.2",
|
|
30
30
|
"@jx3box/jx3box-data": "^3.7.0",
|
|
31
31
|
"@jx3box/jx3box-emotion": "^1.2.8",
|
|
32
32
|
"@jx3box/jx3box-macro": "^1.0.1",
|
package/src/App.vue
CHANGED
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
<ItemSimple :item="item4" :only-icon="true" iconSize="56px" />
|
|
44
44
|
<ItemSimple :item="item5" jx3-client-type="1" only-icon="true" iconSize="56px" />
|
|
45
45
|
<ItemSimple :item="item6" jx3-client-type="2" only-icon="true" iconSize="56px" /> -->
|
|
46
|
+
<versionBy value=""></versionBy>
|
|
46
47
|
<el-divider></el-divider>
|
|
47
48
|
<UploadAlum />
|
|
48
49
|
<!-- <PostHeader :post="post"></PostHeader> -->
|
|
@@ -93,6 +94,7 @@ import post_topics from "@jx3box/jx3box-common/data/post_topics.json";
|
|
|
93
94
|
import { get_item } from "../service/item";
|
|
94
95
|
// import AdminDirectMessage from "./bread/AdminDirectMessage.vue";
|
|
95
96
|
// import Admin from "@/bread/Admin.vue";
|
|
97
|
+
import versionBy from "./filters/versionBy.vue";
|
|
96
98
|
export default {
|
|
97
99
|
name: "App",
|
|
98
100
|
components: {
|
|
@@ -105,6 +107,7 @@ export default {
|
|
|
105
107
|
UploadAlum,
|
|
106
108
|
// AdminDirectMessage,
|
|
107
109
|
singlebox,
|
|
110
|
+
versionBy,
|
|
108
111
|
// Admin,
|
|
109
112
|
},
|
|
110
113
|
data() {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-filter-client">
|
|
3
|
+
<ul>
|
|
4
|
+
<li class="u-client" :class="{on: version == ''}" @click="filter('')">
|
|
5
|
+
双端
|
|
6
|
+
</li>
|
|
7
|
+
<li
|
|
8
|
+
class="u-client"
|
|
9
|
+
:class="{ on: version == value }"
|
|
10
|
+
v-for="(label, value) in versions"
|
|
11
|
+
:key="value"
|
|
12
|
+
@click="filter(value)"
|
|
13
|
+
>{{ label }}</li>
|
|
14
|
+
</ul>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
export default {
|
|
20
|
+
name: "versionBy",
|
|
21
|
+
props: ["value"],
|
|
22
|
+
emits: ["filter"],
|
|
23
|
+
data: function () {
|
|
24
|
+
return {
|
|
25
|
+
version: this.value || "",
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
versions: function () {
|
|
30
|
+
const versions = {
|
|
31
|
+
0: "旗舰",
|
|
32
|
+
1: "无界"
|
|
33
|
+
}
|
|
34
|
+
return versions;
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
filter: function (val) {
|
|
39
|
+
this.version = val;
|
|
40
|
+
this.$emit("filter", { type: "version", val: val });
|
|
41
|
+
this.$forceUpdate();
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="less">
|
|
48
|
+
@import "../../assets/css/client-by.less";
|
|
49
|
+
</style>
|
package/src/interact/Fav.vue
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div class="w-fav2" :class="{ disabled: favorite }" @click="doFav">
|
|
3
3
|
<el-tooltip effect="dark" :content="favContent" placement="top-start">
|
|
4
4
|
<div class="w-fav2_content">
|
|
5
|
-
<img v-if="favorite" class="u-icon" svg-inline src="
|
|
6
|
-
<img v-else class="u-icon" svg-inline src="
|
|
5
|
+
<img v-if="favorite" class="u-icon" svg-inline :src="unstarIcon" />
|
|
6
|
+
<img v-else class="u-icon" svg-inline :src="starIcon" />
|
|
7
7
|
<span class="u-count" v-if="!hiddenNum && total">{{ total }}</span>
|
|
8
8
|
</div>
|
|
9
9
|
</el-tooltip>
|
|
@@ -16,7 +16,7 @@ import { hasFav, addFav, delFav } from "../../service/fav";
|
|
|
16
16
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
17
17
|
export default {
|
|
18
18
|
name: "FavoriteComp",
|
|
19
|
-
props: ["postType", "postId", "postTitle", "hiddenNum"],
|
|
19
|
+
props: ["postType", "postId", "postTitle", "hiddenNum", "isOld"],
|
|
20
20
|
data: function () {
|
|
21
21
|
return {
|
|
22
22
|
login: User.isLogin(),
|
|
@@ -29,10 +29,10 @@ export default {
|
|
|
29
29
|
return this.favorite ? "已收藏" : "收藏";
|
|
30
30
|
},
|
|
31
31
|
starIcon() {
|
|
32
|
-
return JX3BOX.__cdn + "design/vector/icon/collect.svg"
|
|
32
|
+
return this.isOld ? require("../../assets/img/widget/star.svg") : JX3BOX.__cdn + "design/vector/icon/collect.svg"
|
|
33
33
|
},
|
|
34
34
|
unstarIcon() {
|
|
35
|
-
return JX3BOX.__cdn + "design/vector/icon/uncollect.svg"
|
|
35
|
+
return this.isOld ? require("../../assets/img/widget/unstar.svg") : JX3BOX.__cdn + "design/vector/icon/uncollect.svg"
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
methods: {
|