@jx3box/jx3box-editor 1.8.7 → 1.8.9

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.
@@ -23,6 +23,7 @@
23
23
  @import "tinymce/macro.less";
24
24
  @import "tinymce/qixue.less";
25
25
  @import "tinymce/pz.less";
26
+ @import "tinymce/combo.less";
26
27
 
27
28
  @import "module/directory.less";
28
29
  @import "module/icon.less";
@@ -0,0 +1,311 @@
1
+ .scrollbar() {
2
+ &::-webkit-scrollbar {
3
+ width: 4px;
4
+ }
5
+ &::-webkit-scrollbar-track,
6
+ &::-webkit-scrollbar-track-piece {
7
+ background-color: #fafafa;
8
+ border-radius: 6px;
9
+ }
10
+ &::-webkit-scrollbar-thumb {
11
+ background-color: #eee;
12
+ border-radius: 6px;
13
+ }
14
+ &::-webkit-scrollbar-button,
15
+ &::-webkit-scrollbar-corner,
16
+ &::-webkit-resizer {
17
+ display: none;
18
+ }
19
+ }
20
+
21
+ .m-resource-combo {
22
+ .m-combo-list {
23
+ max-height: 230px;
24
+ overflow: auto;
25
+ .scrollbar();
26
+ }
27
+ .m-database-search {
28
+ position: sticky;
29
+ z-index: 100;
30
+ top: 0;
31
+ // padding: 10px 20px 10px 20px;
32
+ background-color: #fff;
33
+ .pr;
34
+
35
+ .u-client {
36
+ // .pa;.lt(20px,10px);
37
+ margin-right: 15px;
38
+ }
39
+ .u-input {
40
+ flex: 1;
41
+ }
42
+ display: flex;
43
+ }
44
+
45
+ .m-database-tip {
46
+ .x;
47
+ // .fz(12px);
48
+ color: #aaa;
49
+ margin: 80px auto;
50
+ // font-weight:300;
51
+ letter-spacing: 1px;
52
+ min-height: 120px;
53
+ }
54
+
55
+ // 加载更多
56
+ .m-archive-more {
57
+ .none;
58
+ margin: 0 20px 10px 20px;
59
+ box-sizing: border-box;
60
+ width: calc(100% - 40px);
61
+ }
62
+ .m-archive-more.show {
63
+ .db;
64
+ }
65
+
66
+ // 分页
67
+ .m-archive-pages {
68
+ overflow-x: auto;
69
+ margin: 0 20px;
70
+ .x;
71
+ }
72
+
73
+ .m-resource-count {
74
+ .mt(0);
75
+ .mb(10px);
76
+
77
+ .lh(28px);
78
+
79
+ .pr;
80
+ }
81
+
82
+ .m-resource-list {
83
+ .mt(10px);
84
+ padding: 0;
85
+ margin: 0;
86
+ .scrollbar();
87
+
88
+ .u-item {
89
+ .db;
90
+ border: 2px solid @border-hr;
91
+ background: #fafbfc;
92
+ margin-bottom: 10px;
93
+ padding: 10px 10px 10px 70px;
94
+ min-height: 60px;
95
+ .r(6px);
96
+ &:hover {
97
+ background-color: #e7f9ff;
98
+ }
99
+ &.on {
100
+ border-color: #34d058;
101
+ background-color: #fff;
102
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
103
+ // &:hover{
104
+ // border:1px dashed #ddd;
105
+ // background-color:#eee;
106
+ // }
107
+ }
108
+ .pr;
109
+ .pointer;
110
+ }
111
+ .u-link {
112
+ .db;
113
+ color: @color;
114
+ }
115
+ .u-pic {
116
+ .db;
117
+ .pa;
118
+ .lt(10px);
119
+ .size(48px);
120
+ .r(6px);
121
+ box-shadow: 0 0 1px inset rgba(0, 0, 0, 0.2);
122
+ }
123
+ .u-id {
124
+ .fz(10px);
125
+ color: #555;
126
+ .pa;
127
+ .rt(10px);
128
+ .x(right);
129
+ }
130
+ .u-detach {
131
+ .mt(4px);
132
+ .db;
133
+ }
134
+ .u-primary {
135
+ .pr;
136
+ }
137
+ .u-raw {
138
+ .pa;
139
+ .rb(0);
140
+ }
141
+ .u-name {
142
+ .fz(14px, 2);
143
+ .bold;
144
+ .db;
145
+ em {
146
+ .fz(12px);
147
+ color: #999;
148
+ font-weight: normal;
149
+ font-style: normal;
150
+ }
151
+ }
152
+ .u-content {
153
+ .fz(13px, 1.8);
154
+ .mb(5px);
155
+ .db;
156
+
157
+ .u-map,
158
+ .u-life {
159
+ .mr(20px);
160
+ }
161
+ }
162
+ .u-remark {
163
+ .fz(12px, 1.8);
164
+ color: #aaa;
165
+ .db;
166
+
167
+ em {
168
+ background-color: #eee;
169
+ padding: 0 5px;
170
+ margin: 0 3px;
171
+ .r(3px);
172
+ }
173
+ }
174
+ .u-desc {
175
+ .fz(12px, 1.8);
176
+ .db;
177
+ white-space: pre-wrap;
178
+ margin: 4px 0;
179
+
180
+ em {
181
+ background-color: #f3f3f3;
182
+ padding: 2px 5px;
183
+ margin-right: 5px;
184
+ color: #999;
185
+ .r(3px);
186
+ .fz(12px);
187
+ font-style: normal;
188
+ }
189
+
190
+ sub {
191
+ font-size: 100%;
192
+ .ps;
193
+ }
194
+ }
195
+ .u-props {
196
+ .mt(10px);
197
+ border-top: 1px dashed #ddd;
198
+ padding: 10px 0;
199
+ .clearfix;
200
+ .u-desc {
201
+ .w(50%);
202
+ .fl;
203
+ }
204
+ .none;
205
+ &.on {
206
+ .db;
207
+ }
208
+ }
209
+ }
210
+ .m-select-content {
211
+ height: calc(100% - 200px);
212
+ overflow: auto;
213
+ }
214
+ // 已选数据
215
+ .m-selected-skills {
216
+ height: 70px;
217
+ border: 1px solid #ddd;
218
+ padding: 10px;
219
+ .scrollbar();
220
+ overflow-y: auto;
221
+ .m-skills-list {
222
+ .flex;
223
+ gap: 30px;
224
+ list-style: none;
225
+ padding: 0;
226
+ margin: 0;
227
+ .flex;
228
+ flex-wrap: wrap;
229
+ }
230
+ .m-skill {
231
+ // position: relative;
232
+ // display: flex;
233
+ // justify-content: center;
234
+ .pr;
235
+
236
+ &:not(:last-of-type)::after {
237
+ content: "▲";
238
+ .pa;
239
+ right: -25px;
240
+ top: 15px;
241
+ transform: rotate(90deg);
242
+ }
243
+
244
+ .u-remove-icon {
245
+ .pa;
246
+ right: -4px;
247
+ top: -4px;
248
+ cursor: pointer;
249
+ // .none;
250
+
251
+ background-color:#c00;
252
+ .size(12px);
253
+ .r(50%);
254
+ .db;
255
+ i{
256
+ color:#fff;
257
+ .fz(12px);
258
+ .db;
259
+ }
260
+ &:hover {
261
+ background-color:#f00;
262
+ }
263
+ }
264
+
265
+ .u-gcd-icon {
266
+ .pa;
267
+ // 左上角
268
+ left: -4px;
269
+ top: -4px;
270
+ // background-color: #fcf003;
271
+ background-color: #0366d6;
272
+ .size(12px);
273
+ .r(50%);
274
+ .db;
275
+
276
+ i{
277
+ color:#fff;
278
+ .fz(12px);
279
+ .db;
280
+ }
281
+ }
282
+
283
+ .u-skill-icon {
284
+ .size(48px, 48px);
285
+ }
286
+
287
+ .u-name {
288
+ display: block;
289
+ font-size: 12px;
290
+ text-align: center;
291
+ overflow: hidden;
292
+ white-space: nowrap;
293
+ width: 48px;
294
+ }
295
+
296
+ .u-mask {
297
+ .pa;
298
+ .lt(0);
299
+ .size(48px, 48px);
300
+ background-color: rgba(0, 0, 0, 0.5);
301
+ .r(6px);
302
+ .none;
303
+ .pointer;
304
+ }
305
+
306
+ &:hover {
307
+ cursor: move;
308
+ }
309
+ }
310
+ }
311
+ }
@@ -0,0 +1,81 @@
1
+ .c-article-tinymce:not(.c-article-editor) {
2
+ .w-skill-combo {
3
+ .flex;
4
+ gap: 20px;
5
+ flex-wrap: wrap;
6
+ list-style: none;
7
+ padding:0;
8
+ margin:0;
9
+ }
10
+ .w-skill-combo-item {
11
+ list-style: none;
12
+ .pr;
13
+ .flex;
14
+ flex-direction: column;
15
+ align-items: center;
16
+ &:not(:last-of-type)::after {
17
+ content: "▲";
18
+ .pa;
19
+ right: -20px;
20
+ top: 5px;
21
+ transform: rotate(90deg);
22
+ }
23
+
24
+ img {
25
+ border: none;
26
+ padding: 0;
27
+ margin: 0;
28
+ }
29
+
30
+ .u-gcd-icon {
31
+ .pa;
32
+ // 左上角
33
+ left: -4px;
34
+ top: -4px;
35
+ background-color: #0366d6;
36
+ .size(12px);
37
+ .r(50%);
38
+ .db;
39
+
40
+ i {
41
+ color: #fff;
42
+ .fz(12px);
43
+ .db;
44
+ }
45
+ }
46
+ .u-skill-name {
47
+ .fz(13px,1.5);
48
+ width: 56px;
49
+ overflow: hidden;
50
+ text-overflow: clip;
51
+ white-space: pre-wrap;
52
+ text-align: center;
53
+ }
54
+ }
55
+ }
56
+ .c-article-editor {
57
+ .e-skill-combo {
58
+ font-size: 14px;
59
+ width: 100%;
60
+ box-sizing: border-box;
61
+ background-color: #f1f8ff;
62
+ border: 1px solid #c8e1ff;
63
+ color: #62a9ff;
64
+ padding: 10px 10px 10px 30px;
65
+ font-family: Monaco, Consolas, "Lucida Console", "Courier New", serif;
66
+ position: relative;
67
+ *zoom: 1;
68
+ border-radius: 3px;
69
+ }
70
+ .e-skill-combo:after {
71
+ content: "JX3BOX·连招套路";
72
+ position: absolute;
73
+ right: 8px;
74
+ top: 8px;
75
+ background-color: #62a9ff;
76
+ color: #fff;
77
+ border-radius: 3px;
78
+ padding: 2px 8px;
79
+ line-height: 21px;
80
+ }
81
+ }
@@ -39,7 +39,6 @@
39
39
 
40
40
  .c-editor-tinymce {
41
41
 
42
-
43
42
  .u-tutorial {
44
43
  padding:0 10px;
45
44
  .mt(10px);
@@ -0,0 +1,33 @@
1
+ import $ from "jquery";
2
+ import { iconLink } from "@jx3box/jx3box-common/js/utils";
3
+
4
+ function renderCombo(selector = ".e-skill-combo .w-skill-combo-item") {
5
+ try {
6
+ let html = ''
7
+ $(selector).each(function(i, ele) {
8
+ // 获取嵌入源地址
9
+ let url = $(this).text();
10
+
11
+ const [id, name, icon, extend] = url.split(",");
12
+
13
+ // 渲染
14
+ let code = `
15
+ <span class="w-skill-combo-item">
16
+ <img class="u-skill-icon" src="${iconLink(icon)}" alt="${icon}" title="${name}" />
17
+ <span class="u-skill-name" title="${name}">${name}</span>
18
+ <i class="u-gcd-icon ${extend && extend.gcd ? 'is-show' : ''}" title="无GCD技能">
19
+ <i class="el-icon-time"></i>
20
+ </i>
21
+ </span>
22
+ `;
23
+ html += code;
24
+ });
25
+
26
+ // 挂载点
27
+ $(selector).parent().html(html);
28
+ } catch(e) {
29
+ console.log(e)
30
+ }
31
+ }
32
+
33
+ export default renderCombo;
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-editor",
3
- "version": "1.8.7",
3
+ "version": "1.8.9",
4
4
  "description": "JX3BOX Article & Editor",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "dev": "env DEV_SERVER=true vue-cli-service serve",
8
8
  "serve": "vue-cli-service serve",
9
+ "less": "less-watch-compiler public/css public/css",
9
10
  "build": "vue-cli-service build",
10
11
  "lint": "vue-cli-service lint",
11
12
  "inspect": "vue inspect > output.js",
@@ -51,9 +52,12 @@
51
52
  "lodash": "^4.17.15",
52
53
  "photoswipe": "^4.1.2",
53
54
  "prismjs": "^1.20.0",
55
+ "sortablejs": "^1.15.0",
54
56
  "vue": "^2.6.11",
57
+ "vue-contextmenujs": "^1.4.9",
55
58
  "vue-gallery-slideshow": "^1.5.2",
56
59
  "vue-photoswipe.js": "^2.0.23",
60
+ "vue-plugin-load-script": "^1.3.6",
57
61
  "xss": "^1.0.8"
58
62
  },
59
63
  "devDependencies": {
@@ -67,6 +71,7 @@
67
71
  "eslint-plugin-vue": "^6.2.2",
68
72
  "less": "^3.0.4",
69
73
  "less-loader": "^5.0.0",
74
+ "less-watch-compiler": "^1.16.3",
70
75
  "style-resources-loader": "^1.3.3",
71
76
  "vue-cli-plugin-element": "~1.0.1",
72
77
  "vue-svg-inline-loader": "^1.4.6",