fast-element-plus 1.0.0-alpha.0 → 1.0.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 (269) hide show
  1. package/package.json +24 -121
  2. package/Fast.png +0 -0
  3. package/LICENSE +0 -201
  4. package/README.md +0 -158
  5. package/README.zh.md +0 -158
  6. package/dist/index.iife.js +0 -2
  7. package/dist/index.iife.js.map +0 -1
  8. package/dist/index.umd.js +0 -2
  9. package/dist/index.umd.js.map +0 -1
  10. package/es/components/icon/index.d.ts +0 -20
  11. package/es/components/icon/index.mjs +0 -9
  12. package/es/components/icon/index.mjs.map +0 -1
  13. package/es/components/icon/src/icon.d.ts +0 -61
  14. package/es/components/icon/src/icon.mjs +0 -81
  15. package/es/components/icon/src/icon.mjs.map +0 -1
  16. package/es/components/index.d.ts +0 -1
  17. package/es/components/index.mjs +0 -5
  18. package/es/components/index.mjs.map +0 -1
  19. package/es/constants/index.d.ts +0 -2
  20. package/es/constants/index.mjs +0 -7
  21. package/es/constants/index.mjs.map +0 -1
  22. package/es/constants/mime.d.ts +0 -61
  23. package/es/constants/mime.mjs +0 -62
  24. package/es/constants/mime.mjs.map +0 -1
  25. package/es/constants/regex.d.ts +0 -78
  26. package/es/constants/regex.mjs +0 -79
  27. package/es/constants/regex.mjs.map +0 -1
  28. package/es/directives/clickCopy/index.d.ts +0 -2
  29. package/es/directives/clickCopy/index.mjs +0 -39
  30. package/es/directives/clickCopy/index.mjs.map +0 -1
  31. package/es/directives/clickDebounce/index.d.ts +0 -2
  32. package/es/directives/clickDebounce/index.mjs +0 -21
  33. package/es/directives/clickDebounce/index.mjs.map +0 -1
  34. package/es/directives/clickDraggable/index.d.ts +0 -2
  35. package/es/directives/clickDraggable/index.mjs +0 -39
  36. package/es/directives/clickDraggable/index.mjs.map +0 -1
  37. package/es/directives/clickIconCopy/index.d.ts +0 -2
  38. package/es/directives/clickIconCopy/index.mjs +0 -57
  39. package/es/directives/clickIconCopy/index.mjs.map +0 -1
  40. package/es/directives/clickLongpress/index.d.ts +0 -2
  41. package/es/directives/clickLongpress/index.mjs +0 -43
  42. package/es/directives/clickLongpress/index.mjs.map +0 -1
  43. package/es/directives/clickThrottle/index.d.ts +0 -2
  44. package/es/directives/clickThrottle/index.mjs +0 -32
  45. package/es/directives/clickThrottle/index.mjs.map +0 -1
  46. package/es/directives/index.d.ts +0 -6
  47. package/es/directives/index.mjs +0 -15
  48. package/es/directives/index.mjs.map +0 -1
  49. package/es/fast-element-plus/component.d.ts +0 -3
  50. package/es/fast-element-plus/component.mjs +0 -6
  51. package/es/fast-element-plus/component.mjs.map +0 -1
  52. package/es/fast-element-plus/directive.d.ts +0 -2
  53. package/es/fast-element-plus/directive.mjs +0 -11
  54. package/es/fast-element-plus/directive.mjs.map +0 -1
  55. package/es/fast-element-plus/element-plus.d.ts +0 -2
  56. package/es/fast-element-plus/element-plus.mjs +0 -113
  57. package/es/fast-element-plus/element-plus.mjs.map +0 -1
  58. package/es/fast-element-plus/fast-element-plus.d.ts +0 -3
  59. package/es/fast-element-plus/fast-element-plus.mjs +0 -12
  60. package/es/fast-element-plus/fast-element-plus.mjs.map +0 -1
  61. package/es/fast-element-plus/make-installer.d.ts +0 -7
  62. package/es/fast-element-plus/make-installer.mjs +0 -30
  63. package/es/fast-element-plus/make-installer.mjs.map +0 -1
  64. package/es/fast-element-plus/version.d.ts +0 -4
  65. package/es/fast-element-plus/version.mjs +0 -5
  66. package/es/fast-element-plus/version.mjs.map +0 -1
  67. package/es/hooks/index.d.ts +0 -2
  68. package/es/hooks/index.mjs +0 -7
  69. package/es/hooks/index.mjs.map +0 -1
  70. package/es/hooks/useLoading/index.d.ts +0 -4
  71. package/es/hooks/useLoading/index.mjs +0 -35
  72. package/es/hooks/useLoading/index.mjs.map +0 -1
  73. package/es/hooks/useOverlay/index.d.ts +0 -4
  74. package/es/hooks/useOverlay/index.mjs +0 -27
  75. package/es/hooks/useOverlay/index.mjs.map +0 -1
  76. package/es/hooks/useScreenFull/index.d.ts +0 -0
  77. package/es/index.d.ts +0 -16
  78. package/es/index.es.d.ts +0 -6
  79. package/es/index.mjs +0 -82
  80. package/es/index.mjs.map +0 -1
  81. package/es/settings/index.d.ts +0 -79
  82. package/es/settings/index.mjs +0 -35
  83. package/es/settings/index.mjs.map +0 -1
  84. package/es/stores/index.d.ts +0 -4
  85. package/es/stores/index.mjs +0 -7
  86. package/es/stores/index.mjs.map +0 -1
  87. package/es/utils/base64.d.ts +0 -10
  88. package/es/utils/base64.mjs +0 -106
  89. package/es/utils/base64.mjs.map +0 -1
  90. package/es/utils/click.d.ts +0 -14
  91. package/es/utils/click.mjs +0 -35
  92. package/es/utils/click.mjs.map +0 -1
  93. package/es/utils/color.d.ts +0 -31
  94. package/es/utils/color.mjs +0 -73
  95. package/es/utils/color.mjs.map +0 -1
  96. package/es/utils/console.d.ts +0 -21
  97. package/es/utils/console.mjs +0 -19
  98. package/es/utils/console.mjs.map +0 -1
  99. package/es/utils/deviceId.d.ts +0 -9
  100. package/es/utils/deviceId.mjs +0 -27
  101. package/es/utils/deviceId.mjs.map +0 -1
  102. package/es/utils/errorHandler.d.ts +0 -4
  103. package/es/utils/errorHandler.mjs +0 -42
  104. package/es/utils/errorHandler.mjs.map +0 -1
  105. package/es/utils/form.d.ts +0 -78
  106. package/es/utils/form.mjs +0 -218
  107. package/es/utils/form.mjs.map +0 -1
  108. package/es/utils/index.d.ts +0 -10
  109. package/es/utils/index.mjs +0 -29
  110. package/es/utils/index.mjs.map +0 -1
  111. package/es/utils/storage.d.ts +0 -79
  112. package/es/utils/storage.mjs +0 -219
  113. package/es/utils/storage.mjs.map +0 -1
  114. package/es/utils/string.d.ts +0 -33
  115. package/es/utils/string.mjs +0 -119
  116. package/es/utils/string.mjs.map +0 -1
  117. package/es/utils/vue/func.d.ts +0 -7
  118. package/es/utils/vue/func.mjs +0 -17
  119. package/es/utils/vue/func.mjs.map +0 -1
  120. package/es/utils/vue/index.d.ts +0 -6
  121. package/es/utils/vue/index.mjs +0 -17
  122. package/es/utils/vue/index.mjs.map +0 -1
  123. package/es/utils/vue/install.d.ts +0 -5
  124. package/es/utils/vue/install.mjs +0 -31
  125. package/es/utils/vue/install.mjs.map +0 -1
  126. package/es/utils/vue/props.d.ts +0 -10
  127. package/es/utils/vue/props.mjs +0 -14
  128. package/es/utils/vue/props.mjs.map +0 -1
  129. package/es/utils/vue/slots.d.ts +0 -11
  130. package/es/utils/vue/slots.mjs +0 -7
  131. package/es/utils/vue/slots.mjs.map +0 -1
  132. package/es/utils/vue/useRender.d.ts +0 -7
  133. package/es/utils/vue/useRender.mjs +0 -12
  134. package/es/utils/vue/useRender.mjs.map +0 -1
  135. package/es/utils/vue/with.d.ts +0 -6
  136. package/es/utils/vue/with.mjs +0 -7
  137. package/es/utils/vue/with.mjs.map +0 -1
  138. package/global.d.ts +0 -3
  139. package/lib/components/icon/index.d.ts +0 -20
  140. package/lib/components/icon/index.js +0 -2
  141. package/lib/components/icon/index.js.map +0 -1
  142. package/lib/components/icon/src/icon.d.ts +0 -61
  143. package/lib/components/icon/src/icon.js +0 -2
  144. package/lib/components/icon/src/icon.js.map +0 -1
  145. package/lib/components/index.d.ts +0 -1
  146. package/lib/components/index.js +0 -2
  147. package/lib/components/index.js.map +0 -1
  148. package/lib/constants/index.d.ts +0 -2
  149. package/lib/constants/index.js +0 -2
  150. package/lib/constants/index.js.map +0 -1
  151. package/lib/constants/mime.d.ts +0 -61
  152. package/lib/constants/mime.js +0 -2
  153. package/lib/constants/mime.js.map +0 -1
  154. package/lib/constants/regex.d.ts +0 -78
  155. package/lib/constants/regex.js +0 -2
  156. package/lib/constants/regex.js.map +0 -1
  157. package/lib/directives/clickCopy/index.d.ts +0 -2
  158. package/lib/directives/clickCopy/index.js +0 -2
  159. package/lib/directives/clickCopy/index.js.map +0 -1
  160. package/lib/directives/clickDebounce/index.d.ts +0 -2
  161. package/lib/directives/clickDebounce/index.js +0 -2
  162. package/lib/directives/clickDebounce/index.js.map +0 -1
  163. package/lib/directives/clickDraggable/index.d.ts +0 -2
  164. package/lib/directives/clickDraggable/index.js +0 -2
  165. package/lib/directives/clickDraggable/index.js.map +0 -1
  166. package/lib/directives/clickIconCopy/index.d.ts +0 -2
  167. package/lib/directives/clickIconCopy/index.js +0 -2
  168. package/lib/directives/clickIconCopy/index.js.map +0 -1
  169. package/lib/directives/clickLongpress/index.d.ts +0 -2
  170. package/lib/directives/clickLongpress/index.js +0 -2
  171. package/lib/directives/clickLongpress/index.js.map +0 -1
  172. package/lib/directives/clickThrottle/index.d.ts +0 -2
  173. package/lib/directives/clickThrottle/index.js +0 -2
  174. package/lib/directives/clickThrottle/index.js.map +0 -1
  175. package/lib/directives/index.d.ts +0 -6
  176. package/lib/directives/index.js +0 -2
  177. package/lib/directives/index.js.map +0 -1
  178. package/lib/fast-element-plus/component.d.ts +0 -3
  179. package/lib/fast-element-plus/component.js +0 -2
  180. package/lib/fast-element-plus/component.js.map +0 -1
  181. package/lib/fast-element-plus/directive.d.ts +0 -2
  182. package/lib/fast-element-plus/directive.js +0 -2
  183. package/lib/fast-element-plus/directive.js.map +0 -1
  184. package/lib/fast-element-plus/element-plus.d.ts +0 -2
  185. package/lib/fast-element-plus/element-plus.js +0 -2
  186. package/lib/fast-element-plus/element-plus.js.map +0 -1
  187. package/lib/fast-element-plus/fast-element-plus.d.ts +0 -3
  188. package/lib/fast-element-plus/fast-element-plus.js +0 -2
  189. package/lib/fast-element-plus/fast-element-plus.js.map +0 -1
  190. package/lib/fast-element-plus/make-installer.d.ts +0 -7
  191. package/lib/fast-element-plus/make-installer.js +0 -2
  192. package/lib/fast-element-plus/make-installer.js.map +0 -1
  193. package/lib/fast-element-plus/version.d.ts +0 -4
  194. package/lib/fast-element-plus/version.js +0 -2
  195. package/lib/fast-element-plus/version.js.map +0 -1
  196. package/lib/hooks/index.d.ts +0 -2
  197. package/lib/hooks/index.js +0 -2
  198. package/lib/hooks/index.js.map +0 -1
  199. package/lib/hooks/useLoading/index.d.ts +0 -4
  200. package/lib/hooks/useLoading/index.js +0 -2
  201. package/lib/hooks/useLoading/index.js.map +0 -1
  202. package/lib/hooks/useOverlay/index.d.ts +0 -4
  203. package/lib/hooks/useOverlay/index.js +0 -2
  204. package/lib/hooks/useOverlay/index.js.map +0 -1
  205. package/lib/hooks/useScreenFull/index.d.ts +0 -0
  206. package/lib/index.d.ts +0 -16
  207. package/lib/index.es.d.ts +0 -6
  208. package/lib/index.js +0 -2
  209. package/lib/index.js.map +0 -1
  210. package/lib/settings/index.d.ts +0 -79
  211. package/lib/settings/index.js +0 -2
  212. package/lib/settings/index.js.map +0 -1
  213. package/lib/stores/index.d.ts +0 -4
  214. package/lib/stores/index.js +0 -2
  215. package/lib/stores/index.js.map +0 -1
  216. package/lib/utils/base64.d.ts +0 -10
  217. package/lib/utils/base64.js +0 -2
  218. package/lib/utils/base64.js.map +0 -1
  219. package/lib/utils/click.d.ts +0 -14
  220. package/lib/utils/click.js +0 -2
  221. package/lib/utils/click.js.map +0 -1
  222. package/lib/utils/color.d.ts +0 -31
  223. package/lib/utils/color.js +0 -2
  224. package/lib/utils/color.js.map +0 -1
  225. package/lib/utils/console.d.ts +0 -21
  226. package/lib/utils/console.js +0 -2
  227. package/lib/utils/console.js.map +0 -1
  228. package/lib/utils/deviceId.d.ts +0 -9
  229. package/lib/utils/deviceId.js +0 -2
  230. package/lib/utils/deviceId.js.map +0 -1
  231. package/lib/utils/errorHandler.d.ts +0 -4
  232. package/lib/utils/errorHandler.js +0 -2
  233. package/lib/utils/errorHandler.js.map +0 -1
  234. package/lib/utils/form.d.ts +0 -78
  235. package/lib/utils/form.js +0 -2
  236. package/lib/utils/form.js.map +0 -1
  237. package/lib/utils/index.d.ts +0 -10
  238. package/lib/utils/index.js +0 -2
  239. package/lib/utils/index.js.map +0 -1
  240. package/lib/utils/storage.d.ts +0 -79
  241. package/lib/utils/storage.js +0 -2
  242. package/lib/utils/storage.js.map +0 -1
  243. package/lib/utils/string.d.ts +0 -33
  244. package/lib/utils/string.js +0 -2
  245. package/lib/utils/string.js.map +0 -1
  246. package/lib/utils/vue/func.d.ts +0 -7
  247. package/lib/utils/vue/func.js +0 -2
  248. package/lib/utils/vue/func.js.map +0 -1
  249. package/lib/utils/vue/index.d.ts +0 -6
  250. package/lib/utils/vue/index.js +0 -2
  251. package/lib/utils/vue/index.js.map +0 -1
  252. package/lib/utils/vue/install.d.ts +0 -5
  253. package/lib/utils/vue/install.js +0 -2
  254. package/lib/utils/vue/install.js.map +0 -1
  255. package/lib/utils/vue/props.d.ts +0 -10
  256. package/lib/utils/vue/props.js +0 -2
  257. package/lib/utils/vue/props.js.map +0 -1
  258. package/lib/utils/vue/slots.d.ts +0 -11
  259. package/lib/utils/vue/slots.js +0 -2
  260. package/lib/utils/vue/slots.js.map +0 -1
  261. package/lib/utils/vue/useRender.d.ts +0 -7
  262. package/lib/utils/vue/useRender.js +0 -2
  263. package/lib/utils/vue/useRender.js.map +0 -1
  264. package/lib/utils/vue/with.d.ts +0 -6
  265. package/lib/utils/vue/with.js +0 -2
  266. package/lib/utils/vue/with.js.map +0 -1
  267. package/types/env.d.ts +0 -45
  268. package/types/runtime-core.d.ts +0 -52
  269. package/types/shims-vue.d.ts +0 -20
@@ -1,61 +0,0 @@
1
- import { PropType } from 'vue';
2
- export declare const faIconProps: {
3
- /**
4
- * 名称
5
- * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
6
- * @requires 必填
7
- */
8
- name: {
9
- type: StringConstructor;
10
- required: boolean;
11
- };
12
- /**
13
- * 大小
14
- */
15
- size: PropType<number | string>;
16
- /**
17
- * 颜色
18
- */
19
- color: StringConstructor;
20
- };
21
- /**
22
- * FaIcon 组件
23
- */
24
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
25
- /**
26
- * 名称
27
- * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
28
- * @requires 必填
29
- */
30
- name: {
31
- type: StringConstructor;
32
- required: boolean;
33
- };
34
- /**
35
- * 大小
36
- */
37
- size: PropType<number | string>;
38
- /**
39
- * 颜色
40
- */
41
- color: StringConstructor;
42
- }>, void, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
43
- /**
44
- * 名称
45
- * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
46
- * @requires 必填
47
- */
48
- name: {
49
- type: StringConstructor;
50
- required: boolean;
51
- };
52
- /**
53
- * 大小
54
- */
55
- size: PropType<number | string>;
56
- /**
57
- * 颜色
58
- */
59
- color: StringConstructor;
60
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
61
- export default _default;
@@ -1,81 +0,0 @@
1
- import { isVNode, defineComponent, reactive, computed, createVNode, mergeProps, h, resolveComponent } from "vue";
2
- import "../../../constants/index.mjs";
3
- import "../../../utils/index.mjs";
4
- import { ElIcon } from "element-plus";
5
- import { isNumber } from "lodash-es";
6
- import { RegExps } from "../../../constants/regex.mjs";
7
- import { useRender } from "../../../utils/vue/useRender.mjs";
8
- function _isSlot(s) {
9
- return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
10
- }
11
- const faIconProps = {
12
- /**
13
- * 名称
14
- * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;
15
- * @requires 必填
16
- */
17
- name: {
18
- type: String,
19
- required: true
20
- },
21
- /**
22
- * 大小
23
- */
24
- size: [Number, String],
25
- /**
26
- * 颜色
27
- */
28
- color: String
29
- };
30
- const Icon = /* @__PURE__ */ defineComponent({
31
- name: "FaIcon",
32
- props: faIconProps,
33
- setup(props, {
34
- attrs
35
- }) {
36
- const state = reactive({
37
- isUrl: computed(() => RegExps.External.test(props.name)),
38
- style: computed(() => {
39
- const result = {};
40
- if (props.size) {
41
- if (isNumber(props.size)) {
42
- result.size = `${props.size}px`;
43
- } else {
44
- result.size = props.size;
45
- }
46
- }
47
- if (props.color) {
48
- result.color = props.color;
49
- }
50
- if (state.isUrl) {
51
- result.mask = `url(${props.name}) no-repeat 50% 50%`;
52
- result["-webkit-mask"] = `url(${props.name}) no-repeat 50% 50%`;
53
- }
54
- return result;
55
- })
56
- });
57
- useRender(() => {
58
- let _slot, _slot2;
59
- return props.name.indexOf("el-icon-") === 0 ? createVNode(ElIcon, mergeProps(attrs, props, {
60
- "class": "fa-icon"
61
- }), _isSlot(_slot = h(resolveComponent(props.name))) ? _slot : {
62
- default: () => [_slot]
63
- }) : props.name.indexOf("fa-icon") === 0 ? createVNode(ElIcon, mergeProps(attrs, props, {
64
- "class": "fa-icon"
65
- }), _isSlot(_slot2 = h(resolveComponent(props.name))) ? _slot2 : {
66
- default: () => [_slot2]
67
- }) : state.isUrl ? createVNode("div", mergeProps(attrs, {
68
- "class": "el-icon fa-icon url-icon",
69
- "style": state.style
70
- }), null) : createVNode("i", mergeProps(attrs, {
71
- "class": [props.name, "el-icon fa-icon"],
72
- "style": state.style
73
- }), null);
74
- });
75
- }
76
- });
77
- export {
78
- Icon as default,
79
- faIconProps
80
- };
81
- //# sourceMappingURL=icon.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon.mjs","sources":["../../../../../packages/components/icon/src/icon.tsx"],"sourcesContent":["import type { CSSProperties, PropType } from \"vue\";\nimport { computed, defineComponent, h, reactive, resolveComponent } from \"vue\";\nimport { RegExps } from \"@fast-element-plus/constants\";\nimport { useRender } from \"@fast-element-plus/utils\";\nimport { ElIcon } from \"element-plus\";\nimport { isNumber } from \"lodash-es\";\n\nexport const faIconProps = {\n\t/**\n\t * 名称\n\t * @description el-icon- 使用 El-icon 的图标;fa-icon 使用 Fast 图标组件库;\n\t * @requires 必填\n\t */\n\tname: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\t/**\n\t * 大小\n\t */\n\tsize: [Number, String] as PropType<number | string>,\n\t/**\n\t * 颜色\n\t */\n\tcolor: String,\n};\n\n/**\n * FaIcon 组件\n */\nexport default defineComponent({\n\tname: \"FaIcon\",\n\tprops: faIconProps,\n\tsetup(props, { attrs }) {\n\t\tconst state = reactive({\n\t\t\tisUrl: computed(() => RegExps.External.test(props.name)),\n\t\t\tstyle: computed((): CSSProperties => {\n\t\t\t\tconst result: any = {};\n\t\t\t\tif (props.size) {\n\t\t\t\t\tif (isNumber(props.size)) {\n\t\t\t\t\t\tresult.size = `${props.size}px`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.size = props.size;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (props.color) {\n\t\t\t\t\tresult.color = props.color;\n\t\t\t\t}\n\t\t\t\tif (state.isUrl) {\n\t\t\t\t\tresult.mask = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t\tresult[\"-webkit-mask\"] = `url(${props.name}) no-repeat 50% 50%`;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}),\n\t\t});\n\n\t\tuseRender(() =>\n\t\t\tprops.name.indexOf(\"el-icon-\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class=\"fa-icon\">\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : props.name.indexOf(\"fa-icon\") === 0 ? (\n\t\t\t\t<ElIcon {...attrs} {...props} class=\"fa-icon\">\n\t\t\t\t\t{h(resolveComponent(props.name))}\n\t\t\t\t</ElIcon>\n\t\t\t) : state.isUrl ? (\n\t\t\t\t<div {...attrs} class=\"el-icon fa-icon url-icon\" style={state.style} />\n\t\t\t) : (\n\t\t\t\t<i {...attrs} class={[props.name, \"el-icon fa-icon\"]} style={state.style} />\n\t\t\t)\n\t\t);\n\t},\n});\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","faIconProps","name","type","String","required","size","Number","color","defineComponent","props","setup","attrs","state","reactive","isUrl","computed","RegExps","External","test","style","result","isNumber","mask","useRender","_slot","_slot2","indexOf","_createVNode","ElIcon","_mergeProps","h","resolveComponent","default"],"mappings":";;;;;;;AAKqC,SAAAA,QAAAC,GAAA;AAAA,SAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,QAAAL,CAAA;AAAA;AAE9B,MAAMM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM1BC,MAAM;AAAA,IACLC,MAAMC;AAAAA,IACNC,UAAU;AAAA,EACV;AAAA;AAAA;AAAA;AAAA,EAIDC,MAAM,CAACC,QAAQH,MAAM;AAAA;AAAA;AAAA;AAAA,EAIrBI,OAAOJ;AACR;AAKA,MAAeK,uCAAgB;AAAA,EAC9BP,MAAM;AAAA,EACNQ,OAAOT;AAAAA,EACPU,MAAMD,OAAO;AAAA,IAAEE;AAAAA,EAAM,GAAG;AACvB,UAAMC,QAAQC,SAAS;AAAA,MACtBC,OAAOC,SAAS,MAAMC,QAAQC,SAASC,KAAKT,MAAMR,IAAI,CAAC;AAAA,MACvDkB,OAAOJ,SAAS,MAAqB;AACpC,cAAMK,SAAc,CAAA;AACpB,YAAIX,MAAMJ,MAAM;AACf,cAAIgB,SAASZ,MAAMJ,IAAI,GAAG;AACzBe,mBAAOf,OAAO,GAAGI,MAAMJ,IAAI;AAAA,UAC5B,OAAO;AACNe,mBAAOf,OAAOI,MAAMJ;AAAAA,UACrB;AAAA,QACD;AACA,YAAII,MAAMF,OAAO;AAChBa,iBAAOb,QAAQE,MAAMF;AAAAA,QACtB;AACA,YAAIK,MAAME,OAAO;AAChBM,iBAAOE,OAAO,OAAOb,MAAMR,IAAI;AAC/BmB,iBAAO,cAAc,IAAI,OAAOX,MAAMR,IAAI;AAAA,QAC3C;AACA,eAAOmB;AAAAA,OACP;AAAA,IACF,CAAC;AAEDG,cAAU,MAAA;AAAA,UAAAC,OAAAC;AAAA,aACThB,MAAMR,KAAKyB,QAAQ,UAAU,MAAM,IAACC,YAAAC,QAAAC,WACvBlB,OAAWF,OAAK;AAAA,QAAA,SAAA;AAAA,MAAA,CAAA,GAAAhB,QAAA+B,QAC1BM,EAAEC,iBAAiBtB,MAAMR,IAAI,CAAC,CAAC,IAAAuB,QAAA;AAAA,QAAAQ,SAAAA,MAAA,CAAAR,KAAA;AAAA,MAAA,CAAA,IAE9Bf,MAAMR,KAAKyB,QAAQ,SAAS,MAAM,IAACC,YAAAC,QAAAC,WAC1BlB,OAAWF,OAAK;AAAA,QAAA,SAAA;AAAA,MAAA,CAAA,GAAAhB,QAAAgC,SAC1BK,EAAEC,iBAAiBtB,MAAMR,IAAI,CAAC,CAAC,IAAAwB,SAAA;AAAA,QAAAO,SAAAA,MAAA,CAAAP,MAAA;AAAA,OAE9Bb,IAAAA,MAAME,QAAKa,YAAAE,OAAAA,WACLlB,OAAK;AAAA,QAAA,SAAA;AAAA,QAAA,SAA0CC,MAAMO;AAAAA,MAAK,CAAA,GAAA,IAAA,IAAAQ,YAAA,KAAAE,WAE5DlB,OAAK;AAAA,QAAA,SAAS,CAACF,MAAMR,MAAM,iBAAiB;AAAA,QAAC,SAASW,MAAMO;AAAAA,OACnE,GAAA,IAAA;AAAA,IAAA,CACF;AAAA,EACD;AACD,CAAC;"}
@@ -1 +0,0 @@
1
- export * from './icon';
@@ -1,5 +0,0 @@
1
- import { FaIcon } from "./icon/index.mjs";
2
- export {
3
- FaIcon
4
- };
5
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +0,0 @@
1
- export * from './mime';
2
- export * from './regex';
@@ -1,7 +0,0 @@
1
- import { FaMimeType } from "./mime.mjs";
2
- import { RegExps } from "./regex.mjs";
3
- export {
4
- FaMimeType,
5
- RegExps
6
- };
7
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,61 +0,0 @@
1
- /**
2
- * MIME 类型
3
- */
4
- export declare const FaMimeType: {
5
- /**
6
- * PDF
7
- */
8
- PDF: string;
9
- /**
10
- * 文本文件
11
- */
12
- Text: string;
13
- /**
14
- * Word 和 DOCX(Word 2007 及以后版本)
15
- */
16
- Word: string;
17
- /**
18
- * Excel 和 CSV
19
- */
20
- Excel: string;
21
- /**
22
- * PowerPoint 和 PPTX(PowerPoint 2007 及以后版本)
23
- */
24
- Powerpoint: string;
25
- /**
26
- * 压缩文件
27
- */
28
- ZIP: string;
29
- /**
30
- * 图片
31
- */
32
- Image: string;
33
- /**
34
- * 视频
35
- */
36
- Video: string;
37
- /**
38
- * 音频
39
- */
40
- Audio: string;
41
- /**
42
- * HTML
43
- */
44
- Html: string;
45
- /**
46
- * CSS
47
- */
48
- Css: string;
49
- /**
50
- * JavaScript
51
- */
52
- JavaScript: string;
53
- /**
54
- * JSON
55
- */
56
- Json: string;
57
- /**
58
- * XML
59
- */
60
- XML: string;
61
- };
@@ -1,62 +0,0 @@
1
- const FaMimeType = {
2
- /**
3
- * PDF
4
- */
5
- PDF: "application/pdf",
6
- /**
7
- * 文本文件
8
- */
9
- Text: "text/plain",
10
- /**
11
- * Word 和 DOCX(Word 2007 及以后版本)
12
- */
13
- Word: "application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",
14
- /**
15
- * Excel 和 CSV
16
- */
17
- Excel: "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv",
18
- /**
19
- * PowerPoint 和 PPTX(PowerPoint 2007 及以后版本)
20
- */
21
- Powerpoint: "application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",
22
- /**
23
- * 压缩文件
24
- */
25
- ZIP: "application/zip,application/x-zip-compressed",
26
- /**
27
- * 图片
28
- */
29
- Image: "image/jpeg,image/png,image/gif",
30
- /**
31
- * 视频
32
- */
33
- Video: "video/mp4,video/mpeg,video/quicktime",
34
- /**
35
- * 音频
36
- */
37
- Audio: "audio/mpeg,audio/wav",
38
- /**
39
- * HTML
40
- */
41
- Html: "text/html",
42
- /**
43
- * CSS
44
- */
45
- Css: "text/css",
46
- /**
47
- * JavaScript
48
- */
49
- JavaScript: "application/javascript,text/javascript",
50
- /**
51
- * JSON
52
- */
53
- Json: "application/json",
54
- /**
55
- * XML
56
- */
57
- XML: "application/xml,text/xml"
58
- };
59
- export {
60
- FaMimeType
61
- };
62
- //# sourceMappingURL=mime.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mime.mjs","sources":["../../../packages/constants/mime.ts"],"sourcesContent":["/**\n * MIME 类型\n */\nexport const FaMimeType = {\n\t/**\n\t * PDF\n\t */\n\tPDF: \"application/pdf\",\n\t/**\n\t * 文本文件\n\t */\n\tText: \"text/plain\",\n\t/**\n\t * Word 和 DOCX(Word 2007 及以后版本)\n\t */\n\tWord: \"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n\t/**\n\t * Excel 和 CSV\n\t */\n\tExcel: \"application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv\",\n\t/**\n\t * PowerPoint 和 PPTX(PowerPoint 2007 及以后版本)\n\t */\n\tPowerpoint: \"application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n\t/**\n\t * 压缩文件\n\t */\n\tZIP: \"application/zip,application/x-zip-compressed\",\n\t/**\n\t * 图片\n\t */\n\tImage: \"image/jpeg,image/png,image/gif\",\n\t/**\n\t * 视频\n\t */\n\tVideo: \"video/mp4,video/mpeg,video/quicktime\",\n\t/**\n\t * 音频\n\t */\n\tAudio: \"audio/mpeg,audio/wav\",\n\t/**\n\t * HTML\n\t */\n\tHtml: \"text/html\",\n\t/**\n\t * CSS\n\t */\n\tCss: \"text/css\",\n\t/**\n\t * JavaScript\n\t */\n\tJavaScript: \"application/javascript,text/javascript\",\n\t/**\n\t * JSON\n\t */\n\tJson: \"application/json\",\n\t/**\n\t * XML\n\t */\n\tXML: \"application/xml,text/xml\",\n};\n"],"names":[],"mappings":"AAGO,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA,EAIzB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,YAAY;AAAA;AAAA;AAAA;AAAA,EAIZ,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,YAAY;AAAA;AAAA;AAAA;AAAA,EAIZ,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,KAAK;AACN;"}
@@ -1,78 +0,0 @@
1
- /**
2
- * 正则表达式
3
- */
4
- export declare const RegExps: {
5
- /**
6
- * UUID
7
- */
8
- UUID: RegExp;
9
- /**
10
- * 手机号
11
- */
12
- Mobile: RegExp;
13
- /**
14
- * 电话
15
- */
16
- Phone: RegExp;
17
- /**
18
- * 邮箱
19
- */
20
- Email: RegExp;
21
- /**
22
- * 身份证
23
- */
24
- IdCard: RegExp;
25
- /**
26
- * 外部链接
27
- * 匹配http、https、mailto、tel和ftp开头的链接
28
- */
29
- External: RegExp;
30
- /**
31
- * Url
32
- */
33
- Url: RegExp;
34
- /**
35
- * 车牌号
36
- */
37
- CarNumber: RegExp;
38
- /**
39
- * 新能源车牌号
40
- */
41
- NewEnergyCarNumber: RegExp;
42
- /**
43
- * 邮政编码
44
- */
45
- PostCode: RegExp;
46
- /**
47
- * ipv4
48
- */
49
- Ipv4: RegExp;
50
- /**
51
- * 护照
52
- */
53
- Passport: RegExp;
54
- /**
55
- * 港澳通行证
56
- */
57
- HKMacauPass: RegExp;
58
- /**
59
- * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)
60
- */
61
- Account: RegExp;
62
- /**
63
- * 弱密码(只包含字母和数字,长度为6到18位)
64
- */
65
- Password: RegExp;
66
- /**
67
- * 强密码(8到20位,包含大小写字母、数字及特殊字符)
68
- */
69
- StrongPassword: RegExp;
70
- /**
71
- * 中文字符
72
- */
73
- Chinese: RegExp;
74
- /**
75
- * 英文字符
76
- */
77
- English: RegExp;
78
- };
@@ -1,79 +0,0 @@
1
- const RegExps = {
2
- /**
3
- * UUID
4
- */
5
- UUID: /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
6
- /**
7
- * 手机号
8
- */
9
- Mobile: /^(?:(?:\+|00)86)?1\d{10}$/,
10
- /**
11
- * 电话
12
- */
13
- Phone: /^(?:(?:\d{3}-)?\d{8}|^(?:\d{4}-)?\d{7,8})(?:-\d+)?$/,
14
- /**
15
- * 邮箱
16
- */
17
- Email: /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\.)+(com|cn|net|org)$/,
18
- /**
19
- * 身份证
20
- */
21
- IdCard: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/,
22
- /**
23
- * 外部链接
24
- * 匹配http、https、mailto、tel和ftp开头的链接
25
- */
26
- External: /^(https?:|mailto:|tel:|ftp:)/,
27
- /**
28
- * Url
29
- */
30
- Url: /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/,
31
- /**
32
- * 车牌号
33
- */
34
- CarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/,
35
- /**
36
- * 新能源车牌号
37
- */
38
- NewEnergyCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}(([0-9]{5}[DF]$)|([ABCDE][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$)|([FGHJK][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$))/,
39
- /**
40
- * 邮政编码
41
- */
42
- PostCode: /^[1-9]\d{5}$/,
43
- /**
44
- * ipv4
45
- */
46
- Ipv4: /^([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])\.([01]?\d{1,2}|2[0-4]\d|25[0-5])$/,
47
- /**
48
- * 护照
49
- */
50
- Passport: /^[EeGg]\d{8}$/,
51
- /**
52
- * 港澳通行证
53
- */
54
- HKMacauPass: /^[HMhm]\d{8}$/,
55
- /**
56
- * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)
57
- */
58
- Account: /^[a-zA-Z][a-zA-Z\d]{5,19}$/,
59
- /**
60
- * 弱密码(只包含字母和数字,长度为6到18位)
61
- */
62
- Password: /^[A-Za-z0-9]{6,18}$/,
63
- /**
64
- * 强密码(8到20位,包含大小写字母、数字及特殊字符)
65
- */
66
- StrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,20}$/,
67
- /**
68
- * 中文字符
69
- */
70
- Chinese: /^[\u4E00-\u9FA5]+$/,
71
- /**
72
- * 英文字符
73
- */
74
- English: /^[a-zA-Z]+$/
75
- };
76
- export {
77
- RegExps
78
- };
79
- //# sourceMappingURL=regex.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"regex.mjs","sources":["../../../packages/constants/regex.ts"],"sourcesContent":["/**\n * 正则表达式\n */\nexport const RegExps = {\n\t/**\n\t * UUID\n\t */\n\tUUID: /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n\t/**\n\t * 手机号\n\t */\n\tMobile: /^(?:(?:\\+|00)86)?1\\d{10}$/,\n\t/**\n\t * 电话\n\t */\n\tPhone: /^(?:(?:\\d{3}-)?\\d{8}|^(?:\\d{4}-)?\\d{7,8})(?:-\\d+)?$/,\n\t/**\n\t * 邮箱\n\t */\n\tEmail: /^[a-zA-Z0-9_-]+@([a-zA-Z0-9]+\\.)+(com|cn|net|org)$/,\n\t/**\n\t * 身份证\n\t */\n\tIdCard: /(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{2}[0-9Xx]$)/,\n\t/**\n\t * 外部链接\n\t * 匹配http、https、mailto、tel和ftp开头的链接\n\t */\n\tExternal: /^(https?:|mailto:|tel:|ftp:)/,\n\t/**\n\t * Url\n\t */\n\tUrl: /^(https?|ftp):\\/\\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\\/($|[a-zA-Z0-9.,?'\\\\+&%$#=~_-]+))*$/,\n\t/**\n\t * 车牌号\n\t */\n\tCarNumber: /^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/,\n\t/**\n\t * 新能源车牌号\n\t */\n\tNewEnergyCarNumber:\n\t\t/^[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼渝川贵云藏陕甘青宁新军使领]{1}[A-HJ-Z]{1}(([0-9]{5}[DF]$)|([ABCDE][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$)|([FGHJK][A-HJ-NP-Z0-9][0-9]{3}[0-9挂学警港澳]{1}$))/,\n\t/**\n\t * 邮政编码\n\t */\n\tPostCode: /^[1-9]\\d{5}$/,\n\t/**\n\t * ipv4\n\t */\n\tIpv4: /^([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.([01]?\\d{1,2}|2[0-4]\\d|25[0-5])$/,\n\t/**\n\t * 护照\n\t */\n\tPassport: /^[EeGg]\\d{8}$/,\n\t/**\n\t * 港澳通行证\n\t */\n\tHKMacauPass: /^[HMhm]\\d{8}$/,\n\t/**\n\t * 账号(6-20位字母或数字,必须以字母开头,不能全为数字)\n\t */\n\tAccount: /^[a-zA-Z][a-zA-Z\\d]{5,19}$/,\n\t/**\n\t * 弱密码(只包含字母和数字,长度为6到18位)\n\t */\n\tPassword: /^[A-Za-z0-9]{6,18}$/,\n\t/**\n\t * 强密码(8到20位,包含大小写字母、数字及特殊字符)\n\t */\n\tStrongPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_])[A-Za-z\\d\\W_]{8,20}$/,\n\t/**\n\t * 中文字符\n\t */\n\tChinese: /^[\\u4E00-\\u9FA5]+$/,\n\t/**\n\t * 英文字符\n\t */\n\tEnglish: /^[a-zA-Z]+$/,\n};\n"],"names":[],"mappings":"AAGO,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,EAItB,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIR,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,EAKR,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,oBACC;AAAA;AAAA;AAAA;AAAA,EAID,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,aAAa;AAAA;AAAA;AAAA;AAAA,EAIb,SAAS;AAAA;AAAA;AAAA;AAAA,EAIT,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,gBAAgB;AAAA;AAAA;AAAA;AAAA,EAIhB,SAAS;AAAA;AAAA;AAAA;AAAA,EAIT,SAAS;AACV;"}
@@ -1,2 +0,0 @@
1
- export declare const vCopy: import('../../utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, string>>;
2
- export default vCopy;
@@ -1,39 +0,0 @@
1
- import "../../utils/index.mjs";
2
- import { ElMessage } from "element-plus";
3
- import { stringUtil } from "../../utils/string.mjs";
4
- import { consoleError } from "../../utils/console.mjs";
5
- import { withInstallDirective } from "../../utils/vue/install.mjs";
6
- const CopyDirective = {
7
- mounted(el, binding) {
8
- el.copyData = binding.value;
9
- el.__handleClick__ = async () => {
10
- if (!el.copyData) return;
11
- try {
12
- await stringUtil.copy(String(el.copyData));
13
- ElMessage({
14
- type: "success",
15
- message: "复制成功"
16
- });
17
- } catch (error) {
18
- ElMessage({
19
- type: "error",
20
- message: "复制失败"
21
- });
22
- consoleError("CopyDirective", "复制失败", error);
23
- }
24
- };
25
- el.addEventListener("click", el.__handleClick__);
26
- },
27
- updated(el, binding) {
28
- el.copyData = binding.value;
29
- },
30
- beforeUnmount(el) {
31
- el.removeEventListener("click", el.__handleClick__);
32
- }
33
- };
34
- const vCopy = withInstallDirective(CopyDirective, "copy");
35
- export {
36
- vCopy as default,
37
- vCopy
38
- };
39
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../packages/directives/clickCopy/index.ts"],"sourcesContent":["/**\n * v-copy\n * 复制某个值至剪贴板\n * 接收参数:string类型/Ref<string>类型/Reactive<string>类型\n */\nimport type { Directive, DirectiveBinding } from \"vue\";\nimport { consoleError, stringUtil, withInstallDirective } from \"@fast-element-plus/utils\";\nimport { ElMessage } from \"element-plus\";\n\ninterface ElType extends HTMLElement {\n\tcopyData: string | number;\n\t__handleClick__: () => void;\n}\n\nconst CopyDirective: Directive = {\n\tmounted(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\n\t\tel.__handleClick__ = async (): Promise<void> => {\n\t\t\tif (!el.copyData) return;\n\t\t\ttry {\n\t\t\t\tawait stringUtil.copy(String(el.copyData));\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"success\",\n\t\t\t\t\tmessage: \"复制成功\",\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tElMessage({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\tmessage: \"复制失败\",\n\t\t\t\t});\n\t\t\t\tconsoleError(\"CopyDirective\", \"复制失败\", error);\n\t\t\t}\n\t\t};\n\t\tel.addEventListener(\"click\", el.__handleClick__);\n\t},\n\tupdated(el: ElType, binding: DirectiveBinding) {\n\t\tel.copyData = binding.value;\n\t},\n\tbeforeUnmount(el: ElType) {\n\t\tel.removeEventListener(\"click\", el.__handleClick__);\n\t},\n};\n\nexport const vCopy = withInstallDirective(CopyDirective, \"copy\");\nexport default vCopy;\n"],"names":[],"mappings":";;;;;AAcA,MAAM,gBAA2B;AAAA,EAChC,QAAQ,IAAY,SAA2B;AAC9C,OAAG,WAAW,QAAQ;AAEtB,OAAG,kBAAkB,YAA2B;AAC3C,UAAA,CAAC,GAAG,SAAU;AACd,UAAA;AACH,cAAM,WAAW,KAAK,OAAO,GAAG,QAAQ,CAAC;AAC/B,kBAAA;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QAAA,CACT;AAAA,eACO,OAAO;AACL,kBAAA;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,QAAA,CACT;AACY,qBAAA,iBAAiB,QAAQ,KAAK;AAAA,MAC5C;AAAA,IAAA;AAEE,OAAA,iBAAiB,SAAS,GAAG,eAAe;AAAA,EAChD;AAAA,EACA,QAAQ,IAAY,SAA2B;AAC9C,OAAG,WAAW,QAAQ;AAAA,EACvB;AAAA,EACA,cAAc,IAAY;AACtB,OAAA,oBAAoB,SAAS,GAAG,eAAe;AAAA,EACnD;AACD;AAEa,MAAA,QAAQ,qBAAqB,eAAe,MAAM;"}
@@ -1,2 +0,0 @@
1
- export declare const vDebounce: import('../../utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, string>>;
2
- export default vDebounce;
@@ -1,21 +0,0 @@
1
- import "../../utils/index.mjs";
2
- import { withInstallDirective } from "../../utils/vue/install.mjs";
3
- const DebounceDirective = {
4
- created(el, binding, vNode) {
5
- el.__debounce_originClick__ = vNode.props.onClick;
6
- vNode.props.onClick = () => {
7
- if (el.__debounce_timer__) {
8
- clearInterval(el.__debounce_timer__);
9
- }
10
- el.__debounce_timer__ = setTimeout(() => {
11
- el.__debounce_originClick__();
12
- }, 500);
13
- };
14
- }
15
- };
16
- const vDebounce = withInstallDirective(DebounceDirective, "debounce");
17
- export {
18
- vDebounce as default,
19
- vDebounce
20
- };
21
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../packages/directives/clickDebounce/index.ts"],"sourcesContent":["/**\n * v-debounce\n * 按钮防抖指令\n */\nimport type { Directive, DirectiveBinding, VNode } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\ninterface ElType extends HTMLElement {\n\t__debounce_timer__: NodeJS.Timeout;\n\t__debounce_originClick__: () => any;\n}\n\nconst DebounceDirective: Directive = {\n\tcreated(el: ElType, binding: DirectiveBinding, vNode: VNode) {\n\t\t// 记录原来的点击事件方法\n\t\tel.__debounce_originClick__ = vNode.props.onClick;\n\n\t\t// 替换原来的点击事件\n\t\tvNode.props.onClick = (): void => {\n\t\t\tif (el.__debounce_timer__) {\n\t\t\t\tclearInterval(el.__debounce_timer__);\n\t\t\t}\n\t\t\t// 防抖处理\n\t\t\tel.__debounce_timer__ = setTimeout(() => {\n\t\t\t\tel.__debounce_originClick__();\n\t\t\t}, 500);\n\t\t};\n\t},\n};\n\nexport const vDebounce = withInstallDirective(DebounceDirective, \"debounce\");\nexport default vDebounce;\n"],"names":[],"mappings":";;AAYA,MAAM,oBAA+B;AAAA,EACpC,QAAQ,IAAY,SAA2B,OAAc;AAEzD,OAAA,2BAA2B,MAAM,MAAM;AAGpC,UAAA,MAAM,UAAU,MAAY;AACjC,UAAI,GAAG,oBAAoB;AAC1B,sBAAc,GAAG,kBAAkB;AAAA,MACpC;AAEG,SAAA,qBAAqB,WAAW,MAAM;AACxC,WAAG,yBAAyB;AAAA,SAC1B,GAAG;AAAA,IAAA;AAAA,EAER;AACD;AAEa,MAAA,YAAY,qBAAqB,mBAAmB,UAAU;"}
@@ -1,2 +0,0 @@
1
- export declare const vDraggable: import('../../utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, string>>;
2
- export default vDraggable;
@@ -1,39 +0,0 @@
1
- import "../../utils/index.mjs";
2
- import { withInstallDirective } from "../../utils/vue/install.mjs";
3
- const DraggableDirective = {
4
- mounted(el) {
5
- el.style.cursor = "move";
6
- el.style.position = "absolute";
7
- el.onmousedown = (e) => {
8
- const disX = e.pageX - el.offsetLeft;
9
- const disY = e.pageY - el.offsetTop;
10
- document.onmousemove = (e2) => {
11
- let x = e2.pageX - disX;
12
- let y = e2.pageY - disY;
13
- const maxX = el.parentNode.offsetWidth - el.offsetWidth;
14
- const maxY = el.parentNode.offsetHeight - el.offsetHeight;
15
- if (x < 0) {
16
- x = 0;
17
- } else if (x > maxX) {
18
- x = maxX;
19
- }
20
- if (y < 0) {
21
- y = 0;
22
- } else if (y > maxY) {
23
- y = maxY;
24
- }
25
- el.style.left = `${x}px`;
26
- el.style.top = `${y}px`;
27
- };
28
- document.onmouseup = () => {
29
- document.onmousemove = document.onmouseup = null;
30
- };
31
- };
32
- }
33
- };
34
- const vDraggable = withInstallDirective(DraggableDirective, "draggable");
35
- export {
36
- vDraggable as default,
37
- vDraggable
38
- };
39
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../packages/directives/clickDraggable/index.ts"],"sourcesContent":["/*\n\t需求:实现一个拖拽指令,可在父元素区域任意拖拽元素。\n\n\t思路:\n\t\t1、设置需要拖拽的元素为absolute,其父元素为relative。\n\t\t2、鼠标按下(onmousedown)时记录目标元素当前的 left 和 top 值。\n\t\t3、鼠标移动(onmousemove)时计算每次移动的横向距离和纵向距离的变化值,并改变元素的 left 和 top 值\n\t\t4、鼠标松开(onmouseup)时完成一次拖拽\n\n\t使用:在 Dom 上加上 v-draggable 即可\n\t<div class=\"dialog-model\" v-draggable></div>\n*/\nimport type { Directive } from \"vue\";\nimport { withInstallDirective } from \"@fast-element-plus/utils\";\n\ninterface ElType extends HTMLElement {\n\tparentNode: any;\n}\n\nconst DraggableDirective: Directive = {\n\tmounted(el: ElType) {\n\t\tel.style.cursor = \"move\";\n\t\tel.style.position = \"absolute\";\n\t\tel.onmousedown = (e): void => {\n\t\t\tconst disX = e.pageX - el.offsetLeft;\n\t\t\tconst disY = e.pageY - el.offsetTop;\n\t\t\tdocument.onmousemove = (e): void => {\n\t\t\t\tlet x = e.pageX - disX;\n\t\t\t\tlet y = e.pageY - disY;\n\t\t\t\tconst maxX = el.parentNode.offsetWidth - el.offsetWidth;\n\t\t\t\tconst maxY = el.parentNode.offsetHeight - el.offsetHeight;\n\t\t\t\tif (x < 0) {\n\t\t\t\t\tx = 0;\n\t\t\t\t} else if (x > maxX) {\n\t\t\t\t\tx = maxX;\n\t\t\t\t}\n\n\t\t\t\tif (y < 0) {\n\t\t\t\t\ty = 0;\n\t\t\t\t} else if (y > maxY) {\n\t\t\t\t\ty = maxY;\n\t\t\t\t}\n\t\t\t\tel.style.left = `${x}px`;\n\t\t\t\tel.style.top = `${y}px`;\n\t\t\t};\n\t\t\tdocument.onmouseup = (): void => {\n\t\t\t\tdocument.onmousemove = document.onmouseup = null;\n\t\t\t};\n\t\t};\n\t},\n};\n\nexport const vDraggable = withInstallDirective(DraggableDirective, \"draggable\");\nexport default vDraggable;\n"],"names":["e"],"mappings":";;AAmBA,MAAM,qBAAgC;AAAA,EACrC,QAAQ,IAAY;AACnB,OAAG,MAAM,SAAS;AAClB,OAAG,MAAM,WAAW;AACjB,OAAA,cAAc,CAAC,MAAY;AACvB,YAAA,OAAO,EAAE,QAAQ,GAAG;AACpB,YAAA,OAAO,EAAE,QAAQ,GAAG;AACjB,eAAA,cAAc,CAACA,OAAY;AAC/B,YAAA,IAAIA,GAAE,QAAQ;AACd,YAAA,IAAIA,GAAE,QAAQ;AAClB,cAAM,OAAO,GAAG,WAAW,cAAc,GAAG;AAC5C,cAAM,OAAO,GAAG,WAAW,eAAe,GAAG;AAC7C,YAAI,IAAI,GAAG;AACN,cAAA;AAAA,QAAA,WACM,IAAI,MAAM;AAChB,cAAA;AAAA,QACL;AAEA,YAAI,IAAI,GAAG;AACN,cAAA;AAAA,QAAA,WACM,IAAI,MAAM;AAChB,cAAA;AAAA,QACL;AACG,WAAA,MAAM,OAAO,GAAG,CAAC;AACjB,WAAA,MAAM,MAAM,GAAG,CAAC;AAAA,MAAA;AAEpB,eAAS,YAAY,MAAY;AACvB,iBAAA,cAAc,SAAS,YAAY;AAAA,MAAA;AAAA,IAC7C;AAAA,EAEF;AACD;AAEa,MAAA,aAAa,qBAAqB,oBAAoB,WAAW;"}
@@ -1,2 +0,0 @@
1
- export declare const vIconCopy: import('../../utils').TSXWithInstall<import('vue').ObjectDirective<any, any, string, string>>;
2
- export default vIconCopy;