@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,2 +1,391 @@
|
|
|
1
|
-
import{copy,isInContainer}from"@web-utils/core";
|
|
2
|
-
|
|
1
|
+
import { copy, isInContainer } from "@web-utils/core";
|
|
2
|
+
import ClickOutside from "element-ui/lib/utils/clickoutside";
|
|
3
|
+
import { n as normalizeComponent } from "../../chunks/6499de3a.js";
|
|
4
|
+
var render = function() {
|
|
5
|
+
var t = this, r = t.$createElement, e = t._self._c || r;
|
|
6
|
+
return e("div", {
|
|
7
|
+
directives: [{
|
|
8
|
+
name: "show",
|
|
9
|
+
rawName: "v-show",
|
|
10
|
+
value: t.showPopover,
|
|
11
|
+
expression: "showPopover"
|
|
12
|
+
}, {
|
|
13
|
+
name: "click-outside",
|
|
14
|
+
rawName: "v-click-outside",
|
|
15
|
+
value: t.hidePopover,
|
|
16
|
+
expression: "hidePopover"
|
|
17
|
+
}],
|
|
18
|
+
staticClass: "search-popover"
|
|
19
|
+
}, [e("div", {
|
|
20
|
+
staticStyle: {
|
|
21
|
+
padding: "10px"
|
|
22
|
+
}
|
|
23
|
+
}, [e("input", {
|
|
24
|
+
directives: [{
|
|
25
|
+
name: "model",
|
|
26
|
+
rawName: "v-model",
|
|
27
|
+
value: t.keyword,
|
|
28
|
+
expression: "keyword"
|
|
29
|
+
}],
|
|
30
|
+
ref: "searchInput",
|
|
31
|
+
staticClass: "search-input",
|
|
32
|
+
attrs: {
|
|
33
|
+
placeholder: t.currentItem ? t.currentItem.name : "\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22 ..."
|
|
34
|
+
},
|
|
35
|
+
domProps: {
|
|
36
|
+
value: t.keyword
|
|
37
|
+
},
|
|
38
|
+
on: {
|
|
39
|
+
input: function(s) {
|
|
40
|
+
s.target.composing || (t.keyword = s.target.value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
})]), e("ul", {
|
|
44
|
+
ref: "ul",
|
|
45
|
+
staticStyle: {
|
|
46
|
+
"list-style-type": "none",
|
|
47
|
+
flex: "1",
|
|
48
|
+
overflow: "auto"
|
|
49
|
+
}
|
|
50
|
+
}, [t.filterList.length ? t._l(t.filterList, function(s, o) {
|
|
51
|
+
return e("li", {
|
|
52
|
+
key: s.name + o,
|
|
53
|
+
staticClass: "search-li",
|
|
54
|
+
attrs: {
|
|
55
|
+
id: `item-${o}`
|
|
56
|
+
},
|
|
57
|
+
on: {
|
|
58
|
+
mousemove: function(i) {
|
|
59
|
+
return t.mouseHoverItem(s, o);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}, [e("a", {
|
|
63
|
+
class: ["search-item", {
|
|
64
|
+
active: t.currentIndex === o
|
|
65
|
+
}],
|
|
66
|
+
attrs: {
|
|
67
|
+
target: s.url ? "_blank" : "",
|
|
68
|
+
rel: "noopener noreferrer",
|
|
69
|
+
href: s.url ? s.url : "javascript:void(0)"
|
|
70
|
+
},
|
|
71
|
+
on: {
|
|
72
|
+
click: function(i) {
|
|
73
|
+
return t.onItemClick(s);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, [e("div", {
|
|
77
|
+
staticClass: "search-icon"
|
|
78
|
+
}, [e("i", {
|
|
79
|
+
class: s.icon || "el-icon-menu"
|
|
80
|
+
})]), e("div", {
|
|
81
|
+
staticStyle: {
|
|
82
|
+
flex: "1",
|
|
83
|
+
"text-align": "left",
|
|
84
|
+
padding: "0 10px",
|
|
85
|
+
"overflow-x": "hidden",
|
|
86
|
+
"box-sizing": "border-box"
|
|
87
|
+
}
|
|
88
|
+
}, [e("p", {
|
|
89
|
+
staticStyle: {
|
|
90
|
+
"margin-bottom": "4px",
|
|
91
|
+
"font-size": "16px"
|
|
92
|
+
}
|
|
93
|
+
}, [t._v(t._s(s.name))]), e("p", {
|
|
94
|
+
staticClass: "url"
|
|
95
|
+
}, [t._v(t._s(s.url || s.path))])]), e("div", {
|
|
96
|
+
staticClass: "search-icon search-action"
|
|
97
|
+
}, [e("svg", {
|
|
98
|
+
staticClass: "action",
|
|
99
|
+
attrs: {
|
|
100
|
+
width: "20",
|
|
101
|
+
height: "20",
|
|
102
|
+
viewBox: "0 0 20 20"
|
|
103
|
+
}
|
|
104
|
+
}, [e("g", {
|
|
105
|
+
attrs: {
|
|
106
|
+
stroke: "currentColor",
|
|
107
|
+
fill: "none",
|
|
108
|
+
"fill-rule": "evenodd",
|
|
109
|
+
"stroke-linecap": "round",
|
|
110
|
+
"stroke-linejoin": "round"
|
|
111
|
+
}
|
|
112
|
+
}, [e("path", {
|
|
113
|
+
attrs: {
|
|
114
|
+
d: "M18 3v4c0 2-2 4-4 4H2"
|
|
115
|
+
}
|
|
116
|
+
}), e("path", {
|
|
117
|
+
attrs: {
|
|
118
|
+
d: "M8 17l-6-6 6-6"
|
|
119
|
+
}
|
|
120
|
+
})])])])])]);
|
|
121
|
+
}) : t.evalResult !== "" ? e("li", {
|
|
122
|
+
staticClass: "search-li",
|
|
123
|
+
on: {
|
|
124
|
+
click: t.copyEvalResult,
|
|
125
|
+
mousemove: function(s) {
|
|
126
|
+
return t.mouseHoverItem({}, -1);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}, [e("a", {
|
|
130
|
+
class: ["search-item", {
|
|
131
|
+
active: t.currentIndex === -1
|
|
132
|
+
}],
|
|
133
|
+
attrs: {
|
|
134
|
+
rel: "noopener noreferrer",
|
|
135
|
+
href: "javascript:void(0)"
|
|
136
|
+
}
|
|
137
|
+
}, [t._m(0), e("div", {
|
|
138
|
+
staticStyle: {
|
|
139
|
+
flex: "1",
|
|
140
|
+
"text-align": "left",
|
|
141
|
+
padding: "0 10px",
|
|
142
|
+
"overflow-x": "hidden",
|
|
143
|
+
"box-sizing": "border-box"
|
|
144
|
+
}
|
|
145
|
+
}, [e("p", {
|
|
146
|
+
staticStyle: {
|
|
147
|
+
"margin-bottom": "4px",
|
|
148
|
+
"font-size": "16px"
|
|
149
|
+
}
|
|
150
|
+
}, [t._v("Result: " + t._s(t.evalResult))]), e("p", {
|
|
151
|
+
staticClass: "url"
|
|
152
|
+
}, [t._v("\u70B9\u51FB\u6216\u8FD9\u6309 Enter \u952E\u590D\u5236")])]), e("div", {
|
|
153
|
+
staticClass: "search-icon search-action"
|
|
154
|
+
}, [e("svg", {
|
|
155
|
+
staticClass: "action",
|
|
156
|
+
attrs: {
|
|
157
|
+
width: "20",
|
|
158
|
+
height: "20",
|
|
159
|
+
viewBox: "0 0 20 20"
|
|
160
|
+
}
|
|
161
|
+
}, [e("g", {
|
|
162
|
+
attrs: {
|
|
163
|
+
stroke: "currentColor",
|
|
164
|
+
fill: "none",
|
|
165
|
+
"fill-rule": "evenodd",
|
|
166
|
+
"stroke-linecap": "round",
|
|
167
|
+
"stroke-linejoin": "round"
|
|
168
|
+
}
|
|
169
|
+
}, [e("path", {
|
|
170
|
+
attrs: {
|
|
171
|
+
d: "M18 3v4c0 2-2 4-4 4H2"
|
|
172
|
+
}
|
|
173
|
+
}), e("path", {
|
|
174
|
+
attrs: {
|
|
175
|
+
d: "M8 17l-6-6 6-6"
|
|
176
|
+
}
|
|
177
|
+
})])])])])]) : e("li", {
|
|
178
|
+
staticStyle: {
|
|
179
|
+
height: "100%",
|
|
180
|
+
display: "flex",
|
|
181
|
+
"align-items": "center",
|
|
182
|
+
"justify-content": "center",
|
|
183
|
+
color: "#808080"
|
|
184
|
+
}
|
|
185
|
+
}, [t._v(" Sorry,no result ! ")])], 2), e("div", {
|
|
186
|
+
staticClass: "footer-tips"
|
|
187
|
+
}, [e("span", {
|
|
188
|
+
staticClass: "keyboard-key"
|
|
189
|
+
}, [e("svg", {
|
|
190
|
+
attrs: {
|
|
191
|
+
width: "15",
|
|
192
|
+
height: "15"
|
|
193
|
+
}
|
|
194
|
+
}, [e("g", {
|
|
195
|
+
attrs: {
|
|
196
|
+
fill: "none",
|
|
197
|
+
stroke: "currentColor",
|
|
198
|
+
"stroke-linecap": "round",
|
|
199
|
+
"stroke-linejoin": "round",
|
|
200
|
+
"stroke-width": "1.2"
|
|
201
|
+
}
|
|
202
|
+
}, [e("path", {
|
|
203
|
+
attrs: {
|
|
204
|
+
d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
|
|
205
|
+
}
|
|
206
|
+
})])])]), e("span", {
|
|
207
|
+
staticStyle: {
|
|
208
|
+
"font-size": "12px",
|
|
209
|
+
"margin-right": "20px"
|
|
210
|
+
}
|
|
211
|
+
}, [t._v("\u9009\u62E9")]), e("span", {
|
|
212
|
+
staticClass: "keyboard-key"
|
|
213
|
+
}, [e("svg", {
|
|
214
|
+
attrs: {
|
|
215
|
+
width: "15",
|
|
216
|
+
height: "15"
|
|
217
|
+
}
|
|
218
|
+
}, [e("g", {
|
|
219
|
+
attrs: {
|
|
220
|
+
fill: "none",
|
|
221
|
+
stroke: "currentColor",
|
|
222
|
+
"stroke-linecap": "round",
|
|
223
|
+
"stroke-linejoin": "round",
|
|
224
|
+
"stroke-width": "1.2"
|
|
225
|
+
}
|
|
226
|
+
}, [e("path", {
|
|
227
|
+
attrs: {
|
|
228
|
+
d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
|
|
229
|
+
}
|
|
230
|
+
})])])]), e("span", {
|
|
231
|
+
staticClass: "keyboard-key"
|
|
232
|
+
}, [e("svg", {
|
|
233
|
+
attrs: {
|
|
234
|
+
width: "15",
|
|
235
|
+
height: "15"
|
|
236
|
+
}
|
|
237
|
+
}, [e("g", {
|
|
238
|
+
attrs: {
|
|
239
|
+
fill: "none",
|
|
240
|
+
stroke: "currentColor",
|
|
241
|
+
"stroke-linecap": "round",
|
|
242
|
+
"stroke-linejoin": "round",
|
|
243
|
+
"stroke-width": "1.2"
|
|
244
|
+
}
|
|
245
|
+
}, [e("path", {
|
|
246
|
+
attrs: {
|
|
247
|
+
d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
|
|
248
|
+
}
|
|
249
|
+
})])])]), e("span", {
|
|
250
|
+
staticStyle: {
|
|
251
|
+
"font-size": "12px",
|
|
252
|
+
"margin-right": "20px"
|
|
253
|
+
}
|
|
254
|
+
}, [t._v("\u5207\u6362")]), e("span", {
|
|
255
|
+
staticClass: "keyboard-key"
|
|
256
|
+
}, [e("svg", {
|
|
257
|
+
attrs: {
|
|
258
|
+
width: "15",
|
|
259
|
+
height: "15"
|
|
260
|
+
}
|
|
261
|
+
}, [e("g", {
|
|
262
|
+
attrs: {
|
|
263
|
+
fill: "none",
|
|
264
|
+
stroke: "currentColor",
|
|
265
|
+
"stroke-linecap": "round",
|
|
266
|
+
"stroke-linejoin": "round",
|
|
267
|
+
"stroke-width": "1.2"
|
|
268
|
+
}
|
|
269
|
+
}, [e("path", {
|
|
270
|
+
attrs: {
|
|
271
|
+
d: "M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"
|
|
272
|
+
}
|
|
273
|
+
})])])]), e("span", {
|
|
274
|
+
staticStyle: {
|
|
275
|
+
"font-size": "12px"
|
|
276
|
+
}
|
|
277
|
+
}, [t._v("\u5173\u95ED")])])]);
|
|
278
|
+
}, staticRenderFns = [function() {
|
|
279
|
+
var t = this, r = t.$createElement, e = t._self._c || r;
|
|
280
|
+
return e("div", {
|
|
281
|
+
staticClass: "search-icon"
|
|
282
|
+
}, [e("i", {
|
|
283
|
+
staticClass: "fa fa-table"
|
|
284
|
+
})]);
|
|
285
|
+
}];
|
|
286
|
+
const SearchPopover_vue_vue_type_style_index_0_lang = "", __vue2_script = {
|
|
287
|
+
name: "SearchPopover",
|
|
288
|
+
directives: {
|
|
289
|
+
ClickOutside
|
|
290
|
+
},
|
|
291
|
+
props: {
|
|
292
|
+
services: {
|
|
293
|
+
type: Array,
|
|
294
|
+
default: () => []
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
data() {
|
|
298
|
+
return {
|
|
299
|
+
showPopover: !1,
|
|
300
|
+
keyword: "",
|
|
301
|
+
currentIndex: 0,
|
|
302
|
+
last: 0
|
|
303
|
+
};
|
|
304
|
+
},
|
|
305
|
+
computed: {
|
|
306
|
+
filterList() {
|
|
307
|
+
return this.services.filter((t) => t.name.indexOf(this.keyword) > -1);
|
|
308
|
+
},
|
|
309
|
+
currentItem() {
|
|
310
|
+
var t;
|
|
311
|
+
return (t = this.filterList) == null ? void 0 : t[this.currentIndex];
|
|
312
|
+
},
|
|
313
|
+
evalResult() {
|
|
314
|
+
try {
|
|
315
|
+
return eval(this.keyword);
|
|
316
|
+
} catch (t) {
|
|
317
|
+
return "";
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
watch: {
|
|
322
|
+
keyword() {
|
|
323
|
+
this.currentIndex = 0, !this.currentItem && this.currentIndex !== -1 && (this.currentIndex = -1);
|
|
324
|
+
},
|
|
325
|
+
showPopover(t) {
|
|
326
|
+
t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
mounted() {
|
|
330
|
+
window.addEventListener("keydown", this.keydown);
|
|
331
|
+
},
|
|
332
|
+
destroyed() {
|
|
333
|
+
window.removeEventListener("keydown", this.keydown);
|
|
334
|
+
},
|
|
335
|
+
methods: {
|
|
336
|
+
async onItemClick(t) {
|
|
337
|
+
t.path && (this.hidePopover(), await this.$router.push(t.path));
|
|
338
|
+
},
|
|
339
|
+
copyEvalResult() {
|
|
340
|
+
return copy(this.evalResult);
|
|
341
|
+
},
|
|
342
|
+
hidePopover() {
|
|
343
|
+
this.showPopover = !1;
|
|
344
|
+
},
|
|
345
|
+
displayPopover() {
|
|
346
|
+
this.showPopover = !0;
|
|
347
|
+
},
|
|
348
|
+
mouseHoverItem(t, r) {
|
|
349
|
+
this.currentIndex = r;
|
|
350
|
+
},
|
|
351
|
+
async keydown(t) {
|
|
352
|
+
if (t.key === "Shift") {
|
|
353
|
+
const r = Date.now() - this.last;
|
|
354
|
+
r > 0 && r < 500 ? (this.showPopover = !0, await this.$nextTick(), this.$refs.searchInput.focus()) : this.last = Date.now();
|
|
355
|
+
}
|
|
356
|
+
this.showPopover === !0 && (t.key === "Escape" && this.hidePopover(), t.key === "Enter" && (this.currentItem ? this.currentItem.url ? (window.open(this.currentItem.url, "_blank"), this.hidePopover()) : this.currentItem.path && await this.onItemClick(this.currentItem) : this.copyEvalResult()), t.key === "ArrowUp" && (this.currentIndex--, this.currentIndex < 0 && (this.currentIndex = this.filterList.length - 1), this.scrollIntoView(this.currentIndex)), t.key === "ArrowDown" && (this.currentIndex++, this.currentIndex >= this.filterList.length && (this.currentIndex = 0), this.scrollIntoView(this.currentIndex)));
|
|
357
|
+
},
|
|
358
|
+
scrollIntoView(t) {
|
|
359
|
+
if (t === 0) {
|
|
360
|
+
this.$refs.ul.scrollTop = 0;
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
if (t === this.filterList.length) {
|
|
364
|
+
this.$refs.ul.scrollTop = this.$refs.ul.scrollHeight;
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const r = this.$refs.ul.querySelector(`#item-${t}`);
|
|
368
|
+
isInContainer(r, this.$refs.ul, { topOffset: -78, bottomOffset: 78 }) || (this.$refs.ul.scrollTop = r.offsetTop - r.clientHeight + 20);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}, __cssModules = {};
|
|
372
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
373
|
+
__vue2_script,
|
|
374
|
+
render,
|
|
375
|
+
staticRenderFns,
|
|
376
|
+
!1,
|
|
377
|
+
__vue2_injectStyles,
|
|
378
|
+
null,
|
|
379
|
+
null,
|
|
380
|
+
null
|
|
381
|
+
);
|
|
382
|
+
function __vue2_injectStyles(t) {
|
|
383
|
+
for (let r in __cssModules)
|
|
384
|
+
this[r] = __cssModules[r];
|
|
385
|
+
}
|
|
386
|
+
const SearchPopover = /* @__PURE__ */ function() {
|
|
387
|
+
return __component__.exports;
|
|
388
|
+
}();
|
|
389
|
+
export {
|
|
390
|
+
SearchPopover as default
|
|
391
|
+
};
|
|
@@ -1 +1,242 @@
|
|
|
1
|
-
import{n
|
|
1
|
+
import { n } from "../../chunks/6499de3a.js";
|
|
2
|
+
var o = function() {
|
|
3
|
+
var t = this, e = t.$createElement, i = t._self._c || e;
|
|
4
|
+
return i("div", {
|
|
5
|
+
staticClass: "sign-panel flex-column"
|
|
6
|
+
}, [i("div", {
|
|
7
|
+
directives: [{
|
|
8
|
+
name: "show",
|
|
9
|
+
rawName: "v-show",
|
|
10
|
+
value: !t.disabled && t.edit,
|
|
11
|
+
expression: "!disabled && edit"
|
|
12
|
+
}],
|
|
13
|
+
staticClass: "sign-edit"
|
|
14
|
+
}, [i("div", {
|
|
15
|
+
staticClass: "sign-draw-area",
|
|
16
|
+
style: {
|
|
17
|
+
width: `${t.width + 2}px`,
|
|
18
|
+
height: `${t.height + 2}px`
|
|
19
|
+
}
|
|
20
|
+
}, [i("div", {
|
|
21
|
+
staticClass: "sign-watermark",
|
|
22
|
+
style: {
|
|
23
|
+
fontSize: `${t.fontSize}px`
|
|
24
|
+
}
|
|
25
|
+
}, [t._v(" " + t._s(t.text) + " ")]), i("canvas", {
|
|
26
|
+
ref: "canvas",
|
|
27
|
+
staticClass: "sign-canvas",
|
|
28
|
+
attrs: {
|
|
29
|
+
width: t.width,
|
|
30
|
+
height: t.height
|
|
31
|
+
},
|
|
32
|
+
on: {
|
|
33
|
+
touchstart: function(s) {
|
|
34
|
+
return s.stopPropagation(), t.touchstart.apply(null, arguments);
|
|
35
|
+
},
|
|
36
|
+
touchmove: function(s) {
|
|
37
|
+
return s.stopPropagation(), t.touchmove.apply(null, arguments);
|
|
38
|
+
},
|
|
39
|
+
mousedown: function(s) {
|
|
40
|
+
return s.stopPropagation(), t.down.apply(null, arguments);
|
|
41
|
+
},
|
|
42
|
+
touchend: function(s) {
|
|
43
|
+
return s.stopPropagation(), t.touchend.apply(null, arguments);
|
|
44
|
+
},
|
|
45
|
+
mouseup: function(s) {
|
|
46
|
+
return s.stopPropagation(), t.up.apply(null, arguments);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}, [t._v("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D ")])]), i("div", {
|
|
50
|
+
staticClass: "sign-tool-bar"
|
|
51
|
+
}, [i("div", {
|
|
52
|
+
staticClass: "sign-button flex-item",
|
|
53
|
+
staticStyle: {
|
|
54
|
+
color: "red"
|
|
55
|
+
},
|
|
56
|
+
on: {
|
|
57
|
+
click: t.clear
|
|
58
|
+
}
|
|
59
|
+
}, [i("i", {
|
|
60
|
+
staticClass: "fa fa-trash"
|
|
61
|
+
}), t._v(" \u6E05\u9664 ")]), i("div", {
|
|
62
|
+
staticClass: "sign-button flex-item",
|
|
63
|
+
staticStyle: {
|
|
64
|
+
color: "red"
|
|
65
|
+
},
|
|
66
|
+
on: {
|
|
67
|
+
click: t.cancel
|
|
68
|
+
}
|
|
69
|
+
}, [i("i", {
|
|
70
|
+
staticClass: "fa fa-close"
|
|
71
|
+
}), t._v(" \u53D6\u6D88 ")]), i("div", {
|
|
72
|
+
staticClass: "sign-button flex-item",
|
|
73
|
+
staticStyle: {
|
|
74
|
+
color: "orange"
|
|
75
|
+
},
|
|
76
|
+
on: {
|
|
77
|
+
click: t.rollback
|
|
78
|
+
}
|
|
79
|
+
}, [i("i", {
|
|
80
|
+
staticClass: "fa fa-repeat"
|
|
81
|
+
}), t._v(" \u64A4\u9500 ")]), i("div", {
|
|
82
|
+
staticClass: "sign-button flex-item",
|
|
83
|
+
staticStyle: {
|
|
84
|
+
color: "green"
|
|
85
|
+
},
|
|
86
|
+
on: {
|
|
87
|
+
click: t.save
|
|
88
|
+
}
|
|
89
|
+
}, [i("i", {
|
|
90
|
+
staticClass: "fa fa-check"
|
|
91
|
+
}), t._v(" \u786E\u5B9A ")])])]), i("div", {
|
|
92
|
+
directives: [{
|
|
93
|
+
name: "show",
|
|
94
|
+
rawName: "v-show",
|
|
95
|
+
value: t.disabled || !t.edit,
|
|
96
|
+
expression: "disabled || !edit"
|
|
97
|
+
}],
|
|
98
|
+
staticClass: "sign-view",
|
|
99
|
+
style: {
|
|
100
|
+
cursor: t.disabled ? "not-allowed" : "pointer"
|
|
101
|
+
},
|
|
102
|
+
on: {
|
|
103
|
+
click: t.showSign
|
|
104
|
+
}
|
|
105
|
+
}, [t.value ? i("img", {
|
|
106
|
+
staticClass: "sign-image",
|
|
107
|
+
attrs: {
|
|
108
|
+
src: t.value,
|
|
109
|
+
alt: "\u7B7E\u540D"
|
|
110
|
+
}
|
|
111
|
+
}) : t._e(), t.value ? t._e() : i("p", {
|
|
112
|
+
staticClass: "sign-tips",
|
|
113
|
+
style: {
|
|
114
|
+
color: !t.value && t.disabled ? "red" : ""
|
|
115
|
+
}
|
|
116
|
+
}, [t._v(" " + t._s(t.disabled ? "\u672A\u7B7E\u540D" : "\u70B9\u51FB\u8FDB\u884C\u7B7E\u540D") + " ")]), t.disabled ? t._e() : i("i", {
|
|
117
|
+
staticClass: "el-icon-edit-outline sign-edit-icon"
|
|
118
|
+
})])]);
|
|
119
|
+
}, l = [];
|
|
120
|
+
const c = {
|
|
121
|
+
name: "SignPanel",
|
|
122
|
+
props: {
|
|
123
|
+
width: {
|
|
124
|
+
type: Number,
|
|
125
|
+
default: 400
|
|
126
|
+
},
|
|
127
|
+
height: {
|
|
128
|
+
type: Number,
|
|
129
|
+
default: 150
|
|
130
|
+
},
|
|
131
|
+
lineWidth: {
|
|
132
|
+
type: Number,
|
|
133
|
+
default: 1
|
|
134
|
+
},
|
|
135
|
+
text: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: "\u7B7E\u540D\u533A"
|
|
138
|
+
},
|
|
139
|
+
fontSize: {
|
|
140
|
+
type: Number,
|
|
141
|
+
default: 20
|
|
142
|
+
},
|
|
143
|
+
value: {
|
|
144
|
+
type: String
|
|
145
|
+
},
|
|
146
|
+
disabled: Boolean
|
|
147
|
+
},
|
|
148
|
+
data() {
|
|
149
|
+
return {
|
|
150
|
+
edit: !1
|
|
151
|
+
};
|
|
152
|
+
},
|
|
153
|
+
mounted() {
|
|
154
|
+
this.init();
|
|
155
|
+
},
|
|
156
|
+
methods: {
|
|
157
|
+
init() {
|
|
158
|
+
if (this.stack = [], this.canvas = this.$refs.canvas, !this.canvas.getContext) {
|
|
159
|
+
alert("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u624B\u5199\u7B7E\u540D");
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
this.canvasInit();
|
|
163
|
+
},
|
|
164
|
+
rollback() {
|
|
165
|
+
if (this.stack.length > 0) {
|
|
166
|
+
const t = this.stack[this.stack.length - 1];
|
|
167
|
+
this.ctx.putImageData(t, 0, 0), this.stack.length = this.stack.length - 1;
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
position() {
|
|
171
|
+
this.restorePoint = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);
|
|
172
|
+
const t = this.canvas.getBoundingClientRect();
|
|
173
|
+
this.start = t.left, this.end = t.top;
|
|
174
|
+
},
|
|
175
|
+
canvasInit() {
|
|
176
|
+
this.ctx = this.canvas.getContext("2d"), this.ctx.lineCap = "round", this.ctx.lineWidth = this.lineWidth, this.ctx.clearRect(0, 0, this.width, this.height), this.blank = this.canvas.toDataURL("image/png");
|
|
177
|
+
},
|
|
178
|
+
drawWaterMark() {
|
|
179
|
+
this.ctx.font = `${this.fontSize}px bold \u9ED1\u4F53`, this.ctx.fillStyle = "#eee", this.ctx.textAlign = "center", this.ctx.shadowBlur = 1, this.ctx.textBaseline = "middle", this.ctx.fillText(this.text, this.width / 2, this.height / 2);
|
|
180
|
+
},
|
|
181
|
+
down(t) {
|
|
182
|
+
this.position(), this.startLine(t.clientX, t.clientY, t), this.target = t.target, this.target.addEventListener("mousemove", this.move), window.addEventListener("mouseup", this.up);
|
|
183
|
+
},
|
|
184
|
+
move(t) {
|
|
185
|
+
this.moveLine(t.clientX, t.clientY, t);
|
|
186
|
+
},
|
|
187
|
+
up() {
|
|
188
|
+
this.target && this.target.removeEventListener("mousemove", this.move), window.removeEventListener("mouseup", this.up), this.record();
|
|
189
|
+
},
|
|
190
|
+
touchstart(t) {
|
|
191
|
+
this.position(), this.startLine(t.changedTouches[0].clientX, t.changedTouches[0].clientY, t);
|
|
192
|
+
},
|
|
193
|
+
touchmove(t) {
|
|
194
|
+
this.moveLine(t.touches[0].clientX, t.touches[0].clientY, t);
|
|
195
|
+
},
|
|
196
|
+
startLine(t, e) {
|
|
197
|
+
this.ctx.beginPath(), t -= this.start, e -= this.end, this.ctx.moveTo(t, e);
|
|
198
|
+
},
|
|
199
|
+
moveLine(t, e, i) {
|
|
200
|
+
i && i.preventDefault(), t -= this.start, e -= this.end, this.ctx.lineTo(t, e), this.ctx.stroke();
|
|
201
|
+
},
|
|
202
|
+
clear() {
|
|
203
|
+
this.ctx.clearRect(0, 0, this.width, this.height);
|
|
204
|
+
},
|
|
205
|
+
cancel() {
|
|
206
|
+
this.clear(), this.edit = !1;
|
|
207
|
+
},
|
|
208
|
+
touchend() {
|
|
209
|
+
this.record();
|
|
210
|
+
},
|
|
211
|
+
record() {
|
|
212
|
+
this.stack.push(this.restorePoint);
|
|
213
|
+
},
|
|
214
|
+
save() {
|
|
215
|
+
const t = this.canvas.toDataURL("image/png");
|
|
216
|
+
this.blank === t ? this.$emit("input", "") : this.$emit("input", t), this.edit = !1, this.stack.length = 0, this.ctx.clearRect(0, 0, this.width, this.height);
|
|
217
|
+
},
|
|
218
|
+
showSign() {
|
|
219
|
+
this.disabled || (this.edit = !0);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}, a = {};
|
|
223
|
+
var h = /* @__PURE__ */ n(
|
|
224
|
+
c,
|
|
225
|
+
o,
|
|
226
|
+
l,
|
|
227
|
+
!1,
|
|
228
|
+
r,
|
|
229
|
+
null,
|
|
230
|
+
null,
|
|
231
|
+
null
|
|
232
|
+
);
|
|
233
|
+
function r(t) {
|
|
234
|
+
for (let e in a)
|
|
235
|
+
this[e] = a[e];
|
|
236
|
+
}
|
|
237
|
+
const u = /* @__PURE__ */ function() {
|
|
238
|
+
return h.exports;
|
|
239
|
+
}();
|
|
240
|
+
export {
|
|
241
|
+
u as default
|
|
242
|
+
};
|