@jx3box/jx3box-editor 2.2.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "2.2.1",
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": {
@@ -65,7 +65,7 @@
65
65
  <i class="el-icon-lollipop" style="margin-right: 5px"></i>
66
66
  <b>连招</b>
67
67
  </span>
68
- <ComboVue :query="query" ref="combo" :client="comboClient" :strict="strict"></ComboVue>
68
+ <ComboVue :query="query" ref="combo" :client="comboClient" :strict="strict" :subtype="subtype"></ComboVue>
69
69
  </el-tab-pane>
70
70
  <el-tab-pane label="信纸" name="letter">
71
71
  <span slot="label" class="u-tab-label">
@@ -123,6 +123,10 @@ export default {
123
123
  type: Boolean,
124
124
  default: true,
125
125
  },
126
+ subtype: {
127
+ type: String,
128
+ default: "通用",
129
+ }
126
130
  },
127
131
  data: function () {
128
132
  return {
package/src/Tinymce.vue CHANGED
@@ -5,7 +5,7 @@
5
5
  <div class="c-editor-header">
6
6
  <Upload v-if="attachmentEnable" @insert="insertAttachments" />
7
7
  <Resource v-if="resourceEnable" @insert="insertResource" />
8
- <BoxResource v-if="resourceEnable" @insert="insertResource" />
8
+ <BoxResource v-if="resourceEnable" @insert="insertResource" :subtype="subtype" />
9
9
  </div>
10
10
  <Emotion class="c-editor-emotion" @selected="emotionSelected"></Emotion>
11
11
 
@@ -37,7 +37,7 @@ Vue.directive("draggable", draggable);
37
37
 
38
38
  export default {
39
39
  name: "Tinymce",
40
- props: ["content", "height", "attachmentEnable", "resourceEnable"],
40
+ props: ["content", "height", "attachmentEnable", "resourceEnable", "subtype"],
41
41
  data: function () {
42
42
  return {
43
43
  data: this.content,
@@ -64,10 +64,12 @@
64
64
 
65
65
  <div class="c-combo-content__right">
66
66
  <!-- 已选技能 -->
67
- <el-divider>已选技能</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: "skillDialog",
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);