@web-utils/component 2.0.10 → 2.0.11
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/dist/chunks/3d28cc08.js +57 -0
- package/dist/chunks/{41a066be.js → 44b78389.js} +8 -8
- package/dist/chunks/5d33812d.js +147 -0
- package/dist/chunks/{61ad06b2.js → 822300f3.js} +3 -3
- package/dist/chunks/9d848bf6.js +99 -0
- package/dist/chunks/a0bb327b.js +96 -0
- package/dist/chunks/a8891d2c.js +30 -0
- package/dist/chunks/c69d5628.js +248 -0
- package/dist/chunks/de9fe802.js +24 -0
- package/dist/chunks/{5a78e0db.js → e1939731.js} +6 -5
- package/dist/components/address-input/index.js +56 -43
- package/dist/components/address-input/style.css +15 -1
- package/dist/components/aside-menu/index.js +36 -30
- package/dist/components/aside-menu/style.css +9 -1
- package/dist/components/awesome-button/index.js +35 -32
- package/dist/components/base.css +66 -1
- package/dist/components/capsule-tab/index.js +33 -27
- package/dist/components/capsule-tab/style.css +32 -1
- package/dist/components/chunk-file-uploader/index.js +88 -54
- package/dist/components/chunk-file-uploader/style.css +4 -1
- package/dist/components/chunk-file-uploader-button/index.js +31 -25
- package/dist/components/chunk-file-uploader-button/style.css +17 -1
- package/dist/components/chunk-file-uploader-drop/index.js +42 -28
- package/dist/components/chunk-file-uploader-drop/style.css +12 -1
- package/dist/components/chunk-file-uploader-file/index.js +212 -134
- package/dist/components/chunk-file-uploader-file/style.css +125 -1
- package/dist/components/chunk-file-uploader-files/index.js +34 -28
- package/dist/components/chunk-file-uploader-files/style.css +9 -1
- package/dist/components/chunk-file-uploader-list/index.js +35 -29
- package/dist/components/chunk-file-uploader-list/style.css +9 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +38 -30
- package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
- package/dist/components/code-mirror-editor/index.js +181 -153
- package/dist/components/code-mirror-editor/style.css +17 -1
- package/dist/components/color-picker/index.js +68 -49
- package/dist/components/confirm-button/index.js +21 -19
- package/dist/components/confirmable/index.js +19 -18
- package/dist/components/context-menu/index.js +130 -108
- package/dist/components/context-menu/style.css +88 -1
- package/dist/components/custom-scrollbar/index.js +67 -49
- package/dist/components/data-table-picker/index.js +81 -62
- package/dist/components/dynamic-table/index.js +113 -89
- package/dist/components/dynamic-table/style.css +30 -1
- package/dist/components/e-charts/index.js +201 -120
- package/dist/components/e-charts/style.css +10 -1
- package/dist/components/editable-progress/index.js +93 -60
- package/dist/components/editable-progress/style.css +37 -1
- package/dist/components/editable-tree/index.js +638 -423
- package/dist/components/editable-tree/style.css +82 -1
- package/dist/components/egd-collapse/index.js +46 -33
- package/dist/components/egd-collapse-item/index.js +76 -60
- package/dist/components/element-dialog/index.js +147 -95
- package/dist/components/element-dialog/style.css +102 -1
- package/dist/components/empty-view/index.js +34 -28
- package/dist/components/empty-view/style.css +17 -1
- package/dist/components/error-view/index.js +32 -26
- package/dist/components/error-view/style.css +17 -1
- package/dist/components/flex-column/index.js +40 -25
- package/dist/components/flex-item/index.js +57 -29
- package/dist/components/flex-row/index.js +40 -25
- package/dist/components/flex-scroller/index.js +32 -26
- package/dist/components/flex-scroller/style.css +20 -1
- package/dist/components/form-button/index.js +38 -34
- package/dist/components/form-cascader/index.js +81 -71
- package/dist/components/form-checkbox-group/index.js +113 -88
- package/dist/components/form-checkbox-group/style.css +51 -1
- package/dist/components/form-date-picker/index.js +132 -70
- package/dist/components/form-holder/index.js +39 -32
- package/dist/components/form-input/index.js +62 -56
- package/dist/components/form-input-email/index.js +60 -48
- package/dist/components/form-input-id-card/index.js +59 -53
- package/dist/components/form-input-number/index.js +68 -61
- package/dist/components/form-input-number/style.css +12 -1
- package/dist/components/form-input-phone-number/index.js +55 -49
- package/dist/components/form-input-time/index.js +59 -53
- package/dist/components/form-item/index.js +123 -80
- package/dist/components/form-item/style.css +11 -1
- package/dist/components/form-item-config-provider/index.js +26 -25
- package/dist/components/form-item-group/index.js +111 -85
- package/dist/components/form-item-group/style.css +30 -1
- package/dist/components/form-radio-group/index.js +104 -85
- package/dist/components/form-radio-group/style.css +53 -1
- package/dist/components/form-select/index.js +91 -76
- package/dist/components/form-switch/index.js +57 -51
- package/dist/components/form-textarea/index.js +57 -51
- package/dist/components/form-view/index.js +232 -165
- package/dist/components/form-view/style.css +158 -1
- package/dist/components/guide-steps/index.js +58 -44
- package/dist/components/guide-steps/style.css +34 -1
- package/dist/components/icon-card/index.js +35 -29
- package/dist/components/icon-card/style.css +56 -1
- package/dist/components/iframe-window/index.js +35 -29
- package/dist/components/iframe-window/style.css +20 -1
- package/dist/components/image-viewer/index.js +66 -48
- package/dist/components/image-viewer/style.css +21 -1
- package/dist/components/input-number/index.js +193 -127
- package/dist/components/input-number/style.css +15 -1
- package/dist/components/input-number-range/index.js +57 -45
- package/dist/components/input-number-range/style.css +12 -1
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +120 -73
- package/dist/components/loading-view/index.js +32 -26
- package/dist/components/loading-view/style.css +17 -1
- package/dist/components/nav-bar/index.js +37 -27
- package/dist/components/nav-bar/style.css +17 -1
- package/dist/components/not-implement/index.js +31 -23
- package/dist/components/not-implement/style.css +15 -1
- package/dist/components/page/index.js +28 -22
- package/dist/components/page/style.css +12 -1
- package/dist/components/page-header/index.js +36 -30
- package/dist/components/page-header/style.css +14 -1
- package/dist/components/page-index/index.js +83 -62
- package/dist/components/page-index/style.css +23 -1
- package/dist/components/page-index-top/index.js +68 -53
- package/dist/components/page-skeleton/index.js +37 -31
- package/dist/components/page-skeleton/style.css +23 -1
- package/dist/components/page-skeleton-new/index.js +48 -42
- package/dist/components/page-skeleton-new/style.css +42 -1
- package/dist/components/pageable-table/index.js +253 -186
- package/dist/components/pageable-table/style.css +72 -1
- package/dist/components/pageable-view/index.js +199 -129
- package/dist/components/pageable-view/style.css +69 -1
- package/dist/components/photo-swipe/index.js +151 -110
- package/dist/components/photo-swipe/style.css +20 -1
- package/dist/components/resize-observer/index.js +68 -34
- package/dist/components/resize-observer/style.css +31 -1
- package/dist/components/search-popover/index.js +211 -153
- package/dist/components/search-popover/style.css +93 -1
- package/dist/components/sign-panel/index.js +142 -92
- package/dist/components/sign-panel/style.css +97 -1
- package/dist/components/split-pane/index.js +162 -101
- package/dist/components/split-pane/style.css +100 -1
- package/dist/components/stateful/index.js +34 -31
- package/dist/components/stateful/style.css +33 -1
- package/dist/components/static-pageable-table/index.js +44 -37
- package/dist/components/static-pageable-table/style.css +9 -1
- package/dist/components/swiper/index.js +150 -85
- package/dist/components/swiper/style.css +43 -1
- package/dist/components/tab/index.js +72 -54
- package/dist/components/tab/style.css +122 -1
- package/dist/components/tab-item/index.js +35 -30
- package/dist/components/table-column/index.js +32 -30
- package/dist/components/table-view/index.js +227 -156
- package/dist/components/table-view/style.css +95 -1
- package/dist/components/tag-render/index.js +58 -44
- package/dist/components/tag-render/style.css +33 -1
- package/dist/components/tinymce-editor/index.js +95 -79
- package/dist/components/tinymce-editor/style.css +43 -1
- package/dist/components/tinymce-wrapper/index.js +121 -92
- package/dist/components/tinymce-wrapper/style.css +36 -1
- package/dist/components/toolbar/index.js +84 -63
- package/dist/components/toolbar/style.css +39 -1
- package/dist/components/toolbar-button/index.js +48 -41
- package/dist/components/toolbar-button/style.css +21 -1
- package/dist/components/trigger/index.js +36 -29
- package/dist/components/vue-tags-input/index.js +308 -188
- package/dist/components/vue-tags-input/style.css +682 -1
- package/dist/components/watermark/index.js +37 -25
- package/dist/components/watermark/style.css +11 -1
- package/dist/components/x-dialog/index.js +93 -67
- package/dist/components/x-dialog/style.css +15 -1
- package/dist/index.css +1105 -193
- package/dist/index.es.js +7242 -4789
- package/package.json +1 -1
- package/web-types.json +1 -1
- package/dist/chunks/3a79781b.js +0 -75
- package/dist/chunks/5d4282fb.js +0 -30
- package/dist/chunks/76680a03.js +0 -24
- package/dist/chunks/8c0142e0.js +0 -81
- package/dist/chunks/97652d86.js +0 -26
- package/dist/chunks/b4acd3a6.js +0 -126
- package/dist/chunks/f71045fc.js +0 -184
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import { hasOwn
|
|
2
|
-
import { n as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
import { hasOwn } from "@web-utils/core";
|
|
2
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
3
|
+
var render = function() {
|
|
4
|
+
var _vm = this;
|
|
5
|
+
var _h = _vm.$createElement;
|
|
6
|
+
var _c = _vm._self._c || _h;
|
|
7
|
+
return _c("div", {
|
|
6
8
|
staticClass: "tag-render"
|
|
7
|
-
}, [
|
|
8
|
-
return
|
|
9
|
-
key:
|
|
9
|
+
}, [_vm.tags && _vm.tags.length && _vm.tags[0] ? _vm._l(_vm.internalTags, function(tag, index) {
|
|
10
|
+
return _c("ElTag", {
|
|
11
|
+
key: index,
|
|
10
12
|
attrs: {
|
|
11
|
-
closable:
|
|
13
|
+
"closable": _vm.enable,
|
|
12
14
|
"disable-transitions": ""
|
|
13
15
|
},
|
|
14
16
|
on: {
|
|
15
|
-
close: function(
|
|
16
|
-
return
|
|
17
|
+
"close": function($event) {
|
|
18
|
+
return _vm.$emit("close", _vm.tags[index], index);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
|
-
}, [
|
|
20
|
-
}) :
|
|
21
|
+
}, [_vm._v(" " + _vm._s(_vm.getTagName(tag)) + " ")]);
|
|
22
|
+
}) : !_vm.enable ? [_c("span", {
|
|
21
23
|
staticStyle: {
|
|
22
|
-
color: "#b5b5b5"
|
|
24
|
+
"color": "#b5b5b5"
|
|
23
25
|
}
|
|
24
|
-
}, [
|
|
26
|
+
}, [_vm._v("无")])] : _vm._e(), _vm.enable ? _c("ElButton", {
|
|
25
27
|
staticClass: "el-tag el-tag--medium el-tag--light button-new-tag",
|
|
26
28
|
attrs: {
|
|
27
|
-
size: "small"
|
|
29
|
+
"size": "small"
|
|
28
30
|
},
|
|
29
31
|
on: {
|
|
30
|
-
click: function(
|
|
31
|
-
return
|
|
32
|
+
"click": function($event) {
|
|
33
|
+
return _vm.$emit("add");
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
|
-
}, [
|
|
36
|
+
}, [_vm._v(" + 添加 ")]) : _vm._e(), _vm.count ? _c("span", {
|
|
35
37
|
staticClass: "tags-count"
|
|
36
|
-
}, [
|
|
37
|
-
}
|
|
38
|
-
|
|
38
|
+
}, [_vm._v(_vm._s(_vm.tags.length && _vm.tags[0] ? _vm.tags.length : ""))]) : _vm._e()], 2);
|
|
39
|
+
};
|
|
40
|
+
var staticRenderFns = [];
|
|
41
|
+
const TagRender_vue_vue_type_style_index_0_lang = "";
|
|
42
|
+
const __vue2_script = {
|
|
39
43
|
name: "TagRender",
|
|
40
44
|
inject: ["elFormItem"],
|
|
41
45
|
props: {
|
|
42
46
|
enable: {
|
|
43
47
|
type: Boolean,
|
|
44
|
-
default:
|
|
48
|
+
default: true
|
|
45
49
|
},
|
|
46
50
|
count: {
|
|
47
51
|
type: Boolean,
|
|
48
|
-
default:
|
|
52
|
+
default: true
|
|
49
53
|
},
|
|
50
54
|
tags: {
|
|
51
55
|
type: Array,
|
|
@@ -58,40 +62,50 @@ const c = {
|
|
|
58
62
|
},
|
|
59
63
|
computed: {
|
|
60
64
|
internalTags() {
|
|
61
|
-
return this.transfer ? this.tags.map((
|
|
62
|
-
const
|
|
63
|
-
return this.transfer(
|
|
65
|
+
return this.transfer ? this.tags.map((value) => {
|
|
66
|
+
const temp = { ...value };
|
|
67
|
+
return this.transfer(temp);
|
|
64
68
|
}) : this.tags;
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
watch: {
|
|
68
|
-
tags(
|
|
69
|
-
this.elFormItem &&
|
|
72
|
+
tags(newVal) {
|
|
73
|
+
if (this.elFormItem && newVal && newVal.length > 0) {
|
|
74
|
+
this.elFormItem.clearValidate();
|
|
75
|
+
}
|
|
70
76
|
}
|
|
71
77
|
},
|
|
72
78
|
methods: {
|
|
73
|
-
getTagName(
|
|
74
|
-
|
|
79
|
+
getTagName(tag) {
|
|
80
|
+
if (hasOwn(tag, "name")) {
|
|
81
|
+
return tag.name;
|
|
82
|
+
} else if (hasOwn(tag, "label")) {
|
|
83
|
+
return tag.label;
|
|
84
|
+
} else {
|
|
85
|
+
return tag;
|
|
86
|
+
}
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
};
|
|
90
|
+
const __cssModules = {};
|
|
91
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
92
|
+
__vue2_script,
|
|
93
|
+
render,
|
|
94
|
+
staticRenderFns,
|
|
95
|
+
false,
|
|
96
|
+
__vue2_injectStyles,
|
|
84
97
|
null,
|
|
85
98
|
null,
|
|
86
99
|
null
|
|
87
100
|
);
|
|
88
|
-
function
|
|
89
|
-
for (let
|
|
90
|
-
this[
|
|
101
|
+
function __vue2_injectStyles(context) {
|
|
102
|
+
for (let o in __cssModules) {
|
|
103
|
+
this[o] = __cssModules[o];
|
|
104
|
+
}
|
|
91
105
|
}
|
|
92
|
-
const
|
|
93
|
-
return
|
|
106
|
+
const TagRender = /* @__PURE__ */ function() {
|
|
107
|
+
return __component__.exports;
|
|
94
108
|
}();
|
|
95
109
|
export {
|
|
96
|
-
|
|
110
|
+
TagRender as default
|
|
97
111
|
};
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
/* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
|
|
2
|
+
/* 应用头部高度 */
|
|
3
|
+
/* 页面宽度 */
|
|
4
|
+
/* 侧栏宽度 */
|
|
5
|
+
/* 标签高度 */
|
|
6
|
+
/* 页面头部工具条高度 */
|
|
7
|
+
.tag-render {
|
|
8
|
+
min-height: 80px;
|
|
9
|
+
padding-top: 3px;
|
|
10
|
+
padding-right: 5px;
|
|
11
|
+
padding-left: 5px;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
border: 1px solid #d7dae0;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
}
|
|
17
|
+
.tag-render .el-tag {
|
|
18
|
+
margin-top: 4px;
|
|
19
|
+
}
|
|
20
|
+
.tag-render .button-new-tag {
|
|
21
|
+
padding-top: 0;
|
|
22
|
+
padding-bottom: 0;
|
|
23
|
+
}
|
|
24
|
+
.tag-render .el-tag .el-tag__close:hover {
|
|
25
|
+
background-color: #ee8677;
|
|
26
|
+
}
|
|
27
|
+
.tag-render .tags-count {
|
|
28
|
+
position: absolute;
|
|
29
|
+
right: 7px;
|
|
30
|
+
bottom: -4px;
|
|
31
|
+
color: #b7b7b7;
|
|
32
|
+
font-size: 0.9em;
|
|
33
|
+
}
|
|
@@ -1,86 +1,90 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
1
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
2
|
+
var render = function() {
|
|
3
|
+
var _vm = this;
|
|
4
|
+
var _h = _vm.$createElement;
|
|
5
|
+
var _c = _vm._self._c || _h;
|
|
6
|
+
return _c("div", {
|
|
5
7
|
staticStyle: {
|
|
6
8
|
"margin-bottom": "10px"
|
|
7
9
|
},
|
|
8
10
|
style: {
|
|
9
|
-
height:
|
|
11
|
+
height: _vm.height
|
|
10
12
|
}
|
|
11
|
-
}, [
|
|
13
|
+
}, [_vm.lazy ? [_vm.focus && !_vm.inputDisabled ? _c("TinymceWrapper", _vm._b({
|
|
12
14
|
ref: "editor",
|
|
13
15
|
attrs: {
|
|
14
|
-
"query-params":
|
|
15
|
-
disabled:
|
|
16
|
-
"show-types":
|
|
17
|
-
value:
|
|
16
|
+
"query-params": _vm.queryParams,
|
|
17
|
+
"disabled": _vm.inputDisabled,
|
|
18
|
+
"show-types": _vm.showTypes,
|
|
19
|
+
"value": _vm.value
|
|
18
20
|
},
|
|
19
21
|
on: {
|
|
20
|
-
"on-blur":
|
|
21
|
-
"dialog-show": function(
|
|
22
|
-
|
|
22
|
+
"on-blur": _vm.onEditorBlur,
|
|
23
|
+
"dialog-show": function($event) {
|
|
24
|
+
_vm.hideOnBlur = false;
|
|
23
25
|
},
|
|
24
|
-
"dialog-hide": function(
|
|
25
|
-
|
|
26
|
+
"dialog-hide": function($event) {
|
|
27
|
+
_vm.hideOnBlur = true;
|
|
26
28
|
},
|
|
27
|
-
input: function(
|
|
28
|
-
return
|
|
29
|
+
"input": function(val) {
|
|
30
|
+
return _vm.$emit("input", val);
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
|
-
}, "TinymceWrapper",
|
|
33
|
+
}, "TinymceWrapper", _vm.$attrs, false)) : _c("div", {
|
|
32
34
|
staticClass: "editor-shadow",
|
|
33
35
|
class: [{
|
|
34
|
-
"show-placeholder":
|
|
36
|
+
"show-placeholder": _vm.isEmpty
|
|
35
37
|
}],
|
|
36
38
|
style: {
|
|
37
|
-
cursor:
|
|
39
|
+
cursor: _vm.inputDisabled ? "not-allowed" : "text"
|
|
38
40
|
},
|
|
39
41
|
attrs: {
|
|
40
|
-
placeholder:
|
|
42
|
+
"placeholder": _vm.inputDisabled ? "" : _vm.placeholder
|
|
41
43
|
},
|
|
42
44
|
domProps: {
|
|
43
|
-
innerHTML:
|
|
45
|
+
"innerHTML": _vm._s(_vm.value)
|
|
44
46
|
},
|
|
45
47
|
on: {
|
|
46
|
-
click:
|
|
48
|
+
"click": _vm.onEditorShadowClick
|
|
47
49
|
}
|
|
48
|
-
})] : [
|
|
50
|
+
})] : [!_vm.inputDisabled ? _c("TinymceWrapper", _vm._b({
|
|
51
|
+
ref: "editor",
|
|
52
|
+
attrs: {
|
|
53
|
+
"query-params": _vm.queryParams,
|
|
54
|
+
"disabled": _vm.inputDisabled,
|
|
55
|
+
"value": _vm.value
|
|
56
|
+
},
|
|
57
|
+
on: {
|
|
58
|
+
"on-blur": _vm.onEditorBlur,
|
|
59
|
+
"dialog-show": function($event) {
|
|
60
|
+
_vm.hideOnBlur = false;
|
|
61
|
+
},
|
|
62
|
+
"dialog-hide": function($event) {
|
|
63
|
+
_vm.hideOnBlur = true;
|
|
64
|
+
},
|
|
65
|
+
"input": function(val) {
|
|
66
|
+
return _vm.$emit("input", val);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, "TinymceWrapper", _vm.$attrs, false)) : _c("div", {
|
|
49
70
|
staticClass: "editor-shadow",
|
|
50
71
|
class: [{
|
|
51
|
-
"show-placeholder":
|
|
72
|
+
"show-placeholder": _vm.isEmpty
|
|
52
73
|
}],
|
|
53
74
|
style: {
|
|
54
|
-
cursor:
|
|
75
|
+
cursor: _vm.inputDisabled ? "not-allowed" : "text"
|
|
55
76
|
},
|
|
56
77
|
attrs: {
|
|
57
|
-
placeholder:
|
|
78
|
+
"placeholder": _vm.inputDisabled ? "" : _vm.placeholder
|
|
58
79
|
},
|
|
59
80
|
domProps: {
|
|
60
|
-
innerHTML:
|
|
81
|
+
"innerHTML": _vm._s(_vm.value)
|
|
61
82
|
}
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
value: e.value
|
|
68
|
-
},
|
|
69
|
-
on: {
|
|
70
|
-
"on-blur": e.onEditorBlur,
|
|
71
|
-
"dialog-show": function(i) {
|
|
72
|
-
e.hideOnBlur = !1;
|
|
73
|
-
},
|
|
74
|
-
"dialog-hide": function(i) {
|
|
75
|
-
e.hideOnBlur = !0;
|
|
76
|
-
},
|
|
77
|
-
input: function(i) {
|
|
78
|
-
return e.$emit("input", i);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, "TinymceWrapper", e.$attrs, !1))]], 2);
|
|
82
|
-
}, a = [];
|
|
83
|
-
const l = {
|
|
83
|
+
})]], 2);
|
|
84
|
+
};
|
|
85
|
+
var staticRenderFns = [];
|
|
86
|
+
const TinymceEditor_vue_vue_type_style_index_0_lang = "";
|
|
87
|
+
const __vue2_script = {
|
|
84
88
|
name: "TinymceEditor",
|
|
85
89
|
inject: {
|
|
86
90
|
elForm: {
|
|
@@ -94,11 +98,11 @@ const l = {
|
|
|
94
98
|
disabled: Boolean,
|
|
95
99
|
lazy: {
|
|
96
100
|
type: Boolean,
|
|
97
|
-
default:
|
|
101
|
+
default: true
|
|
98
102
|
},
|
|
99
103
|
showTypes: {
|
|
100
104
|
type: Boolean,
|
|
101
|
-
default:
|
|
105
|
+
default: true
|
|
102
106
|
},
|
|
103
107
|
height: {
|
|
104
108
|
type: String,
|
|
@@ -113,8 +117,8 @@ const l = {
|
|
|
113
117
|
},
|
|
114
118
|
data() {
|
|
115
119
|
return {
|
|
116
|
-
hideOnBlur:
|
|
117
|
-
focus:
|
|
120
|
+
hideOnBlur: true,
|
|
121
|
+
focus: false
|
|
118
122
|
};
|
|
119
123
|
},
|
|
120
124
|
computed: {
|
|
@@ -126,48 +130,60 @@ const l = {
|
|
|
126
130
|
}
|
|
127
131
|
},
|
|
128
132
|
watch: {
|
|
129
|
-
hideOnBlur(
|
|
130
|
-
|
|
133
|
+
hideOnBlur(newVal) {
|
|
134
|
+
if (newVal) {
|
|
135
|
+
this.onEditorShadowClick();
|
|
136
|
+
}
|
|
131
137
|
}
|
|
132
138
|
},
|
|
133
139
|
methods: {
|
|
134
140
|
onEditorBlur() {
|
|
135
|
-
|
|
141
|
+
if (this.inputDisabled) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (!this.hideOnBlur) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.focus = false;
|
|
136
148
|
},
|
|
137
149
|
getEditor() {
|
|
138
150
|
return this.$refs.editor.$refs.editor.editor;
|
|
139
151
|
},
|
|
140
152
|
async onEditorShadowClick() {
|
|
141
|
-
if (this.inputDisabled)
|
|
153
|
+
if (this.inputDisabled) {
|
|
142
154
|
return;
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
155
|
+
}
|
|
156
|
+
this.focus = true;
|
|
157
|
+
await this.$nextTick();
|
|
158
|
+
const editor = this.getEditor();
|
|
159
|
+
editor.focus();
|
|
160
|
+
const body = editor.getBody();
|
|
161
|
+
editor.selection.setCursorLocation(body, body.childNodes.length);
|
|
162
|
+
},
|
|
163
|
+
insertContent(content) {
|
|
164
|
+
this.getEditor().insertContent(content);
|
|
151
165
|
}
|
|
152
166
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
167
|
+
};
|
|
168
|
+
const __cssModules = {};
|
|
169
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
170
|
+
__vue2_script,
|
|
171
|
+
render,
|
|
172
|
+
staticRenderFns,
|
|
173
|
+
false,
|
|
174
|
+
__vue2_injectStyles,
|
|
160
175
|
null,
|
|
161
176
|
null,
|
|
162
177
|
null
|
|
163
178
|
);
|
|
164
|
-
function
|
|
165
|
-
for (let
|
|
166
|
-
this[
|
|
179
|
+
function __vue2_injectStyles(context) {
|
|
180
|
+
for (let o in __cssModules) {
|
|
181
|
+
this[o] = __cssModules[o];
|
|
182
|
+
}
|
|
167
183
|
}
|
|
168
|
-
const
|
|
169
|
-
return
|
|
184
|
+
const TinymceEditor = /* @__PURE__ */ function() {
|
|
185
|
+
return __component__.exports;
|
|
170
186
|
}();
|
|
171
187
|
export {
|
|
172
|
-
|
|
188
|
+
TinymceEditor as default
|
|
173
189
|
};
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
/* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
|
|
2
|
+
/* 应用头部高度 */
|
|
3
|
+
/* 页面宽度 */
|
|
4
|
+
/* 侧栏宽度 */
|
|
5
|
+
/* 标签高度 */
|
|
6
|
+
/* 页面头部工具条高度 */
|
|
7
|
+
.template-tag {
|
|
8
|
+
margin: 0 10px;
|
|
9
|
+
color: #1e90ff;
|
|
10
|
+
font-weight: bold;
|
|
11
|
+
font-family: "黑体", serif;
|
|
12
|
+
font-style: italic;
|
|
13
|
+
cursor: help !important;
|
|
14
|
+
}
|
|
15
|
+
.editor-shadow {
|
|
16
|
+
position: relative;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
padding: 10px;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-family: "微软雅黑", serif;
|
|
23
|
+
line-height: normal;
|
|
24
|
+
text-align: left;
|
|
25
|
+
word-break: normal;
|
|
26
|
+
word-spacing: 0;
|
|
27
|
+
overflow-wrap: break-word;
|
|
28
|
+
background-color: #fff;
|
|
29
|
+
border: 1px solid #dcdfe6;
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
cursor: text;
|
|
32
|
+
}
|
|
33
|
+
.show-placeholder {
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
.show-placeholder::after {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 10px;
|
|
39
|
+
left: 11px;
|
|
40
|
+
color: #a9a9a9;
|
|
41
|
+
content: attr(placeholder);
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|