@jx3box/jx3box-editor 2.2.2 → 2.2.3
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 +2 -1
- package/src/components/Combo.vue +21 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-editor",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "JX3BOX Article & Editor",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"vue-gallery-slideshow": "^1.5.2",
|
|
59
59
|
"vue-photoswipe.js": "^2.0.23",
|
|
60
60
|
"vue-plugin-load-script": "^1.3.6",
|
|
61
|
+
"vuedraggable": "^2.24.3",
|
|
61
62
|
"xss": "^1.0.8"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
package/src/components/Combo.vue
CHANGED
|
@@ -64,10 +64,12 @@
|
|
|
64
64
|
|
|
65
65
|
<div class="c-combo-content__right">
|
|
66
66
|
<!-- 已选技能 -->
|
|
67
|
-
<el-divider
|
|
67
|
+
<el-divider>已选技能
|
|
68
|
+
<!-- <el-checkbox v-model="sort" border size="small">开启排序</el-checkbox> -->
|
|
69
|
+
</el-divider>
|
|
68
70
|
<div class="m-selected-skills">
|
|
69
71
|
<ul class="m-skills-list">
|
|
70
|
-
<li v-for="(skill, index) in selected" :key="index" class="m-skill" @contextmenu.prevent="(event) => onContextmenu(event, skill)">
|
|
72
|
+
<li v-for="(skill, index) in selected" :key="skill.SkillID + '' + index" class="m-skill" @contextmenu.prevent="(event) => onContextmenu(event, skill)">
|
|
71
73
|
<div class="u-skill" v-if="skill && skill.IconID">
|
|
72
74
|
<img class="u-skill-icon" :src="iconURL(skill.IconID)" :alt="skill.IconID" />
|
|
73
75
|
<i class="u-gcd-icon" v-show="skill.WithoutGcd">
|
|
@@ -100,7 +102,7 @@ Vue.use(LoadScript);
|
|
|
100
102
|
import contextmenu from "vue-contextmenujs";
|
|
101
103
|
Vue.use(contextmenu);
|
|
102
104
|
export default {
|
|
103
|
-
name: "
|
|
105
|
+
name: "ComboSkill",
|
|
104
106
|
components: {
|
|
105
107
|
SkillMartial,
|
|
106
108
|
},
|
|
@@ -141,8 +143,19 @@ export default {
|
|
|
141
143
|
|
|
142
144
|
activeName: "special",
|
|
143
145
|
selected: [],
|
|
146
|
+
|
|
147
|
+
sort: false,
|
|
144
148
|
};
|
|
145
149
|
},
|
|
150
|
+
// watch: {
|
|
151
|
+
// sort: function (val) {
|
|
152
|
+
// if (val) {
|
|
153
|
+
// this.$nextTick(() => {
|
|
154
|
+
// this.initSkillSort();
|
|
155
|
+
// });
|
|
156
|
+
// }
|
|
157
|
+
// },
|
|
158
|
+
// },
|
|
146
159
|
computed: {
|
|
147
160
|
hasNextPage: function () {
|
|
148
161
|
return this.total > 1 && this.page < this.pages;
|
|
@@ -229,6 +242,7 @@ export default {
|
|
|
229
242
|
const _this = this;
|
|
230
243
|
const sortSkills = Sortable.create(el, {
|
|
231
244
|
animation: 200,
|
|
245
|
+
forceFallback: true,
|
|
232
246
|
onEnd({ newIndex, oldIndex }) {
|
|
233
247
|
const newSkills = cloneDeep(_this.selected);
|
|
234
248
|
const [removed] = newSkills.splice(oldIndex, 1);
|
|
@@ -254,6 +268,10 @@ export default {
|
|
|
254
268
|
confirmButtonText: "确定",
|
|
255
269
|
cancelButtonText: "取消",
|
|
256
270
|
inputValue: skill?.n || "",
|
|
271
|
+
// 最长4个字
|
|
272
|
+
inputValidator: (value) => {
|
|
273
|
+
return value.length <= 4;
|
|
274
|
+
},
|
|
257
275
|
})
|
|
258
276
|
.then(({ value }) => {
|
|
259
277
|
this.$set(skill, "n", value);
|