@web-utils/component 2.0.12 → 2.0.14
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/3a79781b.js +75 -0
- package/dist/chunks/{44b78389.js → 41a066be.js} +8 -8
- package/dist/chunks/{e1939731.js → 5a78e0db.js} +5 -6
- package/dist/chunks/5d4282fb.js +30 -0
- package/dist/chunks/{822300f3.js → 61ad06b2.js} +3 -3
- package/dist/chunks/76680a03.js +24 -0
- package/dist/chunks/8c0142e0.js +81 -0
- package/dist/chunks/97652d86.js +26 -0
- package/dist/chunks/b4acd3a6.js +126 -0
- package/dist/chunks/f71045fc.js +184 -0
- package/dist/components/address-input/index.js +43 -56
- package/dist/components/address-input/style.css +1 -15
- package/dist/components/aside-menu/index.js +30 -36
- package/dist/components/aside-menu/style.css +1 -9
- package/dist/components/awesome-button/index.js +32 -35
- package/dist/components/base.css +1 -66
- package/dist/components/capsule-tab/index.js +27 -33
- package/dist/components/capsule-tab/style.css +1 -32
- package/dist/components/chunk-file-uploader/index.js +54 -88
- package/dist/components/chunk-file-uploader/style.css +1 -4
- package/dist/components/chunk-file-uploader-button/index.js +25 -31
- package/dist/components/chunk-file-uploader-button/style.css +1 -17
- package/dist/components/chunk-file-uploader-drop/index.js +28 -42
- package/dist/components/chunk-file-uploader-drop/style.css +1 -12
- package/dist/components/chunk-file-uploader-file/index.js +134 -212
- package/dist/components/chunk-file-uploader-file/style.css +1 -125
- package/dist/components/chunk-file-uploader-files/index.js +28 -34
- package/dist/components/chunk-file-uploader-files/style.css +1 -9
- package/dist/components/chunk-file-uploader-list/index.js +29 -35
- package/dist/components/chunk-file-uploader-list/style.css +1 -9
- package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
- package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
- package/dist/components/code-mirror-editor/index.js +153 -181
- package/dist/components/code-mirror-editor/style.css +1 -17
- package/dist/components/color-picker/index.js +49 -68
- package/dist/components/confirm-button/index.js +19 -21
- package/dist/components/confirmable/index.js +18 -19
- package/dist/components/context-menu/index.js +108 -130
- package/dist/components/context-menu/style.css +1 -88
- package/dist/components/custom-scrollbar/index.js +49 -67
- package/dist/components/data-table-picker/index.js +62 -81
- package/dist/components/dynamic-table/index.js +89 -113
- package/dist/components/dynamic-table/style.css +1 -30
- package/dist/components/e-charts/index.js +120 -201
- package/dist/components/e-charts/style.css +1 -10
- package/dist/components/editable-progress/index.js +60 -93
- package/dist/components/editable-progress/style.css +1 -37
- package/dist/components/editable-tree/index.js +423 -638
- package/dist/components/editable-tree/style.css +1 -82
- package/dist/components/egd-collapse/index.js +33 -46
- package/dist/components/egd-collapse-item/index.js +60 -76
- package/dist/components/element-dialog/index.js +95 -147
- package/dist/components/element-dialog/style.css +1 -102
- package/dist/components/empty-view/index.js +28 -34
- package/dist/components/empty-view/style.css +1 -17
- package/dist/components/error-view/index.js +26 -32
- package/dist/components/error-view/style.css +1 -17
- package/dist/components/flex-column/index.js +25 -40
- package/dist/components/flex-item/index.js +29 -57
- package/dist/components/flex-row/index.js +25 -40
- package/dist/components/flex-scroller/index.js +26 -32
- package/dist/components/flex-scroller/style.css +1 -20
- package/dist/components/form-button/index.js +34 -38
- package/dist/components/form-cascader/index.js +71 -81
- package/dist/components/form-checkbox-group/index.js +88 -113
- package/dist/components/form-checkbox-group/style.css +1 -51
- package/dist/components/form-date-picker/index.js +70 -132
- package/dist/components/form-holder/index.js +32 -39
- package/dist/components/form-input/index.js +56 -62
- package/dist/components/form-input-email/index.js +48 -60
- package/dist/components/form-input-id-card/index.js +53 -59
- package/dist/components/form-input-number/index.js +61 -68
- package/dist/components/form-input-number/style.css +1 -12
- package/dist/components/form-input-phone-number/index.js +49 -55
- package/dist/components/form-input-time/index.js +53 -59
- package/dist/components/form-item/index.js +80 -123
- package/dist/components/form-item/style.css +1 -11
- package/dist/components/form-item-config-provider/index.js +25 -26
- package/dist/components/form-item-group/index.js +85 -111
- package/dist/components/form-item-group/style.css +1 -30
- package/dist/components/form-radio-group/index.js +85 -104
- package/dist/components/form-radio-group/style.css +1 -53
- package/dist/components/form-select/index.js +76 -91
- package/dist/components/form-switch/index.js +51 -57
- package/dist/components/form-textarea/index.js +51 -57
- package/dist/components/form-view/index.js +165 -232
- package/dist/components/form-view/style.css +1 -158
- package/dist/components/guide-steps/index.js +44 -58
- package/dist/components/guide-steps/style.css +1 -34
- package/dist/components/icon-card/index.js +29 -35
- package/dist/components/icon-card/style.css +1 -56
- package/dist/components/iframe-window/index.js +29 -35
- package/dist/components/iframe-window/style.css +1 -20
- package/dist/components/image-viewer/index.js +48 -66
- package/dist/components/image-viewer/style.css +1 -21
- package/dist/components/input-number/index.js +127 -193
- package/dist/components/input-number/style.css +1 -15
- package/dist/components/input-number-range/index.js +45 -57
- package/dist/components/input-number-range/style.css +1 -12
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +73 -120
- package/dist/components/loading-view/index.js +26 -32
- package/dist/components/loading-view/style.css +1 -17
- package/dist/components/nav-bar/index.js +27 -37
- package/dist/components/nav-bar/style.css +1 -17
- package/dist/components/not-implement/index.js +23 -31
- package/dist/components/not-implement/style.css +1 -15
- package/dist/components/page/index.js +22 -28
- package/dist/components/page/style.css +1 -12
- package/dist/components/page-header/index.js +30 -36
- package/dist/components/page-header/style.css +1 -14
- package/dist/components/page-index/index.js +62 -83
- package/dist/components/page-index/style.css +1 -23
- package/dist/components/page-index-top/index.js +53 -68
- package/dist/components/page-skeleton/index.js +31 -37
- package/dist/components/page-skeleton/style.css +1 -23
- package/dist/components/page-skeleton-new/index.js +42 -48
- package/dist/components/page-skeleton-new/style.css +1 -42
- package/dist/components/pageable-table/index.js +186 -253
- package/dist/components/pageable-table/style.css +1 -72
- package/dist/components/pageable-view/index.js +129 -199
- package/dist/components/pageable-view/style.css +1 -69
- package/dist/components/photo-swipe/index.js +110 -151
- package/dist/components/photo-swipe/style.css +1 -20
- package/dist/components/resize-observer/index.js +34 -68
- package/dist/components/resize-observer/style.css +1 -31
- package/dist/components/search-popover/index.js +153 -211
- package/dist/components/search-popover/style.css +1 -93
- package/dist/components/sign-panel/index.js +92 -142
- package/dist/components/sign-panel/style.css +1 -97
- package/dist/components/split-pane/index.js +101 -162
- package/dist/components/split-pane/style.css +1 -100
- package/dist/components/stateful/index.js +31 -34
- package/dist/components/stateful/style.css +1 -33
- package/dist/components/static-pageable-table/index.js +37 -44
- package/dist/components/static-pageable-table/style.css +1 -9
- package/dist/components/swiper/index.js +85 -150
- package/dist/components/swiper/style.css +1 -43
- package/dist/components/tab/index.js +54 -72
- package/dist/components/tab/style.css +1 -122
- package/dist/components/tab-item/index.js +30 -35
- package/dist/components/table-column/index.js +30 -32
- package/dist/components/table-view/index.js +156 -227
- package/dist/components/table-view/style.css +1 -95
- package/dist/components/tag-render/index.js +44 -58
- package/dist/components/tag-render/style.css +1 -33
- package/dist/components/tinymce-editor/index.js +79 -95
- package/dist/components/tinymce-editor/style.css +1 -43
- package/dist/components/tinymce-wrapper/index.js +92 -121
- package/dist/components/tinymce-wrapper/style.css +1 -36
- package/dist/components/toolbar/index.js +63 -84
- package/dist/components/toolbar/style.css +1 -39
- package/dist/components/toolbar-button/index.js +41 -48
- package/dist/components/toolbar-button/style.css +1 -21
- package/dist/components/trigger/index.js +29 -36
- package/dist/components/vue-tags-input/index.js +188 -308
- package/dist/components/vue-tags-input/style.css +1 -682
- package/dist/components/watermark/index.js +25 -37
- package/dist/components/watermark/style.css +1 -11
- package/dist/components/x-dialog/index.js +67 -93
- package/dist/components/x-dialog/style.css +1 -15
- package/dist/index.css +193 -1105
- package/dist/index.es.js +4790 -7243
- package/package.json +1 -2
- package/web-types.json +1 -1
- package/dist/chunks/3d28cc08.js +0 -57
- package/dist/chunks/5d33812d.js +0 -147
- package/dist/chunks/9d848bf6.js +0 -99
- package/dist/chunks/a0bb327b.js +0 -96
- package/dist/chunks/a8891d2c.js +0 -30
- package/dist/chunks/c69d5628.js +0 -248
- package/dist/chunks/de9fe802.js +0 -24
package/package.json
CHANGED
package/web-types.json
CHANGED
package/dist/chunks/3d28cc08.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
2
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
3
|
-
if (render) {
|
|
4
|
-
options.render = render;
|
|
5
|
-
options.staticRenderFns = staticRenderFns;
|
|
6
|
-
options._compiled = true;
|
|
7
|
-
}
|
|
8
|
-
if (functionalTemplate) {
|
|
9
|
-
options.functional = true;
|
|
10
|
-
}
|
|
11
|
-
if (scopeId) {
|
|
12
|
-
options._scopeId = "data-v-" + scopeId;
|
|
13
|
-
}
|
|
14
|
-
var hook;
|
|
15
|
-
if (moduleIdentifier) {
|
|
16
|
-
hook = function(context) {
|
|
17
|
-
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
18
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
19
|
-
context = __VUE_SSR_CONTEXT__;
|
|
20
|
-
}
|
|
21
|
-
if (injectStyles) {
|
|
22
|
-
injectStyles.call(this, context);
|
|
23
|
-
}
|
|
24
|
-
if (context && context._registeredComponents) {
|
|
25
|
-
context._registeredComponents.add(moduleIdentifier);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
options._ssrRegister = hook;
|
|
29
|
-
} else if (injectStyles) {
|
|
30
|
-
hook = shadowMode ? function() {
|
|
31
|
-
injectStyles.call(
|
|
32
|
-
this,
|
|
33
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
34
|
-
);
|
|
35
|
-
} : injectStyles;
|
|
36
|
-
}
|
|
37
|
-
if (hook) {
|
|
38
|
-
if (options.functional) {
|
|
39
|
-
options._injectStyles = hook;
|
|
40
|
-
var originalRender = options.render;
|
|
41
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
42
|
-
hook.call(context);
|
|
43
|
-
return originalRender(h, context);
|
|
44
|
-
};
|
|
45
|
-
} else {
|
|
46
|
-
var existing = options.beforeCreate;
|
|
47
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
exports: scriptExports,
|
|
52
|
-
options
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
normalizeComponent as n
|
|
57
|
-
};
|
package/dist/chunks/5d33812d.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { i as filterProperties } from "./c69d5628.js";
|
|
2
|
-
import { Col, FormItem } from "element-ui";
|
|
3
|
-
const elColManualBindKeys = ["span"];
|
|
4
|
-
const elColKeys = [...Object.keys(Col.props)];
|
|
5
|
-
const elColAutoBindKeys = elColKeys.filter((key) => !elColManualBindKeys.includes(key));
|
|
6
|
-
const elFormItemManualBindKeys = ["label", "prop", "rules", "labelWidth", "required"];
|
|
7
|
-
const elFormItemKeys = [...Object.keys(FormItem.props)];
|
|
8
|
-
const elFormItemAutoBindKeys = elFormItemKeys.filter((key) => !elFormItemManualBindKeys.includes(key));
|
|
9
|
-
const formItemAutoBindKeys = [
|
|
10
|
-
"wrapCol",
|
|
11
|
-
"wrapFormItem",
|
|
12
|
-
"unwrap",
|
|
13
|
-
"prefixConfig",
|
|
14
|
-
"block",
|
|
15
|
-
"placeholder",
|
|
16
|
-
"prefixPick",
|
|
17
|
-
"half",
|
|
18
|
-
...elColKeys,
|
|
19
|
-
...elFormItemKeys
|
|
20
|
-
];
|
|
21
|
-
const formItemMixin = {
|
|
22
|
-
inject: {
|
|
23
|
-
elForm: {
|
|
24
|
-
default: {}
|
|
25
|
-
},
|
|
26
|
-
formItemGroup: {
|
|
27
|
-
default: {}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
props: {
|
|
31
|
-
disabled: Boolean,
|
|
32
|
-
wrapCol: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: true
|
|
35
|
-
},
|
|
36
|
-
wrapFormItem: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true
|
|
39
|
-
},
|
|
40
|
-
unwrap: Boolean,
|
|
41
|
-
half: Boolean,
|
|
42
|
-
prefixConfig: Boolean,
|
|
43
|
-
block: Boolean,
|
|
44
|
-
placeholder: {
|
|
45
|
-
type: [Boolean, String],
|
|
46
|
-
default: true
|
|
47
|
-
},
|
|
48
|
-
formItemClass: String,
|
|
49
|
-
prefixPick: Boolean,
|
|
50
|
-
label: String,
|
|
51
|
-
labelWidth: String,
|
|
52
|
-
prop: String,
|
|
53
|
-
required: Boolean,
|
|
54
|
-
rules: [Object, Array],
|
|
55
|
-
error: String,
|
|
56
|
-
validateStatus: String,
|
|
57
|
-
for: String,
|
|
58
|
-
inlineMessage: {
|
|
59
|
-
type: [String, Boolean],
|
|
60
|
-
default: ""
|
|
61
|
-
},
|
|
62
|
-
showMessage: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: true
|
|
65
|
-
},
|
|
66
|
-
size: String,
|
|
67
|
-
span: {
|
|
68
|
-
type: Number,
|
|
69
|
-
default: 12
|
|
70
|
-
},
|
|
71
|
-
tag: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: "div"
|
|
74
|
-
},
|
|
75
|
-
offset: Number,
|
|
76
|
-
pull: Number,
|
|
77
|
-
push: Number,
|
|
78
|
-
xs: [Number, Object],
|
|
79
|
-
sm: [Number, Object],
|
|
80
|
-
md: [Number, Object],
|
|
81
|
-
lg: [Number, Object],
|
|
82
|
-
xl: [Number, Object]
|
|
83
|
-
},
|
|
84
|
-
computed: {
|
|
85
|
-
prefix() {
|
|
86
|
-
if (this.prefixConfig) {
|
|
87
|
-
return "请配置";
|
|
88
|
-
} else if (this.prefixPick) {
|
|
89
|
-
return "请选择";
|
|
90
|
-
} else {
|
|
91
|
-
return "请输入";
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
message() {
|
|
95
|
-
var _a;
|
|
96
|
-
return `${this.prefix}${((_a = this.label) == null ? void 0 : _a.replace(":", "")) || ""}`;
|
|
97
|
-
},
|
|
98
|
-
computeRules() {
|
|
99
|
-
const rules = [...this.rules || []];
|
|
100
|
-
if (this.required) {
|
|
101
|
-
const requireRule = rules.find((value) => value.required);
|
|
102
|
-
if (requireRule) {
|
|
103
|
-
if (!requireRule.ref) {
|
|
104
|
-
requireRule.message = rules.message || this.message;
|
|
105
|
-
} else {
|
|
106
|
-
requireRule.label = requireRule.label || this.label;
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
rules.unshift(this.getRequireRule());
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return rules.concat(this.getRules());
|
|
113
|
-
},
|
|
114
|
-
computeSpan() {
|
|
115
|
-
return this.block ? 24 : this.span;
|
|
116
|
-
},
|
|
117
|
-
formItemProps() {
|
|
118
|
-
return filterProperties({ ...this.$props, ...this.$attrs }, formItemAutoBindKeys);
|
|
119
|
-
},
|
|
120
|
-
elFormItemProps() {
|
|
121
|
-
return filterProperties({ ...this.$props, ...this.$attrs }, elFormItemAutoBindKeys);
|
|
122
|
-
},
|
|
123
|
-
elColProps() {
|
|
124
|
-
return filterProperties({ ...this.$props, ...this.$attrs }, elColAutoBindKeys);
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
watch: {
|
|
128
|
-
computeRules() {
|
|
129
|
-
var _a, _b;
|
|
130
|
-
(_b = (_a = this.elForm) == null ? void 0 : _a.clearValidate) == null ? void 0 : _b.call(_a, this.prop);
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
methods: {
|
|
134
|
-
getRules() {
|
|
135
|
-
return [];
|
|
136
|
-
},
|
|
137
|
-
getRequireRule() {
|
|
138
|
-
return {
|
|
139
|
-
required: true,
|
|
140
|
-
message: this.message
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
export {
|
|
146
|
-
formItemMixin as f
|
|
147
|
-
};
|
package/dist/chunks/9d848bf6.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
const parentMixin = {
|
|
2
|
-
mounted() {
|
|
3
|
-
if (this.value >= 0) {
|
|
4
|
-
this.currentIndex = this.value;
|
|
5
|
-
}
|
|
6
|
-
this.updateIndex();
|
|
7
|
-
},
|
|
8
|
-
methods: {
|
|
9
|
-
updateIndex() {
|
|
10
|
-
if (!this.$children || !this.$children.length) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
this.number = this.$children.length;
|
|
14
|
-
const children = this.$children;
|
|
15
|
-
for (let i = 0; i < children.length; i++) {
|
|
16
|
-
children[i].currentIndex = i;
|
|
17
|
-
if (children[i].currentSelected) {
|
|
18
|
-
this.index = i;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
props: {
|
|
24
|
-
value: Number
|
|
25
|
-
},
|
|
26
|
-
watch: {
|
|
27
|
-
currentIndex(val, oldVal) {
|
|
28
|
-
oldVal > -1 && this.$children[oldVal] && (this.$children[oldVal].currentSelected = false);
|
|
29
|
-
val > -1 && this.$children[val] && (this.$children[val].currentSelected = true);
|
|
30
|
-
this.$emit("input", val);
|
|
31
|
-
this.$emit("on-index-change", val, oldVal);
|
|
32
|
-
},
|
|
33
|
-
index(val) {
|
|
34
|
-
this.currentIndex = val;
|
|
35
|
-
},
|
|
36
|
-
value(val) {
|
|
37
|
-
this.index = val;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
index: -1,
|
|
43
|
-
currentIndex: this.index,
|
|
44
|
-
number: this.$children.length
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const childMixin = {
|
|
49
|
-
props: {
|
|
50
|
-
selected: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
mounted() {
|
|
56
|
-
this.$parent.updateIndex();
|
|
57
|
-
},
|
|
58
|
-
beforeDestroy() {
|
|
59
|
-
const $parent = this.$parent;
|
|
60
|
-
this.$nextTick(() => {
|
|
61
|
-
$parent.updateIndex();
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
onItemClick(hasLink) {
|
|
66
|
-
if (this.$parent.preventDefault) {
|
|
67
|
-
this.$parent.$emit("on-before-index-change", this.currentIndex);
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (typeof this.disabled === "undefined" || this.disabled === false) {
|
|
71
|
-
this.currentSelected = true;
|
|
72
|
-
this.$parent.currentIndex = this.currentIndex;
|
|
73
|
-
this.$nextTick(() => {
|
|
74
|
-
this.$emit("on-item-click", this.currentIndex);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
watch: {
|
|
80
|
-
currentSelected(val) {
|
|
81
|
-
if (val) {
|
|
82
|
-
this.$parent.index = this.currentIndex;
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
selected(val) {
|
|
86
|
-
this.currentSelected = val;
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
data() {
|
|
90
|
-
return {
|
|
91
|
-
currentIndex: -1,
|
|
92
|
-
currentSelected: this.selected
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
export {
|
|
97
|
-
childMixin as c,
|
|
98
|
-
parentMixin as p
|
|
99
|
-
};
|
package/dist/chunks/a0bb327b.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { MessageBox, Loading } from "element-ui";
|
|
2
|
-
import { isFunction } from "@web-utils/core";
|
|
3
|
-
async function onClick(e, props, listeners) {
|
|
4
|
-
const { stop, prevent, message, loadable, loadingText, confirmable, confirmType, confirmText } = props;
|
|
5
|
-
if (stop) {
|
|
6
|
-
e.stopPropagation();
|
|
7
|
-
}
|
|
8
|
-
if (prevent) {
|
|
9
|
-
e.preventDefault();
|
|
10
|
-
}
|
|
11
|
-
const { before, click, cancel, after } = listeners;
|
|
12
|
-
if (isFunction(click)) {
|
|
13
|
-
try {
|
|
14
|
-
let pass = true;
|
|
15
|
-
if (isFunction(before)) {
|
|
16
|
-
pass = await before(e);
|
|
17
|
-
}
|
|
18
|
-
if (pass === false) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (confirmable) {
|
|
22
|
-
await MessageBox.confirm(message || confirmText, { type: confirmType });
|
|
23
|
-
}
|
|
24
|
-
let loadingInstance;
|
|
25
|
-
if (loadable) {
|
|
26
|
-
loadingInstance = Loading.service({ background: "rgba(0,0,0,0.3)", text: loadingText });
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
await click(e);
|
|
30
|
-
} catch (e2) {
|
|
31
|
-
}
|
|
32
|
-
if (loadable) {
|
|
33
|
-
loadingInstance.close();
|
|
34
|
-
}
|
|
35
|
-
if (isFunction(after)) {
|
|
36
|
-
await after(e);
|
|
37
|
-
}
|
|
38
|
-
} catch (e2) {
|
|
39
|
-
if (isFunction(cancel)) {
|
|
40
|
-
await cancel(e2);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const confirmableMixin = {
|
|
46
|
-
functional: true,
|
|
47
|
-
props: {
|
|
48
|
-
stop: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: true
|
|
51
|
-
},
|
|
52
|
-
prevent: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: true
|
|
55
|
-
},
|
|
56
|
-
text: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: ""
|
|
59
|
-
},
|
|
60
|
-
message: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: "你确定要删除该记录吗?"
|
|
63
|
-
},
|
|
64
|
-
confirmable: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: true
|
|
67
|
-
},
|
|
68
|
-
confirmText: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: "你确定要删除该记录吗?"
|
|
71
|
-
},
|
|
72
|
-
confirmType: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: "warning"
|
|
75
|
-
},
|
|
76
|
-
loadable: Boolean,
|
|
77
|
-
loadingText: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: "正在处理中请稍候..."
|
|
80
|
-
},
|
|
81
|
-
tag: {
|
|
82
|
-
type: String,
|
|
83
|
-
default: "i"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
render(createElement, { props, data, children, listeners }) {
|
|
87
|
-
return createElement(props.tag, {
|
|
88
|
-
...data,
|
|
89
|
-
on: { click: (e) => onClick(e, props, listeners) },
|
|
90
|
-
props
|
|
91
|
-
}, children || props.text);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
export {
|
|
95
|
-
confirmableMixin as c
|
|
96
|
-
};
|
package/dist/chunks/a8891d2c.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
function secondsToStr(temp) {
|
|
2
|
-
const years = Math.floor(temp / 31536e3);
|
|
3
|
-
if (years) {
|
|
4
|
-
return `${years} 年${numberEnding(years)}`;
|
|
5
|
-
}
|
|
6
|
-
const days = Math.floor((temp %= 31536e3) / 86400);
|
|
7
|
-
if (days) {
|
|
8
|
-
return `${days} 天${numberEnding(days)}`;
|
|
9
|
-
}
|
|
10
|
-
const hours = Math.floor((temp %= 86400) / 3600);
|
|
11
|
-
if (hours) {
|
|
12
|
-
return `${hours} 时${numberEnding(hours)}`;
|
|
13
|
-
}
|
|
14
|
-
const minutes = Math.floor((temp %= 3600) / 60);
|
|
15
|
-
if (minutes) {
|
|
16
|
-
return `${minutes} 分${numberEnding(minutes)}`;
|
|
17
|
-
}
|
|
18
|
-
const seconds = temp % 60;
|
|
19
|
-
return `${seconds} 秒${numberEnding(seconds)}`;
|
|
20
|
-
function numberEnding(number) {
|
|
21
|
-
return number > 1 ? "" : "";
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function kebabCase(s) {
|
|
25
|
-
return s.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`);
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
kebabCase as k,
|
|
29
|
-
secondsToStr as s
|
|
30
|
-
};
|
package/dist/chunks/c69d5628.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import { isObject, isString, hasOwn, isPlainObject, isArray, camelize, isFunction } from "@web-utils/core";
|
|
2
|
-
import Vue from "vue";
|
|
3
|
-
const util = "";
|
|
4
|
-
const getClass = (customClass, fixedClass) => {
|
|
5
|
-
if (isPlainObject(customClass) || isString(customClass)) {
|
|
6
|
-
return [fixedClass, customClass];
|
|
7
|
-
} else if (isArray(customClass)) {
|
|
8
|
-
return [fixedClass, ...customClass];
|
|
9
|
-
} else {
|
|
10
|
-
return [fixedClass];
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
function getInternetExplorerVersion() {
|
|
14
|
-
const ua = window.navigator.userAgent;
|
|
15
|
-
const msie = ua.indexOf("MSIE ");
|
|
16
|
-
if (msie > 0) {
|
|
17
|
-
return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)), 10);
|
|
18
|
-
}
|
|
19
|
-
const trident = ua.indexOf("Trident/");
|
|
20
|
-
if (trident > 0) {
|
|
21
|
-
const rv = ua.indexOf("rv:");
|
|
22
|
-
return parseInt(ua.substring(rv + 3, ua.indexOf(".", rv)), 10);
|
|
23
|
-
}
|
|
24
|
-
const edge = ua.indexOf("Edge/");
|
|
25
|
-
if (edge > 0) {
|
|
26
|
-
return parseInt(ua.substring(edge + 5, ua.indexOf(".", edge)), 10);
|
|
27
|
-
}
|
|
28
|
-
return -1;
|
|
29
|
-
}
|
|
30
|
-
function assignReactiveProperties(raw, properties) {
|
|
31
|
-
for (const propertiesKey in properties) {
|
|
32
|
-
Vue.set(raw, propertiesKey, properties[propertiesKey]);
|
|
33
|
-
}
|
|
34
|
-
return raw;
|
|
35
|
-
}
|
|
36
|
-
const findParent = (vm, predicate) => {
|
|
37
|
-
if (!vm || !predicate) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
let parent = vm;
|
|
41
|
-
while (parent && predicate(parent)) {
|
|
42
|
-
parent = parent.$parent;
|
|
43
|
-
}
|
|
44
|
-
return parent;
|
|
45
|
-
};
|
|
46
|
-
const elTableProperties = [
|
|
47
|
-
"data",
|
|
48
|
-
"height",
|
|
49
|
-
"max-height",
|
|
50
|
-
"stripe",
|
|
51
|
-
"border",
|
|
52
|
-
"size",
|
|
53
|
-
"fit",
|
|
54
|
-
"show-header",
|
|
55
|
-
"highlight-current-row",
|
|
56
|
-
"current-row-key",
|
|
57
|
-
"row-class-name",
|
|
58
|
-
"row-style",
|
|
59
|
-
"cell-class-name",
|
|
60
|
-
"cell-style",
|
|
61
|
-
"header-row-class-name",
|
|
62
|
-
"header-row-style",
|
|
63
|
-
"header-cell-class-name",
|
|
64
|
-
"header-cell-style",
|
|
65
|
-
"row-key",
|
|
66
|
-
"empty-text",
|
|
67
|
-
"default-expand-all",
|
|
68
|
-
"expand-row-keys",
|
|
69
|
-
"default-sort",
|
|
70
|
-
"tooltip-effect",
|
|
71
|
-
"show-summary",
|
|
72
|
-
"sum-text",
|
|
73
|
-
"summary-method",
|
|
74
|
-
"span-method",
|
|
75
|
-
"select-on-indeterminate ",
|
|
76
|
-
"indent",
|
|
77
|
-
"lazy",
|
|
78
|
-
"load",
|
|
79
|
-
"tree-props"
|
|
80
|
-
];
|
|
81
|
-
const elTableEvents = [
|
|
82
|
-
"select",
|
|
83
|
-
"select-all",
|
|
84
|
-
"selection-change",
|
|
85
|
-
"cell-mouse-enter",
|
|
86
|
-
"cell-mouse-leave",
|
|
87
|
-
"cell-click",
|
|
88
|
-
"cell-dblclick",
|
|
89
|
-
"row-click",
|
|
90
|
-
"row-contextmenu",
|
|
91
|
-
"header-click",
|
|
92
|
-
"header-contextmenu",
|
|
93
|
-
"sort-change",
|
|
94
|
-
"filter-change",
|
|
95
|
-
"current-change",
|
|
96
|
-
"header-dragend",
|
|
97
|
-
"expand-change"
|
|
98
|
-
];
|
|
99
|
-
const elTableColumnProperties = [
|
|
100
|
-
"type",
|
|
101
|
-
"index",
|
|
102
|
-
"column-key",
|
|
103
|
-
"label",
|
|
104
|
-
"prop",
|
|
105
|
-
"width",
|
|
106
|
-
"min-width",
|
|
107
|
-
"fixed",
|
|
108
|
-
"render-header",
|
|
109
|
-
"sortable",
|
|
110
|
-
"sort-method",
|
|
111
|
-
"sort-by",
|
|
112
|
-
"sort-orders",
|
|
113
|
-
"resizable",
|
|
114
|
-
"formatter",
|
|
115
|
-
"show-overflow-tooltip",
|
|
116
|
-
"align",
|
|
117
|
-
"header-align",
|
|
118
|
-
"class-name",
|
|
119
|
-
"label-class-name",
|
|
120
|
-
"selectable",
|
|
121
|
-
"reserve-selection",
|
|
122
|
-
"filters",
|
|
123
|
-
"filter-placement",
|
|
124
|
-
"filter-multiple",
|
|
125
|
-
"filter-method",
|
|
126
|
-
"filtered-value"
|
|
127
|
-
];
|
|
128
|
-
const elTreeProperties = [
|
|
129
|
-
"data",
|
|
130
|
-
"empty-text",
|
|
131
|
-
"node-key",
|
|
132
|
-
"props",
|
|
133
|
-
"render-after-expand",
|
|
134
|
-
"load",
|
|
135
|
-
"render-content",
|
|
136
|
-
"highlight-current",
|
|
137
|
-
"default-expand-all",
|
|
138
|
-
"expand-on-click-node",
|
|
139
|
-
"check-on-click-node",
|
|
140
|
-
"auto-expand-parent",
|
|
141
|
-
"default-expanded-keys",
|
|
142
|
-
"show-checkbox",
|
|
143
|
-
"check-strictly",
|
|
144
|
-
"default-checked-keys",
|
|
145
|
-
"current-node-key",
|
|
146
|
-
"filter-node-method",
|
|
147
|
-
"accordion",
|
|
148
|
-
"indent",
|
|
149
|
-
"icon-class",
|
|
150
|
-
"lazy",
|
|
151
|
-
"draggable",
|
|
152
|
-
"allow-drag",
|
|
153
|
-
"allow-drop"
|
|
154
|
-
];
|
|
155
|
-
const elTreeEvents = [
|
|
156
|
-
"node-click",
|
|
157
|
-
"node-contextmenu",
|
|
158
|
-
"check-change",
|
|
159
|
-
"check",
|
|
160
|
-
"current-change",
|
|
161
|
-
"node-expand",
|
|
162
|
-
"node-collapse",
|
|
163
|
-
"node-drag-start",
|
|
164
|
-
"node-drag-enter",
|
|
165
|
-
"node-drag-leave",
|
|
166
|
-
"node-drag-over",
|
|
167
|
-
"node-drag-end",
|
|
168
|
-
"node-drop"
|
|
169
|
-
];
|
|
170
|
-
const filterProperties = (obj, allowProperties, allow = true) => {
|
|
171
|
-
if (isObject(obj)) {
|
|
172
|
-
let arr = allowProperties;
|
|
173
|
-
if (isString(allowProperties)) {
|
|
174
|
-
arr = arr.split(",");
|
|
175
|
-
}
|
|
176
|
-
const temp = {};
|
|
177
|
-
arr.forEach((key) => {
|
|
178
|
-
if (hasOwn(obj, key)) {
|
|
179
|
-
if (allow) {
|
|
180
|
-
temp[key] = obj[key];
|
|
181
|
-
} else {
|
|
182
|
-
if (!arr.includes(key)) {
|
|
183
|
-
temp[key] = obj[key];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
return temp;
|
|
189
|
-
}
|
|
190
|
-
return obj;
|
|
191
|
-
};
|
|
192
|
-
const normalizeProps = (attrs) => {
|
|
193
|
-
const props = {};
|
|
194
|
-
for (const attrsKey in attrs) {
|
|
195
|
-
props[camelize(attrsKey)] = attrs[attrsKey];
|
|
196
|
-
}
|
|
197
|
-
return props;
|
|
198
|
-
};
|
|
199
|
-
const filterTableProperties = (obj) => {
|
|
200
|
-
return filterProperties(obj, elTableProperties);
|
|
201
|
-
};
|
|
202
|
-
const filterTableColumnProperties = (obj) => {
|
|
203
|
-
return filterProperties(obj, elTableColumnProperties);
|
|
204
|
-
};
|
|
205
|
-
const filterTableEvents = (obj) => {
|
|
206
|
-
return filterProperties(obj, elTableEvents);
|
|
207
|
-
};
|
|
208
|
-
const filterTreeProperties = (obj) => {
|
|
209
|
-
return filterProperties(obj, elTreeProperties);
|
|
210
|
-
};
|
|
211
|
-
const filterTreeEvents = (obj) => {
|
|
212
|
-
return filterProperties(obj, elTreeEvents);
|
|
213
|
-
};
|
|
214
|
-
const pathArgReplacer = (path = "", row) => {
|
|
215
|
-
const rw = row || {};
|
|
216
|
-
const p = path || "";
|
|
217
|
-
return p.replace(/{(.*?)}/g, (_, key) => {
|
|
218
|
-
if (key.indexOf(":")) {
|
|
219
|
-
const [k, defaultVal] = key.split(":");
|
|
220
|
-
return rw[k] ? rw[k] : defaultVal;
|
|
221
|
-
} else {
|
|
222
|
-
return rw[key] || "";
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
const fillPath = (path, args) => {
|
|
227
|
-
if (isFunction(path)) {
|
|
228
|
-
return pathArgReplacer(path(args), args);
|
|
229
|
-
} else if (isString(path)) {
|
|
230
|
-
return pathArgReplacer(path, args);
|
|
231
|
-
} else {
|
|
232
|
-
return null;
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
export {
|
|
236
|
-
filterTreeProperties as a,
|
|
237
|
-
filterTreeEvents as b,
|
|
238
|
-
assignReactiveProperties as c,
|
|
239
|
-
filterTableProperties as d,
|
|
240
|
-
filterTableEvents as e,
|
|
241
|
-
filterTableColumnProperties as f,
|
|
242
|
-
getInternetExplorerVersion as g,
|
|
243
|
-
getClass as h,
|
|
244
|
-
filterProperties as i,
|
|
245
|
-
findParent as j,
|
|
246
|
-
fillPath as k,
|
|
247
|
-
normalizeProps as n
|
|
248
|
-
};
|