eoss-ui 0.4.35 → 0.4.36

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.
Files changed (74) hide show
  1. package/lib/button-group.js +2 -2
  2. package/lib/button.js +2 -2
  3. package/lib/card.js +2 -2
  4. package/lib/cascader.js +2 -2
  5. package/lib/checkbox-group.js +2 -2
  6. package/lib/clients.js +2 -2
  7. package/lib/data-table-form.js +4 -2
  8. package/lib/data-table.js +4 -2
  9. package/lib/date-picker.js +2 -2
  10. package/lib/dialog.js +9 -6
  11. package/lib/editor.js +1550 -0
  12. package/lib/enterprise.js +2 -2
  13. package/lib/eoss-ui.common.js +1777 -364
  14. package/lib/error-page.js +2 -2
  15. package/lib/flow-group.js +2 -2
  16. package/lib/flow-list.js +2 -2
  17. package/lib/flow.js +38 -21
  18. package/lib/form.js +2 -2
  19. package/lib/handle-user.js +2 -2
  20. package/lib/handler.js +2 -2
  21. package/lib/icons.js +10 -10
  22. package/lib/index.js +1 -1
  23. package/lib/input-number.js +9 -9
  24. package/lib/input.js +9 -9
  25. package/lib/label.js +62 -29
  26. package/lib/login.js +94 -104
  27. package/lib/main.js +8 -5
  28. package/lib/mainComp.js +4 -2
  29. package/lib/menu.js +2 -2
  30. package/lib/nav.js +2 -2
  31. package/lib/notify.js +2 -2
  32. package/lib/page.js +9 -9
  33. package/lib/pagination.js +2 -2
  34. package/lib/player.js +8 -8
  35. package/lib/qr-code.js +4 -4
  36. package/lib/radio-group.js +2 -2
  37. package/lib/select-ganged.js +2 -2
  38. package/lib/select.js +2 -2
  39. package/lib/selector-panel.js +52 -56
  40. package/lib/selector.js +9 -9
  41. package/lib/sizer.js +2 -2
  42. package/lib/steps.js +2 -2
  43. package/lib/switch.js +2 -2
  44. package/lib/table-form.js +2 -2
  45. package/lib/tabs-panel.js +2 -2
  46. package/lib/tabs.js +2 -2
  47. package/lib/theme-chalk/editor.css +1 -0
  48. package/lib/theme-chalk/index.css +1 -1
  49. package/lib/tips.js +11 -11
  50. package/lib/toolbar.js +2 -2
  51. package/lib/tree-group.js +2 -2
  52. package/lib/tree.js +9 -9
  53. package/lib/upload.js +26 -10
  54. package/lib/wujie.js +2 -2
  55. package/lib/wxlogin.js +2 -2
  56. package/package.json +4 -2
  57. package/packages/editor/index.js +5 -0
  58. package/packages/editor/src/color.vue +148 -0
  59. package/packages/editor/src/main.vue +106 -0
  60. package/packages/editor/src/toolbar.vue +365 -0
  61. package/packages/flow/src/main.vue +12 -8
  62. package/packages/flow/src/processForm.vue +40 -31
  63. package/packages/label/src/main.vue +66 -25
  64. package/packages/main/src/main.vue +4 -2
  65. package/packages/selector/src/main.vue +3 -3
  66. package/packages/selector-panel/src/main.vue +1 -0
  67. package/packages/theme-chalk/lib/editor.css +1 -0
  68. package/packages/theme-chalk/lib/index.css +1 -1
  69. package/packages/theme-chalk/src/editor.scss +64 -0
  70. package/packages/theme-chalk/src/index.scss +1 -0
  71. package/packages/tips/src/main.vue +3 -3
  72. package/packages/toolbar/src/main.vue +6 -6
  73. package/packages/upload/src/main.vue +21 -6
  74. package/src/index.js +4 -1
package/lib/editor.js ADDED
@@ -0,0 +1,1550 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 32);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 17:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("@wangeditor/editor-for-vue");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 19:
98
+ /***/ (function(module, exports) {
99
+
100
+ module.exports = require("@wangeditor/editor/dist/css/style.css?vue&type=style&index=0&prod&lang=css&");
101
+
102
+ /***/ }),
103
+
104
+ /***/ 2:
105
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
+
107
+ "use strict";
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
109
+ /* globals __VUE_SSR_CONTEXT__ */
110
+
111
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
112
+ // This module is a runtime utility for cleaner component module output and will
113
+ // be included in the final webpack user bundle.
114
+
115
+ function normalizeComponent(
116
+ scriptExports,
117
+ render,
118
+ staticRenderFns,
119
+ functionalTemplate,
120
+ injectStyles,
121
+ scopeId,
122
+ moduleIdentifier /* server only */,
123
+ shadowMode /* vue-cli only */
124
+ ) {
125
+ // Vue.extend constructor export interop
126
+ var options =
127
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
128
+
129
+ // render functions
130
+ if (render) {
131
+ options.render = render
132
+ options.staticRenderFns = staticRenderFns
133
+ options._compiled = true
134
+ }
135
+
136
+ // functional template
137
+ if (functionalTemplate) {
138
+ options.functional = true
139
+ }
140
+
141
+ // scopedId
142
+ if (scopeId) {
143
+ options._scopeId = 'data-v-' + scopeId
144
+ }
145
+
146
+ var hook
147
+ if (moduleIdentifier) {
148
+ // server build
149
+ hook = function (context) {
150
+ // 2.3 injection
151
+ context =
152
+ context || // cached call
153
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
154
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
155
+ // 2.2 with runInNewContext: true
156
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
157
+ context = __VUE_SSR_CONTEXT__
158
+ }
159
+ // inject component styles
160
+ if (injectStyles) {
161
+ injectStyles.call(this, context)
162
+ }
163
+ // register component module identifier for async chunk inferrence
164
+ if (context && context._registeredComponents) {
165
+ context._registeredComponents.add(moduleIdentifier)
166
+ }
167
+ }
168
+ // used by ssr in case component is cached and beforeCreate
169
+ // never gets called
170
+ options._ssrRegister = hook
171
+ } else if (injectStyles) {
172
+ hook = shadowMode
173
+ ? function () {
174
+ injectStyles.call(
175
+ this,
176
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
177
+ )
178
+ }
179
+ : injectStyles
180
+ }
181
+
182
+ if (hook) {
183
+ if (options.functional) {
184
+ // for template-only hot-reload because in that case the render fn doesn't
185
+ // go through the normalizer
186
+ options._injectStyles = hook
187
+ // register for functional component in vue file
188
+ var originalRender = options.render
189
+ options.render = function renderWithStyleInjection(h, context) {
190
+ hook.call(context)
191
+ return originalRender(h, context)
192
+ }
193
+ } else {
194
+ // inject component registration as beforeCreate hook
195
+ var existing = options.beforeCreate
196
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
197
+ }
198
+ }
199
+
200
+ return {
201
+ exports: scriptExports,
202
+ options: options
203
+ }
204
+ }
205
+
206
+
207
+ /***/ }),
208
+
209
+ /***/ 32:
210
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
211
+
212
+ "use strict";
213
+ // ESM COMPAT FLAG
214
+ __webpack_require__.r(__webpack_exports__);
215
+
216
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/main.vue?vue&type=template&id=250d187c&
217
+ var render = function () {
218
+ var _vm = this
219
+ var _h = _vm.$createElement
220
+ var _c = _vm._self._c || _h
221
+ return _c(
222
+ "div",
223
+ { staticClass: "es-editor" },
224
+ [
225
+ _vm._readonly
226
+ ? _c("div", {
227
+ style: { height: _vm.height },
228
+ attrs: { "data-slate-editor": "" },
229
+ domProps: { innerHTML: _vm._s(_vm.model) },
230
+ })
231
+ : [
232
+ _vm.cs
233
+ ? _c("Toolbars")
234
+ : [
235
+ _c("Toolbar", {
236
+ staticClass: "es-editor-toolbar",
237
+ attrs: {
238
+ editor: _vm.editor,
239
+ defaultConfig: _vm.toolbarConfig,
240
+ mode: _vm.mode,
241
+ },
242
+ }),
243
+ _c("Editor", {
244
+ staticClass: "es-editor-main",
245
+ style: { height: _vm.height },
246
+ attrs: { defaultConfig: _vm._editorConfig, mode: _vm.mode },
247
+ on: { onCreated: _vm.onCreated },
248
+ model: {
249
+ value: _vm.model,
250
+ callback: function ($$v) {
251
+ _vm.model = $$v
252
+ },
253
+ expression: "model",
254
+ },
255
+ }),
256
+ ],
257
+ ],
258
+ ],
259
+ 2
260
+ )
261
+ }
262
+ var staticRenderFns = []
263
+ render._withStripped = true
264
+
265
+
266
+ // CONCATENATED MODULE: ./packages/editor/src/main.vue?vue&type=template&id=250d187c&
267
+
268
+ // EXTERNAL MODULE: external "@wangeditor/editor-for-vue"
269
+ var editor_for_vue_ = __webpack_require__(17);
270
+
271
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/toolbar.vue?vue&type=template&id=5bf29942&
272
+ var toolbarvue_type_template_id_5bf29942_render = function () {
273
+ var _vm = this
274
+ var _h = _vm.$createElement
275
+ var _c = _vm._self._c || _h
276
+ return _c("div", { staticClass: "es-editor-toolbar" }, [
277
+ _c(
278
+ "div",
279
+ { staticClass: "es-editor-toolbar-item" },
280
+ [
281
+ _c(
282
+ "el-dropdown",
283
+ {
284
+ attrs: { placement: "bottom", trigger: "click" },
285
+ on: {
286
+ command: function (res) {
287
+ _vm.handleCommand("tag", res)
288
+ },
289
+ },
290
+ },
291
+ [
292
+ _c(
293
+ "el-tooltip",
294
+ {
295
+ staticClass: "item",
296
+ attrs: { effect: "dark", content: "标题", placement: "bottom" },
297
+ },
298
+ [
299
+ _c("el-button", { attrs: { size: "small" } }, [
300
+ _vm._v("\n " + _vm._s(_vm.tag)),
301
+ _c("i", {
302
+ staticClass: "el-icon-caret-bottom el-icon--right",
303
+ }),
304
+ ]),
305
+ ],
306
+ 1
307
+ ),
308
+ _c(
309
+ "el-dropdown-menu",
310
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
311
+ _vm._l(_vm._tags, function (item) {
312
+ return _c(
313
+ "el-dropdown-item",
314
+ {
315
+ key: item,
316
+ staticClass: "es-editor-dropdown-item",
317
+ class: { active: item == _vm.tag },
318
+ attrs: { command: item },
319
+ },
320
+ [_vm._v(_vm._s(item))]
321
+ )
322
+ }),
323
+ 1
324
+ ),
325
+ ],
326
+ 1
327
+ ),
328
+ ],
329
+ 1
330
+ ),
331
+ _c(
332
+ "div",
333
+ { staticClass: "es-editor-toolbar-item" },
334
+ [
335
+ _c(
336
+ "el-tooltip",
337
+ {
338
+ staticClass: "item",
339
+ attrs: { effect: "dark", content: "引用", placement: "bottom" },
340
+ },
341
+ [
342
+ _c("el-button", { attrs: { size: "small" } }, [
343
+ _c(
344
+ "svg",
345
+ {
346
+ staticClass: "es-icon-svg",
347
+ attrs: { viewBox: "0 0 1024 1024" },
348
+ },
349
+ [
350
+ _c("path", {
351
+ attrs: {
352
+ d: "M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z",
353
+ },
354
+ }),
355
+ ]
356
+ ),
357
+ ]),
358
+ ],
359
+ 1
360
+ ),
361
+ ],
362
+ 1
363
+ ),
364
+ _c(
365
+ "div",
366
+ { staticClass: "es-editor-toolbar-item" },
367
+ [
368
+ _c(
369
+ "el-tooltip",
370
+ {
371
+ staticClass: "item",
372
+ attrs: { effect: "dark", content: "粗体", placement: "bottom" },
373
+ },
374
+ [
375
+ _c(
376
+ "div",
377
+ {
378
+ staticClass: "es-text-center",
379
+ attrs: { slot: "content" },
380
+ slot: "content",
381
+ },
382
+ [_vm._v("粗体"), _c("br"), _vm._v("ctrl+b")]
383
+ ),
384
+ _c("el-button", { attrs: { size: "small" } }, [
385
+ _c(
386
+ "svg",
387
+ {
388
+ staticClass: "es-icon-svg",
389
+ attrs: { viewBox: "0 0 1024 1024" },
390
+ },
391
+ [
392
+ _c("path", {
393
+ attrs: {
394
+ d: "M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z",
395
+ },
396
+ }),
397
+ ]
398
+ ),
399
+ ]),
400
+ ],
401
+ 1
402
+ ),
403
+ ],
404
+ 1
405
+ ),
406
+ _c(
407
+ "div",
408
+ { staticClass: "es-editor-toolbar-item" },
409
+ [
410
+ _c(
411
+ "el-tooltip",
412
+ {
413
+ staticClass: "item",
414
+ attrs: { effect: "dark", content: "下划线", placement: "bottom" },
415
+ },
416
+ [
417
+ _c(
418
+ "div",
419
+ {
420
+ staticClass: "es-text-center",
421
+ attrs: { slot: "content" },
422
+ slot: "content",
423
+ },
424
+ [_vm._v("下划线 "), _c("br"), _vm._v("ctrl+u")]
425
+ ),
426
+ _c("el-button", { attrs: { size: "small" } }, [
427
+ _c(
428
+ "svg",
429
+ {
430
+ staticClass: "es-icon-svg",
431
+ attrs: { viewBox: "0 0 1024 1024" },
432
+ },
433
+ [
434
+ _c("path", {
435
+ attrs: {
436
+ d: "M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z",
437
+ },
438
+ }),
439
+ ]
440
+ ),
441
+ ]),
442
+ ],
443
+ 1
444
+ ),
445
+ ],
446
+ 1
447
+ ),
448
+ _c(
449
+ "div",
450
+ { staticClass: "es-editor-toolbar-item" },
451
+ [
452
+ _c(
453
+ "el-tooltip",
454
+ {
455
+ staticClass: "item",
456
+ attrs: { effect: "dark", content: "斜体", placement: "bottom" },
457
+ },
458
+ [
459
+ _c(
460
+ "div",
461
+ {
462
+ staticClass: "es-text-center",
463
+ attrs: { slot: "content" },
464
+ slot: "content",
465
+ },
466
+ [_vm._v("斜体"), _c("br"), _vm._v("ctrl+i")]
467
+ ),
468
+ _c("el-button", { attrs: { size: "small" } }, [
469
+ _c(
470
+ "svg",
471
+ {
472
+ staticClass: "es-icon-svg",
473
+ attrs: { viewBox: "0 0 1024 1024" },
474
+ },
475
+ [
476
+ _c("path", {
477
+ attrs: {
478
+ d: "M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z",
479
+ },
480
+ }),
481
+ ]
482
+ ),
483
+ ]),
484
+ ],
485
+ 1
486
+ ),
487
+ ],
488
+ 1
489
+ ),
490
+ _c(
491
+ "div",
492
+ { staticClass: "es-editor-toolbar-item" },
493
+ [
494
+ _c(
495
+ "el-dropdown",
496
+ {
497
+ attrs: { placement: "bottom", size: "small" },
498
+ on: {
499
+ command: function (res) {
500
+ _vm.handleCommand("tag", res)
501
+ },
502
+ },
503
+ },
504
+ [
505
+ _c("el-button", { attrs: { size: "small" } }, [
506
+ _c(
507
+ "svg",
508
+ {
509
+ staticClass: "es-icon-svg",
510
+ attrs: { viewBox: "0 0 1024 1024" },
511
+ },
512
+ [
513
+ _c("path", {
514
+ attrs: {
515
+ d: "M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z",
516
+ },
517
+ }),
518
+ _c("path", {
519
+ attrs: {
520
+ d: "M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z",
521
+ },
522
+ }),
523
+ _c("path", {
524
+ attrs: {
525
+ d: "M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z",
526
+ },
527
+ }),
528
+ ]
529
+ ),
530
+ _c("i", { staticClass: "el-icon-caret-bottom el-icon--right" }),
531
+ ]),
532
+ _c(
533
+ "el-dropdown-menu",
534
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
535
+ [
536
+ _c(
537
+ "el-tooltip",
538
+ {
539
+ staticClass: "item",
540
+ attrs: {
541
+ effect: "dark",
542
+ content: "ctrl+shift+x",
543
+ placement: "right",
544
+ },
545
+ },
546
+ [
547
+ _c("el-dropdown-item", { attrs: { command: "删除线" } }, [
548
+ _c(
549
+ "svg",
550
+ {
551
+ staticClass: "es-icon-svg",
552
+ attrs: { viewBox: "0 0 1024 1024" },
553
+ },
554
+ [
555
+ _c("path", {
556
+ attrs: {
557
+ d: "M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z",
558
+ },
559
+ }),
560
+ ]
561
+ ),
562
+ _c("span", { staticClass: "title" }, [_vm._v("删除线")]),
563
+ ]),
564
+ ],
565
+ 1
566
+ ),
567
+ _c(
568
+ "el-tooltip",
569
+ {
570
+ staticClass: "item",
571
+ attrs: {
572
+ effect: "dark",
573
+ content: "ctrl+e",
574
+ placement: "right",
575
+ },
576
+ },
577
+ [
578
+ _c("el-dropdown-item", { attrs: { command: "行内代码" } }, [
579
+ _c(
580
+ "svg",
581
+ {
582
+ staticClass: "es-icon-svg",
583
+ attrs: { viewBox: "0 0 1024 1024" },
584
+ },
585
+ [
586
+ _c("path", {
587
+ attrs: {
588
+ d: "M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z",
589
+ },
590
+ }),
591
+ ]
592
+ ),
593
+ _c("span", { staticClass: "title" }, [
594
+ _vm._v("行内代码"),
595
+ ]),
596
+ ]),
597
+ ],
598
+ 1
599
+ ),
600
+ _c("el-dropdown-item", { attrs: { command: "上标" } }, [
601
+ _c(
602
+ "svg",
603
+ {
604
+ staticClass: "es-icon-svg",
605
+ attrs: { viewBox: "0 0 1024 1024" },
606
+ },
607
+ [
608
+ _c("path", {
609
+ attrs: {
610
+ d: "M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z",
611
+ },
612
+ }),
613
+ ]
614
+ ),
615
+ _c("span", { staticClass: "title" }, [_vm._v("上标")]),
616
+ ]),
617
+ _c("el-dropdown-item", { attrs: { command: "下标" } }, [
618
+ _c(
619
+ "svg",
620
+ {
621
+ staticClass: "es-icon-svg",
622
+ attrs: { viewBox: "0 0 1024 1024" },
623
+ },
624
+ [
625
+ _c("path", {
626
+ attrs: {
627
+ d: "M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z",
628
+ },
629
+ }),
630
+ ]
631
+ ),
632
+ _c("span", { staticClass: "title" }, [_vm._v("下标")]),
633
+ ]),
634
+ _c("el-dropdown-item", { attrs: { command: "清除格式" } }, [
635
+ _c(
636
+ "svg",
637
+ {
638
+ staticClass: "es-icon-svg",
639
+ attrs: { viewBox: "0 0 1024 1024" },
640
+ },
641
+ [
642
+ _c("path", {
643
+ attrs: {
644
+ d: "M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0",
645
+ },
646
+ }),
647
+ ]
648
+ ),
649
+ _c("span", { staticClass: "title" }, [_vm._v("清除格式")]),
650
+ ]),
651
+ ],
652
+ 1
653
+ ),
654
+ ],
655
+ 1
656
+ ),
657
+ ],
658
+ 1
659
+ ),
660
+ _c(
661
+ "div",
662
+ { staticClass: "es-editor-toolbar-item" },
663
+ [
664
+ _c("Colors", {
665
+ attrs: { tips: "文字颜色" },
666
+ on: { select: _vm.selectColor },
667
+ }),
668
+ ],
669
+ 1
670
+ ),
671
+ _c(
672
+ "div",
673
+ { staticClass: "es-editor-toolbar-item" },
674
+ [
675
+ _c(
676
+ "Colors",
677
+ {
678
+ attrs: { tips: "背景颜色", title: "清除背景色" },
679
+ on: { select: _vm.selectBgColor },
680
+ },
681
+ [
682
+ _c(
683
+ "svg",
684
+ {
685
+ staticClass: "es-icon-svg",
686
+ attrs: { viewBox: "0 0 1024 1024" },
687
+ },
688
+ [
689
+ _c("path", {
690
+ attrs: {
691
+ d: "M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z",
692
+ },
693
+ }),
694
+ ]
695
+ ),
696
+ ]
697
+ ),
698
+ ],
699
+ 1
700
+ ),
701
+ _c(
702
+ "div",
703
+ { staticClass: "es-editor-toolbar-item" },
704
+ [
705
+ _c(
706
+ "el-dropdown",
707
+ {
708
+ attrs: { placement: "bottom", trigger: "click" },
709
+ on: {
710
+ command: function (res) {
711
+ _vm.handleCommand("size", res)
712
+ },
713
+ },
714
+ },
715
+ [
716
+ _c(
717
+ "el-tooltip",
718
+ {
719
+ staticClass: "item",
720
+ attrs: { effect: "dark", content: "字号", placement: "bottom" },
721
+ },
722
+ [
723
+ _c("el-button", { attrs: { size: "small" } }, [
724
+ _vm._v("\n " + _vm._s(_vm.fontSize)),
725
+ _c("i", {
726
+ staticClass: "el-icon-caret-bottom el-icon--right",
727
+ }),
728
+ ]),
729
+ ],
730
+ 1
731
+ ),
732
+ _c(
733
+ "el-dropdown-menu",
734
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
735
+ _vm._l(_vm._fontSizes, function (item) {
736
+ return _c(
737
+ "el-dropdown-item",
738
+ {
739
+ key: item,
740
+ staticClass: "es-editor-dropdown-item",
741
+ class: { active: item == _vm.fontSize },
742
+ attrs: { command: item },
743
+ },
744
+ [_vm._v(_vm._s(item))]
745
+ )
746
+ }),
747
+ 1
748
+ ),
749
+ ],
750
+ 1
751
+ ),
752
+ ],
753
+ 1
754
+ ),
755
+ _c(
756
+ "div",
757
+ { staticClass: "es-editor-toolbar-item" },
758
+ [
759
+ _c(
760
+ "el-dropdown",
761
+ {
762
+ attrs: { placement: "bottom", trigger: "click" },
763
+ on: {
764
+ command: function (res) {
765
+ _vm.handleCommand("family", res)
766
+ },
767
+ },
768
+ },
769
+ [
770
+ _c(
771
+ "el-tooltip",
772
+ {
773
+ staticClass: "item",
774
+ attrs: { effect: "dark", content: "字体", placement: "bottom" },
775
+ },
776
+ [
777
+ _c("el-button", { attrs: { size: "small" } }, [
778
+ _vm._v("\n " + _vm._s(_vm.fontFamily)),
779
+ _c("i", {
780
+ staticClass: "el-icon-caret-bottom el-icon--right",
781
+ }),
782
+ ]),
783
+ ],
784
+ 1
785
+ ),
786
+ _c(
787
+ "el-dropdown-menu",
788
+ { attrs: { slot: "dropdown" }, slot: "dropdown" },
789
+ _vm._l(_vm._fontFamilys, function (item) {
790
+ return _c(
791
+ "el-dropdown-item",
792
+ {
793
+ key: item,
794
+ staticClass: "es-editor-dropdown-item",
795
+ class: { active: item == _vm.fontFamily },
796
+ attrs: { command: item },
797
+ },
798
+ [_vm._v(_vm._s(item))]
799
+ )
800
+ }),
801
+ 1
802
+ ),
803
+ ],
804
+ 1
805
+ ),
806
+ ],
807
+ 1
808
+ ),
809
+ ])
810
+ }
811
+ var toolbarvue_type_template_id_5bf29942_staticRenderFns = []
812
+ toolbarvue_type_template_id_5bf29942_render._withStripped = true
813
+
814
+
815
+ // CONCATENATED MODULE: ./packages/editor/src/toolbar.vue?vue&type=template&id=5bf29942&
816
+
817
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/color.vue?vue&type=template&id=2a807a98&
818
+ var colorvue_type_template_id_2a807a98_render = function () {
819
+ var _vm = this
820
+ var _h = _vm.$createElement
821
+ var _c = _vm._self._c || _h
822
+ return _c(
823
+ "el-popover",
824
+ {
825
+ attrs: { placement: "bottom", width: "256" },
826
+ model: {
827
+ value: _vm.visible,
828
+ callback: function ($$v) {
829
+ _vm.visible = $$v
830
+ },
831
+ expression: "visible",
832
+ },
833
+ },
834
+ [
835
+ _c(
836
+ "el-tooltip",
837
+ {
838
+ staticClass: "item",
839
+ attrs: {
840
+ slot: "reference",
841
+ effect: "dark",
842
+ disabled: _vm.disabled,
843
+ content: _vm.tips,
844
+ placement: "bottom",
845
+ },
846
+ slot: "reference",
847
+ },
848
+ [
849
+ _c(
850
+ "el-button",
851
+ { attrs: { size: "small" } },
852
+ [
853
+ _vm._t("default", [
854
+ _c(
855
+ "svg",
856
+ {
857
+ staticClass: "es-icon-svg",
858
+ attrs: { viewBox: "0 0 1024 1024" },
859
+ },
860
+ [
861
+ _c("path", {
862
+ attrs: {
863
+ d: "M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z",
864
+ },
865
+ }),
866
+ ]
867
+ ),
868
+ ]),
869
+ _c("i", { staticClass: "el-icon-caret-bottom el-icon--right" }),
870
+ ],
871
+ 2
872
+ ),
873
+ ],
874
+ 1
875
+ ),
876
+ _c(
877
+ "ul",
878
+ { staticClass: "es-editor-color" },
879
+ [
880
+ _c(
881
+ "li",
882
+ {
883
+ staticClass: "es-editor-color-clear",
884
+ on: {
885
+ click: function ($event) {
886
+ $event.stopPropagation()
887
+ return _vm.handleClick($event)
888
+ },
889
+ },
890
+ },
891
+ [
892
+ _c(
893
+ "svg",
894
+ {
895
+ staticClass: "es-icon-svg",
896
+ attrs: { viewBox: "0 0 1024 1024" },
897
+ },
898
+ [
899
+ _c("path", {
900
+ attrs: {
901
+ d: "M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z",
902
+ },
903
+ }),
904
+ ]
905
+ ),
906
+ _vm._v("\n " + _vm._s(_vm.title) + "\n "),
907
+ ]
908
+ ),
909
+ _vm._l(_vm.colors, function (item) {
910
+ return _c(
911
+ "li",
912
+ {
913
+ key: item,
914
+ staticClass: "es-editor-color-item",
915
+ class: { active: _vm.active == item },
916
+ on: {
917
+ click: function ($event) {
918
+ $event.stopPropagation()
919
+ _vm.handleClick(item)
920
+ },
921
+ },
922
+ },
923
+ [
924
+ _c("div", {
925
+ staticClass: "es-editor-color-block",
926
+ style: { "background-color": item },
927
+ }),
928
+ ]
929
+ )
930
+ }),
931
+ ],
932
+ 2
933
+ ),
934
+ ],
935
+ 1
936
+ )
937
+ }
938
+ var colorvue_type_template_id_2a807a98_staticRenderFns = []
939
+ colorvue_type_template_id_2a807a98_render._withStripped = true
940
+
941
+
942
+ // CONCATENATED MODULE: ./packages/editor/src/color.vue?vue&type=template&id=2a807a98&
943
+
944
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/color.vue?vue&type=script&lang=js&
945
+ //
946
+ //
947
+ //
948
+ //
949
+ //
950
+ //
951
+ //
952
+ //
953
+ //
954
+ //
955
+ //
956
+ //
957
+ //
958
+ //
959
+ //
960
+ //
961
+ //
962
+ //
963
+ //
964
+ //
965
+ //
966
+ //
967
+ //
968
+ //
969
+ //
970
+ //
971
+ //
972
+ //
973
+ //
974
+ //
975
+ //
976
+ //
977
+ //
978
+ //
979
+ //
980
+ //
981
+ //
982
+ //
983
+ //
984
+ //
985
+ //
986
+ //
987
+ //
988
+ //
989
+ //
990
+
991
+ /* harmony default export */ var colorvue_type_script_lang_js_ = ({
992
+ name: 'colors',
993
+ props: {
994
+ tips: String,
995
+ title: {
996
+ type: String,
997
+ default: '默认颜色'
998
+ }
999
+ },
1000
+ computed: {
1001
+ disabled: function disabled() {
1002
+ return this.tips ? false : true;
1003
+ }
1004
+ },
1005
+ data: function data() {
1006
+ return {
1007
+ visible: false,
1008
+ colors: ['rgb(0, 0, 0)', 'rgb(38, 38, 38)', 'rgb(89, 89, 89)', 'rgb(140, 140, 140)', 'rgb(191, 191, 191)', 'rgb(217, 217, 217)', 'rgb(233, 233, 233)', 'rgb(245, 245, 245)', 'rgb(250, 250, 250)', 'rgb(255, 255, 255)', // 10
1009
+ 'rgb(225, 60, 57)', 'rgb(231, 95, 51)', 'rgb(235, 144, 58)', 'rgb(245, 219, 77)', 'rgb(114, 192, 64)', 'rgb(89, 191, 192)', 'rgb(66, 144, 247)', 'rgb(54, 88, 226)', 'rgb(106, 57, 201)', 'rgb(216, 68, 147)', // 10
1010
+ 'rgb(251, 233, 230)', 'rgb(252, 237, 225)', 'rgb(252, 239, 212)', 'rgb(252, 251, 207)', 'rgb(231, 246, 213)', 'rgb(218, 244, 240)', 'rgb(217, 237, 250)', 'rgb(224, 232, 250)', 'rgb(237, 225, 248)', 'rgb(246, 226, 234)', // 10
1011
+ 'rgb(255, 163, 158)', 'rgb(255, 187, 150)', 'rgb(255, 213, 145)', 'rgb(255, 251, 143)', 'rgb(183, 235, 143)', 'rgb(135, 232, 222)', 'rgb(145, 213, 255)', 'rgb(173, 198, 255)', 'rgb(211, 173, 247)', 'rgb(255, 173, 210)', // 10
1012
+ 'rgb(255, 77, 79)', 'rgb(255, 122, 69)', 'rgb(255, 169, 64)', 'rgb(255, 236, 61)', 'rgb(115, 209, 61)', 'rgb(54, 207, 201)', 'rgb(64, 169, 255)', 'rgb(89, 126, 247)', 'rgb(146, 84, 222)', 'rgb(247, 89, 171)', // 10
1013
+ 'rgb(207, 19, 34)', 'rgb(212, 56, 13)', 'rgb(212, 107, 8)', 'rgb(212, 177, 6)', 'rgb(56, 158, 13)', 'rgb(8, 151, 156)', 'rgb(9, 109, 217)', 'rgb(29, 57, 196)', 'rgb(83, 29, 171)', 'rgb(196, 29, 127)', // 10
1014
+ 'rgb(130, 0, 20)', 'rgb(135, 20, 0)', 'rgb(135, 56, 0)', 'rgb(97, 71, 0)', 'rgb(19, 82, 0)', 'rgb(0, 71, 79)', 'rgb(0, 58, 140)', 'rgb(6, 17, 120)', 'rgb(34, 7, 94)', 'rgb(120, 6, 80)' // 10
1015
+ ],
1016
+ active: ''
1017
+ };
1018
+ },
1019
+ mounted: function mounted() {},
1020
+
1021
+ methods: {
1022
+ handleClick: function handleClick(res) {
1023
+ this.visible = false;
1024
+ this.active = res;
1025
+ this.$emit('select', res);
1026
+ }
1027
+ }
1028
+ });
1029
+ // CONCATENATED MODULE: ./packages/editor/src/color.vue?vue&type=script&lang=js&
1030
+ /* harmony default export */ var src_colorvue_type_script_lang_js_ = (colorvue_type_script_lang_js_);
1031
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1032
+ var componentNormalizer = __webpack_require__(2);
1033
+
1034
+ // CONCATENATED MODULE: ./packages/editor/src/color.vue
1035
+
1036
+
1037
+
1038
+
1039
+
1040
+ /* normalize component */
1041
+
1042
+ var component = Object(componentNormalizer["a" /* default */])(
1043
+ src_colorvue_type_script_lang_js_,
1044
+ colorvue_type_template_id_2a807a98_render,
1045
+ colorvue_type_template_id_2a807a98_staticRenderFns,
1046
+ false,
1047
+ null,
1048
+ null,
1049
+ null
1050
+
1051
+ )
1052
+
1053
+ /* harmony default export */ var color = (component.exports);
1054
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/toolbar.vue?vue&type=script&lang=js&
1055
+ //
1056
+ //
1057
+ //
1058
+ //
1059
+ //
1060
+ //
1061
+ //
1062
+ //
1063
+ //
1064
+ //
1065
+ //
1066
+ //
1067
+ //
1068
+ //
1069
+ //
1070
+ //
1071
+ //
1072
+ //
1073
+ //
1074
+ //
1075
+ //
1076
+ //
1077
+ //
1078
+ //
1079
+ //
1080
+ //
1081
+ //
1082
+ //
1083
+ //
1084
+ //
1085
+ //
1086
+ //
1087
+ //
1088
+ //
1089
+ //
1090
+ //
1091
+ //
1092
+ //
1093
+ //
1094
+ //
1095
+ //
1096
+ //
1097
+ //
1098
+ //
1099
+ //
1100
+ //
1101
+ //
1102
+ //
1103
+ //
1104
+ //
1105
+ //
1106
+ //
1107
+ //
1108
+ //
1109
+ //
1110
+ //
1111
+ //
1112
+ //
1113
+ //
1114
+ //
1115
+ //
1116
+ //
1117
+ //
1118
+ //
1119
+ //
1120
+ //
1121
+ //
1122
+ //
1123
+ //
1124
+ //
1125
+ //
1126
+ //
1127
+ //
1128
+ //
1129
+ //
1130
+ //
1131
+ //
1132
+ //
1133
+ //
1134
+ //
1135
+ //
1136
+ //
1137
+ //
1138
+ //
1139
+ //
1140
+ //
1141
+ //
1142
+ //
1143
+ //
1144
+ //
1145
+ //
1146
+ //
1147
+ //
1148
+ //
1149
+ //
1150
+ //
1151
+ //
1152
+ //
1153
+ //
1154
+ //
1155
+ //
1156
+ //
1157
+ //
1158
+ //
1159
+ //
1160
+ //
1161
+ //
1162
+ //
1163
+ //
1164
+ //
1165
+ //
1166
+ //
1167
+ //
1168
+ //
1169
+ //
1170
+ //
1171
+ //
1172
+ //
1173
+ //
1174
+ //
1175
+ //
1176
+ //
1177
+ //
1178
+ //
1179
+ //
1180
+ //
1181
+ //
1182
+ //
1183
+ //
1184
+ //
1185
+ //
1186
+ //
1187
+ //
1188
+ //
1189
+ //
1190
+ //
1191
+ //
1192
+ //
1193
+ //
1194
+ //
1195
+ //
1196
+ //
1197
+ //
1198
+ //
1199
+ //
1200
+ //
1201
+ //
1202
+ //
1203
+ //
1204
+ //
1205
+ //
1206
+ //
1207
+ //
1208
+ //
1209
+ //
1210
+ //
1211
+ //
1212
+ //
1213
+ //
1214
+ //
1215
+ //
1216
+ //
1217
+ //
1218
+ //
1219
+ //
1220
+ //
1221
+ //
1222
+ //
1223
+ //
1224
+ //
1225
+ //
1226
+ //
1227
+ //
1228
+ //
1229
+ //
1230
+ //
1231
+ //
1232
+ //
1233
+ //
1234
+ //
1235
+ //
1236
+ //
1237
+ //
1238
+ //
1239
+ //
1240
+ //
1241
+ //
1242
+ //
1243
+ //
1244
+ //
1245
+ //
1246
+ //
1247
+ //
1248
+ //
1249
+ //
1250
+ //
1251
+ //
1252
+ //
1253
+ //
1254
+ //
1255
+ //
1256
+ //
1257
+ //
1258
+ //
1259
+ //
1260
+ //
1261
+ //
1262
+ //
1263
+ //
1264
+ //
1265
+ //
1266
+ //
1267
+ //
1268
+ //
1269
+ //
1270
+ //
1271
+ //
1272
+ //
1273
+ //
1274
+ //
1275
+ //
1276
+ //
1277
+ //
1278
+ //
1279
+ //
1280
+ //
1281
+ //
1282
+ //
1283
+ //
1284
+ //
1285
+ //
1286
+ //
1287
+ //
1288
+ //
1289
+ //
1290
+ //
1291
+ //
1292
+ //
1293
+ //
1294
+ //
1295
+ //
1296
+ //
1297
+ //
1298
+ //
1299
+ //
1300
+ //
1301
+
1302
+
1303
+ /* harmony default export */ var toolbarvue_type_script_lang_js_ = ({
1304
+ name: 'Toolbars',
1305
+ components: { Colors: color },
1306
+ inject: {
1307
+ elForm: {
1308
+ default: ''
1309
+ },
1310
+ elFormItem: {
1311
+ default: ''
1312
+ }
1313
+ },
1314
+ props: {
1315
+ tags: Array,
1316
+ quote: {
1317
+ type: Boolean,
1318
+ default: true
1319
+ },
1320
+ fontSizes: Array,
1321
+ fontFamilys: Array
1322
+ },
1323
+ computed: {
1324
+ _tags: function _tags() {
1325
+ var tags = ['h1', 'h2', 'h3', 'h4', 'h5', '正文'];
1326
+ if (this.tags && this.tags.length) {
1327
+ return this.tags.includes('正文') ? this.tags : this.tags.concat(['正文']);
1328
+ }
1329
+ return tags;
1330
+ },
1331
+ _fontSizes: function _fontSizes() {
1332
+ var fontSizes = ['默认字号', '12px', '13px', '14px', '15px', '16px', '19px', '22px', '24px', '29px', '32px', '40px', '48px'];
1333
+ if (this.fontSizes && this.fontSizes.length) {
1334
+ return this.fontSizes.includes('默认字号') ? this.fontSizes : ['默认字号'].concat(this.fontSizes);
1335
+ }
1336
+ return fontSizes;
1337
+ },
1338
+ _fontFamilys: function _fontFamilys() {
1339
+ var fontFamilys = ['默认字体', '黑体', '仿宋', '楷体', '标楷体', '华文仿宋', '华文楷体', '宋体', '微软雅黑', 'Arial', 'Tahoma', 'Verdana', 'Times New Roman', 'Courier New'];
1340
+ if (this.fontFamilys && this.fontFamilys.length) {
1341
+ var i = this.fontFamilys.findIndex('默认字体');
1342
+ if (i > -1) {
1343
+ this.fontFamilys.splice(i, 1);
1344
+ }
1345
+ return fontFamilys.concat(this.fontFamilys);
1346
+ }
1347
+ return fontFamilys;
1348
+ }
1349
+ },
1350
+ data: function data() {
1351
+ return {
1352
+ tag: '正文',
1353
+ fontSize: '默认字号',
1354
+ fontFamily: '默认字体'
1355
+ };
1356
+ },
1357
+ mounted: function mounted() {},
1358
+
1359
+ methods: {
1360
+ handleCommand: function handleCommand(type, res) {
1361
+ switch (type) {
1362
+ case 'size':
1363
+ this.fontSize = res;
1364
+ break;
1365
+ case 'family':
1366
+ this.fontFamily = res;
1367
+ break;
1368
+ default:
1369
+ this.tag = res;
1370
+ }
1371
+ console.log(res);
1372
+ },
1373
+ selectColor: function selectColor(res) {
1374
+ console.log(res);
1375
+ },
1376
+ selectBgColor: function selectBgColor(res) {
1377
+ console.log(res);
1378
+ }
1379
+ },
1380
+ beforeDestroy: function beforeDestroy() {
1381
+ var editor = this.editor;
1382
+ if (editor == null) return;
1383
+ editor.destroy(); // 组件销毁时,及时销毁编辑器
1384
+ }
1385
+ });
1386
+ // CONCATENATED MODULE: ./packages/editor/src/toolbar.vue?vue&type=script&lang=js&
1387
+ /* harmony default export */ var src_toolbarvue_type_script_lang_js_ = (toolbarvue_type_script_lang_js_);
1388
+ // EXTERNAL MODULE: external "@wangeditor/editor/dist/css/style.css?vue&type=style&index=0&prod&lang=css&"
1389
+ var stylevue_type_style_index_0_prod_lang_css_ = __webpack_require__(19);
1390
+
1391
+ // CONCATENATED MODULE: ./packages/editor/src/toolbar.vue
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+ /* normalize component */
1399
+
1400
+ var toolbar_component = Object(componentNormalizer["a" /* default */])(
1401
+ src_toolbarvue_type_script_lang_js_,
1402
+ toolbarvue_type_template_id_5bf29942_render,
1403
+ toolbarvue_type_template_id_5bf29942_staticRenderFns,
1404
+ false,
1405
+ null,
1406
+ null,
1407
+ null
1408
+
1409
+ )
1410
+
1411
+ /* harmony default export */ var toolbar = (toolbar_component.exports);
1412
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/editor/src/main.vue?vue&type=script&lang=js&
1413
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
1414
+
1415
+ //
1416
+ //
1417
+ //
1418
+ //
1419
+ //
1420
+ //
1421
+ //
1422
+ //
1423
+ //
1424
+ //
1425
+ //
1426
+ //
1427
+ //
1428
+ //
1429
+ //
1430
+ //
1431
+ //
1432
+ //
1433
+ //
1434
+ //
1435
+ //
1436
+ //
1437
+ //
1438
+ //
1439
+ //
1440
+ //
1441
+ //
1442
+ //
1443
+ //
1444
+
1445
+
1446
+
1447
+ /* harmony default export */ var mainvue_type_script_lang_js_ = ({
1448
+ name: 'EsEditor',
1449
+ inheritAttrs: false,
1450
+ components: { Editor: editor_for_vue_["Editor"], Toolbar: editor_for_vue_["Toolbar"], Toolbars: toolbar },
1451
+ inject: {
1452
+ elForm: {
1453
+ default: ''
1454
+ },
1455
+ elFormItem: {
1456
+ default: ''
1457
+ }
1458
+ },
1459
+ props: {
1460
+ mode: {
1461
+ type: String,
1462
+ validator: function validator(val) {
1463
+ return ['default', 'simple'].includes(val);
1464
+ },
1465
+
1466
+ default: 'default'
1467
+ },
1468
+ readonly: Boolean,
1469
+ value: String,
1470
+ toolbarConfig: Object,
1471
+ editorConfig: Object,
1472
+ height: {
1473
+ type: String,
1474
+ default: '500px'
1475
+ },
1476
+ cs: Boolean
1477
+ },
1478
+ computed: {
1479
+ model: {
1480
+ get: function get() {
1481
+ return this.value;
1482
+ },
1483
+ set: function set(val) {
1484
+ this.$emit('input', val);
1485
+ return val;
1486
+ }
1487
+ },
1488
+ _editorConfig: function _editorConfig() {
1489
+ var config = { placeholder: '请输入内容...' };
1490
+ return this.editorConfig ? _extends({}, config, this.editorConfig) : config;
1491
+ },
1492
+ _readonly: function _readonly() {
1493
+ return this.readonly || this._editorConfig.readOnly || (this.elForm || {}).readonly || (this.elFormItem || {}).readonly;
1494
+ }
1495
+ },
1496
+ data: function data() {
1497
+ return {
1498
+ editor: null
1499
+ };
1500
+ },
1501
+ mounted: function mounted() {},
1502
+
1503
+ methods: {
1504
+ onCreated: function onCreated(editor) {
1505
+ this.editor = Object.seal(editor);
1506
+ this.$emit('created', this.editor);
1507
+ this.$emit('onCreated', this.editor);
1508
+ }
1509
+ },
1510
+ beforeDestroy: function beforeDestroy() {
1511
+ var editor = this.editor;
1512
+ if (editor == null) return;
1513
+ editor.destroy(); // 组件销毁时,及时销毁编辑器
1514
+ }
1515
+ });
1516
+ // CONCATENATED MODULE: ./packages/editor/src/main.vue?vue&type=script&lang=js&
1517
+ /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
1518
+ // CONCATENATED MODULE: ./packages/editor/src/main.vue
1519
+
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+ /* normalize component */
1526
+
1527
+ var main_component = Object(componentNormalizer["a" /* default */])(
1528
+ src_mainvue_type_script_lang_js_,
1529
+ render,
1530
+ staticRenderFns,
1531
+ false,
1532
+ null,
1533
+ null,
1534
+ null
1535
+
1536
+ )
1537
+
1538
+ /* harmony default export */ var main = (main_component.exports);
1539
+ // CONCATENATED MODULE: ./packages/editor/index.js
1540
+
1541
+
1542
+ main.install = function (Vue) {
1543
+ return Vue.component(main.name, main);
1544
+ };
1545
+
1546
+ /* harmony default export */ var editor = __webpack_exports__["default"] = (main);
1547
+
1548
+ /***/ })
1549
+
1550
+ /******/ });