@jx3box/jx3box-common-ui 6.1.5 → 6.1.8

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 CHANGED
@@ -31,8 +31,6 @@ import zlpBy from "./src/filters/zlpBy.vue";
31
31
  import Thx from './src/single/Thx.vue'
32
32
  import WikiPanel from './src/wiki/WikiPanel.vue'
33
33
 
34
- import GameText from './src/GameText.vue'
35
-
36
34
  const components = {
37
35
  Header,
38
36
  Breadcrumb,
@@ -66,9 +64,7 @@ const components = {
66
64
  clientBy,
67
65
  zlpBy,
68
66
 
69
- WikiPanel,
70
-
71
- GameText
67
+ WikiPanel
72
68
  }
73
69
 
74
70
  const install = function (Vue, Option) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "6.1.5",
3
+ "version": "6.1.8",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@
33
33
  "@jx3box/jx3box-comment-ui": "^1.7.1",
34
34
  "@jx3box/jx3box-common": "^7.4.2",
35
35
  "@jx3box/jx3box-data": "^1.11.1",
36
- "@jx3box/jx3box-editor": "^1.4.8",
36
+ "@jx3box/jx3box-editor": "^1.5.0",
37
37
  "axios": "^0.26.1",
38
38
  "dayjs": "^1.11.0",
39
39
  "element-ui": "^2.13.2",
package/src/App.vue CHANGED
@@ -110,11 +110,6 @@
110
110
  <Avatar :id="8" url="" :size="avatar_size" frame="" />
111
111
  </div>
112
112
  </el-tab-pane>
113
- <el-tab-pane label="游戏描述" name="GameText">
114
- <div>
115
- <game-text :text="text"></game-text>
116
- </div>
117
- </el-tab-pane>
118
113
  </el-tabs>
119
114
 
120
115
  <RightSidebar>
@@ -178,8 +173,6 @@ import WikiPanel from "./wiki/WikiPanel.vue";
178
173
  import WikiRevisions from "./wiki/WikiRevisions.vue";
179
174
  import WikiComments from "./wiki/WikiComments.vue";
180
175
 
181
- import GameText from "./GameText.vue";
182
-
183
176
  import axios from "axios";
184
177
  import { __server } from "@jx3box/jx3box-common/data/jx3box.json";
185
178
  import { wiki } from "@jx3box/jx3box-common/js/wiki";
@@ -233,8 +226,7 @@ export default {
233
226
  WikiRevisions,
234
227
  WikiComments,
235
228
 
236
- UserPop,
237
- GameText,
229
+ UserPop
238
230
  },
239
231
  data: function () {
240
232
  return {
@@ -14,13 +14,19 @@
14
14
  {{ btnText }}
15
15
  <!-- <span class="u-follow-count">{{ formatFansNum(fansNum) }} </span> -->
16
16
  </el-button>
17
- <el-popover v-else placement="bottom" trigger="hover" popper-class="u-follow-popover" :visible-arrow="false">
17
+ <el-popover
18
+ v-else
19
+ placement="bottom"
20
+ trigger="hover"
21
+ popper-class="c-author-follow-popover"
22
+ :visible-arrow="false"
23
+ >
18
24
  <div class="u-action-list">
19
25
  <div class="u-action-item" v-for="item in actions" :key="item.label" @click.stop="item.action">
20
26
  {{ item.label }}
21
27
  </div>
22
28
  </div>
23
- <el-button class="u-unfollow-btn" size="mini" :type="btnType" slot="reference"
29
+ <el-button class="u-btn" size="mini" :type="btnType" slot="reference"
24
30
  >{{ btnText }}
25
31
  <!-- TODO:后续在粉丝榜中展示粉丝数 -->
26
32
  <!-- <span class="u-follow-count">{{ formatFansNum(fansNum) }}</span> -->
@@ -146,39 +152,33 @@ export default {
146
152
  };
147
153
  </script>
148
154
 
149
- <style scoped lang="less">
150
- .c-author-follow{
151
- // .u-btn{
152
- // background-color: #31dee6;
153
- // border-color:lighten(#31dee6,5%);
154
- // color: #fff;
155
- // }
156
- }
157
-
158
- .u-unfollow-btn {
159
- &.el-button {
160
- margin-right: 10px;
161
- }
162
- }
163
- .u-follow-popover {
164
- &.el-popover {
165
- min-width: 100px;
166
- padding: 0;
167
- margin: 0;
168
- .u-action-list {
169
- .u-action-item {
170
- text-align: center;
171
- cursor: pointer;
172
- padding: 8px 10px;
173
- &:hover {
174
- background: rgb(248, 248, 251);
155
+ <style lang="less">
156
+ .c-author-follow-popover {
157
+ .u-follow-popover {
158
+ &.el-popover {
159
+ min-width: 100px;
160
+ padding: 0;
161
+ margin: 0;
162
+ .u-action-list {
163
+ .u-action-item {
164
+ text-align: center;
165
+ cursor: pointer;
166
+ padding: 8px 10px;
167
+ &:hover {
168
+ background: rgb(248, 248, 251);
169
+ }
175
170
  }
176
171
  }
177
172
  }
178
173
  }
179
- }
180
- .u-follow-count {
181
- margin-left: 5px;
174
+ .u-follow-count {
175
+ margin-left: 5px;
176
+ }
182
177
  }
183
178
 
179
+ @media screen and (max-width: @phone) {
180
+ .el-message-box {
181
+ max-width: 60%;
182
+ }
183
+ }
184
184
  </style>
@@ -129,10 +129,7 @@ export default {
129
129
  } else if (this.client == "std") {
130
130
  this.user_left = res.data.data.asUserBoxCoinRemainStd + res.data.data.asUserBoxCoinRemainAll;
131
131
  } else {
132
- this.user_left =
133
- res.data.data.asUserBoxCoinRemainAll +
134
- res.data.data.asUserBoxCoinRemainStd +
135
- res.data.data.asUserBoxCoinRemainOrigin;
132
+ this.user_left = res.data.data.asUserBoxCoinRemainAll
136
133
  }
137
134
  });
138
135
  getBoxcoinStatus().then((res) => {
package/yarn-error.log ADDED
@@ -0,0 +1,95 @@
1
+ Arguments:
2
+ C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\yarn\bin\yarn.js add @jx3box/jx3box-editor@latest
3
+
4
+ PATH:
5
+ C:\Program Files (x86)\PowerShell\7;C:\Python310\Scripts\;C:\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;D:\Program Files (x86)\Xftp\;D:\Program Files (x86)\Xshell\;C:\Program Files (x86)\PowerShell\7\;D:\Program Files (x86)\Bandizip;d:\Program Files (x86)\Tencent\微信web开发者工具\dll;%NVM_HOME%;%NVM_SYMLINK%;C:\Program Files (x86)\oh-my-posh\bin;;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\ljw\AppData\Local\pnpm;C:\Users\ljw\.cargo\bin;C:\Users\ljw\AppData\Local\Microsoft\WindowsApps;D:\Microsoft VS Code\bin;d:\Program Files\JetBrains\WebStorm 2022.2\bin;;C:\Users\ljw\AppData\Roaming\nvm;C:\Program Files\nodejs
6
+
7
+ Yarn version:
8
+ 1.22.19
9
+
10
+ Node version:
11
+ 14.18.2
12
+
13
+ Platform:
14
+ win32 x64
15
+
16
+ Trace:
17
+ Error: ENOENT: no such file or directory, copyfile 'C:\Users\ljw\AppData\Local\Yarn\Cache\v6\npm-yallist-2.1.2-1c11f9218f076089a47dd512f93c6699a6a81d52-integrity\node_modules\yallist\LICENSE' -> 'D:\Projects\Personal\JX3BOX\jx3box-common-ui\node_modules\@vue\component-compiler-utils\node_modules\yallist\LICENSE'
18
+
19
+ npm manifest:
20
+ {
21
+ "name": "@jx3box/jx3box-common-ui",
22
+ "version": "6.1.7",
23
+ "description": "JX3BOX UI",
24
+ "main": "index.js",
25
+ "scripts": {
26
+ "dev": "cross-env DEV_SERVER=true vue-cli-service serve",
27
+ "serve": "vue-cli-service serve",
28
+ "build": "vue-cli-service build",
29
+ "lint": "vue-cli-service lint",
30
+ "inspect": "vue inspect > output.js",
31
+ "update": "npm --registry https://registry.npmjs.org install @jx3box/jx3box-common@latest @jx3box/jx3box-data@latest @jx3box/jx3box-editor@latest @jx3box/jx3box-comment-ui@latest",
32
+ "header": "vue-cli-service build --target lib --name newheader src/Header.vue && cp public/index.html dist/newheader.html"
33
+ },
34
+ "eslintConfig": {
35
+ "root": true,
36
+ "env": {
37
+ "node": true
38
+ },
39
+ "extends": [
40
+ "plugin:vue/essential"
41
+ ],
42
+ "rules": {},
43
+ "parserOptions": {
44
+ "parser": "babel-eslint"
45
+ }
46
+ },
47
+ "browserslist": [
48
+ "> 1%",
49
+ "last 2 versions"
50
+ ],
51
+ "dependencies": {
52
+ "@jx3box/jx3box-comment-ui": "^1.7.1",
53
+ "@jx3box/jx3box-common": "^7.4.2",
54
+ "@jx3box/jx3box-data": "^1.11.1",
55
+ "@jx3box/jx3box-editor": "^1.4.12",
56
+ "axios": "^0.26.1",
57
+ "dayjs": "^1.11.0",
58
+ "element-ui": "^2.13.2",
59
+ "jquery": "^3.5.1",
60
+ "lodash": "^4.17.15",
61
+ "qrcode.vue": "^1.7.0",
62
+ "url": "^0.11.0",
63
+ "vue": "^2.6.11"
64
+ },
65
+ "devDependencies": {
66
+ "@babel/plugin-proposal-optional-chaining": "^7.14.5",
67
+ "@vue/cli-plugin-babel": "~4.3.0",
68
+ "@vue/cli-plugin-eslint": "~4.3.0",
69
+ "@vue/cli-plugin-vuex": "^4.0.0",
70
+ "@vue/cli-service": "~4.3.0",
71
+ "babel-eslint": "^10.1.0",
72
+ "core-js": "^3.6.5",
73
+ "cross-env": "^7.0.3",
74
+ "csslab": "^4.0.3",
75
+ "eslint": "^6.7.2",
76
+ "eslint-plugin-vue": "^6.2.2",
77
+ "less": "^3.0.4",
78
+ "less-loader": "^5.0.0",
79
+ "style-resources-loader": "^1.3.3",
80
+ "vue-cli-plugin-element": "~1.0.1",
81
+ "vue-svg-inline-loader": "^1.4.6",
82
+ "vue-template-compiler": "^2.6.11",
83
+ "weixin-js-sdk": "^1.6.0"
84
+ },
85
+ "repository": {
86
+ "type": "git",
87
+ "url": "git+https://github.com/JX3BOX/jx3box-common-ui.git"
88
+ }
89
+ }
90
+
91
+ yarn manifest:
92
+ No manifest
93
+
94
+ Lockfile:
95
+ No lockfile
@@ -1,20 +0,0 @@
1
- /*
2
- * @Author: X3ZvaWQ
3
- * @Date: 2022-08-20 22:17:27
4
- * @LastEditors: X3ZvaWQ
5
- * @LastEditTime: 2022-08-20 23:13:38
6
- * @Description:
7
- */
8
- import { $node } from "@jx3box/jx3box-common/js/https";
9
- const $ = $node();
10
-
11
- /* import axios from 'axios'
12
- const $ = axios.create({
13
- baseURL: 'http://localhost:7002/',
14
- }) */
15
-
16
- function getResource(id, client = 'std') {
17
- return $.get(`/resource/${client}/${id}`);
18
- }
19
-
20
- export { getResource };
package/src/GameText.vue DELETED
@@ -1,144 +0,0 @@
1
- <!--
2
- * @Author: X3ZvaWQ
3
- * @Date: 2022-08-20 20:23:57
4
- * @LastEditors: X3ZvaWQ
5
- * @LastEditTime: 2022-08-20 23:12:34
6
- * @Description: 用于渲染游戏内Text标签的文本
7
- -->
8
- <template>
9
- <span v-html="html"></span>
10
- </template>
11
-
12
- <script>
13
- import { extractTextContent, getLink } from "@jx3box/jx3box-common/js/utils";
14
- import { getResource } from "../service/resource";
15
-
16
- export default {
17
- name: "GameText",
18
- props: {
19
- text: {
20
- type: String,
21
- default: "",
22
- },
23
- client: {
24
- type: String,
25
- default: "std",
26
- },
27
- },
28
- data: function () {
29
- return {
30
- html: "",
31
- };
32
- },
33
- methods: {
34
- /**
35
- * 渲染某一个单独的Text标签成Span或链接
36
- * @param {*} school_id
37
- * @returns
38
- */
39
- renderItemHtml: function (item) {
40
- let content = item.text;
41
- let style = ``;
42
- let link = null;
43
- content = content.replace(/\n/g, "<br />").replace(/\\/g, "");
44
- if ([item.r, item.g, item.b].every((v) => v != undefined && v > 0)) {
45
- style = `color: rgb(${item.r}, ${item.g}, ${item.b});`;
46
- } else if (item.font != undefined) {
47
- const fonts = require("../assets/data/game_font.json");
48
- for (let color in fonts) {
49
- if (fonts[color].includes(item.font)) {
50
- style = `color: ${color};`;
51
- break;
52
- }
53
- }
54
- }
55
- if (item.name == "iteminfolink" && item.script) {
56
- let item_type = item.script?.match(/this\.dwTabType=(\d+)/i)?.[1];
57
- let item_index = item.script?.match(/this\.dwIndex=(\d+)/i)?.[1];
58
- if (item_type && item_index) {
59
- let item_id = `${item_type}_${item_index}`;
60
- link = getLink("item", item_id);
61
- }
62
- }
63
- if (link) {
64
- return `<a style="${style} text-decoration: none;" target="_blank" href="${link}">${content}</a>`;
65
- } else {
66
- return `<span style="${style}">${content}</span>`;
67
- }
68
- },
69
- /**
70
- * 将一段游戏内文本转换为Html
71
- * @param {Object[]} texts 标签对象
72
- */
73
- renderTextHtml: function (Text) {
74
- let result = Text;
75
- const matches = Text.match(/<Text>(.*?)<\/text>/gimsy);
76
- if (!matches) return Text;
77
- for (let match of matches) {
78
- let text = extractTextContent(match);
79
- let html = this.renderItemHtml(text[0]);
80
- result = result.replace(match, html);
81
- }
82
- return result;
83
- },
84
- /**
85
- * 获取形如<BUFF 110 1 desc>的资源字段并转换
86
- */
87
- renderResource: function () {
88
- const matches = this.html.match(/<BUFF (\d+) (\d+) (.*?)>/gim);
89
- if (!matches) return;
90
- for (let match of matches) {
91
- let [, id, level, type] = match.match(/<BUFF (\d+) (\d+) (.*?)>/i);
92
- type = type.toLowerCase();
93
- let type_map = {
94
- desc: "Desc",
95
- time: "Interval",
96
- };
97
- getResource(`buff.${id}_${level}`, this.client)
98
- .then((res) => {
99
- let data = res.data;
100
- let attr = type_map[type] || type;
101
- let value = data[attr];
102
- if (typeof value == "number" && type == "time") {
103
- let time = value / 16;
104
- if (time > 60) {
105
- time = `${Math.floor(time / 60)}分钟`;
106
- } else {
107
- time = `${time}秒`;
108
- }
109
- this.html = this.html.replace(match, time);
110
- return;
111
- }
112
- if (!value) return;
113
- let _matches = value.match(/<BUFF ([0-9a-zA-Z]+)>/gi);
114
- if (!_matches) this.html = this.html.replace(match, value);
115
- for (let _match of _matches) {
116
- let [, _attr] = _match.match(/<BUFF ([0-9a-zA-Z]+)>/i);
117
- for (let i = 1; i < 15; i++) {
118
- if (data[`BeginAttrib${i}`] == _attr) {
119
- value = value.replace(_match, data[`BeginValue${i}A`]);
120
- }
121
- }
122
- }
123
- this.html = this.html.replace(match, value);
124
- })
125
- .catch((err) => {
126
- console.log(err);
127
- });
128
- }
129
- },
130
- },
131
- watch: {
132
- text: {
133
- immediate: true,
134
- handler: function (val) {
135
- this.html = this.renderTextHtml(val);
136
- this.renderResource();
137
- },
138
- },
139
- },
140
- };
141
- </script>
142
-
143
- <style>
144
- </style>