@jx3box/jx3box-vue3-ui 0.8.8 → 0.8.10
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/.eslintrc +4 -6
- package/assets/js/combo.js +1 -2
- package/assets/js/filter2.js +3 -3
- package/assets/js/item/border.js +5 -5
- package/assets/js/item/border_quest.js +2 -1
- package/assets/js/item/icon_url.js +2 -1
- package/assets/js/stat.js +1 -1
- package/package.json +2 -2
- package/service/author.js +6 -6
- package/service/database.js +1 -1
- package/service/enum/EquipPosition.js +39 -39
- package/service/enum/EquipType.js +30 -30
- package/src/author/AuthorLink.vue +5 -1
- package/src/editor/Article.vue +0 -1
- package/src/editor/BoxResource.vue +2 -1
- package/src/editor/Resource.vue +22 -19
- package/src/editor/Tinymce.vue +2 -1
- package/src/editor/Upload.vue +2 -1
- package/src/editor/UploadAlum.vue +3 -2
- package/src/editor/components/Author.vue +3 -1
- package/src/editor/components/Avatar.vue +2 -1
- package/src/editor/components/Equip.vue +2 -1
- package/src/header/Nav.vue +14 -12
- package/src/single/PostHeader.vue +18 -10
- package/src/single/cms-single.vue +7 -5
- package/vue.config.js +1 -0
package/.eslintrc
CHANGED
|
@@ -4,20 +4,18 @@
|
|
|
4
4
|
"node": true
|
|
5
5
|
},
|
|
6
6
|
"parser": "vue-eslint-parser",
|
|
7
|
-
"extends": [
|
|
8
|
-
"plugin:vue/vue3-essential",
|
|
9
|
-
"eslint:recommended"
|
|
10
|
-
],
|
|
7
|
+
"extends": ["plugin:vue/vue3-essential", "eslint:recommended"],
|
|
11
8
|
"rules": {
|
|
12
9
|
"vue/multi-word-component-names": [
|
|
13
10
|
"error",
|
|
14
11
|
{
|
|
15
12
|
"ignores": ["Item"]
|
|
16
13
|
}
|
|
17
|
-
]
|
|
14
|
+
],
|
|
15
|
+
"no-useless-escape": "off"
|
|
18
16
|
},
|
|
19
17
|
"globals": {
|
|
20
18
|
"defineOptions": "writable",
|
|
21
19
|
"tinyMCE": true
|
|
22
20
|
}
|
|
23
|
-
}
|
|
21
|
+
}
|
package/assets/js/combo.js
CHANGED
package/assets/js/filter2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//对数据库查询的desc字段进行数据加工
|
|
2
|
-
|
|
2
|
+
import {JX3BOX} from '@jx3box/jx3box-common';
|
|
3
3
|
let $ = jQuery
|
|
4
4
|
|
|
5
5
|
//技能过滤器
|
|
@@ -33,7 +33,7 @@ async function filterBySub(desc){
|
|
|
33
33
|
let reg = new RegExp(/\<SUB (\d+?) (\d)\>/g)
|
|
34
34
|
let subreg = new RegExp(/\<SUB (\d+?) (\d)\>/)
|
|
35
35
|
let hasMatched = reg.test(desc)
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
if(hasMatched){
|
|
38
38
|
let arr = desc.match(reg)
|
|
39
39
|
for(let i=0;i<arr.length;i++){
|
|
@@ -135,7 +135,7 @@ async function itemFilter(desc){
|
|
|
135
135
|
desc = desc.replace(/<\/text>/g,'')
|
|
136
136
|
desc = desc.replace(/font=\d+/g,'')
|
|
137
137
|
desc = desc.replace(/"/g,'')
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
//处理buff描述
|
|
140
140
|
desc = await filterByBuffDesc(desc)
|
|
141
141
|
|
package/assets/js/item/border.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* border
|
|
3
3
|
* @param {*} item 物品对象
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
6
|
+
const { __imgPath } = JX3BOX;
|
|
6
7
|
|
|
7
8
|
export default (item) => {
|
|
8
9
|
switch (item.Quality) {
|
|
@@ -10,10 +11,9 @@ export default (item) => {
|
|
|
10
11
|
return `url(${__imgPath}image/item/blue.png)`;
|
|
11
12
|
case 4:
|
|
12
13
|
return `url(${__imgPath}image/item/purple.png)`;
|
|
13
|
-
case 5
|
|
14
|
+
case 5:
|
|
14
15
|
return `url(${__imgPath}image/item/orange.gif)`;
|
|
15
16
|
default:
|
|
16
|
-
return
|
|
17
|
+
return "";
|
|
17
18
|
}
|
|
18
|
-
}
|
|
19
|
-
|
|
19
|
+
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* border_quest
|
|
3
3
|
* @param {*} item 物品对象
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
6
|
+
const { __imgPath } = JX3BOX;
|
|
6
7
|
|
|
7
8
|
export default (item) => {
|
|
8
9
|
if (item.IsQuest > 0) return `url(${__imgPath}image/item/renwu.png)`;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {*} icon_id IconID
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
7
|
+
const { __imgPath, __iconPath } = JX3BOX;
|
|
7
8
|
|
|
8
9
|
export default (icon_id) => {
|
|
9
10
|
if (isNaN(parseInt(icon_id))) {
|
package/assets/js/stat.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-vue3-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.10",
|
|
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.2.
|
|
29
|
+
"@jx3box/jx3box-common": "^8.2.24",
|
|
30
30
|
"@jx3box/jx3box-data": "^3.6.0",
|
|
31
31
|
"@jx3box/jx3box-emotion": "^1.2.8",
|
|
32
32
|
"@jx3box/jx3box-macro": "^1.0.1",
|
package/service/author.js
CHANGED
|
@@ -34,12 +34,12 @@ async function getDouyu(ids) {
|
|
|
34
34
|
return res.data.data;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
async function getUserMedals(uid) {
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
async function getUserMedals(uid) {
|
|
38
|
+
return $cms({ mute: true })
|
|
39
|
+
.get("/api/cms/user/medal/" + uid)
|
|
40
|
+
.then((res) => {
|
|
41
|
+
return res.data.data;
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function getFrames() {
|
package/service/database.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
|
|
2
|
+
import { __node, __helperUrl } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
3
3
|
import { $node } from "@jx3box/jx3box-common/js/https_v2";
|
|
4
4
|
|
|
5
5
|
function loadResource(type, query, params) {
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 获取装备部位信息
|
|
3
3
|
*/
|
|
4
|
-
import EquipType from
|
|
4
|
+
import EquipType from "./EquipType";
|
|
5
5
|
|
|
6
6
|
const EquipPosition = Object.freeze({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
HELM: EquipType.HELM, // 帽子
|
|
8
|
+
CHEST: EquipType.CHEST, // 上衣
|
|
9
|
+
WAIST: EquipType.WAIST, // 腰带
|
|
10
|
+
BANGLE: EquipType.BANGLE, // 护腕
|
|
11
|
+
PANTS: EquipType.PANTS, // 下装
|
|
12
|
+
BOOTS: EquipType.BOOTS, // 鞋子
|
|
13
|
+
AMULET: EquipType.AMULET, // 项链
|
|
14
|
+
PENDANT: EquipType.PENDANT, // 腰坠
|
|
15
|
+
RING_1: `${EquipType.RING}_1`, // 戒指1
|
|
16
|
+
RING_2: `${EquipType.RING}_2`, // 戒指2
|
|
17
|
+
MELEE_WEAPON: EquipType.MELEE_WEAPON, // 近身武器
|
|
18
|
+
RANGE_WEAPON: EquipType.RANGE_WEAPON, // 远程武器
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
all() {
|
|
21
|
+
// 部位配置信息
|
|
22
|
+
let positions = [
|
|
23
|
+
{ type: this.MELEE_WEAPON, label: "武器", AucGenre: 1 },
|
|
24
|
+
{ type: this.RANGE_WEAPON, label: "暗器", AucGenre: 2 },
|
|
25
|
+
{ type: this.HELM, label: "帽子", AucGenre: 3, AucSubType: 2 },
|
|
26
|
+
{ type: this.CHEST, label: "上衣", AucGenre: 3, AucSubType: 1 },
|
|
27
|
+
{ type: this.WAIST, label: "腰带", AucGenre: 3, AucSubType: 3 },
|
|
28
|
+
{ type: this.BANGLE, label: "护腕", AucGenre: 3, AucSubType: 6 },
|
|
29
|
+
{ type: this.PANTS, label: "下装", AucGenre: 3, AucSubType: 4 },
|
|
30
|
+
{ type: this.BOOTS, label: "鞋子", AucGenre: 3, AucSubType: 5 },
|
|
31
|
+
{ type: this.AMULET, label: "项链", AucGenre: 4, AucSubType: 1 },
|
|
32
|
+
{ type: this.PENDANT, label: "腰坠", AucGenre: 4, AucSubType: 3 },
|
|
33
|
+
{ type: this.RING_1, label: "戒指", AucGenre: 4, AucSubType: 2 },
|
|
34
|
+
{ type: this.RING_2, label: "戒指", AucGenre: 4, AucSubType: 2 },
|
|
35
|
+
];
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
// 重置键名
|
|
38
|
+
let output = {};
|
|
39
|
+
for (let i in positions) {
|
|
40
|
+
let position = positions[i];
|
|
41
|
+
output[position.type] = position;
|
|
42
|
+
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
})
|
|
44
|
+
return output;
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
47
|
|
|
48
|
-
export default EquipPosition;
|
|
48
|
+
export default EquipPosition;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
const EquipType = Object.freeze({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
HELM: "helm", // 帽子
|
|
3
|
+
CHEST: "chest", // 上衣
|
|
4
|
+
WAIST: "waist", // 腰带
|
|
5
|
+
BANGLE: "bangle", // 护腕
|
|
6
|
+
PANTS: "pants", // 下装
|
|
7
|
+
BOOTS: "boots", // 鞋子
|
|
8
|
+
AMULET: "amulet", // 项链
|
|
9
|
+
PENDANT: "pendant", // 腰坠
|
|
10
|
+
RING: "ring", // 戒指
|
|
11
|
+
MELEE_WEAPON: "melee_weapon", // 近身武器
|
|
12
|
+
RANGE_WEAPON: "range_weapon", // 远程武器
|
|
13
|
+
AMMO_POUCH: "ammo_pouch", // 暗器弹药
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
15
|
+
all() {
|
|
16
|
+
return [
|
|
17
|
+
this.HELM,
|
|
18
|
+
this.CHEST,
|
|
19
|
+
this.WAIST,
|
|
20
|
+
this.BANGLE,
|
|
21
|
+
this.PANTS,
|
|
22
|
+
this.BOOTS,
|
|
23
|
+
this.AMULET,
|
|
24
|
+
this.PENDANT,
|
|
25
|
+
this.RING,
|
|
26
|
+
this.MELEE_WEAPON,
|
|
27
|
+
this.RANGE_WEAPON,
|
|
28
|
+
this.AMMO_POUCH,
|
|
29
|
+
];
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
32
|
|
|
33
|
-
export default EquipType;
|
|
33
|
+
export default EquipType;
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<script>
|
|
36
36
|
import * as utilModule from "@jx3box/jx3box-common/js/utils";
|
|
37
37
|
const { tvLink } = utilModule;
|
|
38
|
+
|
|
38
39
|
export default {
|
|
39
40
|
name: "AuthorLink",
|
|
40
41
|
props: ["data"],
|
|
@@ -61,8 +62,11 @@ export default {
|
|
|
61
62
|
return "https://github.com/" + val;
|
|
62
63
|
},
|
|
63
64
|
getIcon: function (val) {
|
|
65
|
+
console.log(process.env);
|
|
64
66
|
// return __imgPath + "image/author/" + val + ".svg";
|
|
65
|
-
|
|
67
|
+
const img = require("../../assets/img/author/" + val + ".svg");
|
|
68
|
+
console.log(img)
|
|
69
|
+
return img;
|
|
66
70
|
},
|
|
67
71
|
},
|
|
68
72
|
created: function () {},
|
package/src/editor/Article.vue
CHANGED
|
@@ -155,9 +155,10 @@
|
|
|
155
155
|
import { loadStat } from "../../service/database";
|
|
156
156
|
import { loadAuthors, loadEmotions } from "../../service/cms";
|
|
157
157
|
import { getUserInfo } from "../../service/author";
|
|
158
|
-
|
|
158
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
159
159
|
import { getLink, showAvatar, resolveImagePath } from "@jx3box/jx3box-common/js/utils";
|
|
160
160
|
import User from "@jx3box/jx3box-common/js/user";
|
|
161
|
+
const { __Root, __OriginRoot, __imgPath } = JX3BOX;
|
|
161
162
|
|
|
162
163
|
// import ComboVue from "./components/Combo.vue";
|
|
163
164
|
export default {
|
package/src/editor/Resource.vue
CHANGED
|
@@ -145,24 +145,24 @@
|
|
|
145
145
|
v-for="(o, i) in item"
|
|
146
146
|
:key="i"
|
|
147
147
|
>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
<template #reference>
|
|
149
|
+
<li
|
|
150
|
+
class="u-item"
|
|
151
|
+
:class="{ on: o.isSelected }"
|
|
152
|
+
@click="selectItem(o, i)"
|
|
153
|
+
ref="item"
|
|
154
|
+
>
|
|
155
|
+
<span class="u-id">ID:{{ o.id }}</span>
|
|
156
|
+
<img class="u-pic" :title="'IconID:' + o.IconID" :src="iconURL(o.IconID)" />
|
|
157
|
+
<span class="u-name">{{ o.Name }}</span>
|
|
158
|
+
<span class="u-content">
|
|
159
|
+
<game-text :text="o.Desc"></game-text>
|
|
160
|
+
</span>
|
|
161
|
+
<span class="u-remark">
|
|
162
|
+
{{ o.Requirement }}
|
|
163
|
+
</span>
|
|
164
|
+
</li>
|
|
165
|
+
</template>
|
|
166
166
|
|
|
167
167
|
<jx3-item :item_id="o.id" :client="client"></jx3-item>
|
|
168
168
|
</el-popover>
|
|
@@ -282,12 +282,15 @@
|
|
|
282
282
|
<script>
|
|
283
283
|
import { loadResource, loadStat, getIcons } from "../../service/database";
|
|
284
284
|
import { loadEmotions } from "../../service/cms";
|
|
285
|
-
|
|
285
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
286
286
|
import detach_types from "../../assets/data/detach_type.json";
|
|
287
287
|
import { iconLink, getLink, showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
288
288
|
import GameText from "./components/GameText.vue";
|
|
289
289
|
import User from "@jx3box/jx3box-common/js/user";
|
|
290
290
|
import Item from "./components/Item.vue";
|
|
291
|
+
|
|
292
|
+
const { __iconPath, __Root, __OriginRoot } = JX3BOX;
|
|
293
|
+
|
|
291
294
|
export default {
|
|
292
295
|
name: "ResourceDialog",
|
|
293
296
|
props: {
|
package/src/editor/Tinymce.vue
CHANGED
|
@@ -33,9 +33,10 @@ import Editor from "@tinymce/tinymce-vue";
|
|
|
33
33
|
import Upload from "./Upload.vue";
|
|
34
34
|
import Resource from "./Resource.vue";
|
|
35
35
|
import BoxResource from "./BoxResource.vue";
|
|
36
|
-
|
|
36
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
37
37
|
import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue"
|
|
38
38
|
import hljs_languages from "../../assets/js/item/hljs_languages.js"
|
|
39
|
+
const { __cms, __imgPath } = JX3BOX;
|
|
39
40
|
const API_Root = process.env.NODE_ENV === "production" ? __cms : "/";
|
|
40
41
|
const API = API_Root + "api/cms/upload/tinymce";
|
|
41
42
|
|
package/src/editor/Upload.vue
CHANGED
|
@@ -76,7 +76,8 @@
|
|
|
76
76
|
<script>
|
|
77
77
|
import axios from "axios";
|
|
78
78
|
import { cloneDeep } from "lodash";
|
|
79
|
-
|
|
79
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
80
|
+
const { __cms } = JX3BOX;
|
|
80
81
|
const API_Root = process.env.NODE_ENV === "production" ? __cms : "/";
|
|
81
82
|
const API = API_Root + "api/cms/upload";
|
|
82
83
|
const imgtypes = ["jpg", "png", "gif", "bmp", "webp", "jpeg", "JPG", "PNG", "GIF", "BMP", "WEBP", "JPEG"];
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
24
|
import draggable from "vuedraggable";
|
|
25
|
-
|
|
25
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
26
26
|
import Upload from "./Upload.vue";
|
|
27
|
+
const { getThumbnail } = JX3BOX;
|
|
27
28
|
|
|
28
29
|
export default {
|
|
29
30
|
name: "UploadAlum",
|
|
@@ -79,7 +80,7 @@ export default {
|
|
|
79
80
|
},
|
|
80
81
|
deleteHandle: function (row) {
|
|
81
82
|
this.imgList= this.imgList.filter(item=>item !== row);
|
|
82
|
-
},
|
|
83
|
+
},
|
|
83
84
|
showThumbnail(val) {
|
|
84
85
|
return getThumbnail(val, 146);
|
|
85
86
|
},
|
|
@@ -60,10 +60,12 @@
|
|
|
60
60
|
import { authorLink, getLink, getThumbnail } from "@jx3box/jx3box-common/js/utils";
|
|
61
61
|
import { getUserInfo, getUserMedals, getUserPublicTeams } from "../../../service/author";
|
|
62
62
|
import { getDecoration, getDecorationJson } from "../../../service/cms";
|
|
63
|
-
|
|
63
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
64
64
|
import User from "@jx3box/jx3box-common/js/user";
|
|
65
65
|
import Avatar from "./Avatar.vue";
|
|
66
66
|
import medal from "./Medal.vue";
|
|
67
|
+
const { __imgPath, __userLevelColor } = JX3BOX;
|
|
68
|
+
|
|
67
69
|
const ATCARD_KEY = "decoration_atcard";
|
|
68
70
|
const DECORATION_JSON = "decoration_json";
|
|
69
71
|
const DECORATION_KEY = "decoration_me";
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
|
|
12
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
13
|
+
const { __imgPath } = JX3BOX;
|
|
13
14
|
import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
|
|
14
15
|
export default {
|
|
15
16
|
name: "AvatarComponent",
|
|
@@ -45,7 +45,8 @@ const { authorLink } = utilModule;
|
|
|
45
45
|
import QRcode from "@jx3box/jx3box-common-ui/src/interact/QRcode.vue";
|
|
46
46
|
import { showTime } from "@jx3box/jx3box-common/js/moment.js";
|
|
47
47
|
import { get_plan } from "../../../service/item.js";
|
|
48
|
-
|
|
48
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
49
|
+
const { __Root } = JX3BOX;
|
|
49
50
|
export default {
|
|
50
51
|
name: "EquipComponent",
|
|
51
52
|
props: ["data", "id"],
|
package/src/header/Nav.vue
CHANGED
|
@@ -126,21 +126,22 @@
|
|
|
126
126
|
</template>
|
|
127
127
|
|
|
128
128
|
<script>
|
|
129
|
+
import { cloneDeep } from "lodash";
|
|
129
130
|
import default_nav from "../../assets/data/nav.json";
|
|
130
131
|
import { getMenu } from "../../service/header";
|
|
131
132
|
import { trimSlash } from "../../utils";
|
|
132
133
|
|
|
133
134
|
const activeNav = {
|
|
134
|
-
index: [
|
|
135
|
-
macro: [
|
|
136
|
-
tool: [
|
|
137
|
-
bps: [
|
|
138
|
-
fb: [
|
|
139
|
-
cj: [
|
|
140
|
-
pvx: [
|
|
141
|
-
bbs: [
|
|
142
|
-
pvp: [
|
|
143
|
-
}
|
|
135
|
+
index: ["index"],
|
|
136
|
+
macro: ["macro", "pz"],
|
|
137
|
+
tool: ["app", "jx3dat", "dbm"],
|
|
138
|
+
bps: ["bps", "jcl", "battle"],
|
|
139
|
+
fb: ["fb", "baizhan", "team", "jdt", "rank"],
|
|
140
|
+
cj: ["cj", "item", "knowledge", "quest"],
|
|
141
|
+
pvx: ["face", "adventure", "pvg"],
|
|
142
|
+
bbs: ["bbs", "topic", "event"],
|
|
143
|
+
pvp: ["pvp"],
|
|
144
|
+
};
|
|
144
145
|
export default {
|
|
145
146
|
name: "HeaderNav",
|
|
146
147
|
props: [],
|
|
@@ -153,6 +154,7 @@ export default {
|
|
|
153
154
|
},
|
|
154
155
|
computed: {
|
|
155
156
|
finalNav: function ({ nav }) {
|
|
157
|
+
nav = cloneDeep(nav);
|
|
156
158
|
// 父节点
|
|
157
159
|
const finalNav = nav.filter((d) => !d.parentKey && d.status);
|
|
158
160
|
// 子节点
|
|
@@ -183,8 +185,8 @@ export default {
|
|
|
183
185
|
methods: {
|
|
184
186
|
isFocus: function (type) {
|
|
185
187
|
// return location.pathname.includes(type);
|
|
186
|
-
let active =
|
|
187
|
-
const pathname = location.pathname?.split(
|
|
188
|
+
let active = "";
|
|
189
|
+
const pathname = location.pathname?.split("/")?.filter(Boolean)?.[0] || "";
|
|
188
190
|
for (const key in activeNav) {
|
|
189
191
|
if (activeNav[key].includes(pathname)) {
|
|
190
192
|
active = key;
|
|
@@ -83,11 +83,13 @@
|
|
|
83
83
|
</template>
|
|
84
84
|
|
|
85
85
|
<script>
|
|
86
|
-
|
|
86
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
87
87
|
import { showDate, showTime } from "@jx3box/jx3box-common/js/moment";
|
|
88
88
|
import { editLink, authorLink } from "@jx3box/jx3box-common/js/utils.js";
|
|
89
89
|
import User from "@jx3box/jx3box-common/js/user.js";
|
|
90
90
|
import $ from "jquery";
|
|
91
|
+
const { __clients } = JX3BOX;
|
|
92
|
+
|
|
91
93
|
export default {
|
|
92
94
|
name: "PostHeader",
|
|
93
95
|
props: ["post", "stat"],
|
|
@@ -140,24 +142,29 @@ export default {
|
|
|
140
142
|
watch: {
|
|
141
143
|
post: {
|
|
142
144
|
deep: true,
|
|
143
|
-
handler: function() {
|
|
145
|
+
handler: function () {
|
|
144
146
|
this.countWords();
|
|
145
147
|
},
|
|
146
|
-
}
|
|
148
|
+
},
|
|
147
149
|
},
|
|
148
150
|
methods: {
|
|
149
151
|
showClientLabel: function (val) {
|
|
150
152
|
return __clients[val];
|
|
151
153
|
},
|
|
152
|
-
countWords: function (){
|
|
154
|
+
countWords: function () {
|
|
153
155
|
this.$nextTick(() => {
|
|
154
156
|
// 需要去除空格 \n \g
|
|
155
157
|
// eslint-disable-next-line no-useless-escape
|
|
156
|
-
const text = $(
|
|
158
|
+
const text = $(".c-article")
|
|
159
|
+
.text()
|
|
160
|
+
?.replace(
|
|
161
|
+
/[\s|\n|\r|\t|\g|\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?|\,|\。|\?|\:|\;|\‘|\’|\”|\“|\、|\·|\!|\(|\)|\》|\《|\『|\』]/g,
|
|
162
|
+
""
|
|
163
|
+
);
|
|
157
164
|
|
|
158
165
|
this.wordCount = text?.length || 0;
|
|
159
|
-
})
|
|
160
|
-
}
|
|
166
|
+
});
|
|
167
|
+
},
|
|
161
168
|
},
|
|
162
169
|
mounted: function () {},
|
|
163
170
|
};
|
|
@@ -245,7 +252,7 @@ export default {
|
|
|
245
252
|
@origin: #0eb7ce;
|
|
246
253
|
@std: #f0b400;
|
|
247
254
|
@all: #a26ef7;
|
|
248
|
-
@wujie
|
|
255
|
+
@wujie: #fc79bf;
|
|
249
256
|
|
|
250
257
|
.u-client {
|
|
251
258
|
// .fl;
|
|
@@ -265,7 +272,7 @@ export default {
|
|
|
265
272
|
color: @origin;
|
|
266
273
|
}
|
|
267
274
|
|
|
268
|
-
&.wujie{
|
|
275
|
+
&.wujie {
|
|
269
276
|
border: 1px solid #00dcda;
|
|
270
277
|
color: #3ae0f1;
|
|
271
278
|
background: #eff;
|
|
@@ -312,7 +319,8 @@ export default {
|
|
|
312
319
|
font-style: normal;
|
|
313
320
|
}
|
|
314
321
|
|
|
315
|
-
.u-views
|
|
322
|
+
.u-views,
|
|
323
|
+
.u-word-count {
|
|
316
324
|
.flex;
|
|
317
325
|
align-items: center;
|
|
318
326
|
gap: 2px;
|
|
@@ -81,9 +81,11 @@ import Thx from "./Thx.vue";
|
|
|
81
81
|
import Article from "../editor/Article.vue";
|
|
82
82
|
// import ArticleMarkdown from "@jx3box/jx3box-editor/src/ArticleMarkdown.vue";
|
|
83
83
|
import Comment from "./Comment.vue";
|
|
84
|
-
|
|
85
|
-
import
|
|
86
|
-
|
|
84
|
+
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
85
|
+
import { getAppType } from "@jx3box/jx3box-common/js/utils";
|
|
86
|
+
|
|
87
|
+
const { __visibleMap } = JX3BOX;
|
|
88
|
+
|
|
87
89
|
export default {
|
|
88
90
|
name: "cms-single",
|
|
89
91
|
components: {
|
|
@@ -218,8 +220,8 @@ export default {
|
|
|
218
220
|
}
|
|
219
221
|
location.href = `/community/${val}`;
|
|
220
222
|
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
+
},
|
|
224
|
+
},
|
|
223
225
|
},
|
|
224
226
|
};
|
|
225
227
|
</script>
|