@jx3box/jx3box-editor 1.2.0 → 1.2.1
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/src/Resource.vue +10 -6
package/package.json
CHANGED
package/src/Resource.vue
CHANGED
|
@@ -198,7 +198,7 @@ import { loadResource, loadStat, getIcons } from "../service/database";
|
|
|
198
198
|
import { __ossRoot, __iconPath, __Root, __OriginRoot } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
199
199
|
import detach_types from "../assets/data/detach_type.json";
|
|
200
200
|
import User from "@jx3box/jx3box-common/js/user";
|
|
201
|
-
import { iconLink } from "@jx3box/jx3box-common/js/utils";
|
|
201
|
+
import { iconLink,getLink } from "@jx3box/jx3box-common/js/utils";
|
|
202
202
|
export default {
|
|
203
203
|
name: "Resource",
|
|
204
204
|
props: {
|
|
@@ -369,7 +369,7 @@ export default {
|
|
|
369
369
|
// <img src="${this.iconURL(
|
|
370
370
|
// o.IconID
|
|
371
371
|
// )}">
|
|
372
|
-
this.html = `<a data-type="buff" class="e-jx3-buff w-jx3-element ${o.CanCancel == 1 ? "isBuff" : "isDebuff"}" href="${this.
|
|
372
|
+
this.html = `<a data-type="buff" class="e-jx3-buff w-jx3-element ${o.CanCancel == 1 ? "isBuff" : "isDebuff"}" href="${this.getDbLink(
|
|
373
373
|
"buff",
|
|
374
374
|
this.client,
|
|
375
375
|
o.BuffID,
|
|
@@ -383,7 +383,7 @@ export default {
|
|
|
383
383
|
this.resetItems();
|
|
384
384
|
o.isSelected = true;
|
|
385
385
|
if (this.skill_mode == "simple") {
|
|
386
|
-
this.html = `<a data-type="skill" class="e-jx3-skill w-jx3-element" href="${this.
|
|
386
|
+
this.html = `<a data-type="skill" class="e-jx3-skill w-jx3-element" href="${this.getDbLink("skill", this.client, o.SkillID, o.Level)}" data-client="${this.client}" data-id="${
|
|
387
387
|
o.SkillID
|
|
388
388
|
}" data-level="${o.Level}">[${o.Name}]</a>`;
|
|
389
389
|
} else {
|
|
@@ -393,7 +393,7 @@ export default {
|
|
|
393
393
|
selectItem: function(o, i) {
|
|
394
394
|
this.resetItems();
|
|
395
395
|
o.isSelected = true;
|
|
396
|
-
this.html = `<a data-type="item" class="e-jx3-item e-jx3-item-q${o.Quality} w-jx3-element" data-mode="" data-id="${o.id}" data-quality="${o.Quality}" data-client="${this.client}" target="_blank" href="${o.
|
|
396
|
+
this.html = `<a data-type="item" class="e-jx3-item e-jx3-item-q${o.Quality} w-jx3-element" data-mode="" data-id="${o.id}" data-quality="${o.Quality}" data-client="${this.client}" target="_blank" href="${this.getLink('item', o.id)}">[${o.Name}]</a>`;
|
|
397
397
|
},
|
|
398
398
|
selectIcon: function(o) {
|
|
399
399
|
this.resetItems();
|
|
@@ -403,7 +403,7 @@ export default {
|
|
|
403
403
|
selectNpc: function (o, i){
|
|
404
404
|
this.resetItems()
|
|
405
405
|
o.isSelected = true
|
|
406
|
-
this.html = `<a data-type="npc" class="e-jx3-npc w-jx3-element" data-mode="" data-id="${o.ID}" data-client="${this.client}" target="_blank" href="${this.
|
|
406
|
+
this.html = `<a data-type="npc" class="e-jx3-npc w-jx3-element" data-mode="" data-id="${o.ID}" data-client="${this.client}" target="_blank" href="${this.getDbLink("npc", this.client, o.ID, '')}">[${o.Name}]</a>`
|
|
407
407
|
},
|
|
408
408
|
resetItems: function() {
|
|
409
409
|
let data = this[this.type];
|
|
@@ -418,10 +418,14 @@ export default {
|
|
|
418
418
|
iconURL: function(id) {
|
|
419
419
|
return iconLink(id, this.client);
|
|
420
420
|
},
|
|
421
|
-
|
|
421
|
+
getDbLink: function(type, client, id, level) {
|
|
422
422
|
let domain = client == "origin" ? __OriginRoot : __Root;
|
|
423
423
|
return domain + "app/database/?type=" + type + `&query=${id}&level=${level}`;
|
|
424
424
|
},
|
|
425
|
+
getLink : function (type,id){
|
|
426
|
+
let domain = this.client == "origin" ? __OriginRoot : __Root;
|
|
427
|
+
return domain + getLink(type,id).slice(1)
|
|
428
|
+
},
|
|
425
429
|
|
|
426
430
|
// 杂项
|
|
427
431
|
// ==============================
|