@web-utils/component 1.2.5 → 1.2.6
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/README.md +27 -27
- package/dist/chunks/163eed3b.js +16 -1
- package/dist/chunks/2bd4e340.js +184 -0
- package/dist/chunks/6499de3a.js +30 -1
- package/dist/chunks/7af3ceb1.js +75 -0
- package/dist/chunks/86bcadec.js +24 -0
- package/dist/chunks/8bbde9bf.js +81 -1
- package/dist/chunks/90bd3d52.js +26 -1
- package/dist/chunks/92404ceb.js +126 -0
- package/dist/chunks/a73fe8ee.js +11 -0
- package/dist/chunks/df803484.js +60 -0
- package/dist/components/address-input/index.js +113 -1
- package/dist/components/aside-menu/index.js +58 -1
- package/dist/components/awesome-button/index.js +82 -1
- package/dist/components/capsule-tab/index.js +52 -1
- package/dist/components/chunk-file-uploader/index.js +119 -1
- package/dist/components/chunk-file-uploader-button/index.js +60 -1
- package/dist/components/chunk-file-uploader-drop/index.js +65 -1
- package/dist/components/chunk-file-uploader-file/index.js +311 -1
- package/dist/components/chunk-file-uploader-files/index.js +49 -1
- package/dist/components/chunk-file-uploader-list/index.js +50 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +51 -1
- package/dist/components/code-mirror-editor/index.js +310 -6
- package/dist/components/color-picker/index.js +110 -1
- package/dist/components/confirm-button/index.js +57 -1
- package/dist/components/confirmable/index.js +28 -1
- package/dist/components/context-menu/index.js +236 -1
- package/dist/components/custom-scrollbar/index.js +150 -1
- package/dist/components/data-table-picker/index.js +137 -1
- package/dist/components/dynamic-table/index.js +195 -1
- package/dist/components/e-charts/index.js +229 -1
- package/dist/components/editable-progress/index.js +141 -1
- package/dist/components/editable-tree/index.js +789 -1
- package/dist/components/egd-collapse/index.js +79 -1
- package/dist/components/egd-collapse-item/index.js +132 -1
- package/dist/components/el-color-picker-dropdown/index.js +170 -1
- package/dist/components/element-dialog/index.js +242 -1
- package/dist/components/empty-view/index.js +69 -1
- package/dist/components/error-view/index.js +61 -1
- package/dist/components/flex-column/index.js +50 -1
- package/dist/components/flex-item/index.js +66 -1
- package/dist/components/flex-row/index.js +50 -1
- package/dist/components/flex-scroller/index.js +47 -1
- package/dist/components/form-button/index.js +80 -1
- package/dist/components/form-cascader/index.js +151 -1
- package/dist/components/form-checkbox-group/index.js +192 -1
- package/dist/components/form-date-picker/index.js +182 -1
- package/dist/components/form-holder/index.js +90 -1
- package/dist/components/form-input/index.js +106 -1
- package/dist/components/form-input-email/index.js +97 -1
- package/dist/components/form-input-id-card/index.js +104 -1
- package/dist/components/form-input-number/index.js +123 -1
- package/dist/components/form-input-phone-number/index.js +98 -1
- package/dist/components/form-input-time/index.js +124 -1
- package/dist/components/form-item/index.js +120 -1
- package/dist/components/form-item-config-provider/index.js +63 -1
- package/dist/components/form-item-group/index.js +169 -1
- package/dist/components/form-radio-group/index.js +170 -1
- package/dist/components/form-select/index.js +154 -1
- package/dist/components/form-switch/index.js +97 -1
- package/dist/components/form-textarea/index.js +102 -1
- package/dist/components/form-view/index.js +343 -1
- package/dist/components/guide-steps/index.js +94 -1
- package/dist/components/icon-card/index.js +62 -1
- package/dist/components/iframe-window/index.js +99 -1
- package/dist/components/input-number/index.js +274 -1
- package/dist/components/input-number-range/index.js +110 -1
- package/dist/components/j-s-x-component/index.js +16 -1
- package/dist/components/keep-view-alive/index.js +119 -1
- package/dist/components/loading-view/index.js +61 -1
- package/dist/components/nav-bar/index.js +52 -1
- package/dist/components/not-implement/index.js +35 -1
- package/dist/components/page/index.js +40 -1
- package/dist/components/page-header/index.js +56 -1
- package/dist/components/page-index/index.js +151 -1
- package/dist/components/page-index-top/index.js +119 -1
- package/dist/components/page-skeleton/index.js +56 -1
- package/dist/components/page-skeleton-new/index.js +98 -1
- package/dist/components/pageable-table/index.js +429 -1
- package/dist/components/pageable-view/index.js +328 -2
- package/dist/components/photo-swipe/index.js +187 -1
- package/dist/components/resize-observer/index.js +62 -1
- package/dist/components/search-popover/index.js +391 -2
- package/dist/components/sign-panel/index.js +242 -1
- package/dist/components/split-pane/index.js +209 -1
- package/dist/components/stateful/index.js +84 -1
- package/dist/components/static-pageable-table/index.js +92 -1
- package/dist/components/swiper/index.js +158 -1
- package/dist/components/tab/index.js +145 -1
- package/dist/components/tab-item/index.js +73 -1
- package/dist/components/table-column/index.js +89 -1
- package/dist/components/table-view/index.js +363 -1
- package/dist/components/tag-render/index.js +97 -1
- package/dist/components/tinymce-editor/index.js +173 -1
- package/dist/components/tinymce-wrapper/index.js +618 -1
- package/dist/components/toolbar/index.js +217 -1
- package/dist/components/toolbar-button/index.js +90 -1
- package/dist/components/trigger/index.js +71 -1
- package/dist/components/vue-tags-input/index.js +439 -1
- package/dist/components/watermark/index.js +63 -1
- package/dist/components/x-dialog/index.js +173 -1
- package/dist/index.css +2102 -1
- package/dist/index.es.js +2992 -2075
- package/package.json +29 -29
- package/web-types.json +22 -16
- package/dist/chunks/23bd3525.js +0 -1
- package/dist/chunks/65f4f4f2.js +0 -1
- package/dist/chunks/8473fc69.js +0 -1
- package/dist/chunks/a125d16c.js +0 -1
- package/dist/chunks/addb6ed5.js +0 -1
- package/dist/chunks/f15477c7.js +0 -1
|
@@ -1 +1,439 @@
|
|
|
1
|
-
import{n as l}from"../../chunks/6499de3a.js";
|
|
1
|
+
import { n as l } from "../../chunks/6499de3a.js";
|
|
2
|
+
var h = function() {
|
|
3
|
+
var e = this, s = e.$createElement, a = e._self._c || s;
|
|
4
|
+
return a("div", {
|
|
5
|
+
staticClass: "tags-input-root"
|
|
6
|
+
}, [a("div", {
|
|
7
|
+
class: `${e.wrapperClass} tags-input`
|
|
8
|
+
}, [e._l(e.tags, function(t, i) {
|
|
9
|
+
return a("span", {
|
|
10
|
+
key: i,
|
|
11
|
+
staticClass: "el-tag el-tag--medium el-tag--light"
|
|
12
|
+
}, [a("span", {
|
|
13
|
+
domProps: {
|
|
14
|
+
innerHTML: e._s(t.value)
|
|
15
|
+
}
|
|
16
|
+
}), a("i", {
|
|
17
|
+
staticClass: "tags-input-remove ov",
|
|
18
|
+
attrs: {
|
|
19
|
+
href: "#"
|
|
20
|
+
},
|
|
21
|
+
on: {
|
|
22
|
+
click: function(n) {
|
|
23
|
+
return n.preventDefault(), e.removeTag(i);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
})]);
|
|
27
|
+
}), a("input", {
|
|
28
|
+
directives: [{
|
|
29
|
+
name: "model",
|
|
30
|
+
rawName: "v-model",
|
|
31
|
+
value: e.input,
|
|
32
|
+
expression: "input"
|
|
33
|
+
}],
|
|
34
|
+
ref: "taginput",
|
|
35
|
+
staticStyle: {
|
|
36
|
+
height: "28px",
|
|
37
|
+
"margin-top": "5px",
|
|
38
|
+
"line-height": "28px"
|
|
39
|
+
},
|
|
40
|
+
attrs: {
|
|
41
|
+
type: "text",
|
|
42
|
+
placeholder: e.placeholder
|
|
43
|
+
},
|
|
44
|
+
domProps: {
|
|
45
|
+
value: e.input
|
|
46
|
+
},
|
|
47
|
+
on: {
|
|
48
|
+
keydown: [function(t) {
|
|
49
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : (t.preventDefault(), e.tagFromInput(!1));
|
|
50
|
+
}, function(t) {
|
|
51
|
+
return !t.type.indexOf("key") && t.keyCode !== 8 ? null : e.removeLastTag.apply(null, arguments);
|
|
52
|
+
}, function(t) {
|
|
53
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "down", 40, t.key, ["Down", "ArrowDown"]) ? null : e.nextSearchResult.apply(null, arguments);
|
|
54
|
+
}, function(t) {
|
|
55
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "up", 38, t.key, ["Up", "ArrowUp"]) ? null : e.prevSearchResult.apply(null, arguments);
|
|
56
|
+
}, e.onKeyDown],
|
|
57
|
+
keyup: [e.onKeyUp, function(t) {
|
|
58
|
+
return !t.type.indexOf("key") && e._k(t.keyCode, "esc", 27, t.key, ["Esc", "Escape"]) ? null : e.clearSearchResults.apply(null, arguments);
|
|
59
|
+
}],
|
|
60
|
+
focus: e.onFocus,
|
|
61
|
+
blur: e.onBlur,
|
|
62
|
+
value: e.tags,
|
|
63
|
+
input: function(t) {
|
|
64
|
+
t.target.composing || (e.input = t.target.value);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}), e.elementId ? a("input", {
|
|
68
|
+
directives: [{
|
|
69
|
+
name: "model",
|
|
70
|
+
rawName: "v-model",
|
|
71
|
+
value: e.hiddenInput,
|
|
72
|
+
expression: "hiddenInput"
|
|
73
|
+
}],
|
|
74
|
+
attrs: {
|
|
75
|
+
id: e.elementId,
|
|
76
|
+
type: "hidden",
|
|
77
|
+
name: e.elementId
|
|
78
|
+
},
|
|
79
|
+
domProps: {
|
|
80
|
+
value: e.hiddenInput
|
|
81
|
+
},
|
|
82
|
+
on: {
|
|
83
|
+
input: function(t) {
|
|
84
|
+
t.target.composing || (e.hiddenInput = t.target.value);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}) : e._e()], 2), a("div", {
|
|
88
|
+
directives: [{
|
|
89
|
+
name: "show",
|
|
90
|
+
rawName: "v-show",
|
|
91
|
+
value: e.searchResults.length,
|
|
92
|
+
expression: "searchResults.length"
|
|
93
|
+
}]
|
|
94
|
+
}, [e.typeaheadStyle === "badges" ? a("p", {
|
|
95
|
+
class: `typeahead-${e.typeaheadStyle}`
|
|
96
|
+
}, [e.typeaheadHideDiscard ? e._e() : a("span", {
|
|
97
|
+
staticClass: "tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default",
|
|
98
|
+
domProps: {
|
|
99
|
+
textContent: e._s(e.discardSearchText)
|
|
100
|
+
},
|
|
101
|
+
on: {
|
|
102
|
+
click: function(t) {
|
|
103
|
+
return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}), e._l(e.searchResults, function(t, i) {
|
|
107
|
+
return a("span", {
|
|
108
|
+
key: i,
|
|
109
|
+
staticClass: "tags-input-badge",
|
|
110
|
+
class: {
|
|
111
|
+
"tags-input-typeahead-item-default": i != e.searchSelection,
|
|
112
|
+
"tags-input-typeahead-item-highlighted-default": i == e.searchSelection
|
|
113
|
+
},
|
|
114
|
+
domProps: {
|
|
115
|
+
innerHTML: e._s(t.value)
|
|
116
|
+
},
|
|
117
|
+
on: {
|
|
118
|
+
mouseover: function(n) {
|
|
119
|
+
e.searchSelection = i;
|
|
120
|
+
},
|
|
121
|
+
mousedown: function(n) {
|
|
122
|
+
return n.preventDefault(), e.tagFromSearchOnClick(t);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
})], 2) : e.typeaheadStyle === "dropdown" ? a("ul", {
|
|
127
|
+
class: `typeahead-${e.typeaheadStyle}`
|
|
128
|
+
}, [e.typeaheadHideDiscard ? e._e() : a("li", {
|
|
129
|
+
staticClass: "tags-input-typeahead-item-default typeahead-hide-btn",
|
|
130
|
+
domProps: {
|
|
131
|
+
textContent: e._s(e.discardSearchText)
|
|
132
|
+
},
|
|
133
|
+
on: {
|
|
134
|
+
mousedown: function(t) {
|
|
135
|
+
return t.preventDefault(), e.clearSearchResults.apply(null, arguments);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}), e._l(e.searchResults, function(t, i) {
|
|
139
|
+
return a("li", {
|
|
140
|
+
key: i,
|
|
141
|
+
class: {
|
|
142
|
+
"tags-input-typeahead-item-default": i != e.searchSelection,
|
|
143
|
+
"tags-input-typeahead-item-highlighted-default": i == e.searchSelection
|
|
144
|
+
},
|
|
145
|
+
domProps: {
|
|
146
|
+
innerHTML: e._s(t.value)
|
|
147
|
+
},
|
|
148
|
+
on: {
|
|
149
|
+
mouseover: function(n) {
|
|
150
|
+
e.searchSelection = i;
|
|
151
|
+
},
|
|
152
|
+
mousedown: function(n) {
|
|
153
|
+
return n.preventDefault(), e.tagFromSearchOnClick(t);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
})], 2) : e._e()])]);
|
|
158
|
+
}, u = [];
|
|
159
|
+
const o = {
|
|
160
|
+
name: "VueTagsInput",
|
|
161
|
+
props: {
|
|
162
|
+
elementId: {
|
|
163
|
+
type: String
|
|
164
|
+
},
|
|
165
|
+
existingTags: {
|
|
166
|
+
type: Array,
|
|
167
|
+
default: () => []
|
|
168
|
+
},
|
|
169
|
+
value: {
|
|
170
|
+
type: Array,
|
|
171
|
+
default: () => []
|
|
172
|
+
},
|
|
173
|
+
typeahead: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
default: !1
|
|
176
|
+
},
|
|
177
|
+
typeaheadStyle: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: "badges"
|
|
180
|
+
},
|
|
181
|
+
typeaheadActivationThreshold: {
|
|
182
|
+
type: Number,
|
|
183
|
+
default: 1
|
|
184
|
+
},
|
|
185
|
+
typeaheadMaxResults: {
|
|
186
|
+
type: Number,
|
|
187
|
+
default: 0
|
|
188
|
+
},
|
|
189
|
+
typeaheadAlwaysShow: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: !1
|
|
192
|
+
},
|
|
193
|
+
typeaheadHideDiscard: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: !1
|
|
196
|
+
},
|
|
197
|
+
placeholder: {
|
|
198
|
+
type: String,
|
|
199
|
+
default: "\u8BF7\u8F93\u5165..."
|
|
200
|
+
},
|
|
201
|
+
discardSearchText: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: "\u53D6\u6D88"
|
|
204
|
+
},
|
|
205
|
+
limit: {
|
|
206
|
+
type: Number,
|
|
207
|
+
default: 0
|
|
208
|
+
},
|
|
209
|
+
onlyExistingTags: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
default: !1
|
|
212
|
+
},
|
|
213
|
+
deleteOnBackspace: {
|
|
214
|
+
type: Boolean,
|
|
215
|
+
default: !0
|
|
216
|
+
},
|
|
217
|
+
allowDuplicates: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
default: !1
|
|
220
|
+
},
|
|
221
|
+
validate: {
|
|
222
|
+
type: Function,
|
|
223
|
+
default: () => !0
|
|
224
|
+
},
|
|
225
|
+
addTagsOnComma: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: !1
|
|
228
|
+
},
|
|
229
|
+
addTagsOnSpace: {
|
|
230
|
+
type: Boolean,
|
|
231
|
+
default: !1
|
|
232
|
+
},
|
|
233
|
+
addTagsOnBlur: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
default: !1
|
|
236
|
+
},
|
|
237
|
+
wrapperClass: {
|
|
238
|
+
type: String,
|
|
239
|
+
default: "tags-input-wrapper-default"
|
|
240
|
+
},
|
|
241
|
+
sortSearchResults: {
|
|
242
|
+
type: Boolean,
|
|
243
|
+
default: !0
|
|
244
|
+
},
|
|
245
|
+
caseSensitiveTags: {
|
|
246
|
+
type: Boolean,
|
|
247
|
+
default: !1
|
|
248
|
+
},
|
|
249
|
+
beforeAddingTag: {
|
|
250
|
+
type: Function,
|
|
251
|
+
default: () => !0
|
|
252
|
+
},
|
|
253
|
+
beforeRemovingTag: {
|
|
254
|
+
type: Function,
|
|
255
|
+
default: () => !0
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
data() {
|
|
259
|
+
return {
|
|
260
|
+
tags: [],
|
|
261
|
+
input: "",
|
|
262
|
+
oldInput: "",
|
|
263
|
+
hiddenInput: "",
|
|
264
|
+
searchResults: [],
|
|
265
|
+
searchSelection: 0
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
watch: {
|
|
269
|
+
input(e, s) {
|
|
270
|
+
this.$emit("input-changed", e), this.searchTag(!1), e.length && e !== s && (this.addTagsOnSpace && e.endsWith(" ") && (this.input = e.trim(), this.tagFromInput(!0)), this.addTagsOnComma && (e = e.trim(), e.endsWith(",") && (this.input = e.substring(0, e.length - 1), this.tagFromInput(!0))), this.$emit("change", e));
|
|
271
|
+
},
|
|
272
|
+
tags() {
|
|
273
|
+
this.hiddenInput = JSON.stringify(this.tags), this.$emit("input", this.tags);
|
|
274
|
+
},
|
|
275
|
+
value() {
|
|
276
|
+
this.tagsFromValue();
|
|
277
|
+
},
|
|
278
|
+
typeaheadAlwaysShow(e) {
|
|
279
|
+
e ? this.searchTag(!1) : this.clearSearchResults();
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
created() {
|
|
283
|
+
this.tagsFromValue(), this.typeaheadAlwaysShow && this.searchTag(!1), this.$emit("initialized");
|
|
284
|
+
},
|
|
285
|
+
methods: {
|
|
286
|
+
escapeRegExp(e) {
|
|
287
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
288
|
+
},
|
|
289
|
+
tagFromInput(e = !1) {
|
|
290
|
+
if (this.searchResults.length && this.searchSelection >= 0 && !e)
|
|
291
|
+
this.tagFromSearch(this.searchResults[this.searchSelection]), this.input = "";
|
|
292
|
+
else {
|
|
293
|
+
const s = this.input.trim();
|
|
294
|
+
if (!this.onlyExistingTags && s.length && this.validate(s)) {
|
|
295
|
+
this.input = "";
|
|
296
|
+
let a = {
|
|
297
|
+
key: "",
|
|
298
|
+
value: s
|
|
299
|
+
};
|
|
300
|
+
const t = this.escapeRegExp(this.caseSensitiveTags ? a.value : a.value.toLowerCase());
|
|
301
|
+
for (const i of this.existingTags) {
|
|
302
|
+
const n = this.caseSensitiveTags ? i.value : i.value.toLowerCase();
|
|
303
|
+
if (t === n) {
|
|
304
|
+
a = Object.assign({}, i);
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
this.addTag(a);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
tagFromSearchOnClick(e) {
|
|
313
|
+
this.tagFromSearch(e), this.$refs.taginput.blur();
|
|
314
|
+
},
|
|
315
|
+
tagFromSearch(e) {
|
|
316
|
+
this.clearSearchResults(), this.addTag(e), this.$nextTick(() => {
|
|
317
|
+
this.input = "", this.oldInput = "";
|
|
318
|
+
});
|
|
319
|
+
},
|
|
320
|
+
addTag(e) {
|
|
321
|
+
if (!this.beforeAddingTag(e))
|
|
322
|
+
return !1;
|
|
323
|
+
if (this.limit > 0 && this.tags.length >= this.limit)
|
|
324
|
+
return this.$emit("limit-reached"), !1;
|
|
325
|
+
this.tagSelected(e) || (this.tags.push(e), this.$nextTick(() => {
|
|
326
|
+
this.$emit("tag-added", e), this.$emit("tags-updated");
|
|
327
|
+
}));
|
|
328
|
+
},
|
|
329
|
+
removeLastTag() {
|
|
330
|
+
!this.input.length && this.deleteOnBackspace && this.tags.length && this.removeTag(this.tags.length - 1);
|
|
331
|
+
},
|
|
332
|
+
removeTag(e) {
|
|
333
|
+
const s = this.tags[e];
|
|
334
|
+
if (!this.beforeRemovingTag(s))
|
|
335
|
+
return !1;
|
|
336
|
+
this.tags.splice(e, 1), this.$nextTick(() => {
|
|
337
|
+
this.$emit("tag-removed", s), this.$emit("tags-updated"), this.typeaheadAlwaysShow && this.searchTag();
|
|
338
|
+
});
|
|
339
|
+
},
|
|
340
|
+
searchTag() {
|
|
341
|
+
if (this.typeahead !== !0)
|
|
342
|
+
return !1;
|
|
343
|
+
if (this.oldInput !== this.input || !this.searchResults.length && this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
|
|
344
|
+
this.searchResults = [], this.searchSelection = 0;
|
|
345
|
+
const e = this.input.trim();
|
|
346
|
+
if (e.length && e.length >= this.typeaheadActivationThreshold || this.typeaheadActivationThreshold === 0 || this.typeaheadAlwaysShow) {
|
|
347
|
+
const s = this.escapeRegExp(this.caseSensitiveTags ? e : e.toLowerCase());
|
|
348
|
+
for (const a of this.existingTags)
|
|
349
|
+
(this.caseSensitiveTags ? a.value : a.value.toLowerCase()).search(s) > -1 && !this.tagSelected(a) && this.searchResults.push(a);
|
|
350
|
+
this.sortSearchResults && this.searchResults.sort((a, t) => a.value < t.value ? -1 : a.value > t.value ? 1 : 0), this.typeaheadMaxResults > 0 && (this.searchResults = this.searchResults.slice(0, this.typeaheadMaxResults));
|
|
351
|
+
}
|
|
352
|
+
this.oldInput = this.input;
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
hideTypeahead() {
|
|
356
|
+
this.input.length || this.$nextTick(() => {
|
|
357
|
+
this.clearSearchResults();
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
nextSearchResult() {
|
|
361
|
+
this.searchSelection + 1 <= this.searchResults.length - 1 && this.searchSelection++;
|
|
362
|
+
},
|
|
363
|
+
prevSearchResult() {
|
|
364
|
+
this.searchSelection > 0 && this.searchSelection--;
|
|
365
|
+
},
|
|
366
|
+
clearSearchResults() {
|
|
367
|
+
this.searchResults = [], this.searchSelection = 0, this.typeaheadAlwaysShow && this.$nextTick(() => {
|
|
368
|
+
this.searchTag();
|
|
369
|
+
});
|
|
370
|
+
},
|
|
371
|
+
clearTags() {
|
|
372
|
+
this.tags.splice(0, this.tags.length);
|
|
373
|
+
},
|
|
374
|
+
tagsFromValue() {
|
|
375
|
+
if (this.value && this.value.length) {
|
|
376
|
+
if (!Array.isArray(this.value)) {
|
|
377
|
+
console.error("Voerro Tags Input: the v-model value must be an array!");
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
const e = this.value;
|
|
381
|
+
if (this.tags === e)
|
|
382
|
+
return;
|
|
383
|
+
this.clearTags();
|
|
384
|
+
for (const s of e)
|
|
385
|
+
this.addTag(s);
|
|
386
|
+
} else {
|
|
387
|
+
if (this.tags.length === 0)
|
|
388
|
+
return;
|
|
389
|
+
this.clearTags();
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
tagSelected(e) {
|
|
393
|
+
if (this.allowDuplicates || !e)
|
|
394
|
+
return !1;
|
|
395
|
+
const s = this.escapeRegExp(this.caseSensitiveTags ? e.value : e.value.toLowerCase());
|
|
396
|
+
for (const a of this.tags) {
|
|
397
|
+
const t = this.caseSensitiveTags ? a.value : a.value.toLowerCase();
|
|
398
|
+
if (a.key === e.key && t.search(s) > -1)
|
|
399
|
+
return !0;
|
|
400
|
+
}
|
|
401
|
+
return !1;
|
|
402
|
+
},
|
|
403
|
+
clearInput() {
|
|
404
|
+
this.input = "";
|
|
405
|
+
},
|
|
406
|
+
onKeyUp(e) {
|
|
407
|
+
this.$emit("keyup", e);
|
|
408
|
+
},
|
|
409
|
+
onKeyDown(e) {
|
|
410
|
+
this.$emit("keydown", e);
|
|
411
|
+
},
|
|
412
|
+
onFocus(e) {
|
|
413
|
+
this.$emit("focus", e), this.searchTag();
|
|
414
|
+
},
|
|
415
|
+
onBlur(e) {
|
|
416
|
+
this.$emit("blur", e), this.addTagsOnBlur && this.tagFromInput(!0), this.typeaheadAlwaysShow ? this.searchTag() : this.hideTypeahead();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}, r = {};
|
|
420
|
+
var c = /* @__PURE__ */ l(
|
|
421
|
+
o,
|
|
422
|
+
h,
|
|
423
|
+
u,
|
|
424
|
+
!1,
|
|
425
|
+
p,
|
|
426
|
+
null,
|
|
427
|
+
null,
|
|
428
|
+
null
|
|
429
|
+
);
|
|
430
|
+
function p(e) {
|
|
431
|
+
for (let s in r)
|
|
432
|
+
this[s] = r[s];
|
|
433
|
+
}
|
|
434
|
+
const g = /* @__PURE__ */ function() {
|
|
435
|
+
return c.exports;
|
|
436
|
+
}();
|
|
437
|
+
export {
|
|
438
|
+
g as default
|
|
439
|
+
};
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
import { h as _ } from "../../chunks/2bd4e340.js";
|
|
2
|
+
import { n as p } from "../../chunks/6499de3a.js";
|
|
3
|
+
const f = {
|
|
4
|
+
name: "Watermark",
|
|
5
|
+
functional: !0,
|
|
6
|
+
props: {
|
|
7
|
+
text: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
width: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 200
|
|
14
|
+
},
|
|
15
|
+
height: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 150
|
|
18
|
+
},
|
|
19
|
+
rotate: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: -30
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "rgba(0,0,0,0.15)"
|
|
26
|
+
},
|
|
27
|
+
backgroundColor: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "rgba(0,0,0,0)"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
render(a, { props: { width: e, height: l, text: s, backgroundColor: u, rotate: c, color: i }, data: n }) {
|
|
33
|
+
const r = document.createElement("canvas");
|
|
34
|
+
r.width = e, r.height = l;
|
|
35
|
+
const t = r.getContext("2d");
|
|
36
|
+
return t.font = "15px Verdana", t.fillStyle = u, t.fillRect(0, 0, e, l), t.translate(e / 2, l / 2), t.rotate(c * Math.PI / 180), t.fillStyle = i, t.textAlign = "center", t.textBaseline = "middle", t.fillText(s, 0, 0), a("div", {
|
|
37
|
+
class: _(n.class, `watermark ${n.staticClass || ""}`),
|
|
38
|
+
style: { ...n.style || {}, ...n.staticStyle || {}, background: `url(${r.toDataURL("image/png")}) left top repeat` }
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
let m, d;
|
|
43
|
+
const o = {};
|
|
44
|
+
var y = /* @__PURE__ */ p(
|
|
45
|
+
f,
|
|
46
|
+
m,
|
|
47
|
+
d,
|
|
48
|
+
!1,
|
|
49
|
+
g,
|
|
50
|
+
null,
|
|
51
|
+
null,
|
|
52
|
+
null
|
|
53
|
+
);
|
|
54
|
+
function g(a) {
|
|
55
|
+
for (let e in o)
|
|
56
|
+
this[e] = o[e];
|
|
57
|
+
}
|
|
58
|
+
const b = /* @__PURE__ */ function() {
|
|
59
|
+
return y.exports;
|
|
60
|
+
}();
|
|
61
|
+
export {
|
|
62
|
+
b as default
|
|
63
|
+
};
|
|
@@ -1 +1,173 @@
|
|
|
1
|
-
import{isPromise as n,isFunction as l}from"@web-utils/core";
|
|
1
|
+
import { isPromise as n, isFunction as l } from "@web-utils/core";
|
|
2
|
+
import { n as r } from "../../chunks/6499de3a.js";
|
|
3
|
+
var a = function() {
|
|
4
|
+
var e = this, o = e.$createElement, t = e._self._c || o;
|
|
5
|
+
return t("ElDialog", {
|
|
6
|
+
directives: [{
|
|
7
|
+
name: "dialog-drag",
|
|
8
|
+
rawName: "v-dialog-drag"
|
|
9
|
+
}],
|
|
10
|
+
attrs: {
|
|
11
|
+
"append-to-body": "",
|
|
12
|
+
"close-on-click-modal": !1,
|
|
13
|
+
"lock-scroll": !1,
|
|
14
|
+
visible: e.show,
|
|
15
|
+
"custom-class": "x-dialog",
|
|
16
|
+
center: "",
|
|
17
|
+
top: e.top,
|
|
18
|
+
width: e.width,
|
|
19
|
+
title: e.title
|
|
20
|
+
},
|
|
21
|
+
on: {
|
|
22
|
+
"update:visible": function(i) {
|
|
23
|
+
e.show = i;
|
|
24
|
+
},
|
|
25
|
+
close: e.close
|
|
26
|
+
},
|
|
27
|
+
scopedSlots: e._u([{
|
|
28
|
+
key: "default",
|
|
29
|
+
fn: function() {
|
|
30
|
+
return [t("div", {
|
|
31
|
+
staticClass: "x-dialog-content",
|
|
32
|
+
style: {
|
|
33
|
+
height: e.height
|
|
34
|
+
}
|
|
35
|
+
}, [e.cache ? [t("KeepAlive", [t(e.resolve, e._g(e._b({
|
|
36
|
+
ref: "cpn",
|
|
37
|
+
tag: "Component"
|
|
38
|
+
}, "Component", e.$attrs, !1), e.$listeners))], 1)] : [e.show ? t("KeepAlive", [t(e.resolve, e._g(e._b({
|
|
39
|
+
ref: "cpn",
|
|
40
|
+
tag: "Component"
|
|
41
|
+
}, "Component", e.$attrs, !1), e.$listeners))], 1) : e._e()]], 2)];
|
|
42
|
+
},
|
|
43
|
+
proxy: !0
|
|
44
|
+
}, e.footer ? {
|
|
45
|
+
key: "footer",
|
|
46
|
+
fn: function() {
|
|
47
|
+
return [t("div", {
|
|
48
|
+
staticClass: "x-dialog-footer",
|
|
49
|
+
staticStyle: {
|
|
50
|
+
"text-align": "right"
|
|
51
|
+
}
|
|
52
|
+
}, [t("ElButton", {
|
|
53
|
+
attrs: {
|
|
54
|
+
size: "small",
|
|
55
|
+
type: "primary"
|
|
56
|
+
},
|
|
57
|
+
on: {
|
|
58
|
+
click: e.confirm
|
|
59
|
+
}
|
|
60
|
+
}, [e._v(" \u786E\u5B9A ")]), t("ElButton", {
|
|
61
|
+
attrs: {
|
|
62
|
+
size: "small"
|
|
63
|
+
},
|
|
64
|
+
on: {
|
|
65
|
+
click: e.close
|
|
66
|
+
}
|
|
67
|
+
}, [e._v(" \u53D6 \u6D88 ")])], 1)];
|
|
68
|
+
},
|
|
69
|
+
proxy: !0
|
|
70
|
+
} : null], null, !0)
|
|
71
|
+
});
|
|
72
|
+
}, c = [];
|
|
73
|
+
const f = {
|
|
74
|
+
name: "XDialog",
|
|
75
|
+
inheritedAttrs: !1,
|
|
76
|
+
provide() {
|
|
77
|
+
return {
|
|
78
|
+
close: this.close
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
component: [Function, Object, Promise],
|
|
83
|
+
height: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: "auto"
|
|
86
|
+
},
|
|
87
|
+
top: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: "15vh"
|
|
90
|
+
},
|
|
91
|
+
width: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: "600px"
|
|
94
|
+
},
|
|
95
|
+
title: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "\u6807\u9898"
|
|
98
|
+
},
|
|
99
|
+
cache: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !0
|
|
102
|
+
},
|
|
103
|
+
visible: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: !1
|
|
106
|
+
},
|
|
107
|
+
showTips: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: process.env.NODE_ENV !== "production"
|
|
110
|
+
},
|
|
111
|
+
footer: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: !0
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
data() {
|
|
117
|
+
return {
|
|
118
|
+
show: !1
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
watch: {
|
|
122
|
+
visible: {
|
|
123
|
+
immediate: !0,
|
|
124
|
+
handler(e) {
|
|
125
|
+
this.show = e;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
show(e) {
|
|
129
|
+
e !== this.visible && this.$emit("update:visible", e), e || this.$emit("close");
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
beforeDestroy() {
|
|
133
|
+
this.show && this.close();
|
|
134
|
+
},
|
|
135
|
+
methods: {
|
|
136
|
+
resolve() {
|
|
137
|
+
return n(this.component) ? this.component : l(this.component) ? this.component() : Promise.resolve(this.component);
|
|
138
|
+
},
|
|
139
|
+
close() {
|
|
140
|
+
this.show = !1;
|
|
141
|
+
},
|
|
142
|
+
closed() {
|
|
143
|
+
this.$emit("closed");
|
|
144
|
+
},
|
|
145
|
+
confirm() {
|
|
146
|
+
this.$refs.cpn && this.$refs.cpn.onConfirm ? this.$refs.cpn.onConfirm(this.close) : (this.showTips && this.$notify({
|
|
147
|
+
type: "warning",
|
|
148
|
+
title: "\u5F00\u53D1\u63D0\u793A",
|
|
149
|
+
message: "\u5982\u9700\u5904\u7406\u786E\u5B9A\u4E8B\u4EF6\uFF0C\u8BF7\u5728\u7EC4\u4EF6\u5185\u90E8\u6DFB\u52A0 onConfirm(done) \u65B9\u6CD5,\u5E76\u8C03\u7528 done \u65B9\u6CD5\u6765\u5173\u95ED\u5BF9\u8BDD\u6846\uFF01"
|
|
150
|
+
}), this.close());
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, s = {};
|
|
154
|
+
var p = /* @__PURE__ */ r(
|
|
155
|
+
f,
|
|
156
|
+
a,
|
|
157
|
+
c,
|
|
158
|
+
!1,
|
|
159
|
+
h,
|
|
160
|
+
null,
|
|
161
|
+
null,
|
|
162
|
+
null
|
|
163
|
+
);
|
|
164
|
+
function h(e) {
|
|
165
|
+
for (let o in s)
|
|
166
|
+
this[o] = s[o];
|
|
167
|
+
}
|
|
168
|
+
const m = /* @__PURE__ */ function() {
|
|
169
|
+
return p.exports;
|
|
170
|
+
}();
|
|
171
|
+
export {
|
|
172
|
+
m as default
|
|
173
|
+
};
|