@web-utils/component 3.0.6 → 3.1.0

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.
Files changed (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,309 +1,27 @@
1
- var c = (t, r, e) => new Promise((s, o) => {
1
+ var c = (r, e, t) => new Promise((s, o) => {
2
2
  var n = (i) => {
3
3
  try {
4
- a(e.next(i));
4
+ a(t.next(i));
5
5
  } catch (l) {
6
6
  o(l);
7
7
  }
8
- }, u = (i) => {
8
+ }, h = (i) => {
9
9
  try {
10
- a(e.throw(i));
10
+ a(t.throw(i));
11
11
  } catch (l) {
12
12
  o(l);
13
13
  }
14
- }, a = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, u);
15
- a((e = e.apply(t, r)).next());
14
+ }, a = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, h);
15
+ a((t = t.apply(r, e)).next());
16
16
  });
17
- import { copy as d, isInContainer as p } from "@web-utils/core";
18
- import v from "element-ui/lib/utils/clickoutside";
19
- import { z as f } from "../chunks/util.ae730cde.mjs";
20
- import { n as m } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
21
- var w = function() {
22
- var t = this, r = t.$createElement, e = t._self._c || r;
23
- return e("div", {
24
- directives: [{
25
- name: "show",
26
- rawName: "v-show",
27
- value: t.showPopover,
28
- expression: "showPopover"
29
- }, {
30
- name: "click-outside",
31
- rawName: "v-click-outside",
32
- value: t.hidePopover,
33
- expression: "hidePopover"
34
- }],
35
- staticClass: "search-popover"
36
- }, [e("div", {
37
- staticStyle: {
38
- padding: "10px"
39
- }
40
- }, [e("input", {
41
- directives: [{
42
- name: "model",
43
- rawName: "v-model",
44
- value: t.keyword,
45
- expression: "keyword"
46
- }],
47
- ref: "searchInput",
48
- staticClass: "search-input",
49
- attrs: {
50
- placeholder: t.currentItem ? t.currentItem.name : "输入关键字搜索 ..."
51
- },
52
- domProps: {
53
- value: t.keyword
54
- },
55
- on: {
56
- input: function(s) {
57
- s.target.composing || (t.keyword = s.target.value);
58
- }
59
- }
60
- })]), e("ul", {
61
- ref: "ul",
62
- staticStyle: {
63
- flex: "1",
64
- overflow: "auto",
65
- "list-style-type": "none"
66
- }
67
- }, [t.filterList.length ? t._l(t.filterList, function(s, o) {
68
- return e("li", {
69
- key: s.name + o,
70
- staticClass: "search-li",
71
- attrs: {
72
- id: `item-${o}`
73
- },
74
- on: {
75
- mousemove: function(n) {
76
- return t.mouseHoverItem(s, o);
77
- }
78
- }
79
- }, [e("a", {
80
- class: ["search-item", {
81
- active: t.currentIndex === o
82
- }],
83
- attrs: {
84
- target: s.url ? "_blank" : "",
85
- rel: "noopener noreferrer",
86
- href: s.url ? s.url : "javascript:void(0)"
87
- },
88
- on: {
89
- click: function(n) {
90
- return t.onItemClick(s);
91
- }
92
- }
93
- }, [e("div", {
94
- staticClass: "search-icon"
95
- }, [e("i", {
96
- class: s.icon || "el-icon-menu"
97
- })]), e("div", {
98
- staticStyle: {
99
- flex: "1",
100
- "box-sizing": "border-box",
101
- padding: "0 10px",
102
- "overflow-x": "hidden",
103
- "text-align": "left"
104
- }
105
- }, [e("p", {
106
- staticStyle: {
107
- "margin-bottom": "4px",
108
- "font-size": "16px"
109
- }
110
- }, [t._v(t._s(s.name))]), e("p", {
111
- staticClass: "url"
112
- }, [t._v(t._s(s.url || s.path))])]), e("div", {
113
- staticClass: "search-icon search-action"
114
- }, [e("svg", {
115
- staticClass: "action",
116
- attrs: {
117
- width: "20",
118
- height: "20",
119
- viewBox: "0 0 20 20"
120
- }
121
- }, [e("g", {
122
- attrs: {
123
- stroke: "currentColor",
124
- fill: "none",
125
- "fill-rule": "evenodd",
126
- "stroke-linecap": "round",
127
- "stroke-linejoin": "round"
128
- }
129
- }, [e("path", {
130
- attrs: {
131
- d: "M18 3v4c0 2-2 4-4 4H2"
132
- }
133
- }), e("path", {
134
- attrs: {
135
- d: "M8 17l-6-6 6-6"
136
- }
137
- })])])])])]);
138
- }) : t.evalResult !== "" ? e("li", {
139
- staticClass: "search-li",
140
- on: {
141
- click: t.copyEvalResult,
142
- mousemove: function(s) {
143
- return t.mouseHoverItem({}, -1);
144
- }
145
- }
146
- }, [e("a", {
147
- class: ["search-item", {
148
- active: t.currentIndex === -1
149
- }],
150
- attrs: {
151
- rel: "noopener noreferrer",
152
- href: "javascript:void(0)"
153
- }
154
- }, [t._m(0), e("div", {
155
- staticStyle: {
156
- flex: "1",
157
- "box-sizing": "border-box",
158
- padding: "0 10px",
159
- "overflow-x": "hidden",
160
- "text-align": "left"
161
- }
162
- }, [e("p", {
163
- staticStyle: {
164
- "margin-bottom": "4px",
165
- "font-size": "16px"
166
- }
167
- }, [t._v("Result: " + t._s(t.evalResult))]), e("p", {
168
- staticClass: "url"
169
- }, [t._v("点击或这按 Enter 键复制")])]), e("div", {
170
- staticClass: "search-icon search-action"
171
- }, [e("svg", {
172
- staticClass: "action",
173
- attrs: {
174
- width: "20",
175
- height: "20",
176
- viewBox: "0 0 20 20"
177
- }
178
- }, [e("g", {
179
- attrs: {
180
- stroke: "currentColor",
181
- fill: "none",
182
- "fill-rule": "evenodd",
183
- "stroke-linecap": "round",
184
- "stroke-linejoin": "round"
185
- }
186
- }, [e("path", {
187
- attrs: {
188
- d: "M18 3v4c0 2-2 4-4 4H2"
189
- }
190
- }), e("path", {
191
- attrs: {
192
- d: "M8 17l-6-6 6-6"
193
- }
194
- })])])])])]) : e("li", {
195
- staticStyle: {
196
- display: "flex",
197
- "align-items": "center",
198
- "justify-content": "center",
199
- height: "100%",
200
- color: "#808080"
201
- }
202
- }, [t._v(" Sorry,no result ! ")])], 2), e("div", {
203
- staticClass: "footer-tips"
204
- }, [e("span", {
205
- staticClass: "keyboard-key"
206
- }, [e("svg", {
207
- attrs: {
208
- width: "15",
209
- height: "15"
210
- }
211
- }, [e("g", {
212
- attrs: {
213
- fill: "none",
214
- stroke: "currentColor",
215
- "stroke-linecap": "round",
216
- "stroke-linejoin": "round",
217
- "stroke-width": "1.2"
218
- }
219
- }, [e("path", {
220
- attrs: {
221
- d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
222
- }
223
- })])])]), e("span", {
224
- staticStyle: {
225
- "margin-right": "20px",
226
- "font-size": "12px"
227
- }
228
- }, [t._v("选择")]), e("span", {
229
- staticClass: "keyboard-key"
230
- }, [e("svg", {
231
- attrs: {
232
- width: "15",
233
- height: "15"
234
- }
235
- }, [e("g", {
236
- attrs: {
237
- fill: "none",
238
- stroke: "currentColor",
239
- "stroke-linecap": "round",
240
- "stroke-linejoin": "round",
241
- "stroke-width": "1.2"
242
- }
243
- }, [e("path", {
244
- attrs: {
245
- d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
246
- }
247
- })])])]), e("span", {
248
- staticClass: "keyboard-key"
249
- }, [e("svg", {
250
- attrs: {
251
- width: "15",
252
- height: "15"
253
- }
254
- }, [e("g", {
255
- attrs: {
256
- fill: "none",
257
- stroke: "currentColor",
258
- "stroke-linecap": "round",
259
- "stroke-linejoin": "round",
260
- "stroke-width": "1.2"
261
- }
262
- }, [e("path", {
263
- attrs: {
264
- d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
265
- }
266
- })])])]), e("span", {
267
- staticStyle: {
268
- "margin-right": "20px",
269
- "font-size": "12px"
270
- }
271
- }, [t._v("切换")]), e("span", {
272
- staticClass: "keyboard-key"
273
- }, [e("svg", {
274
- attrs: {
275
- width: "15",
276
- height: "15"
277
- }
278
- }, [e("g", {
279
- attrs: {
280
- fill: "none",
281
- stroke: "currentColor",
282
- "stroke-linecap": "round",
283
- "stroke-linejoin": "round",
284
- "stroke-width": "1.2"
285
- }
286
- }, [e("path", {
287
- attrs: {
288
- 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"
289
- }
290
- })])])]), e("span", {
291
- staticStyle: {
292
- "font-size": "12px"
293
- }
294
- }, [t._v("关闭")])])]);
295
- }, y = [function() {
296
- var t = this, r = t.$createElement, e = t._self._c || r;
297
- return e("div", {
298
- staticClass: "search-icon"
299
- }, [e("i", {
300
- staticClass: "fa fa-table"
301
- })]);
302
- }];
303
- const k = {
17
+ import { copy as u, isInContainer as d } from "@web-utils/core";
18
+ import p from "element-ui/lib/utils/clickoutside";
19
+ import { z as v } from "../chunks/util.ae730cde.mjs";
20
+ import { n as f } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
21
+ const m = {
304
22
  name: "SearchPopover",
305
23
  directives: {
306
- ClickOutside: v
24
+ ClickOutside: p
307
25
  },
308
26
  props: {
309
27
  services: {
@@ -321,16 +39,16 @@ const k = {
321
39
  },
322
40
  computed: {
323
41
  filterList() {
324
- return this.services.filter((t) => t.name.indexOf(this.keyword) > -1);
42
+ return this.services.filter((r) => r.name.indexOf(this.keyword) > -1);
325
43
  },
326
44
  currentItem() {
327
- var t;
328
- return (t = this.filterList) == null ? void 0 : t[this.currentIndex];
45
+ var r;
46
+ return (r = this.filterList) == null ? void 0 : r[this.currentIndex];
329
47
  },
330
48
  evalResult() {
331
49
  try {
332
- return f(this.keyword);
333
- } catch (t) {
50
+ return v(this.keyword);
51
+ } catch (r) {
334
52
  return "";
335
53
  }
336
54
  }
@@ -339,8 +57,8 @@ const k = {
339
57
  keyword() {
340
58
  this.currentIndex = 0, !this.currentItem && this.currentIndex !== -1 && (this.currentIndex = -1);
341
59
  },
342
- showPopover(t) {
343
- t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
60
+ showPopover(r) {
61
+ r ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
344
62
  }
345
63
  },
346
64
  mounted() {
@@ -350,13 +68,13 @@ const k = {
350
68
  window.removeEventListener("keydown", this.keydown);
351
69
  },
352
70
  methods: {
353
- onItemClick(t) {
71
+ onItemClick(r) {
354
72
  return c(this, null, function* () {
355
- t.path && (this.hidePopover(), yield this.$router.push(t.path));
73
+ r.path && (this.hidePopover(), yield this.$router.push(r.path));
356
74
  });
357
75
  },
358
76
  copyEvalResult() {
359
- return d(this.evalResult);
77
+ return u(this.evalResult);
360
78
  },
361
79
  hidePopover() {
362
80
  this.showPopover = !1;
@@ -364,49 +82,59 @@ const k = {
364
82
  displayPopover() {
365
83
  this.showPopover = !0;
366
84
  },
367
- mouseHoverItem(t, r) {
368
- this.currentIndex = r;
85
+ mouseHoverItem(r, e) {
86
+ this.currentIndex = e;
369
87
  },
370
- keydown(t) {
88
+ keydown(r) {
371
89
  return c(this, null, function* () {
372
- if (t.key === "Shift") {
373
- const r = Date.now() - this.last;
374
- r > 0 && r < 500 ? (this.showPopover = !0, yield this.$nextTick(), this.$refs.searchInput.focus()) : this.last = Date.now();
90
+ if (r.key === "Shift") {
91
+ const e = Date.now() - this.last;
92
+ e > 0 && e < 500 ? (this.showPopover = !0, yield this.$nextTick(), this.$refs.searchInput.focus()) : this.last = Date.now();
375
93
  }
376
- 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 && (yield 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)));
94
+ this.showPopover === !0 && (r.key === "Escape" && this.hidePopover(), r.key === "Enter" && (this.currentItem ? this.currentItem.url ? (window.open(this.currentItem.url, "_blank"), this.hidePopover()) : this.currentItem.path && (yield this.onItemClick(this.currentItem)) : this.copyEvalResult()), r.key === "ArrowUp" && (this.currentIndex--, this.currentIndex < 0 && (this.currentIndex = this.filterList.length - 1), this.scrollIntoView(this.currentIndex)), r.key === "ArrowDown" && (this.currentIndex++, this.currentIndex >= this.filterList.length && (this.currentIndex = 0), this.scrollIntoView(this.currentIndex)));
377
95
  });
378
96
  },
379
- scrollIntoView(t) {
380
- if (t === 0) {
97
+ scrollIntoView(r) {
98
+ if (r === 0) {
381
99
  this.$refs.ul.scrollTop = 0;
382
100
  return;
383
101
  }
384
- if (t === this.filterList.length) {
102
+ if (r === this.filterList.length) {
385
103
  this.$refs.ul.scrollTop = this.$refs.ul.scrollHeight;
386
104
  return;
387
105
  }
388
- const r = this.$refs.ul.querySelector(`#item-${t}`);
389
- p(r, this.$refs.ul, { topOffset: -78, bottomOffset: 78 }) || (this.$refs.ul.scrollTop = r.offsetTop - r.clientHeight + 20);
106
+ const e = this.$refs.ul.querySelector(`#item-${r}`);
107
+ d(e, this.$refs.ul, { topOffset: -78, bottomOffset: 78 }) || (this.$refs.ul.scrollTop = e.offsetTop - e.clientHeight + 20);
390
108
  }
391
109
  }
392
- }, h = {};
393
- var x = /* @__PURE__ */ m(
394
- k,
110
+ };
111
+ var w = function() {
112
+ var e = this, t = e._self._c;
113
+ return t("div", { directives: [{ name: "show", rawName: "v-show", value: e.showPopover, expression: "showPopover" }, { name: "click-outside", rawName: "v-click-outside", value: e.hidePopover, expression: "hidePopover" }], staticClass: "search-popover" }, [t("div", { staticStyle: { padding: "10px" } }, [t("input", { directives: [{ name: "model", rawName: "v-model", value: e.keyword, expression: "keyword" }], ref: "searchInput", staticClass: "search-input", attrs: { placeholder: e.currentItem ? e.currentItem.name : "输入关键字搜索 ..." }, domProps: { value: e.keyword }, on: { input: function(s) {
114
+ s.target.composing || (e.keyword = s.target.value);
115
+ } } })]), t("ul", { ref: "ul", staticStyle: { flex: "1", overflow: "auto", "list-style-type": "none" } }, [e.filterList.length ? e._l(e.filterList, function(s, o) {
116
+ return t("li", { key: s.name + o, staticClass: "search-li", attrs: { id: `item-${o}` }, on: { mousemove: function(n) {
117
+ return e.mouseHoverItem(s, o);
118
+ } } }, [t("a", { class: ["search-item", { active: e.currentIndex === o }], attrs: { target: s.url ? "_blank" : "", rel: "noopener noreferrer", href: s.url ? s.url : "javascript:void(0)" }, on: { click: function(n) {
119
+ return e.onItemClick(s);
120
+ } } }, [t("div", { staticClass: "search-icon" }, [t("i", { class: s.icon || "el-icon-menu" })]), t("div", { staticStyle: { flex: "1", "box-sizing": "border-box", padding: "0 10px", "overflow-x": "hidden", "text-align": "left" } }, [t("p", { staticStyle: { "margin-bottom": "4px", "font-size": "16px" } }, [e._v(e._s(s.name))]), t("p", { staticClass: "url" }, [e._v(e._s(s.url || s.path))])]), t("div", { staticClass: "search-icon search-action" }, [t("svg", { staticClass: "action", attrs: { width: "20", height: "20", viewBox: "0 0 20 20" } }, [t("g", { attrs: { stroke: "currentColor", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M18 3v4c0 2-2 4-4 4H2" } }), t("path", { attrs: { d: "M8 17l-6-6 6-6" } })])])])])]);
121
+ }) : e.evalResult !== "" ? t("li", { staticClass: "search-li", on: { click: e.copyEvalResult, mousemove: function(s) {
122
+ return e.mouseHoverItem({}, -1);
123
+ } } }, [t("a", { class: ["search-item", { active: e.currentIndex === -1 }], attrs: { rel: "noopener noreferrer", href: "javascript:void(0)" } }, [e._m(0), t("div", { staticStyle: { flex: "1", "box-sizing": "border-box", padding: "0 10px", "overflow-x": "hidden", "text-align": "left" } }, [t("p", { staticStyle: { "margin-bottom": "4px", "font-size": "16px" } }, [e._v("Result: " + e._s(e.evalResult))]), t("p", { staticClass: "url" }, [e._v("点击或这按 Enter 键复制")])]), t("div", { staticClass: "search-icon search-action" }, [t("svg", { staticClass: "action", attrs: { width: "20", height: "20", viewBox: "0 0 20 20" } }, [t("g", { attrs: { stroke: "currentColor", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "round", "stroke-linejoin": "round" } }, [t("path", { attrs: { d: "M18 3v4c0 2-2 4-4 4H2" } }), t("path", { attrs: { d: "M8 17l-6-6 6-6" } })])])])])]) : t("li", { staticStyle: { display: "flex", "align-items": "center", "justify-content": "center", height: "100%", color: "#808080" } }, [e._v(" Sorry,no result ! ")])], 2), t("div", { staticClass: "footer-tips" }, [t("span", { staticClass: "keyboard-key" }, [t("svg", { attrs: { width: "15", height: "15" } }, [t("g", { attrs: { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.2" } }, [t("path", { attrs: { d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3" } })])])]), t("span", { staticStyle: { "margin-right": "20px", "font-size": "12px" } }, [e._v("选择")]), t("span", { staticClass: "keyboard-key" }, [t("svg", { attrs: { width: "15", height: "15" } }, [t("g", { attrs: { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.2" } }, [t("path", { attrs: { d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3" } })])])]), t("span", { staticClass: "keyboard-key" }, [t("svg", { attrs: { width: "15", height: "15" } }, [t("g", { attrs: { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.2" } }, [t("path", { attrs: { d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3" } })])])]), t("span", { staticStyle: { "margin-right": "20px", "font-size": "12px" } }, [e._v("切换")]), t("span", { staticClass: "keyboard-key" }, [t("svg", { attrs: { width: "15", height: "15" } }, [t("g", { attrs: { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "1.2" } }, [t("path", { attrs: { 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" } })])])]), t("span", { staticStyle: { "font-size": "12px" } }, [e._v("关闭")])])]);
124
+ }, k = [function() {
125
+ var r = this, e = r._self._c;
126
+ return e("div", { staticClass: "search-icon" }, [e("i", { staticClass: "fa fa-table" })]);
127
+ }], y = /* @__PURE__ */ f(
128
+ m,
395
129
  w,
396
- y,
130
+ k,
397
131
  !1,
398
- g,
132
+ null,
399
133
  null,
400
134
  null,
401
135
  null
402
136
  );
403
- function g(t) {
404
- for (let r in h)
405
- this[r] = h[r];
406
- }
407
- const S = /* @__PURE__ */ function() {
408
- return x.exports;
409
- }();
137
+ const P = y.exports;
410
138
  export {
411
- S as default
139
+ P as default
412
140
  };
package/sign/index.mjs CHANGED
@@ -1,28 +1,14 @@
1
- import { s as g } from "../chunks/util.ae730cde.mjs";
2
- import { n as m } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
3
- var _ = function() {
4
- var t = this, n = t.$createElement, s = t._self._c || n;
5
- return s("div", {
6
- staticClass: "avue-sign",
7
- style: t.styleName
8
- }, [s("canvas", {
9
- ref: "canvas",
10
- staticClass: "avue-sige__canvas",
11
- attrs: {
12
- width: t.width,
13
- height: t.height
14
- }
15
- })]);
16
- }, x = [];
17
- function y(t, n, s, r, e, o) {
18
- t.save(), t.fillStyle = e, t.translate(n, s), t.rotate(Math.PI + o), t.beginPath();
1
+ import { s as v } from "../chunks/util.ae730cde.mjs";
2
+ import { n as m } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
3
+ function p(e, s, n, r, t, o) {
4
+ e.save(), e.fillStyle = t, e.translate(s, n), e.rotate(Math.PI + o), e.beginPath();
19
5
  let a = Math.sin(0), d = Math.cos(0);
20
6
  const f = Math.PI / 5 * 4;
21
7
  for (let h = 0; h < 5; h++)
22
- a = Math.sin(h * f), d = Math.cos(h * f), t.lineTo(a * r, d * r);
23
- t.closePath(), t.stroke(), t.fill(), t.restore();
8
+ a = Math.sin(h * f), d = Math.cos(h * f), e.lineTo(a * r, d * r);
9
+ e.closePath(), e.stroke(), e.fill(), e.restore();
24
10
  }
25
- const M = {
11
+ const x = {
26
12
  name: "Sign",
27
13
  props: {
28
14
  width: {
@@ -47,8 +33,8 @@ const M = {
47
33
  computed: {
48
34
  styleName() {
49
35
  return {
50
- width: g(this.width),
51
- height: g(this.height)
36
+ width: v(this.width),
37
+ height: v(this.height)
52
38
  };
53
39
  }
54
40
  },
@@ -56,77 +42,74 @@ const M = {
56
42
  this.init();
57
43
  },
58
44
  methods: {
59
- getStar(t, n, s) {
60
- const r = this.canvas, e = this.context, o = r.width / 2, a = r.height / 2;
61
- e.lineWidth = 7, e.strokeStyle = "#f00", e.beginPath(), e.arc(o, a, 110, 0, Math.PI * 2), e.stroke(), y(e, o, a, 20, "#f00", 0), e.font = "18px 黑体", e.textBaseline = "middle", e.textAlign = "center", e.lineWidth = 1, e.strokeStyle = "#f00", e.strokeText(t, o, a + 50), e.font = "14px 黑体", e.textBaseline = "middle", e.textAlign = "center", e.lineWidth = 1, e.strokeStyle = "#f00", e.strokeText(s, o, a + 80), e.translate(o, a), e.font = "22px 黑体";
62
- const d = n.length, f = 4 * Math.PI / (3 * (d - 1)), h = n.split("");
45
+ getStar(e, s, n) {
46
+ const r = this.canvas, t = this.context, o = r.width / 2, a = r.height / 2;
47
+ t.lineWidth = 7, t.strokeStyle = "#f00", t.beginPath(), t.arc(o, a, 110, 0, Math.PI * 2), t.stroke(), p(t, o, a, 20, "#f00", 0), t.font = "18px 黑体", t.textBaseline = "middle", t.textAlign = "center", t.lineWidth = 1, t.strokeStyle = "#f00", t.strokeText(e, o, a + 50), t.font = "14px 黑体", t.textBaseline = "middle", t.textAlign = "center", t.lineWidth = 1, t.strokeStyle = "#f00", t.strokeText(n, o, a + 80), t.translate(o, a), t.font = "22px 黑体";
48
+ const d = s.length, f = 4 * Math.PI / (3 * (d - 1)), h = s.split("");
63
49
  let l;
64
50
  for (let i = 0; i < d; i++)
65
- l = h[i], i === 0 ? e.rotate(5 * Math.PI / 6) : e.rotate(f), e.save(), e.translate(90, 0), e.rotate(Math.PI / 2), e.strokeText(l, 0, 0), e.restore(), e.save();
51
+ l = h[i], i === 0 ? t.rotate(5 * Math.PI / 6) : t.rotate(f), t.save(), t.translate(90, 0), t.rotate(Math.PI / 2), t.strokeText(l, 0, 0), t.restore(), t.save();
66
52
  this.disabled = !0;
67
53
  },
68
- submit(t, n) {
69
- return t || (t = this.width), n || (n = this.height), this.canvas.toDataURL("i/png");
54
+ submit(e, s) {
55
+ return e || (e = this.width), s || (s = this.height), this.canvas.toDataURL("i/png");
70
56
  },
71
57
  clear() {
72
58
  this.linex = [], this.liney = [], this.linen = [], this.disabled = !1;
73
59
  },
74
60
  init() {
75
61
  this.canvas = this.$refs.canvas;
76
- const t = this.canvas, n = this;
77
- typeof document.ontouchstart != "undefined" ? (t.addEventListener("touchmove", d, !1), t.addEventListener("touchstart", f, !1), t.addEventListener("touchend", h, !1)) : (t.addEventListener("mousemove", d, !1), t.addEventListener("mousedown", f, !1), t.addEventListener("mouseup", h, !1), t.addEventListener("mouseleave", h, !1)), this.context = t.getContext("2d");
78
- const s = this.context;
62
+ const e = this.canvas, s = this;
63
+ typeof document.ontouchstart != "undefined" ? (e.addEventListener("touchmove", d, !1), e.addEventListener("touchstart", f, !1), e.addEventListener("touchend", h, !1)) : (e.addEventListener("mousemove", d, !1), e.addEventListener("mousedown", f, !1), e.addEventListener("mouseup", h, !1), e.addEventListener("mouseleave", h, !1)), this.context = e.getContext("2d");
64
+ const n = this.context;
79
65
  this.linex = [], this.liney = [], this.linen = [];
80
- let r = 1, e = 30, o = 0;
66
+ let r = 1, t = 30, o = 0;
81
67
  function a(l, i) {
82
68
  const u = l.getBoundingClientRect();
83
- let c, v;
84
- return i.targetTouches ? (c = i.targetTouches[0].clientX, v = i.targetTouches[0].clientY) : (c = i.clientX, v = i.clientY), {
69
+ let c, g;
70
+ return i.targetTouches ? (c = i.targetTouches[0].clientX, g = i.targetTouches[0].clientY) : (c = i.clientX, g = i.clientY), {
85
71
  x: (c - u.left) * (l.width / u.width),
86
- y: (v - u.top) * (l.height / u.height)
72
+ y: (g - u.top) * (l.height / u.height)
87
73
  };
88
74
  }
89
75
  function d(l) {
90
- if (n.disabled)
76
+ if (s.disabled)
91
77
  return;
92
- const i = a(t, l).x, u = a(t, l).y;
78
+ const i = a(e, l).x, u = a(e, l).y;
93
79
  if (o === 1) {
94
- n.linex.push(i), n.liney.push(u), n.linen.push(1), s.save(), s.translate(s.canvas.width / 2, s.canvas.height / 2), s.translate(-s.canvas.width / 2, -s.canvas.height / 2), s.beginPath(), s.lineWidth = 2;
95
- for (let c = 1; c < n.linex.length; c++)
96
- r = n.linex[c], e = n.liney[c], n.linen[c] === 0 ? s.moveTo(r, e) : s.lineTo(r, e);
97
- s.shadowBlur = 10, s.stroke(), s.restore();
80
+ s.linex.push(i), s.liney.push(u), s.linen.push(1), n.save(), n.translate(n.canvas.width / 2, n.canvas.height / 2), n.translate(-n.canvas.width / 2, -n.canvas.height / 2), n.beginPath(), n.lineWidth = 2;
81
+ for (let c = 1; c < s.linex.length; c++)
82
+ r = s.linex[c], t = s.liney[c], s.linen[c] === 0 ? n.moveTo(r, t) : n.lineTo(r, t);
83
+ n.shadowBlur = 10, n.stroke(), n.restore();
98
84
  }
99
85
  l.preventDefault();
100
86
  }
101
87
  function f(l) {
102
- if (n.disabled)
88
+ if (s.disabled)
103
89
  return;
104
- const i = a(t, l).x, u = a(t, l).y;
105
- o = 1, n.linex.push(i), n.liney.push(u), n.linen.push(0);
90
+ const i = a(e, l).x, u = a(e, l).y;
91
+ o = 1, s.linex.push(i), s.liney.push(u), s.linen.push(0);
106
92
  }
107
93
  function h() {
108
- n.disabled || (o = 0);
94
+ s.disabled || (o = 0);
109
95
  }
110
96
  }
111
97
  }
112
- }, p = {};
113
- var w = /* @__PURE__ */ m(
114
- M,
115
- _,
98
+ };
99
+ var y = function() {
100
+ var s = this, n = s._self._c;
101
+ return n("div", { staticClass: "avue-sign", style: s.styleName }, [n("canvas", { ref: "canvas", staticClass: "avue-sige__canvas", attrs: { width: s.width, height: s.height } })]);
102
+ }, _ = [], w = /* @__PURE__ */ m(
116
103
  x,
104
+ y,
105
+ _,
117
106
  !1,
118
- b,
107
+ null,
119
108
  null,
120
109
  null,
121
110
  null
122
111
  );
123
- function b(t) {
124
- for (let n in p)
125
- this[n] = p[n];
126
- }
127
- const S = /* @__PURE__ */ function() {
128
- return w.exports;
129
- }();
112
+ const P = w.exports;
130
113
  export {
131
- S as default
114
+ P as default
132
115
  };