@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,93 +1 @@
1
- /* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
2
- /* 应用头部高度 */
3
- /* 页面宽度 */
4
- /* 侧栏宽度 */
5
- /* 标签高度 */
6
- /* 页面头部工具条高度 */
7
- .search-popover {
8
- border-radius: 4px;
9
- z-index: 100;
10
- position: fixed;
11
- overflow: hidden;
12
- background-color: #f5f6f7;
13
- display: inline-flex;
14
- flex-direction: column;
15
- border: 1px solid #1989fa;
16
- width: 560px;
17
- height: 500px;
18
- top: 0;
19
- left: 0;
20
- transform: translate3d(calc((100vw - 560px) / 2), 15%, 0);
21
- background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACZJREFUeNpi/PTpEwMY8PLyMsFZnz9/ZoKzgAzG////Q1hAABBgAFeiDto+NxIZAAAAAElFTkSuQmCC");
22
- background-repeat: repeat;
23
- }
24
- .search-popover .footer-tips {
25
- padding: 10px;
26
- text-align: left;
27
- border-top: 1px solid #1989fa;
28
- }
29
- .search-popover .keyboard-key {
30
- align-items: center;
31
- background: linear-gradient(-225deg, #d5dbe4, #f8f8f8);
32
- border-radius: 2px;
33
- box-shadow: inset 0 -2px 0 0 #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px rgba(30, 35, 90, 0.4);
34
- display: inline-flex;
35
- height: 18px;
36
- justify-content: center;
37
- margin-right: 0.4em;
38
- padding-bottom: 2px;
39
- width: 20px;
40
- }
41
- .search-popover .search-input {
42
- height: 46px;
43
- border: 1px solid #1989fa;
44
- appearance: none;
45
- border-radius: 4px;
46
- outline: none;
47
- width: 100%;
48
- box-sizing: border-box;
49
- padding: 10px;
50
- }
51
- .search-popover .search-li {
52
- padding: 10px;
53
- }
54
- .search-popover .search-icon {
55
- color: #969faf;
56
- flex-shrink: 0;
57
- font-size: 24px;
58
- }
59
- .search-popover .search-item {
60
- box-shadow: 0 1px 3px 0 #d4d9e1;
61
- text-decoration: none;
62
- box-sizing: border-box;
63
- color: #000;
64
- padding: 10px;
65
- display: flex;
66
- align-items: center;
67
- border-radius: 4px;
68
- background-color: #fff;
69
- overflow-x: hidden;
70
- }
71
- .search-popover .search-item .search-action {
72
- display: none;
73
- }
74
- .search-popover .search-item .url {
75
- color: #969faf;
76
- text-overflow: ellipsis;
77
- white-space: nowrap;
78
- font-size: 14px;
79
- overflow-x: hidden;
80
- }
81
- .search-popover .search-item.active {
82
- color: #fff;
83
- background-color: #1989fa;
84
- }
85
- .search-popover .search-item.active .url {
86
- color: #fff;
87
- }
88
- .search-popover .search-item.active .search-action {
89
- display: inline-block;
90
- }
91
- .search-popover .search-item.active .search-icon {
92
- color: #fff;
93
- }
1
+ .search-popover{border-radius:4px;z-index:100;position:fixed;overflow:hidden;background-color:#f5f6f7;display:inline-flex;flex-direction:column;border:1px solid #1989fa;width:560px;height:500px;top:0;left:0;transform:translate3d(calc((100vw - 560px)/2),15%,0);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACZJREFUeNpi/PTpEwMY8PLyMsFZnz9/ZoKzgAzG////Q1hAABBgAFeiDto+NxIZAAAAAElFTkSuQmCC);background-repeat:repeat}.search-popover .footer-tips{padding:10px;text-align:left;border-top:1px solid #1989fa}.search-popover .keyboard-key{align-items:center;background:linear-gradient(-225deg,#d5dbe4,#f8f8f8);border-radius:2px;box-shadow:inset 0 -2px #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;display:inline-flex;height:18px;justify-content:center;margin-right:.4em;padding-bottom:2px;width:20px}.search-popover .search-input{height:46px;border:1px solid #1989fa;appearance:none;border-radius:4px;outline:none;width:100%;box-sizing:border-box;padding:10px}.search-popover .search-li{padding:10px}.search-popover .search-icon{color:#969faf;flex-shrink:0;font-size:24px}.search-popover .search-item{box-shadow:0 1px 3px #d4d9e1;text-decoration:none;box-sizing:border-box;color:#000;padding:10px;display:flex;align-items:center;border-radius:4px;background-color:#fff;overflow-x:hidden}.search-popover .search-item .search-action{display:none}.search-popover .search-item .url{color:#969faf;text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow-x:hidden}.search-popover .search-item.active{color:#fff;background-color:#1989fa}.search-popover .search-item.active .url{color:#fff}.search-popover .search-item.active .search-action{display:inline-block}.search-popover .search-item.active .search-icon{color:#fff}
@@ -0,0 +1,128 @@
1
+ import { s as g } from "../../chunks/util.5053d54e.js";
2
+ import { n as p } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
3
+ var m = function() {
4
+ var e = this, a = e.$createElement, n = e._self._c || a;
5
+ return n("div", {
6
+ staticClass: "avue-sige"
7
+ }, [n("canvas", {
8
+ ref: "canvas",
9
+ staticClass: "avue-sige__canvas",
10
+ attrs: {
11
+ width: e.width,
12
+ height: e.height
13
+ }
14
+ })]);
15
+ }, x = [];
16
+ function _(e, a, n, o, t, l) {
17
+ e.save(), e.fillStyle = t, e.translate(a, n), e.rotate(Math.PI + l), e.beginPath();
18
+ for (var i = Math.sin(0), v = Math.cos(0), c = Math.PI / 5 * 4, h = 0; h < 5; h++) {
19
+ var i = Math.sin(h * c), v = Math.cos(h * c);
20
+ e.lineTo(i * o, v * o);
21
+ }
22
+ e.closePath(), e.stroke(), e.fill(), e.restore();
23
+ }
24
+ const w = {
25
+ name: "Sign",
26
+ props: {
27
+ width: {
28
+ type: Number,
29
+ default: 600
30
+ },
31
+ height: {
32
+ type: Number,
33
+ default: 400
34
+ }
35
+ },
36
+ data() {
37
+ return {
38
+ disabled: !1,
39
+ linex: [],
40
+ liney: [],
41
+ linen: [],
42
+ canvas: {},
43
+ context: {}
44
+ };
45
+ },
46
+ computed: {
47
+ styleName() {
48
+ return {
49
+ width: g(this.width),
50
+ height: g(this.height)
51
+ };
52
+ }
53
+ },
54
+ mounted() {
55
+ this.init();
56
+ },
57
+ methods: {
58
+ getStar(e, a, n) {
59
+ var o = this.canvas, t = this.context, l = o.width / 2, i = o.height / 2;
60
+ t.lineWidth = 7, t.strokeStyle = "#f00", t.beginPath(), t.arc(l, i, 110, 0, Math.PI * 2), t.stroke(), _(t, l, i, 20, "#f00", 0), t.font = "18px 黑体", t.textBaseline = "middle", t.textAlign = "center", t.lineWidth = 1, t.strokeStyle = "#f00", t.strokeText(e, l, i + 50), t.font = "14px 黑体", t.textBaseline = "middle", t.textAlign = "center", t.lineWidth = 1, t.strokeStyle = "#f00", t.strokeText(n, l, i + 80), t.translate(l, i), t.font = "22px 黑体";
61
+ for (var v = a.length, c = 4 * Math.PI / (3 * (v - 1)), h = a.split(""), r, s = 0; s < v; s++)
62
+ r = h[s], s == 0 ? t.rotate(5 * Math.PI / 6) : t.rotate(c), t.save(), t.translate(90, 0), t.rotate(Math.PI / 2), t.strokeText(r, 0, 0), t.restore(), t.save();
63
+ this.disabled = !0;
64
+ },
65
+ submit(e, a) {
66
+ return e || (e = this.width), a || (a = this.height), this.canvas.toDataURL("i/png");
67
+ },
68
+ clear() {
69
+ this.linex = new Array(), this.liney = new Array(), this.linen = new Array(), this.disabled = !1, this.canvas.width = this.canvas.width;
70
+ },
71
+ init() {
72
+ this.canvas = this.$refs.canvas;
73
+ var e = this.canvas, a = this;
74
+ typeof document.ontouchstart < "u" ? (e.addEventListener("touchmove", v, !1), e.addEventListener("touchstart", c, !1), e.addEventListener("touchend", h, !1)) : (e.addEventListener("mousemove", v, !1), e.addEventListener("mousedown", c, !1), e.addEventListener("mouseup", h, !1), e.addEventListener("mouseleave", h, !1)), this.context = e.getContext("2d");
75
+ var n = this.context;
76
+ this.linex = new Array(), this.liney = new Array(), this.linen = new Array();
77
+ var o = 1, t = 30, l = 0;
78
+ function i(r, s) {
79
+ var u = r.getBoundingClientRect(), d, f;
80
+ return s.targetTouches ? (d = s.targetTouches[0].clientX, f = s.targetTouches[0].clientY) : (d = s.clientX, f = s.clientY), {
81
+ x: (d - u.left) * (r.width / u.width),
82
+ y: (f - u.top) * (r.height / u.height)
83
+ };
84
+ }
85
+ function v(r) {
86
+ if (!a.disabled) {
87
+ var s = i(e, r).x, u = i(e, r).y;
88
+ if (l == 1) {
89
+ a.linex.push(s), a.liney.push(u), a.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;
90
+ for (var d = 1; d < a.linex.length; d++)
91
+ o = a.linex[d], t = a.liney[d], a.linen[d] == 0 ? n.moveTo(o, t) : n.lineTo(o, t);
92
+ n.shadowBlur = 10, n.stroke(), n.restore();
93
+ }
94
+ r.preventDefault();
95
+ }
96
+ }
97
+ function c(r) {
98
+ if (!a.disabled) {
99
+ var s = i(e, r).x, u = i(e, r).y;
100
+ l = 1, a.linex.push(s), a.liney.push(u), a.linen.push(0);
101
+ }
102
+ }
103
+ function h() {
104
+ a.disabled || (l = 0);
105
+ }
106
+ }
107
+ }
108
+ }, y = {};
109
+ var M = /* @__PURE__ */ p(
110
+ w,
111
+ m,
112
+ x,
113
+ !1,
114
+ b,
115
+ null,
116
+ null,
117
+ null
118
+ );
119
+ function b(e) {
120
+ for (let a in y)
121
+ this[a] = y[a];
122
+ }
123
+ const S = /* @__PURE__ */ function() {
124
+ return M.exports;
125
+ }();
126
+ export {
127
+ S as default
128
+ };
@@ -0,0 +1 @@
1
+ .avue-sign{padding:5px}.avue-sign__canvas{border:1px solid #ccc}
@@ -1,132 +1,123 @@
1
- import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
2
- var render = function() {
3
- var _vm = this;
4
- var _h = _vm.$createElement;
5
- var _c = _vm._self._c || _h;
6
- return _c("div", {
1
+ import { n } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
2
+ var o = function() {
3
+ var t = this, e = t.$createElement, i = t._self._c || e;
4
+ return i("div", {
7
5
  staticClass: "sign-panel flex-column"
8
- }, [_c("div", {
6
+ }, [i("div", {
9
7
  directives: [{
10
8
  name: "show",
11
9
  rawName: "v-show",
12
- value: !_vm.disabled && _vm.edit,
10
+ value: !t.disabled && t.edit,
13
11
  expression: "!disabled && edit"
14
12
  }],
15
13
  staticClass: "sign-edit"
16
- }, [_c("div", {
14
+ }, [i("div", {
17
15
  staticClass: "sign-draw-area",
18
16
  style: {
19
- width: `${_vm.width + 2}px`,
20
- height: `${_vm.height + 2}px`
17
+ width: `${t.width + 2}px`,
18
+ height: `${t.height + 2}px`
21
19
  }
22
- }, [_c("div", {
20
+ }, [i("div", {
23
21
  staticClass: "sign-watermark",
24
22
  style: {
25
- fontSize: `${_vm.fontSize}px`
23
+ fontSize: `${t.fontSize}px`
26
24
  }
27
- }, [_vm._v(" " + _vm._s(_vm.text) + " ")]), _c("canvas", {
25
+ }, [t._v(" " + t._s(t.text) + " ")]), i("canvas", {
28
26
  ref: "canvas",
29
27
  staticClass: "sign-canvas",
30
28
  attrs: {
31
- "width": _vm.width,
32
- "height": _vm.height
29
+ width: t.width,
30
+ height: t.height
33
31
  },
34
32
  on: {
35
- "touchstart": function($event) {
36
- $event.stopPropagation();
37
- return _vm.touchstart.apply(null, arguments);
33
+ touchstart: function(s) {
34
+ return s.stopPropagation(), t.touchstart.apply(null, arguments);
38
35
  },
39
- "touchmove": function($event) {
40
- $event.stopPropagation();
41
- return _vm.touchmove.apply(null, arguments);
36
+ touchmove: function(s) {
37
+ return s.stopPropagation(), t.touchmove.apply(null, arguments);
42
38
  },
43
- "mousedown": function($event) {
44
- $event.stopPropagation();
45
- return _vm.down.apply(null, arguments);
39
+ mousedown: function(s) {
40
+ return s.stopPropagation(), t.down.apply(null, arguments);
46
41
  },
47
- "touchend": function($event) {
48
- $event.stopPropagation();
49
- return _vm.touchend.apply(null, arguments);
42
+ touchend: function(s) {
43
+ return s.stopPropagation(), t.touchend.apply(null, arguments);
50
44
  },
51
- "mouseup": function($event) {
52
- $event.stopPropagation();
53
- return _vm.up.apply(null, arguments);
45
+ mouseup: function(s) {
46
+ return s.stopPropagation(), t.up.apply(null, arguments);
54
47
  }
55
48
  }
56
- }, [_vm._v("当前浏览器不支持手写签名 ")])]), _c("div", {
49
+ }, [t._v("当前浏览器不支持手写签名 ")])]), i("div", {
57
50
  staticClass: "sign-tool-bar"
58
- }, [_c("div", {
51
+ }, [i("div", {
59
52
  staticClass: "sign-button flex-item",
60
53
  staticStyle: {
61
- "color": "red"
54
+ color: "red"
62
55
  },
63
56
  on: {
64
- "click": _vm.clear
57
+ click: t.clear
65
58
  }
66
- }, [_c("i", {
59
+ }, [i("i", {
67
60
  staticClass: "fa fa-trash"
68
- }), _vm._v(" 清除 ")]), _c("div", {
61
+ }), t._v(" 清除 ")]), i("div", {
69
62
  staticClass: "sign-button flex-item",
70
63
  staticStyle: {
71
- "color": "red"
64
+ color: "red"
72
65
  },
73
66
  on: {
74
- "click": _vm.cancel
67
+ click: t.cancel
75
68
  }
76
- }, [_c("i", {
69
+ }, [i("i", {
77
70
  staticClass: "fa fa-close"
78
- }), _vm._v(" 取消 ")]), _c("div", {
71
+ }), t._v(" 取消 ")]), i("div", {
79
72
  staticClass: "sign-button flex-item",
80
73
  staticStyle: {
81
- "color": "orange"
74
+ color: "orange"
82
75
  },
83
76
  on: {
84
- "click": _vm.rollback
77
+ click: t.rollback
85
78
  }
86
- }, [_c("i", {
79
+ }, [i("i", {
87
80
  staticClass: "fa fa-repeat"
88
- }), _vm._v(" 撤销 ")]), _c("div", {
81
+ }), t._v(" 撤销 ")]), i("div", {
89
82
  staticClass: "sign-button flex-item",
90
83
  staticStyle: {
91
- "color": "green"
84
+ color: "green"
92
85
  },
93
86
  on: {
94
- "click": _vm.save
87
+ click: t.save
95
88
  }
96
- }, [_c("i", {
89
+ }, [i("i", {
97
90
  staticClass: "fa fa-check"
98
- }), _vm._v(" 确定 ")])])]), _c("div", {
91
+ }), t._v(" 确定 ")])])]), i("div", {
99
92
  directives: [{
100
93
  name: "show",
101
94
  rawName: "v-show",
102
- value: _vm.disabled || !_vm.edit,
95
+ value: t.disabled || !t.edit,
103
96
  expression: "disabled || !edit"
104
97
  }],
105
98
  staticClass: "sign-view",
106
99
  style: {
107
- cursor: _vm.disabled ? "not-allowed" : "pointer"
100
+ cursor: t.disabled ? "not-allowed" : "pointer"
108
101
  },
109
102
  on: {
110
- "click": _vm.showSign
103
+ click: t.showSign
111
104
  }
112
- }, [_vm.value ? _c("img", {
105
+ }, [t.value ? i("img", {
113
106
  staticClass: "sign-image",
114
107
  attrs: {
115
- "src": _vm.value,
116
- "alt": "签名"
108
+ src: t.value,
109
+ alt: "签名"
117
110
  }
118
- }) : _vm._e(), !_vm.value ? _c("p", {
111
+ }) : t._e(), t.value ? t._e() : i("p", {
119
112
  staticClass: "sign-tips",
120
113
  style: {
121
- color: !_vm.value && _vm.disabled ? "red" : ""
114
+ color: !t.value && t.disabled ? "red" : ""
122
115
  }
123
- }, [_vm._v(" " + _vm._s(_vm.disabled ? "未签名" : "点击进行签名") + " ")]) : _vm._e(), !_vm.disabled ? _c("i", {
116
+ }, [t._v(" " + t._s(t.disabled ? "未签名" : "点击进行签名") + " ")]), t.disabled ? t._e() : i("i", {
124
117
  staticClass: "el-icon-edit-outline sign-edit-icon"
125
- }) : _vm._e()])]);
126
- };
127
- var staticRenderFns = [];
128
- const SignPanel_vue_vue_type_style_index_0_lang = "";
129
- const __vue2_script = {
118
+ })])]);
119
+ }, l = [];
120
+ const c = {
130
121
  name: "SignPanel",
131
122
  props: {
132
123
  width: {
@@ -156,17 +147,16 @@ const __vue2_script = {
156
147
  },
157
148
  data() {
158
149
  return {
159
- edit: false
150
+ edit: !1
160
151
  };
161
152
  },
162
153
  mounted() {
163
154
  this.init();
164
155
  },
165
156
  methods: {
157
+ // 初始化
166
158
  init() {
167
- this.stack = [];
168
- this.canvas = this.$refs.canvas;
169
- if (!this.canvas.getContext) {
159
+ if (this.stack = [], this.canvas = this.$refs.canvas, !this.canvas.getContext) {
170
160
  alert("当前浏览器不支持手写签名");
171
161
  return;
172
162
  }
@@ -174,75 +164,59 @@ const __vue2_script = {
174
164
  },
175
165
  rollback() {
176
166
  if (this.stack.length > 0) {
177
- const restorePoint = this.stack[this.stack.length - 1];
178
- this.ctx.putImageData(restorePoint, 0, 0);
179
- this.stack.length = this.stack.length - 1;
167
+ const t = this.stack[this.stack.length - 1];
168
+ this.ctx.putImageData(t, 0, 0), this.stack.length = this.stack.length - 1;
180
169
  }
181
170
  },
171
+ // 位置初始化
182
172
  position() {
183
173
  this.restorePoint = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);
184
- const rect = this.canvas.getBoundingClientRect();
185
- this.start = rect.left;
186
- this.end = rect.top;
174
+ const t = this.canvas.getBoundingClientRect();
175
+ this.start = t.left, this.end = t.top;
187
176
  },
177
+ // 画布初始化
188
178
  canvasInit() {
189
- this.ctx = this.canvas.getContext("2d");
190
- this.ctx.lineCap = "round";
191
- this.ctx.lineWidth = this.lineWidth;
192
- this.ctx.clearRect(0, 0, this.width, this.height);
193
- this.blank = this.canvas.toDataURL("image/png");
179
+ 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");
194
180
  },
181
+ /**
182
+ * 绘制水印
183
+ */
195
184
  drawWaterMark() {
196
- this.ctx.font = `${this.fontSize}px bold 黑体`;
197
- this.ctx.fillStyle = "#eee";
198
- this.ctx.textAlign = "center";
199
- this.ctx.shadowBlur = 1;
200
- this.ctx.textBaseline = "middle";
201
- this.ctx.fillText(this.text, this.width / 2, this.height / 2);
185
+ this.ctx.font = `${this.fontSize}px bold 黑体`, 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);
202
186
  },
203
- down(e) {
204
- this.position();
205
- this.startLine(e.clientX, e.clientY, e);
206
- this.target = e.target;
207
- this.target.addEventListener("mousemove", this.move);
208
- window.addEventListener("mouseup", this.up);
187
+ // PC 端鼠标按下开始绘画
188
+ down(t) {
189
+ this.position(), this.startLine(t.clientX, t.clientY, t), this.target = t.target, this.target.addEventListener("mousemove", this.move), window.addEventListener("mouseup", this.up);
209
190
  },
210
- move(e) {
211
- this.moveLine(e.clientX, e.clientY, e);
191
+ // PC 端鼠标按下开始绘画后,跟踪移动轨迹
192
+ move(t) {
193
+ this.moveLine(t.clientX, t.clientY, t);
212
194
  },
195
+ // PC 端鼠标松开结束绘画
213
196
  up() {
214
- if (this.target) {
215
- this.target.removeEventListener("mousemove", this.move);
216
- }
217
- window.removeEventListener("mouseup", this.up);
218
- this.record();
197
+ this.target && this.target.removeEventListener("mousemove", this.move), window.removeEventListener("mouseup", this.up), this.record();
219
198
  },
220
- touchstart(e) {
221
- this.position();
222
- this.startLine(e.changedTouches[0].clientX, e.changedTouches[0].clientY, e);
199
+ // 移动端触摸开始绘画
200
+ touchstart(t) {
201
+ this.position(), this.startLine(t.changedTouches[0].clientX, t.changedTouches[0].clientY, t);
223
202
  },
224
- touchmove(e) {
225
- this.moveLine(e.touches[0].clientX, e.touches[0].clientY, e);
203
+ // 移动端触摸开始绘画后,跟踪滑动轨迹
204
+ touchmove(t) {
205
+ this.moveLine(t.touches[0].clientX, t.touches[0].clientY, t);
226
206
  },
227
- startLine(x, y) {
228
- this.ctx.beginPath();
229
- x -= this.start;
230
- y -= this.end;
231
- this.ctx.moveTo(x, y);
207
+ // 开始绘画
208
+ startLine(t, e) {
209
+ this.ctx.beginPath(), t -= this.start, e -= this.end, this.ctx.moveTo(t, e);
232
210
  },
233
- moveLine(x, y, event) {
234
- event && event.preventDefault();
235
- x -= this.start;
236
- y -= this.end;
237
- this.ctx.lineTo(x, y);
238
- this.ctx.stroke();
211
+ // 绘制移动轨迹
212
+ moveLine(t, e, i) {
213
+ i && i.preventDefault(), t -= this.start, e -= this.end, this.ctx.lineTo(t, e), this.ctx.stroke();
239
214
  },
240
215
  clear() {
241
216
  this.ctx.clearRect(0, 0, this.width, this.height);
242
217
  },
243
218
  cancel() {
244
- this.clear();
245
- this.edit = false;
219
+ this.clear(), this.edit = !1;
246
220
  },
247
221
  touchend() {
248
222
  this.record();
@@ -251,42 +225,31 @@ const __vue2_script = {
251
225
  this.stack.push(this.restorePoint);
252
226
  },
253
227
  save() {
254
- const dataURL = this.canvas.toDataURL("image/png");
255
- if (this.blank === dataURL) {
256
- this.$emit("input", "");
257
- } else {
258
- this.$emit("input", dataURL);
259
- }
260
- this.edit = false;
261
- this.stack.length = 0;
262
- this.ctx.clearRect(0, 0, this.width, this.height);
228
+ const t = this.canvas.toDataURL("image/png");
229
+ 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);
263
230
  },
264
231
  showSign() {
265
- if (!this.disabled) {
266
- this.edit = true;
267
- }
232
+ this.disabled || (this.edit = !0);
268
233
  }
269
234
  }
270
- };
271
- const __cssModules = {};
272
- var __component__ = /* @__PURE__ */ normalizeComponent(
273
- __vue2_script,
274
- render,
275
- staticRenderFns,
276
- false,
277
- __vue2_injectStyles,
235
+ }, a = {};
236
+ var h = /* @__PURE__ */ n(
237
+ c,
238
+ o,
239
+ l,
240
+ !1,
241
+ r,
278
242
  null,
279
243
  null,
280
244
  null
281
245
  );
282
- function __vue2_injectStyles(context) {
283
- for (let o in __cssModules) {
284
- this[o] = __cssModules[o];
285
- }
246
+ function r(t) {
247
+ for (let e in a)
248
+ this[e] = a[e];
286
249
  }
287
- const SignPanel = /* @__PURE__ */ function() {
288
- return __component__.exports;
250
+ const u = /* @__PURE__ */ function() {
251
+ return h.exports;
289
252
  }();
290
253
  export {
291
- SignPanel as default
254
+ u as default
292
255
  };