@web-utils/component 2.0.9 → 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 +2 -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,110 +1,129 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { n } from "../../chunks/
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
1
|
+
import Color from "element-ui/packages/color-picker/src/color";
|
|
2
|
+
import Clickoutside from "element-ui/src/utils/clickoutside";
|
|
3
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
4
|
+
var render = function() {
|
|
5
|
+
var _vm = this;
|
|
6
|
+
var _h = _vm.$createElement;
|
|
7
|
+
var _c = _vm._self._c || _h;
|
|
8
|
+
return _c("ElColorPickerDropdown", {
|
|
7
9
|
directives: [{
|
|
8
10
|
name: "clickoutside",
|
|
9
11
|
rawName: "v-clickoutside",
|
|
10
|
-
value:
|
|
12
|
+
value: _vm.onClickOutside,
|
|
11
13
|
expression: "onClickOutside"
|
|
12
14
|
}],
|
|
13
15
|
ref: "dropdown",
|
|
14
|
-
class: ["el-color-picker__panel",
|
|
16
|
+
class: ["el-color-picker__panel", _vm.popperClass || ""],
|
|
15
17
|
attrs: {
|
|
16
|
-
offset:
|
|
17
|
-
"append-to-body":
|
|
18
|
-
color:
|
|
19
|
-
predefine:
|
|
18
|
+
"offset": _vm.offset,
|
|
19
|
+
"append-to-body": _vm.appendToBody,
|
|
20
|
+
"color": _vm.color,
|
|
21
|
+
"predefine": _vm.predefine
|
|
20
22
|
},
|
|
21
23
|
on: {
|
|
22
|
-
pick:
|
|
23
|
-
clear:
|
|
24
|
+
"pick": _vm.confirmValue,
|
|
25
|
+
"clear": _vm.clearValue
|
|
24
26
|
},
|
|
25
27
|
model: {
|
|
26
|
-
value:
|
|
27
|
-
callback: function(
|
|
28
|
-
|
|
28
|
+
value: _vm.showPicker,
|
|
29
|
+
callback: function($$v) {
|
|
30
|
+
_vm.showPicker = $$v;
|
|
29
31
|
},
|
|
30
32
|
expression: "showPicker"
|
|
31
33
|
}
|
|
32
34
|
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
+
};
|
|
36
|
+
var staticRenderFns = [];
|
|
37
|
+
const __vue2_script = {
|
|
35
38
|
name: "ColorPicker",
|
|
36
|
-
directives: { Clickoutside
|
|
39
|
+
directives: { Clickoutside },
|
|
37
40
|
props: {
|
|
38
41
|
popperClass: String,
|
|
39
42
|
predefine: Array,
|
|
40
43
|
visible: Boolean,
|
|
41
44
|
hideOnClickOutside: {
|
|
42
45
|
type: Boolean,
|
|
43
|
-
default:
|
|
46
|
+
default: true
|
|
44
47
|
},
|
|
45
48
|
value: String,
|
|
46
49
|
offset: Number,
|
|
47
50
|
anchor: HTMLElement,
|
|
48
51
|
appendToBody: {
|
|
49
52
|
type: Boolean,
|
|
50
|
-
default:
|
|
53
|
+
default: true
|
|
51
54
|
}
|
|
52
55
|
},
|
|
53
56
|
data() {
|
|
57
|
+
const color = new Color({ enableAlpha: false });
|
|
54
58
|
return {
|
|
55
|
-
color
|
|
56
|
-
showPicker:
|
|
59
|
+
color,
|
|
60
|
+
showPicker: false
|
|
57
61
|
};
|
|
58
62
|
},
|
|
59
63
|
watch: {
|
|
60
64
|
value: {
|
|
61
|
-
immediate:
|
|
62
|
-
handler(
|
|
63
|
-
|
|
65
|
+
immediate: true,
|
|
66
|
+
handler(val) {
|
|
67
|
+
if (val && val !== this.color.value) {
|
|
68
|
+
this.color.fromString(val);
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
72
|
visible: {
|
|
67
|
-
immediate:
|
|
68
|
-
async handler(
|
|
69
|
-
|
|
73
|
+
immediate: true,
|
|
74
|
+
async handler(newVal) {
|
|
75
|
+
if (newVal) {
|
|
76
|
+
await this.$nextTick();
|
|
77
|
+
this.$refs.dropdown.referenceElm = this.anchor;
|
|
78
|
+
} else {
|
|
79
|
+
this.$refs.dropdown && this.$refs.dropdown.doDestroy(true);
|
|
80
|
+
}
|
|
81
|
+
this.showPicker = newVal;
|
|
70
82
|
}
|
|
71
83
|
}
|
|
72
84
|
},
|
|
73
85
|
methods: {
|
|
74
86
|
confirmValue() {
|
|
75
|
-
this.emitInput(this.color)
|
|
87
|
+
this.emitInput(this.color);
|
|
88
|
+
this.$emit("pick", this.color.value);
|
|
89
|
+
this.hide();
|
|
76
90
|
},
|
|
77
91
|
clearValue() {
|
|
78
|
-
this.$emit("clear")
|
|
92
|
+
this.$emit("clear");
|
|
93
|
+
this.hide();
|
|
79
94
|
},
|
|
80
|
-
emitInput(
|
|
81
|
-
this.$emit("input",
|
|
95
|
+
emitInput(color) {
|
|
96
|
+
this.$emit("input", color.value);
|
|
82
97
|
},
|
|
83
98
|
onClickOutside() {
|
|
84
|
-
this.hideOnClickOutside
|
|
99
|
+
if (this.hideOnClickOutside) {
|
|
100
|
+
this.hide();
|
|
101
|
+
}
|
|
85
102
|
},
|
|
86
103
|
hide() {
|
|
87
|
-
this.$emit("update:visible",
|
|
104
|
+
this.$emit("update:visible", false);
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
107
|
+
};
|
|
108
|
+
const __cssModules = {};
|
|
109
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
110
|
+
__vue2_script,
|
|
111
|
+
render,
|
|
112
|
+
staticRenderFns,
|
|
113
|
+
false,
|
|
114
|
+
__vue2_injectStyles,
|
|
97
115
|
null,
|
|
98
116
|
null,
|
|
99
117
|
null
|
|
100
118
|
);
|
|
101
|
-
function
|
|
102
|
-
for (let
|
|
103
|
-
this[
|
|
119
|
+
function __vue2_injectStyles(context) {
|
|
120
|
+
for (let o in __cssModules) {
|
|
121
|
+
this[o] = __cssModules[o];
|
|
122
|
+
}
|
|
104
123
|
}
|
|
105
|
-
const
|
|
106
|
-
return
|
|
124
|
+
const ColorPicker = /* @__PURE__ */ function() {
|
|
125
|
+
return __component__.exports;
|
|
107
126
|
}();
|
|
108
127
|
export {
|
|
109
|
-
|
|
128
|
+
ColorPicker as default
|
|
110
129
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { n as
|
|
3
|
-
const
|
|
1
|
+
import { c as confirmableMixin } from "../../chunks/a0bb327b.js";
|
|
2
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
3
|
+
const props = {
|
|
4
4
|
props: {
|
|
5
5
|
type: {
|
|
6
6
|
type: String,
|
|
@@ -29,29 +29,31 @@ const i = {
|
|
|
29
29
|
default: "ElButton"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
|
+
const __vue2_script = {
|
|
33
34
|
name: "ConfirmButton",
|
|
34
|
-
mixins: [
|
|
35
|
+
mixins: [confirmableMixin, props]
|
|
35
36
|
};
|
|
36
|
-
let
|
|
37
|
-
const
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
let __vue2_render, __vue2_staticRenderFns;
|
|
38
|
+
const __cssModules = {};
|
|
39
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
40
|
+
__vue2_script,
|
|
41
|
+
__vue2_render,
|
|
42
|
+
__vue2_staticRenderFns,
|
|
43
|
+
false,
|
|
44
|
+
__vue2_injectStyles,
|
|
44
45
|
null,
|
|
45
46
|
null,
|
|
46
47
|
null
|
|
47
48
|
);
|
|
48
|
-
function
|
|
49
|
-
for (let
|
|
50
|
-
this[
|
|
49
|
+
function __vue2_injectStyles(context) {
|
|
50
|
+
for (let o in __cssModules) {
|
|
51
|
+
this[o] = __cssModules[o];
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
+
const ConfirmButton = /* @__PURE__ */ function() {
|
|
55
|
+
return __component__.exports;
|
|
54
56
|
}();
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
ConfirmButton as default
|
|
57
59
|
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { n as
|
|
3
|
-
const
|
|
1
|
+
import { c as confirmableMixin } from "../../chunks/a0bb327b.js";
|
|
2
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
3
|
+
const __vue2_script = {
|
|
4
4
|
name: "Confirmable",
|
|
5
|
-
mixins: [
|
|
5
|
+
mixins: [confirmableMixin]
|
|
6
6
|
};
|
|
7
|
-
let
|
|
8
|
-
const
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
let __vue2_render, __vue2_staticRenderFns;
|
|
8
|
+
const __cssModules = {};
|
|
9
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
10
|
+
__vue2_script,
|
|
11
|
+
__vue2_render,
|
|
12
|
+
__vue2_staticRenderFns,
|
|
13
|
+
false,
|
|
14
|
+
__vue2_injectStyles,
|
|
15
15
|
null,
|
|
16
16
|
null,
|
|
17
17
|
null
|
|
18
18
|
);
|
|
19
|
-
function
|
|
20
|
-
for (let
|
|
21
|
-
this[
|
|
19
|
+
function __vue2_injectStyles(context) {
|
|
20
|
+
for (let o in __cssModules) {
|
|
21
|
+
this[o] = __cssModules[o];
|
|
22
|
+
}
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
-
return
|
|
24
|
+
const Confirmable = /* @__PURE__ */ function() {
|
|
25
|
+
return __component__.exports;
|
|
25
26
|
}();
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
+
Confirmable as default
|
|
28
29
|
};
|
|
@@ -1,133 +1,137 @@
|
|
|
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 _vm.rendered ? _c("div", {
|
|
5
7
|
directives: [{
|
|
6
8
|
name: "show",
|
|
7
9
|
rawName: "v-show",
|
|
8
|
-
value:
|
|
10
|
+
value: _vm.visible,
|
|
9
11
|
expression: "visible"
|
|
10
12
|
}],
|
|
11
13
|
staticClass: "cm-container",
|
|
12
|
-
style:
|
|
13
|
-
}, [
|
|
14
|
+
style: _vm.axisComputed
|
|
15
|
+
}, [_c("svg", {
|
|
14
16
|
staticStyle: {
|
|
15
|
-
position: "absolute",
|
|
16
|
-
width: "0",
|
|
17
|
-
height: "0",
|
|
18
|
-
overflow: "hidden"
|
|
17
|
+
"position": "absolute",
|
|
18
|
+
"width": "0",
|
|
19
|
+
"height": "0",
|
|
20
|
+
"overflow": "hidden"
|
|
19
21
|
},
|
|
20
22
|
attrs: {
|
|
21
23
|
"aria-hidden": "true"
|
|
22
24
|
}
|
|
23
|
-
}, [
|
|
25
|
+
}, [_c("symbol", {
|
|
24
26
|
attrs: {
|
|
25
|
-
id: "icon-arrow",
|
|
26
|
-
viewBox: "0 0 1024 1024"
|
|
27
|
+
"id": "icon-arrow",
|
|
28
|
+
"viewBox": "0 0 1024 1024"
|
|
27
29
|
}
|
|
28
|
-
}, [
|
|
30
|
+
}, [_c("path", {
|
|
29
31
|
attrs: {
|
|
30
|
-
d: "M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"
|
|
32
|
+
"d": "M288.791335 65.582671l446.41733 446.417329-446.41733 446.417329z"
|
|
31
33
|
}
|
|
32
|
-
})])]),
|
|
34
|
+
})])]), _c("ul", {
|
|
33
35
|
staticClass: "cm-ul cm-ul-1 easy-cm-ul",
|
|
34
|
-
class:
|
|
35
|
-
},
|
|
36
|
-
return
|
|
37
|
-
key:
|
|
38
|
-
style:
|
|
39
|
-
}, [
|
|
40
|
-
class:
|
|
36
|
+
class: _vm.underline ? "cm-underline" : ""
|
|
37
|
+
}, _vm._l(_vm.list, function(item, index) {
|
|
38
|
+
return _c("li", {
|
|
39
|
+
key: index,
|
|
40
|
+
style: _vm.liStyle
|
|
41
|
+
}, [_c("div", {
|
|
42
|
+
class: _vm.firstLeft ? "cm-left" : "",
|
|
41
43
|
on: {
|
|
42
|
-
click: function(
|
|
43
|
-
return
|
|
44
|
+
"click": function($event) {
|
|
45
|
+
return _vm.onItemClick(item, [index]);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
|
-
}, [
|
|
48
|
+
}, [_c("i", {
|
|
47
49
|
staticClass: "cm-item-icon",
|
|
48
|
-
class:
|
|
49
|
-
}),
|
|
50
|
+
class: item.icon
|
|
51
|
+
}), _c("span", {
|
|
50
52
|
staticClass: "cm-item-label"
|
|
51
|
-
}, [
|
|
53
|
+
}, [_vm._v(_vm._s(item.text))]), _vm.arrow && item.children && item.children.length > 0 ? _c("svg", {
|
|
52
54
|
staticClass: "icon",
|
|
53
55
|
attrs: {
|
|
54
56
|
"aria-hidden": "true"
|
|
55
57
|
}
|
|
56
|
-
}, [
|
|
58
|
+
}, [_c("use", {
|
|
57
59
|
attrs: {
|
|
58
60
|
"xlink:href": "#icon-arrow"
|
|
59
61
|
}
|
|
60
|
-
})]) :
|
|
62
|
+
})]) : _vm._e()]), item.children && item.children.length > 0 ? _c("ul", {
|
|
61
63
|
staticClass: "cm-ul cm-ul-2 easy-cm-ul",
|
|
62
|
-
class:
|
|
63
|
-
style:
|
|
64
|
-
},
|
|
65
|
-
return
|
|
66
|
-
key:
|
|
67
|
-
style:
|
|
68
|
-
}, [
|
|
69
|
-
class:
|
|
64
|
+
class: _vm.underline ? "cm-underline" : "",
|
|
65
|
+
style: _vm.secondBorderCheck(index)
|
|
66
|
+
}, _vm._l(item.children, function(second, si) {
|
|
67
|
+
return _c("li", {
|
|
68
|
+
key: si,
|
|
69
|
+
style: _vm.liStyle
|
|
70
|
+
}, [_c("div", {
|
|
71
|
+
class: _vm.secondLeft ? "cm-left" : "",
|
|
70
72
|
on: {
|
|
71
|
-
click: function(
|
|
72
|
-
return
|
|
73
|
+
"click": function($event) {
|
|
74
|
+
return _vm.onItemClick(second, [index, si]);
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
|
-
}, [
|
|
77
|
+
}, [_c("i", {
|
|
76
78
|
staticClass: "cm-item-icon",
|
|
77
|
-
class:
|
|
78
|
-
}),
|
|
79
|
+
class: second.icon
|
|
80
|
+
}), _c("span", {
|
|
79
81
|
staticClass: "cm-item-label"
|
|
80
|
-
}, [
|
|
82
|
+
}, [_vm._v(_vm._s(second.text))]), _vm.arrow && second.children && second.children.length > 0 ? _c("svg", {
|
|
81
83
|
staticClass: "icon",
|
|
82
84
|
attrs: {
|
|
83
85
|
"aria-hidden": "true"
|
|
84
86
|
}
|
|
85
|
-
}, [
|
|
87
|
+
}, [_c("use", {
|
|
86
88
|
attrs: {
|
|
87
89
|
"xlink:href": "#icon-arrow"
|
|
88
90
|
}
|
|
89
|
-
})]) :
|
|
91
|
+
})]) : _vm._e()]), second.children && second.children.length > 0 ? _c("ul", {
|
|
90
92
|
staticClass: "cm-ul cm-ul-3 easy-cm-ul",
|
|
91
|
-
class:
|
|
92
|
-
style:
|
|
93
|
-
},
|
|
94
|
-
return
|
|
95
|
-
key:
|
|
96
|
-
style:
|
|
97
|
-
}, [
|
|
93
|
+
class: _vm.underline ? "cm-underline" : "",
|
|
94
|
+
style: _vm.thirdBorderCheck(index, si)
|
|
95
|
+
}, _vm._l(second.children, function(third, ti) {
|
|
96
|
+
return _c("li", {
|
|
97
|
+
key: ti,
|
|
98
|
+
style: _vm.liStyle
|
|
99
|
+
}, [_c("div", {
|
|
98
100
|
on: {
|
|
99
|
-
click: function(
|
|
100
|
-
return
|
|
101
|
+
"click": function($event) {
|
|
102
|
+
return _vm.onItemClick(third, [index, si, ti]);
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
|
-
}, [
|
|
105
|
+
}, [_c("i", {
|
|
104
106
|
staticClass: "cm-item-icon",
|
|
105
|
-
class:
|
|
106
|
-
}),
|
|
107
|
+
class: third.icon
|
|
108
|
+
}), _c("span", {
|
|
107
109
|
staticClass: "cm-item-label"
|
|
108
|
-
}, [
|
|
109
|
-
}), 0) :
|
|
110
|
-
}), 0) :
|
|
111
|
-
}), 0)]) :
|
|
112
|
-
}
|
|
113
|
-
|
|
110
|
+
}, [_vm._v(_vm._s(third.text))])])]);
|
|
111
|
+
}), 0) : _vm._e()]);
|
|
112
|
+
}), 0) : _vm._e()]);
|
|
113
|
+
}), 0)]) : _vm._e();
|
|
114
|
+
};
|
|
115
|
+
var staticRenderFns = [];
|
|
116
|
+
const ContextMenu_vue_vue_type_style_index_0_lang = "";
|
|
117
|
+
const __vue2_script = {
|
|
114
118
|
name: "ContextMenu",
|
|
115
119
|
props: {
|
|
116
120
|
list: {
|
|
117
121
|
type: Array,
|
|
118
|
-
required:
|
|
122
|
+
required: true
|
|
119
123
|
},
|
|
120
124
|
underline: {
|
|
121
125
|
type: Boolean,
|
|
122
|
-
default:
|
|
126
|
+
default: false
|
|
123
127
|
},
|
|
124
128
|
arrow: {
|
|
125
129
|
type: Boolean,
|
|
126
|
-
default:
|
|
130
|
+
default: true
|
|
127
131
|
},
|
|
128
132
|
border: {
|
|
129
133
|
type: Boolean,
|
|
130
|
-
default:
|
|
134
|
+
default: true
|
|
131
135
|
},
|
|
132
136
|
itemWidth: {
|
|
133
137
|
type: Number,
|
|
@@ -143,10 +147,12 @@ const m = {
|
|
|
143
147
|
},
|
|
144
148
|
offset: {
|
|
145
149
|
type: Object,
|
|
146
|
-
default: () =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
default: () => {
|
|
151
|
+
return {
|
|
152
|
+
x: 6,
|
|
153
|
+
y: 2
|
|
154
|
+
};
|
|
155
|
+
}
|
|
150
156
|
},
|
|
151
157
|
borderWidth: {
|
|
152
158
|
type: Number,
|
|
@@ -155,8 +161,8 @@ const m = {
|
|
|
155
161
|
},
|
|
156
162
|
data() {
|
|
157
163
|
return {
|
|
158
|
-
visible:
|
|
159
|
-
rendered:
|
|
164
|
+
visible: false,
|
|
165
|
+
rendered: false,
|
|
160
166
|
axis: {
|
|
161
167
|
x: 0,
|
|
162
168
|
y: 0
|
|
@@ -179,65 +185,81 @@ const m = {
|
|
|
179
185
|
};
|
|
180
186
|
},
|
|
181
187
|
firstLeft() {
|
|
182
|
-
const
|
|
183
|
-
return this.axis.x + this.itemWidth * 2 >=
|
|
188
|
+
const bw = document.body.offsetWidth;
|
|
189
|
+
return this.axis.x + this.itemWidth * 2 >= bw;
|
|
184
190
|
},
|
|
185
191
|
secondLeft() {
|
|
186
|
-
const
|
|
187
|
-
return this.axis.x + this.itemWidth * 3 >=
|
|
192
|
+
const bw = document.body.offsetWidth;
|
|
193
|
+
return this.axis.x + this.itemWidth * 3 >= bw;
|
|
188
194
|
}
|
|
189
195
|
},
|
|
190
196
|
watch: {
|
|
191
197
|
axis() {
|
|
192
198
|
if (this.border) {
|
|
193
|
-
const
|
|
194
|
-
|
|
199
|
+
const bw = document.body.offsetWidth;
|
|
200
|
+
const bh = document.body.offsetHeight;
|
|
201
|
+
if (this.axis.x + this.offset.x + this.itemWidth >= bw) {
|
|
202
|
+
this.axis.x = bw - this.itemWidth - this.borderWidth - this.offset.x;
|
|
203
|
+
}
|
|
204
|
+
if (this.axis.y + this.offset.y + this.itemHeight * this.list.length >= bh) {
|
|
205
|
+
this.axis.y = bh - this.itemHeight * this.list.length - this.borderWidth - this.offset.y;
|
|
206
|
+
}
|
|
195
207
|
}
|
|
196
208
|
}
|
|
197
209
|
},
|
|
198
210
|
methods: {
|
|
199
|
-
secondBorderCheck(
|
|
200
|
-
const
|
|
211
|
+
secondBorderCheck(i) {
|
|
212
|
+
const bw = document.body.offsetWidth;
|
|
213
|
+
const bh = document.body.offsetHeight;
|
|
214
|
+
const cy = this.axis.y + (i + this.list[i].children.length) * this.itemHeight;
|
|
201
215
|
return {
|
|
202
|
-
left: this.axis.x + this.itemWidth * 2 >=
|
|
203
|
-
top:
|
|
216
|
+
left: this.axis.x + this.itemWidth * 2 >= bw ? "-100%" : "100%",
|
|
217
|
+
top: bh >= cy ? 0 : `${-(this.list[i].children.length - 1) * this.itemHeight}px`
|
|
204
218
|
};
|
|
205
219
|
},
|
|
206
|
-
thirdBorderCheck(
|
|
207
|
-
const
|
|
220
|
+
thirdBorderCheck(i, si) {
|
|
221
|
+
const bw = document.body.offsetWidth;
|
|
222
|
+
const bh = document.body.offsetHeight;
|
|
223
|
+
const cy = this.axis.y + this.list[i].children[si].children.length * this.itemHeight + (i + si) * this.itemHeight + parseInt(this.secondBorderCheck(i).top);
|
|
208
224
|
return {
|
|
209
|
-
left: this.axis.x + this.itemWidth * 3 >=
|
|
210
|
-
top:
|
|
225
|
+
left: this.axis.x + this.itemWidth * 3 >= bw ? "-100%" : "100%",
|
|
226
|
+
top: cy > bh ? `${-(this.list[i].children[si].children.length - 1) * this.itemHeight}px` : 0
|
|
211
227
|
};
|
|
212
228
|
},
|
|
213
|
-
show(
|
|
214
|
-
document.addEventListener("click", this.hide,
|
|
229
|
+
show(event) {
|
|
230
|
+
document.addEventListener("click", this.hide, true);
|
|
231
|
+
this.axis = { x: event.clientX, y: event.clientY };
|
|
232
|
+
this.rendered = true;
|
|
233
|
+
this.visible = true;
|
|
215
234
|
},
|
|
216
235
|
hide() {
|
|
217
|
-
this.visible =
|
|
236
|
+
this.visible = false;
|
|
237
|
+
document.removeEventListener("click", this.hide);
|
|
218
238
|
},
|
|
219
|
-
onItemClick(
|
|
220
|
-
this.$emit("on-item-click",
|
|
239
|
+
onItemClick(item, indexList) {
|
|
240
|
+
this.$emit("on-item-click", item, indexList);
|
|
221
241
|
}
|
|
222
242
|
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
243
|
+
};
|
|
244
|
+
const __cssModules = {};
|
|
245
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
246
|
+
__vue2_script,
|
|
247
|
+
render,
|
|
248
|
+
staticRenderFns,
|
|
249
|
+
false,
|
|
250
|
+
__vue2_injectStyles,
|
|
230
251
|
null,
|
|
231
252
|
null,
|
|
232
253
|
null
|
|
233
254
|
);
|
|
234
|
-
function
|
|
235
|
-
for (let
|
|
236
|
-
this[
|
|
255
|
+
function __vue2_injectStyles(context) {
|
|
256
|
+
for (let o in __cssModules) {
|
|
257
|
+
this[o] = __cssModules[o];
|
|
258
|
+
}
|
|
237
259
|
}
|
|
238
|
-
const
|
|
239
|
-
return
|
|
260
|
+
const ContextMenu = /* @__PURE__ */ function() {
|
|
261
|
+
return __component__.exports;
|
|
240
262
|
}();
|
|
241
263
|
export {
|
|
242
|
-
|
|
264
|
+
ContextMenu as default
|
|
243
265
|
};
|