@jx3box/jx3box-editor 1.1.8 → 1.2.2

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.
@@ -14,7 +14,9 @@
14
14
 
15
15
  .w-buff-icon {
16
16
  .size(48px);
17
- .mr(10px);
17
+ border:none;
18
+ padding:0;
19
+ margin:0 10px 0 0;
18
20
  }
19
21
 
20
22
  .w-buff-content {
@@ -85,10 +85,13 @@
85
85
  background-color: rgba(15, 34, 34, 0.88);
86
86
  // background-color: #0f2222;
87
87
  color: #ffffff;
88
- text-shadow: 1px 1px 1px #0f2222;
89
- font-weight: normal;
90
- font-size: 13.6px;
91
- line-height: 1.5em;
88
+
89
+ *{
90
+ font-weight: normal;
91
+ font-size: 13.6px;
92
+ line-height: 1.5em;
93
+ text-shadow: 1px 1px 1px #0f2222;
94
+ }
92
95
 
93
96
  &:before {
94
97
  content: "";
@@ -4,23 +4,19 @@
4
4
  .w-npc-wrapper {
5
5
  @min-width: 200px;
6
6
  min-width: @min-width;
7
- padding: 9px 10px 10px;
8
7
  background-color: rgba(15, 34, 34, 0.88);
9
8
  box-sizing: border-box;
10
9
  display: flex;
11
10
 
12
- div {
13
- margin: 2px 0;
14
- }
15
11
 
16
12
  .w-npc-content {
17
13
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
18
- margin-bottom: 10px;
19
- padding: 10px;
20
14
  .r(4px);
21
15
  .clearfix;
22
16
  .fz(13px);
23
17
  color: #e7e7e7;
18
+ margin:0;
19
+ padding:5px 15px 10px 15px;
24
20
  }
25
21
 
26
22
  .u-icon {
@@ -45,7 +41,7 @@
45
41
 
46
42
  .u-id {
47
43
  .pa;
48
- .rt(22px,28px);
44
+ .rt(15px,10px);
49
45
  .pointer;
50
46
  color: #5df9eb;
51
47
  }
@@ -14,7 +14,9 @@
14
14
 
15
15
  .w-skill-icon{
16
16
  .size(48px);
17
- .mr(10px);
17
+ border:none;
18
+ padding:0;
19
+ margin:0 10px 0 0;
18
20
  }
19
21
 
20
22
  .w-skill-content{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.1.8",
3
+ "version": "1.2.2",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/service/item.js CHANGED
@@ -1,14 +1,15 @@
1
1
  import { $helper } from "@jx3box/jx3box-common/js/https";
2
2
 
3
3
  // 获取物品
4
- function get_item(item_id, client_id) {
4
+ function get_item(item_id, client) {
5
5
  if (!item_id) return;
6
-
7
6
  let options = {
8
- url: `api/item/${item_id}`,
7
+ url: `/api/item/${item_id}`,
8
+ params : {
9
+ client
10
+ }
9
11
  };
10
-
11
- return $helper({ mute: true,client_id : client_id })(options);
12
+ return $helper({ mute: true })(options);
12
13
  }
13
14
 
14
15
  // 获取清单
package/src/Article.vue CHANGED
@@ -53,6 +53,7 @@
53
53
  :level="skill.level"
54
54
  v-show="jx3_element.type == 'skill'"
55
55
  />
56
+ <jx3-npc :client="npc.client" :id="npc.id" v-show="jx3_element.type === 'npc'" />
56
57
  </div>
57
58
  <!-- <gallery :images="images" :index="gallery_index" @close="index = null"></gallery> -->
58
59
  </div>
@@ -96,6 +97,7 @@ import renderPzIframe from '../assets/js/pz_iframe'
96
97
  import Item from "./Item";
97
98
  import Buff from "./Buff";
98
99
  import Skill from "./Skill";
100
+ import Npc from "./Npc";
99
101
  import renderJx3Element from "../assets/js/jx3_element";
100
102
 
101
103
  export default {
@@ -137,6 +139,12 @@ export default {
137
139
  id: "",
138
140
  level: "",
139
141
  },
142
+ // NPC
143
+ npc : {
144
+ client : 'std',
145
+ id : '',
146
+ },
147
+ // COMMON
140
148
  jx3_element: {
141
149
  style: {
142
150
  top: 0,
@@ -265,6 +273,7 @@ export default {
265
273
  "jx3-item": Item,
266
274
  "jx3-buff": Buff,
267
275
  "jx3-skill": Skill,
276
+ "jx3-npc": Npc,
268
277
  // "gallery":gallery,
269
278
  // VueViewer
270
279
  },
package/src/Buff.vue CHANGED
@@ -76,6 +76,6 @@ export default {
76
76
  };
77
77
  </script>
78
78
 
79
- <style scoped lang="less">
79
+ <style lang="less">
80
80
  @import "../assets/css/module/buff.less";
81
81
  </style>
package/src/Item.vue CHANGED
@@ -13,7 +13,7 @@
13
13
  <span v-text="`精炼等级:0 / ${source.MaxStrengthLevel}`"></span>
14
14
  </div>
15
15
  <!-- 物品名称 -->
16
- <h4 class="u-title" :style="{ color: color(source.Quality) }" v-text="source.Name"></h4>
16
+ <div class="u-title" :style="{ color: color(source.Quality) }" v-text="source.Name"></div>
17
17
  <!-- 绑定状态 -->
18
18
  <div v-if="source.BindType > 1" class="u-bind" v-text="bind(source.BindType)"></div>
19
19
  <!-- 唯一 -->
@@ -250,26 +250,34 @@ import { iconLink } from "@jx3box/jx3box-common/js/utils";
250
250
 
251
251
  export default {
252
252
  name: "Item",
253
- props: ["item", "item_id", "jx3ClientType"],
253
+ props: ["item", "item_id", "jx3ClientType","client"],
254
254
  data() {
255
255
  return {
256
256
  source: null,
257
257
  };
258
258
  },
259
259
  computed : {
260
+ // 兼容旧版传值
261
+ env_client_id : function (){
262
+ return location.href.includes('origin') ? 2 : 1
263
+ },
260
264
  client_id : function (){
261
- return this.jx3ClientType || 1
265
+ return this.jx3ClientType || this.env_client_id
266
+ },
267
+ client_by_id : function (){
268
+ return this.client_id == 1 ? 'std' : 'origin'
262
269
  },
263
- client : function (){
264
- return this.client_id == 1 ? 'std' : 'origin'
270
+ // 新版传值
271
+ final_client : function (){
272
+ return this.client || this.client_by_id
265
273
  },
266
274
  cache_key : function (){
267
- return `item-${this.client}-${this.item_id}`
275
+ return `item-${this.final_client}-${this.item_id}`
268
276
  },
269
277
  },
270
278
  methods: {
271
279
  iconLink : function (id){
272
- return iconLink(id,this.client)
280
+ return iconLink(id,this.final_client)
273
281
  },
274
282
  second_format,
275
283
  attribute_percent,
@@ -303,7 +311,7 @@ export default {
303
311
 
304
312
  // 服务端拉取
305
313
  }else{
306
- get_item(this.item_id, this.client_id).then((res) => {
314
+ get_item(this.item_id, this.final_client).then((res) => {
307
315
  let data = res.data;
308
316
  if (data.code === 200) {
309
317
  let item = data.data.item;
@@ -324,6 +332,6 @@ export default {
324
332
  };
325
333
  </script>
326
334
 
327
- <style lang="less" scoped>
335
+ <style lang="less">
328
336
  @import "../assets/css/module/item.less";
329
337
  </style>
package/src/Npc.vue CHANGED
@@ -209,6 +209,6 @@ export default {
209
209
  };
210
210
  </script>
211
211
 
212
- <style scoped lang="less">
212
+ <style lang="less">
213
213
  @import "../assets/css/module/npc.less";
214
214
  </style>
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.getLink(
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.getLink("skill", this.client, o.SkillID, o.Level)}" data-client="${this.client}" data-id="${
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.Link}">[${o.Name}]</a>`;
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.getLink("npc", this.client, o.ID, '')}">[${o.Name}]</a>`
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
- getLink: function(type, client, id, level) {
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
  // ==============================
package/src/Skill.vue CHANGED
@@ -65,6 +65,6 @@ export default {
65
65
  };
66
66
  </script>
67
67
 
68
- <style scoped lang="less">
68
+ <style lang="less">
69
69
  @import "../assets/css/module/skill.less";
70
70
  </style>