@jx3box/jx3box-editor 1.5.2 → 1.5.4
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 +1 -1
- package/service/database.js +6 -2
- package/src/GameText.vue +13 -2
- package/src/Item.vue +4 -2
- package/src/Resource.vue +7 -1
package/package.json
CHANGED
package/service/database.js
CHANGED
|
@@ -36,9 +36,13 @@ function loadResource(type, query, params) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
function loadStat() {
|
|
39
|
+
function loadStat({client = 'std'} = {}) {
|
|
40
40
|
return axios
|
|
41
|
-
.get(__node
|
|
41
|
+
.get(__node, {
|
|
42
|
+
params: {
|
|
43
|
+
client,
|
|
44
|
+
}
|
|
45
|
+
})
|
|
42
46
|
.then((res) => {
|
|
43
47
|
return res.data;
|
|
44
48
|
})
|
package/src/GameText.vue
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
extractTextContent,
|
|
15
|
+
getLink,
|
|
16
|
+
iconLink,
|
|
17
|
+
} from "@jx3box/jx3box-common/js/utils";
|
|
14
18
|
import { getResource } from "../service/resource";
|
|
15
19
|
import { escape } from "lodash";
|
|
16
20
|
|
|
@@ -21,6 +25,10 @@ export default {
|
|
|
21
25
|
type: String,
|
|
22
26
|
default: "",
|
|
23
27
|
},
|
|
28
|
+
ignoreColor: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
24
32
|
client: {
|
|
25
33
|
type: String,
|
|
26
34
|
default: "std",
|
|
@@ -64,6 +72,9 @@ export default {
|
|
|
64
72
|
link = getLink("item", item_id);
|
|
65
73
|
}
|
|
66
74
|
}
|
|
75
|
+
if (this.ignoreColor) {
|
|
76
|
+
style = "";
|
|
77
|
+
}
|
|
67
78
|
if (link) {
|
|
68
79
|
return `<a style="${style} text-decoration: none;" target="_blank" href="${link}">${content}</a>`;
|
|
69
80
|
} else {
|
|
@@ -81,7 +92,7 @@ export default {
|
|
|
81
92
|
let icon_id = match.match(/frame=(\d+)/i)?.[1];
|
|
82
93
|
let w = parseInt(match.match(/w=(\d+)/i)?.[1]) / 1.12;
|
|
83
94
|
let h = parseInt(match.match(/h=(\d+)/i)?.[1]) / 1.12;
|
|
84
|
-
let src =
|
|
95
|
+
let src = iconLink(icon_id, this.client);
|
|
85
96
|
let html = `<img src="${src}" style="width: ${w}px; height: ${h}px; margin-bottom: -5px" />`;
|
|
86
97
|
Text = Text.replace(match, html);
|
|
87
98
|
}
|
package/src/Item.vue
CHANGED
|
@@ -165,8 +165,10 @@
|
|
|
165
165
|
<li
|
|
166
166
|
v-for="(attribute, key) in source.Set.attributes"
|
|
167
167
|
:key="key"
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
>
|
|
169
|
+
<span>{{`[${key}]`}}</span>
|
|
170
|
+
<game-text :client="client" :text="attribute" :ignore-color="true"></game-text>
|
|
171
|
+
</li>
|
|
170
172
|
</ul>
|
|
171
173
|
<br />
|
|
172
174
|
</div>
|
package/src/Resource.vue
CHANGED
|
@@ -296,6 +296,12 @@ export default {
|
|
|
296
296
|
html: function(newval) {
|
|
297
297
|
this.$emit("update", newval);
|
|
298
298
|
},
|
|
299
|
+
client: function() {
|
|
300
|
+
loadStat({client: this.client}).then((data) => {
|
|
301
|
+
this.stat = data;
|
|
302
|
+
this.actived = true;
|
|
303
|
+
});
|
|
304
|
+
},
|
|
299
305
|
},
|
|
300
306
|
methods: {
|
|
301
307
|
getData: function(page = 1, append = false) {
|
|
@@ -482,7 +488,7 @@ export default {
|
|
|
482
488
|
openDialog: function() {
|
|
483
489
|
this.dialogVisible = true;
|
|
484
490
|
if (!this.actived) {
|
|
485
|
-
loadStat().then((data) => {
|
|
491
|
+
loadStat({client: this.client}).then((data) => {
|
|
486
492
|
this.stat = data;
|
|
487
493
|
this.actived = true;
|
|
488
494
|
});
|