@web-utils/component 2.0.13 → 2.7.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 (315) hide show
  1. package/dist/chunks/config.46422d7f.js +73 -0
  2. package/dist/chunks/confirmable-mixin.3a79781b.js +75 -0
  3. package/dist/chunks/dataformat.fb35ee10.js +61 -0
  4. package/dist/chunks/detail.a3249549.js +28 -0
  5. package/dist/chunks/dic.5f7e3523.js +132 -0
  6. package/dist/chunks/event.50c365eb.js +235 -0
  7. package/dist/chunks/form-input-mixin.ff5b58f7.js +24 -0
  8. package/dist/chunks/form-item-mixin.79f6eaff.js +128 -0
  9. package/dist/chunks/{822300f3.js → form-pick-mixin.61ad06b2.js} +3 -3
  10. package/dist/chunks/init.352281f5.js +121 -0
  11. package/dist/chunks/{44b78389.js → input-number-mixin.41a066be.js} +8 -8
  12. package/dist/chunks/{e1939731.js → mixins.5a78e0db.js} +5 -6
  13. package/dist/chunks/packages.5d7a86c4.js +114 -0
  14. package/dist/chunks/permission.ce5d2121.js +16 -0
  15. package/dist/chunks/slot.1b8d2b1b.js +27 -0
  16. package/dist/chunks/tab-mixin.8c0142e0.js +81 -0
  17. package/dist/chunks/util.5053d54e.js +264 -0
  18. package/dist/chunks/utils.97652d86.js +26 -0
  19. package/dist/chunks/utils.fa73de78.js +185 -0
  20. package/dist/chunks/vueComponentNormalizer.71e2aa87.js +32 -0
  21. package/dist/components/address-input/index.js +43 -56
  22. package/dist/components/address-input/style.css +1 -15
  23. package/dist/components/affix/index.js +102 -0
  24. package/dist/components/affix/style.css +1 -0
  25. package/dist/components/array/index.js +156 -0
  26. package/dist/components/array/style.css +1 -0
  27. package/dist/components/article/index.js +93 -0
  28. package/dist/components/article/style.css +1 -0
  29. package/dist/components/aside-menu/index.js +30 -36
  30. package/dist/components/aside-menu/style.css +1 -9
  31. package/dist/components/avatar/index.js +106 -0
  32. package/dist/components/avatar/style.css +1 -0
  33. package/dist/components/awesome-button/index.js +32 -35
  34. package/dist/components/base.css +1 -66
  35. package/dist/components/capsule-tab/index.js +27 -33
  36. package/dist/components/capsule-tab/style.css +1 -32
  37. package/dist/components/card/index.js +130 -0
  38. package/dist/components/card/style.css +1 -0
  39. package/dist/components/carousel/index.js +70 -0
  40. package/dist/components/carousel/style.css +1 -0
  41. package/dist/components/chat/index.js +567 -0
  42. package/dist/components/chat/style.css +1 -0
  43. package/dist/components/chunk-file-uploader/index.js +54 -88
  44. package/dist/components/chunk-file-uploader/style.css +1 -4
  45. package/dist/components/chunk-file-uploader-button/index.js +25 -31
  46. package/dist/components/chunk-file-uploader-button/style.css +1 -17
  47. package/dist/components/chunk-file-uploader-drop/index.js +28 -42
  48. package/dist/components/chunk-file-uploader-drop/style.css +1 -12
  49. package/dist/components/chunk-file-uploader-file/index.js +134 -211
  50. package/dist/components/chunk-file-uploader-file/style.css +1 -125
  51. package/dist/components/chunk-file-uploader-files/index.js +28 -34
  52. package/dist/components/chunk-file-uploader-files/style.css +1 -9
  53. package/dist/components/chunk-file-uploader-list/index.js +29 -35
  54. package/dist/components/chunk-file-uploader-list/style.css +1 -9
  55. package/dist/components/chunk-file-uploader-un-support/index.js +30 -38
  56. package/dist/components/chunk-file-uploader-un-support/style.css +1 -6
  57. package/dist/components/code/index.js +66 -0
  58. package/dist/components/code-mirror-editor/index.js +156 -181
  59. package/dist/components/code-mirror-editor/style.css +1 -17
  60. package/dist/components/color-picker/index.js +49 -68
  61. package/dist/components/column/index.js +114 -0
  62. package/dist/components/column-default/index.js +105 -0
  63. package/dist/components/column-dynamic/index.js +93 -0
  64. package/dist/components/column-menu/index.js +286 -0
  65. package/dist/components/column-slot/index.js +265 -0
  66. package/dist/components/comment/index.js +94 -0
  67. package/dist/components/comment/style.css +1 -0
  68. package/dist/components/confirm-button/index.js +19 -21
  69. package/dist/components/confirmable/index.js +18 -19
  70. package/dist/components/context-menu/index.js +118 -130
  71. package/dist/components/context-menu/style.css +1 -88
  72. package/dist/components/count-up/index.js +120 -0
  73. package/dist/components/custom-scrollbar/index.js +50 -68
  74. package/dist/components/data-box/index.js +97 -0
  75. package/dist/components/data-box/style.css +1 -0
  76. package/dist/components/data-card/index.js +98 -0
  77. package/dist/components/data-card/style.css +1 -0
  78. package/dist/components/data-cardtext/index.js +82 -0
  79. package/dist/components/data-cardtext/style.css +1 -0
  80. package/dist/components/data-display/index.js +93 -0
  81. package/dist/components/data-display/style.css +1 -0
  82. package/dist/components/data-icons/index.js +104 -0
  83. package/dist/components/data-icons/style.css +1 -0
  84. package/dist/components/data-imgtext/index.js +106 -0
  85. package/dist/components/data-imgtext/style.css +1 -0
  86. package/dist/components/data-operatext/index.js +99 -0
  87. package/dist/components/data-operatext/style.css +1 -0
  88. package/dist/components/data-panel/index.js +93 -0
  89. package/dist/components/data-panel/style.css +1 -0
  90. package/dist/components/data-pay/index.js +149 -0
  91. package/dist/components/data-pay/style.css +1 -0
  92. package/dist/components/data-price/index.js +84 -0
  93. package/dist/components/data-price/style.css +1 -0
  94. package/dist/components/data-progress/index.js +97 -0
  95. package/dist/components/data-progress/style.css +1 -0
  96. package/dist/components/data-rotate/index.js +96 -0
  97. package/dist/components/data-rotate/style.css +1 -0
  98. package/dist/components/data-table-picker/index.js +62 -81
  99. package/dist/components/data-tabs/index.js +94 -0
  100. package/dist/components/data-tabs/style.css +1 -0
  101. package/dist/components/dialog-column/index.js +138 -0
  102. package/dist/components/dialog-excel/index.js +214 -0
  103. package/dist/components/dialog-filter/index.js +245 -0
  104. package/dist/components/dialog-form/index.js +275 -0
  105. package/dist/components/draggable/index.js +384 -0
  106. package/dist/components/draggable/style.css +1 -0
  107. package/dist/components/dynamic-table/index.js +89 -113
  108. package/dist/components/dynamic-table/style.css +1 -30
  109. package/dist/components/e-charts/index.js +126 -201
  110. package/dist/components/e-charts/style.css +1 -10
  111. package/dist/components/editable-progress/index.js +60 -93
  112. package/dist/components/editable-progress/style.css +1 -37
  113. package/dist/components/editable-tree/index.js +423 -638
  114. package/dist/components/editable-tree/style.css +1 -82
  115. package/dist/components/egd-collapse/index.js +33 -46
  116. package/dist/components/egd-collapse-item/index.js +60 -76
  117. package/dist/components/element-dialog/index.js +95 -147
  118. package/dist/components/element-dialog/style.css +1 -102
  119. package/dist/components/empty/index.js +59 -0
  120. package/dist/components/empty/style.css +1 -0
  121. package/dist/components/empty-view/index.js +28 -34
  122. package/dist/components/empty-view/style.css +1 -17
  123. package/dist/components/error-view/index.js +26 -32
  124. package/dist/components/error-view/style.css +1 -17
  125. package/dist/components/flex-column/index.js +25 -40
  126. package/dist/components/flex-item/index.js +29 -57
  127. package/dist/components/flex-row/index.js +25 -40
  128. package/dist/components/flex-scroller/index.js +26 -32
  129. package/dist/components/flex-scroller/style.css +1 -20
  130. package/dist/components/flow/index.js +278 -0
  131. package/dist/components/flow/style.css +1 -0
  132. package/dist/components/flow-node/index.js +102 -0
  133. package/dist/components/form-button/index.js +34 -38
  134. package/dist/components/form-cascader/index.js +71 -81
  135. package/dist/components/form-checkbox-group/index.js +88 -113
  136. package/dist/components/form-checkbox-group/style.css +1 -51
  137. package/dist/components/form-date-picker/index.js +70 -132
  138. package/dist/components/form-group/index.js +122 -0
  139. package/dist/components/form-group/style.css +1 -0
  140. package/dist/components/form-holder/index.js +53 -39
  141. package/dist/components/form-input/index.js +56 -62
  142. package/dist/components/form-input-email/index.js +48 -60
  143. package/dist/components/form-input-id-card/index.js +53 -59
  144. package/dist/components/form-input-number/index.js +61 -68
  145. package/dist/components/form-input-number/style.css +1 -12
  146. package/dist/components/form-input-phone-number/index.js +49 -55
  147. package/dist/components/form-input-time/index.js +53 -59
  148. package/dist/components/form-item/index.js +80 -123
  149. package/dist/components/form-item/style.css +1 -11
  150. package/dist/components/form-item-config-provider/index.js +25 -26
  151. package/dist/components/form-item-group/index.js +85 -111
  152. package/dist/components/form-item-group/style.css +1 -30
  153. package/dist/components/form-radio-group/index.js +85 -104
  154. package/dist/components/form-radio-group/style.css +1 -53
  155. package/dist/components/form-select/index.js +76 -91
  156. package/dist/components/form-switch/index.js +51 -57
  157. package/dist/components/form-temp/index.js +149 -0
  158. package/dist/components/form-textarea/index.js +51 -57
  159. package/dist/components/form-view/index.js +165 -232
  160. package/dist/components/form-view/style.css +1 -158
  161. package/dist/components/fy-cascader/index.js +132 -0
  162. package/dist/components/fy-checkbox/index.js +116 -0
  163. package/dist/components/fy-checkbox/style.css +1 -0
  164. package/dist/components/fy-curd/index.js +846 -0
  165. package/dist/components/fy-curd/style.css +1 -0
  166. package/dist/components/fy-date/index.js +84 -0
  167. package/dist/components/fy-date/style.css +1 -0
  168. package/dist/components/fy-dialog-form/index.js +278 -0
  169. package/dist/components/fy-dialog-form/style.css +1 -0
  170. package/dist/components/fy-dynamic/index.js +335 -0
  171. package/dist/components/fy-dynamic/style.css +1 -0
  172. package/dist/components/fy-form/index.js +754 -0
  173. package/dist/components/fy-form/style.css +1 -0
  174. package/dist/components/fy-form-menu/index.js +95 -0
  175. package/dist/components/fy-input/index.js +162 -0
  176. package/dist/components/fy-input-color/index.js +96 -0
  177. package/dist/components/fy-input-icon/index.js +161 -0
  178. package/dist/components/fy-input-icon/style.css +1 -0
  179. package/dist/components/fy-input-map/index.js +275 -0
  180. package/dist/components/fy-input-map/style.css +1 -0
  181. package/dist/components/fy-input-number/index.js +87 -0
  182. package/dist/components/fy-input-table/index.js +172 -0
  183. package/dist/components/fy-input-table/style.css +1 -0
  184. package/dist/components/fy-input-tree/index.js +265 -0
  185. package/dist/components/fy-input-tree/style.css +1 -0
  186. package/dist/components/fy-radio/index.js +68 -0
  187. package/dist/components/fy-radio/style.css +1 -0
  188. package/dist/components/fy-rate/index.js +105 -0
  189. package/dist/components/fy-rate/style.css +1 -0
  190. package/dist/components/fy-select/index.js +223 -0
  191. package/dist/components/fy-select/style.css +1 -0
  192. package/dist/components/fy-slider/index.js +79 -0
  193. package/dist/components/fy-switch/index.js +73 -0
  194. package/dist/components/fy-time/index.js +95 -0
  195. package/dist/components/fy-title/index.js +40 -0
  196. package/dist/components/fy-title/style.css +1 -0
  197. package/dist/components/fy-upload/index.js +704 -0
  198. package/dist/components/fy-upload/style.css +1 -0
  199. package/dist/components/guide-steps/index.js +44 -58
  200. package/dist/components/guide-steps/style.css +1 -34
  201. package/dist/components/header-menu/index.js +238 -0
  202. package/dist/components/header-search/index.js +246 -0
  203. package/dist/components/icon-card/index.js +29 -35
  204. package/dist/components/icon-card/style.css +1 -56
  205. package/dist/components/icon-temp/index.js +50 -0
  206. package/dist/components/icon-temp/style.css +1 -0
  207. package/dist/components/iframe-window/index.js +29 -35
  208. package/dist/components/iframe-window/style.css +1 -20
  209. package/dist/components/image-viewer/index.js +48 -66
  210. package/dist/components/image-viewer/style.css +1 -21
  211. package/dist/components/input-number/index.js +127 -193
  212. package/dist/components/input-number/style.css +1 -15
  213. package/dist/components/input-number-range/index.js +45 -57
  214. package/dist/components/input-number-range/style.css +1 -12
  215. package/dist/components/j-s-x-component/index.js +4 -4
  216. package/dist/components/keep-view-alive/index.js +77 -120
  217. package/dist/components/keyboard/index.js +389 -0
  218. package/dist/components/keyboard/style.css +1 -0
  219. package/dist/components/license/index.js +134 -0
  220. package/dist/components/loading-view/index.js +26 -32
  221. package/dist/components/loading-view/style.css +1 -17
  222. package/dist/components/login/index.js +244 -0
  223. package/dist/components/login/style.css +1 -0
  224. package/dist/components/name-avatar/index.js +66 -0
  225. package/dist/components/name-avatar/style.css +1 -0
  226. package/dist/components/nav-bar/index.js +27 -37
  227. package/dist/components/nav-bar/style.css +1 -17
  228. package/dist/components/not-implement/index.js +23 -31
  229. package/dist/components/not-implement/style.css +1 -15
  230. package/dist/components/notice/index.js +143 -0
  231. package/dist/components/notice/style.css +1 -0
  232. package/dist/components/page/index.js +22 -28
  233. package/dist/components/page/style.css +1 -12
  234. package/dist/components/page-header/index.js +30 -36
  235. package/dist/components/page-header/style.css +1 -14
  236. package/dist/components/page-index/index.js +62 -83
  237. package/dist/components/page-index/style.css +1 -23
  238. package/dist/components/page-index-top/index.js +53 -68
  239. package/dist/components/page-skeleton/index.js +31 -37
  240. package/dist/components/page-skeleton/style.css +1 -23
  241. package/dist/components/page-skeleton-new/index.js +42 -48
  242. package/dist/components/page-skeleton-new/style.css +1 -42
  243. package/dist/components/pageable-table/index.js +190 -253
  244. package/dist/components/pageable-table/style.css +1 -72
  245. package/dist/components/pageable-view/index.js +134 -199
  246. package/dist/components/pageable-view/style.css +1 -69
  247. package/dist/components/photo-swipe/index.js +116 -151
  248. package/dist/components/photo-swipe/style.css +1 -20
  249. package/dist/components/progress/index.js +60 -0
  250. package/dist/components/queue/index.js +76 -0
  251. package/dist/components/record-video/index.js +173 -0
  252. package/dist/components/record-video/style.css +1 -0
  253. package/dist/components/resize-observer/index.js +34 -68
  254. package/dist/components/resize-observer/style.css +1 -31
  255. package/dist/components/search/index.js +142 -0
  256. package/dist/components/search/style.css +1 -0
  257. package/dist/components/search-popover/index.js +153 -211
  258. package/dist/components/search-popover/style.css +1 -93
  259. package/dist/components/sign/index.js +128 -0
  260. package/dist/components/sign/style.css +1 -0
  261. package/dist/components/sign-panel/index.js +105 -142
  262. package/dist/components/sign-panel/style.css +1 -97
  263. package/dist/components/skeleton/index.js +82 -0
  264. package/dist/components/skeleton/style.css +1 -0
  265. package/dist/components/split-pane/index.js +107 -162
  266. package/dist/components/split-pane/style.css +1 -100
  267. package/dist/components/stateful/index.js +31 -34
  268. package/dist/components/stateful/style.css +1 -33
  269. package/dist/components/static-pageable-table/index.js +37 -44
  270. package/dist/components/static-pageable-table/style.css +1 -9
  271. package/dist/components/swiper/index.js +85 -150
  272. package/dist/components/swiper/style.css +1 -43
  273. package/dist/components/tab/index.js +56 -72
  274. package/dist/components/tab/style.css +1 -122
  275. package/dist/components/tab-item/index.js +30 -35
  276. package/dist/components/table-column/index.js +30 -32
  277. package/dist/components/table-page/index.js +129 -0
  278. package/dist/components/table-view/index.js +156 -227
  279. package/dist/components/table-view/style.css +1 -95
  280. package/dist/components/tabs/index.js +90 -0
  281. package/dist/components/tabs/style.css +0 -0
  282. package/dist/components/tag-render/index.js +44 -58
  283. package/dist/components/tag-render/style.css +1 -33
  284. package/dist/components/text-ellipsis/index.js +107 -0
  285. package/dist/components/text-ellipsis/style.css +1 -0
  286. package/dist/components/tinymce-editor/index.js +79 -95
  287. package/dist/components/tinymce-editor/style.css +1 -43
  288. package/dist/components/tinymce-wrapper/index.js +92 -121
  289. package/dist/components/tinymce-wrapper/style.css +1 -36
  290. package/dist/components/toolbar/index.js +63 -84
  291. package/dist/components/toolbar/style.css +1 -39
  292. package/dist/components/toolbar-button/index.js +41 -48
  293. package/dist/components/toolbar-button/style.css +1 -21
  294. package/dist/components/tree/index.js +427 -0
  295. package/dist/components/tree/style.css +1 -0
  296. package/dist/components/trigger/index.js +29 -36
  297. package/dist/components/verify/index.js +80 -0
  298. package/dist/components/verify/style.css +1 -0
  299. package/dist/components/vue-tags-input/index.js +305 -311
  300. package/dist/components/vue-tags-input/style.css +1 -682
  301. package/dist/components/watermark/index.js +43 -37
  302. package/dist/components/watermark/style.css +1 -11
  303. package/dist/index.css +4157 -1686
  304. package/dist/index.es.js +23131 -11014
  305. package/package.json +20 -4
  306. package/web-types.json +12777 -2788
  307. package/dist/chunks/3d28cc08.js +0 -57
  308. package/dist/chunks/5d33812d.js +0 -147
  309. package/dist/chunks/9d848bf6.js +0 -99
  310. package/dist/chunks/a0bb327b.js +0 -96
  311. package/dist/chunks/a8891d2c.js +0 -30
  312. package/dist/chunks/c69d5628.js +0 -248
  313. package/dist/chunks/de9fe802.js +0 -24
  314. package/dist/components/x-dialog/index.js +0 -199
  315. package/dist/components/x-dialog/style.css +0 -15
@@ -1,297 +1,289 @@
1
1
  import { copy, isInContainer } from "@web-utils/core";
2
2
  import ClickOutside from "element-ui/lib/utils/clickoutside";
3
- import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
3
+ import { n as normalizeComponent } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
4
  var render = function() {
5
- var _vm = this;
6
- var _h = _vm.$createElement;
7
- var _c = _vm._self._c || _h;
8
- return _c("div", {
5
+ var t = this, r = t.$createElement, e = t._self._c || r;
6
+ return e("div", {
9
7
  directives: [{
10
8
  name: "show",
11
9
  rawName: "v-show",
12
- value: _vm.showPopover,
10
+ value: t.showPopover,
13
11
  expression: "showPopover"
14
12
  }, {
15
13
  name: "click-outside",
16
14
  rawName: "v-click-outside",
17
- value: _vm.hidePopover,
15
+ value: t.hidePopover,
18
16
  expression: "hidePopover"
19
17
  }],
20
18
  staticClass: "search-popover"
21
- }, [_c("div", {
19
+ }, [e("div", {
22
20
  staticStyle: {
23
- "padding": "10px"
21
+ padding: "10px"
24
22
  }
25
- }, [_c("input", {
23
+ }, [e("input", {
26
24
  directives: [{
27
25
  name: "model",
28
26
  rawName: "v-model",
29
- value: _vm.keyword,
27
+ value: t.keyword,
30
28
  expression: "keyword"
31
29
  }],
32
30
  ref: "searchInput",
33
31
  staticClass: "search-input",
34
32
  attrs: {
35
- "placeholder": _vm.currentItem ? _vm.currentItem.name : "输入关键字搜索 ..."
33
+ placeholder: t.currentItem ? t.currentItem.name : "输入关键字搜索 ..."
36
34
  },
37
35
  domProps: {
38
- "value": _vm.keyword
36
+ value: t.keyword
39
37
  },
40
38
  on: {
41
- "input": function($event) {
42
- if ($event.target.composing)
43
- return;
44
- _vm.keyword = $event.target.value;
39
+ input: function(s) {
40
+ s.target.composing || (t.keyword = s.target.value);
45
41
  }
46
42
  }
47
- })]), _c("ul", {
43
+ })]), e("ul", {
48
44
  ref: "ul",
49
45
  staticStyle: {
50
46
  "list-style-type": "none",
51
- "flex": "1",
52
- "overflow": "auto"
47
+ flex: "1",
48
+ overflow: "auto"
53
49
  }
54
- }, [_vm.filterList.length ? _vm._l(_vm.filterList, function(item, index) {
55
- return _c("li", {
56
- key: item.name + index,
50
+ }, [t.filterList.length ? t._l(t.filterList, function(s, o) {
51
+ return e("li", {
52
+ key: s.name + o,
57
53
  staticClass: "search-li",
58
54
  attrs: {
59
- "id": `item-${index}`
55
+ id: `item-${o}`
60
56
  },
61
57
  on: {
62
- "mousemove": function($event) {
63
- return _vm.mouseHoverItem(item, index);
58
+ mousemove: function(i) {
59
+ return t.mouseHoverItem(s, o);
64
60
  }
65
61
  }
66
- }, [_c("a", {
62
+ }, [e("a", {
67
63
  class: ["search-item", {
68
- active: _vm.currentIndex === index
64
+ active: t.currentIndex === o
69
65
  }],
70
66
  attrs: {
71
- "target": item.url ? "_blank" : "",
72
- "rel": "noopener noreferrer",
73
- "href": item.url ? item.url : "javascript:void(0)"
67
+ target: s.url ? "_blank" : "",
68
+ rel: "noopener noreferrer",
69
+ href: s.url ? s.url : "javascript:void(0)"
74
70
  },
75
71
  on: {
76
- "click": function($event) {
77
- return _vm.onItemClick(item);
72
+ click: function(i) {
73
+ return t.onItemClick(s);
78
74
  }
79
75
  }
80
- }, [_c("div", {
76
+ }, [e("div", {
81
77
  staticClass: "search-icon"
82
- }, [_c("i", {
83
- class: item.icon || "el-icon-menu"
84
- })]), _c("div", {
78
+ }, [e("i", {
79
+ class: s.icon || "el-icon-menu"
80
+ })]), e("div", {
85
81
  staticStyle: {
86
- "flex": "1",
82
+ flex: "1",
87
83
  "text-align": "left",
88
- "padding": "0 10px",
84
+ padding: "0 10px",
89
85
  "overflow-x": "hidden",
90
86
  "box-sizing": "border-box"
91
87
  }
92
- }, [_c("p", {
88
+ }, [e("p", {
93
89
  staticStyle: {
94
90
  "margin-bottom": "4px",
95
91
  "font-size": "16px"
96
92
  }
97
- }, [_vm._v(_vm._s(item.name))]), _c("p", {
93
+ }, [t._v(t._s(s.name))]), e("p", {
98
94
  staticClass: "url"
99
- }, [_vm._v(_vm._s(item.url || item.path))])]), _c("div", {
95
+ }, [t._v(t._s(s.url || s.path))])]), e("div", {
100
96
  staticClass: "search-icon search-action"
101
- }, [_c("svg", {
97
+ }, [e("svg", {
102
98
  staticClass: "action",
103
99
  attrs: {
104
- "width": "20",
105
- "height": "20",
106
- "viewBox": "0 0 20 20"
100
+ width: "20",
101
+ height: "20",
102
+ viewBox: "0 0 20 20"
107
103
  }
108
- }, [_c("g", {
104
+ }, [e("g", {
109
105
  attrs: {
110
- "stroke": "currentColor",
111
- "fill": "none",
106
+ stroke: "currentColor",
107
+ fill: "none",
112
108
  "fill-rule": "evenodd",
113
109
  "stroke-linecap": "round",
114
110
  "stroke-linejoin": "round"
115
111
  }
116
- }, [_c("path", {
112
+ }, [e("path", {
117
113
  attrs: {
118
- "d": "M18 3v4c0 2-2 4-4 4H2"
114
+ d: "M18 3v4c0 2-2 4-4 4H2"
119
115
  }
120
- }), _c("path", {
116
+ }), e("path", {
121
117
  attrs: {
122
- "d": "M8 17l-6-6 6-6"
118
+ d: "M8 17l-6-6 6-6"
123
119
  }
124
120
  })])])])])]);
125
- }) : _vm.evalResult !== "" ? _c("li", {
121
+ }) : t.evalResult !== "" ? e("li", {
126
122
  staticClass: "search-li",
127
123
  on: {
128
- "click": _vm.copyEvalResult,
129
- "mousemove": function($event) {
130
- return _vm.mouseHoverItem({}, -1);
124
+ click: t.copyEvalResult,
125
+ mousemove: function(s) {
126
+ return t.mouseHoverItem({}, -1);
131
127
  }
132
128
  }
133
- }, [_c("a", {
129
+ }, [e("a", {
134
130
  class: ["search-item", {
135
- active: _vm.currentIndex === -1
131
+ active: t.currentIndex === -1
136
132
  }],
137
133
  attrs: {
138
- "rel": "noopener noreferrer",
139
- "href": "javascript:void(0)"
134
+ rel: "noopener noreferrer",
135
+ href: "javascript:void(0)"
140
136
  }
141
- }, [_vm._m(0), _c("div", {
137
+ }, [t._m(0), e("div", {
142
138
  staticStyle: {
143
- "flex": "1",
139
+ flex: "1",
144
140
  "text-align": "left",
145
- "padding": "0 10px",
141
+ padding: "0 10px",
146
142
  "overflow-x": "hidden",
147
143
  "box-sizing": "border-box"
148
144
  }
149
- }, [_c("p", {
145
+ }, [e("p", {
150
146
  staticStyle: {
151
147
  "margin-bottom": "4px",
152
148
  "font-size": "16px"
153
149
  }
154
- }, [_vm._v("Result: " + _vm._s(_vm.evalResult))]), _c("p", {
150
+ }, [t._v("Result: " + t._s(t.evalResult))]), e("p", {
155
151
  staticClass: "url"
156
- }, [_vm._v("点击或这按 Enter 键复制")])]), _c("div", {
152
+ }, [t._v("点击或这按 Enter 键复制")])]), e("div", {
157
153
  staticClass: "search-icon search-action"
158
- }, [_c("svg", {
154
+ }, [e("svg", {
159
155
  staticClass: "action",
160
156
  attrs: {
161
- "width": "20",
162
- "height": "20",
163
- "viewBox": "0 0 20 20"
157
+ width: "20",
158
+ height: "20",
159
+ viewBox: "0 0 20 20"
164
160
  }
165
- }, [_c("g", {
161
+ }, [e("g", {
166
162
  attrs: {
167
- "stroke": "currentColor",
168
- "fill": "none",
163
+ stroke: "currentColor",
164
+ fill: "none",
169
165
  "fill-rule": "evenodd",
170
166
  "stroke-linecap": "round",
171
167
  "stroke-linejoin": "round"
172
168
  }
173
- }, [_c("path", {
169
+ }, [e("path", {
174
170
  attrs: {
175
- "d": "M18 3v4c0 2-2 4-4 4H2"
171
+ d: "M18 3v4c0 2-2 4-4 4H2"
176
172
  }
177
- }), _c("path", {
173
+ }), e("path", {
178
174
  attrs: {
179
- "d": "M8 17l-6-6 6-6"
175
+ d: "M8 17l-6-6 6-6"
180
176
  }
181
- })])])])])]) : _c("li", {
177
+ })])])])])]) : e("li", {
182
178
  staticStyle: {
183
- "height": "100%",
184
- "display": "flex",
179
+ height: "100%",
180
+ display: "flex",
185
181
  "align-items": "center",
186
182
  "justify-content": "center",
187
- "color": "#808080"
183
+ color: "#808080"
188
184
  }
189
- }, [_vm._v(" Sorry,no result ! ")])], 2), _c("div", {
185
+ }, [t._v(" Sorry,no result ! ")])], 2), e("div", {
190
186
  staticClass: "footer-tips"
191
- }, [_c("span", {
187
+ }, [e("span", {
192
188
  staticClass: "keyboard-key"
193
- }, [_c("svg", {
189
+ }, [e("svg", {
194
190
  attrs: {
195
- "width": "15",
196
- "height": "15"
191
+ width: "15",
192
+ height: "15"
197
193
  }
198
- }, [_c("g", {
194
+ }, [e("g", {
199
195
  attrs: {
200
- "fill": "none",
201
- "stroke": "currentColor",
196
+ fill: "none",
197
+ stroke: "currentColor",
202
198
  "stroke-linecap": "round",
203
199
  "stroke-linejoin": "round",
204
200
  "stroke-width": "1.2"
205
201
  }
206
- }, [_c("path", {
202
+ }, [e("path", {
207
203
  attrs: {
208
- "d": "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
204
+ d: "M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"
209
205
  }
210
- })])])]), _c("span", {
206
+ })])])]), e("span", {
211
207
  staticStyle: {
212
208
  "font-size": "12px",
213
209
  "margin-right": "20px"
214
210
  }
215
- }, [_vm._v("选择")]), _c("span", {
211
+ }, [t._v("选择")]), e("span", {
216
212
  staticClass: "keyboard-key"
217
- }, [_c("svg", {
213
+ }, [e("svg", {
218
214
  attrs: {
219
- "width": "15",
220
- "height": "15"
215
+ width: "15",
216
+ height: "15"
221
217
  }
222
- }, [_c("g", {
218
+ }, [e("g", {
223
219
  attrs: {
224
- "fill": "none",
225
- "stroke": "currentColor",
220
+ fill: "none",
221
+ stroke: "currentColor",
226
222
  "stroke-linecap": "round",
227
223
  "stroke-linejoin": "round",
228
224
  "stroke-width": "1.2"
229
225
  }
230
- }, [_c("path", {
226
+ }, [e("path", {
231
227
  attrs: {
232
- "d": "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
228
+ d: "M7.5 3.5v8M10.5 8.5l-3 3-3-3"
233
229
  }
234
- })])])]), _c("span", {
230
+ })])])]), e("span", {
235
231
  staticClass: "keyboard-key"
236
- }, [_c("svg", {
232
+ }, [e("svg", {
237
233
  attrs: {
238
- "width": "15",
239
- "height": "15"
234
+ width: "15",
235
+ height: "15"
240
236
  }
241
- }, [_c("g", {
237
+ }, [e("g", {
242
238
  attrs: {
243
- "fill": "none",
244
- "stroke": "currentColor",
239
+ fill: "none",
240
+ stroke: "currentColor",
245
241
  "stroke-linecap": "round",
246
242
  "stroke-linejoin": "round",
247
243
  "stroke-width": "1.2"
248
244
  }
249
- }, [_c("path", {
245
+ }, [e("path", {
250
246
  attrs: {
251
- "d": "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
247
+ d: "M7.5 11.5v-8M10.5 6.5l-3-3-3 3"
252
248
  }
253
- })])])]), _c("span", {
249
+ })])])]), e("span", {
254
250
  staticStyle: {
255
251
  "font-size": "12px",
256
252
  "margin-right": "20px"
257
253
  }
258
- }, [_vm._v("切换")]), _c("span", {
254
+ }, [t._v("切换")]), e("span", {
259
255
  staticClass: "keyboard-key"
260
- }, [_c("svg", {
256
+ }, [e("svg", {
261
257
  attrs: {
262
- "width": "15",
263
- "height": "15"
258
+ width: "15",
259
+ height: "15"
264
260
  }
265
- }, [_c("g", {
261
+ }, [e("g", {
266
262
  attrs: {
267
- "fill": "none",
268
- "stroke": "currentColor",
263
+ fill: "none",
264
+ stroke: "currentColor",
269
265
  "stroke-linecap": "round",
270
266
  "stroke-linejoin": "round",
271
267
  "stroke-width": "1.2"
272
268
  }
273
- }, [_c("path", {
269
+ }, [e("path", {
274
270
  attrs: {
275
- "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"
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"
276
272
  }
277
- })])])]), _c("span", {
273
+ })])])]), e("span", {
278
274
  staticStyle: {
279
275
  "font-size": "12px"
280
276
  }
281
- }, [_vm._v("关闭")])])]);
282
- };
283
- var staticRenderFns = [function() {
284
- var _vm = this;
285
- var _h = _vm.$createElement;
286
- var _c = _vm._self._c || _h;
287
- return _c("div", {
277
+ }, [t._v("关闭")])])]);
278
+ }, staticRenderFns = [function() {
279
+ var t = this, r = t.$createElement, e = t._self._c || r;
280
+ return e("div", {
288
281
  staticClass: "search-icon"
289
- }, [_c("i", {
282
+ }, [e("i", {
290
283
  staticClass: "fa fa-table"
291
284
  })]);
292
285
  }];
293
- const SearchPopover_vue_vue_type_style_index_0_lang = "";
294
- const __vue2_script = {
286
+ const SearchPopover_vue_vue_type_style_index_0_lang = "", __vue2_script = {
295
287
  name: "SearchPopover",
296
288
  directives: {
297
289
  ClickOutside
@@ -304,7 +296,7 @@ const __vue2_script = {
304
296
  },
305
297
  data() {
306
298
  return {
307
- showPopover: false,
299
+ showPopover: !1,
308
300
  keyword: "",
309
301
  currentIndex: 0,
310
302
  last: 0
@@ -312,33 +304,26 @@ const __vue2_script = {
312
304
  },
313
305
  computed: {
314
306
  filterList() {
315
- return this.services.filter((value) => value.name.indexOf(this.keyword) > -1);
307
+ return this.services.filter((t) => t.name.indexOf(this.keyword) > -1);
316
308
  },
317
309
  currentItem() {
318
- var _a;
319
- return (_a = this.filterList) == null ? void 0 : _a[this.currentIndex];
310
+ var t;
311
+ return (t = this.filterList) == null ? void 0 : t[this.currentIndex];
320
312
  },
321
313
  evalResult() {
322
314
  try {
323
315
  return eval(this.keyword);
324
- } catch (e) {
316
+ } catch (t) {
325
317
  return "";
326
318
  }
327
319
  }
328
320
  },
329
321
  watch: {
330
322
  keyword() {
331
- this.currentIndex = 0;
332
- if (!this.currentItem && this.currentIndex !== -1) {
333
- this.currentIndex = -1;
334
- }
323
+ this.currentIndex = 0, !this.currentItem && this.currentIndex !== -1 && (this.currentIndex = -1);
335
324
  },
336
- showPopover(newVal) {
337
- if (newVal) {
338
- document.body.style.overflow = "hidden";
339
- } else {
340
- document.body.style.overflow = "";
341
- }
325
+ showPopover(t) {
326
+ t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
342
327
  }
343
328
  },
344
329
  mounted() {
@@ -348,98 +333,55 @@ const __vue2_script = {
348
333
  window.removeEventListener("keydown", this.keydown);
349
334
  },
350
335
  methods: {
351
- async onItemClick(item) {
352
- if (item.path) {
353
- this.hidePopover();
354
- await this.$router.push(item.path);
355
- }
336
+ async onItemClick(t) {
337
+ t.path && (this.hidePopover(), await this.$router.push(t.path));
356
338
  },
357
339
  copyEvalResult() {
358
340
  return copy(this.evalResult);
359
341
  },
360
342
  hidePopover() {
361
- this.showPopover = false;
343
+ this.showPopover = !1;
362
344
  },
363
345
  displayPopover() {
364
- this.showPopover = true;
346
+ this.showPopover = !0;
365
347
  },
366
- mouseHoverItem(item, index) {
367
- this.currentIndex = index;
348
+ mouseHoverItem(t, r) {
349
+ this.currentIndex = r;
368
350
  },
369
- async keydown(event) {
370
- if (event.key === "Shift") {
371
- const cost = Date.now() - this.last;
372
- if (cost > 0 && cost < 500) {
373
- this.showPopover = true;
374
- await this.$nextTick();
375
- this.$refs.searchInput.focus();
376
- } else {
377
- this.last = Date.now();
378
- }
379
- }
380
- if (this.showPopover === true) {
381
- if (event.key === "Escape") {
382
- this.hidePopover();
383
- }
384
- if (event.key === "Enter") {
385
- if (this.currentItem) {
386
- if (this.currentItem.url) {
387
- window.open(this.currentItem.url, "_blank");
388
- this.hidePopover();
389
- } else if (this.currentItem.path) {
390
- await this.onItemClick(this.currentItem);
391
- }
392
- } else {
393
- this.copyEvalResult();
394
- }
395
- }
396
- if (event.key === "ArrowUp") {
397
- this.currentIndex--;
398
- if (this.currentIndex < 0) {
399
- this.currentIndex = this.filterList.length - 1;
400
- }
401
- this.scrollIntoView(this.currentIndex);
402
- }
403
- if (event.key === "ArrowDown") {
404
- this.currentIndex++;
405
- if (this.currentIndex >= this.filterList.length) {
406
- this.currentIndex = 0;
407
- }
408
- this.scrollIntoView(this.currentIndex);
409
- }
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();
410
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)));
411
357
  },
412
- scrollIntoView(index) {
413
- if (index === 0) {
358
+ scrollIntoView(t) {
359
+ if (t === 0) {
414
360
  this.$refs.ul.scrollTop = 0;
415
361
  return;
416
362
  }
417
- if (index === this.filterList.length) {
363
+ if (t === this.filterList.length) {
418
364
  this.$refs.ul.scrollTop = this.$refs.ul.scrollHeight;
419
365
  return;
420
366
  }
421
- const item = this.$refs.ul.querySelector(`#item-${index}`);
422
- if (!isInContainer(item, this.$refs.ul, { topOffset: -78, bottomOffset: 78 })) {
423
- this.$refs.ul.scrollTop = item.offsetTop - item.clientHeight + 20;
424
- }
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);
425
369
  }
426
370
  }
427
- };
428
- const __cssModules = {};
371
+ }, __cssModules = {};
429
372
  var __component__ = /* @__PURE__ */ normalizeComponent(
430
373
  __vue2_script,
431
374
  render,
432
375
  staticRenderFns,
433
- false,
376
+ !1,
434
377
  __vue2_injectStyles,
435
378
  null,
436
379
  null,
437
380
  null
438
381
  );
439
- function __vue2_injectStyles(context) {
440
- for (let o in __cssModules) {
441
- this[o] = __cssModules[o];
442
- }
382
+ function __vue2_injectStyles(t) {
383
+ for (let r in __cssModules)
384
+ this[r] = __cssModules[r];
443
385
  }
444
386
  const SearchPopover = /* @__PURE__ */ function() {
445
387
  return __component__.exports;