@jx3box/jx3box-editor 1.9.2 → 1.9.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.
@@ -36,6 +36,11 @@
36
36
  .size(12px);
37
37
  .r(50%);
38
38
  .db;
39
+ .none;
40
+
41
+ &.is-show {
42
+ display: inline-block;
43
+ }
39
44
 
40
45
  i {
41
46
  color: #fff;
@@ -8,14 +8,19 @@ function renderCombo(selector = ".e-skill-combo .w-skill-combo-item") {
8
8
  // 获取嵌入源地址
9
9
  let url = $(this).text();
10
10
 
11
+ // extend = {gcd: 0}
11
12
  const [id, name, icon, extend] = url.split(",");
13
+ // 去除左右花括号
14
+
15
+
16
+ const _extend = extend ? JSON.parse(extend) : null;
12
17
 
13
18
  // 渲染
14
19
  let code = `
15
20
  <span class="w-skill-combo-item">
16
21
  <img class="u-skill-icon" src="${iconLink(icon)}" alt="${icon}" title="${name}" />
17
22
  <span class="u-skill-name" title="${name}">${name}</span>
18
- <i class="u-gcd-icon ${extend && extend.gcd ? 'is-show' : ''}" title="无GCD技能">
23
+ <i class="u-gcd-icon ${_extend && _extend.gcd == 0 ? 'is-show' : ''}" title="无GCD技能">
19
24
  <i class="el-icon-time"></i>
20
25
  </i>
21
26
  </span>
@@ -23,6 +28,8 @@ function renderCombo(selector = ".e-skill-combo .w-skill-combo-item") {
23
28
  html += code;
24
29
  });
25
30
 
31
+ // console.log(html)
32
+
26
33
  // 挂载点
27
34
  $(selector).parent().html(html);
28
35
  } catch(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -145,7 +145,6 @@ export default {
145
145
  mounted() {
146
146
  this.$nextTick(() => {
147
147
  this.initSkillSort();
148
-
149
148
  });
150
149
  },
151
150
  methods: {
@@ -179,14 +178,6 @@ export default {
179
178
  this.loading = false;
180
179
  });
181
180
  },
182
- submit() {
183
- this.$emit("submit", this.selected);
184
- this.close();
185
- this.selected = [];
186
- },
187
- close() {
188
- this.$emit("update:modelValue", false);
189
- },
190
181
  iconURL: function (id) {
191
182
  return iconLink(id, this.client);
192
183
  },
@@ -224,11 +215,10 @@ export default {
224
215
  });
225
216
  },
226
217
  onContextmenu(event, skill) {
227
- // console.log(skill)
228
218
  this.$contextmenu({
229
219
  items: [
230
220
  {
231
- label: !skill?.WithoutGcd ? "设置为无GCD技能" : "取消无GCD技能",
221
+ label: !skill?.WithoutGcd ? "设置为无GCD技能" : "设置为有GCD技能",
232
222
  onClick: () => {
233
223
  this.$set(skill, "WithoutGcd", !skill.WithoutGcd);
234
224
  },
@@ -245,9 +235,15 @@ export default {
245
235
 
246
236
  renderVal() {
247
237
  const {selected} = this;
248
- return `<ul class="e-skill-combo w-skill-combo">${selected.map(item => {
249
- return `<li class="w-skill-combo-item">${item.SkillID},${item.Name},${item.IconID},{gcd:${item.WithoutGcd ? 0: 1}}</li>`
250
- })}</ul>`
238
+ let skills_html = ''
239
+ selected.forEach(item => {
240
+ const obj = {
241
+ gcd: item.WithoutGcd ? 0: 1
242
+ }
243
+ skills_html += `<li class="w-skill-combo-item">${item.SkillID},${item.Name},${item.IconID},${JSON.stringify(obj)}</li>`
244
+ })
245
+ const html = `<ul class="e-skill-combo w-skill-combo">${skills_html}</ul>`
246
+ return html;
251
247
  },
252
248
  },
253
249
  };