@vipl520/dk-ui 1.0.19 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. package/dist/attributes.json +16 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +1216 -674
  4. package/dist/index.min.js +7 -7
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +7 -7
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +1203 -665
  9. package/dist/tags.json +14 -0
  10. package/dist/web-types.json +69 -1
  11. package/es/animate-select/index.d.ts +19 -0
  12. package/es/animate-select/index.mjs +8 -0
  13. package/es/animate-select/index.mjs.map +1 -0
  14. package/es/animate-select/src/animate-select.vue.d.ts +18 -0
  15. package/es/animate-select/src/animate-select.vue.mjs +7 -0
  16. package/es/animate-select/src/animate-select.vue.mjs.map +1 -0
  17. package/es/animate-select/src/animate-select.vue2.mjs +168 -0
  18. package/es/animate-select/src/animate-select.vue2.mjs.map +1 -0
  19. package/es/animate-select/src/animates.d.ts +9 -0
  20. package/es/animate-select/src/animates.mjs +98 -0
  21. package/es/animate-select/src/animates.mjs.map +1 -0
  22. package/es/animate-select/src/props.d.ts +11 -0
  23. package/es/animate-select/src/props.mjs +11 -0
  24. package/es/animate-select/src/props.mjs.map +1 -0
  25. package/es/animate-select/style/index.css +1 -0
  26. package/es/animate-select/style/index.scss +41 -0
  27. package/es/audio-input/index.d.ts +4 -4
  28. package/es/audio-input/src/audio-input.vue.d.ts +4 -4
  29. package/es/audio-list-input/index.d.ts +3 -3
  30. package/es/audio-list-input/src/audio-list-input.vue.d.ts +3 -3
  31. package/es/box-size-input/index.d.ts +1 -1
  32. package/es/box-size-input/src/box-size-input.vue.d.ts +1 -1
  33. package/es/color-input/index.d.ts +3 -3
  34. package/es/color-input/src/color-input.vue.d.ts +3 -3
  35. package/es/dialog/index.d.ts +11 -11
  36. package/es/dialog/src/dialog.vue.d.ts +3 -3
  37. package/es/file-input/index.d.ts +4 -4
  38. package/es/file-input/src/file-input.vue.d.ts +4 -4
  39. package/es/file-list-input/index.d.ts +4 -4
  40. package/es/file-list-input/src/file-list-input.vue.d.ts +4 -4
  41. package/es/form/index.d.ts +10 -10
  42. package/es/form/src/form.vue.d.ts +2 -2
  43. package/es/group/index.d.ts +6 -6
  44. package/es/group/src/group.vue.d.ts +6 -6
  45. package/es/icon/index.d.ts +3 -3
  46. package/es/icon-input/index.d.ts +5 -5
  47. package/es/icon-input/src/icon-content.vue.d.ts +1 -1
  48. package/es/icon-input/src/icon-dialog.vue.d.ts +1 -1
  49. package/es/icon-input/src/icon-input.vue.d.ts +3 -3
  50. package/es/image-input/index.d.ts +4 -4
  51. package/es/image-input/src/image-input.vue.d.ts +4 -4
  52. package/es/image-list-input/index.d.ts +3 -3
  53. package/es/image-list-input/src/image-list-input.vue.d.ts +3 -3
  54. package/es/index.d.ts +2 -0
  55. package/es/index.mjs +9 -1
  56. package/es/index.mjs.map +1 -1
  57. package/es/index.scss +14 -0
  58. package/es/page-diy/index.d.ts +70 -4
  59. package/es/page-diy/src/components/DragTool.vue.d.ts +2 -1
  60. package/es/page-diy/src/components/DragTool.vue.mjs +12 -15
  61. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  62. package/es/page-diy/src/components/PreviewPhone.vue2.mjs +74 -2
  63. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  64. package/es/page-diy/src/config/base/dkSetting.d.ts +68 -2
  65. package/es/page-diy/src/config/base/dkSetting.mjs +83 -0
  66. package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
  67. package/es/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
  68. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +2 -1
  69. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
  70. package/es/page-diy/src/config/rule/min/common/index.d.ts +2 -0
  71. package/es/page-diy/src/config/rule/min/index.d.ts +2 -0
  72. package/es/page-diy/src/page-diy.vue.d.ts +70 -4
  73. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.d.ts +1 -1
  74. package/es/page-diy/src/views/min/DkMinTitle.vue.d.ts +1 -1
  75. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.d.ts +2 -2
  76. package/es/page-diy/src/views/web/DkViewDialog.vue.d.ts +2 -2
  77. package/es/page-diy/src/views/web/DkViewGridCellList.vue.d.ts +1 -1
  78. package/es/page-diy/src/views/web/DkViewImage.vue.d.ts +2 -2
  79. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.d.ts +2 -2
  80. package/es/page-diy/src/views/web/DkViewSwipe.vue.d.ts +1 -1
  81. package/es/page-diy/src/views/web/DkViewTitle.vue.d.ts +2 -2
  82. package/es/page-diy/style/drag-tool.css +1 -1
  83. package/es/page-diy/style/drag-tool.scss +1 -1
  84. package/es/page-diy/style/index.css +1 -1
  85. package/es/poster-input/index.d.ts +6 -6
  86. package/es/poster-input/src/component/poster.vue.d.ts +3 -3
  87. package/es/poster-input/src/poster-input.vue.d.ts +3 -3
  88. package/es/select/src/select.vue.d.ts +3 -3
  89. package/es/style-animation-input/index.d.ts +25 -0
  90. package/es/style-animation-input/index.mjs +8 -0
  91. package/es/style-animation-input/index.mjs.map +1 -0
  92. package/es/style-animation-input/src/props.d.ts +15 -0
  93. package/es/style-animation-input/src/props.mjs +16 -0
  94. package/es/style-animation-input/src/props.mjs.map +1 -0
  95. package/es/style-animation-input/src/style-animation-input.vue.d.ts +24 -0
  96. package/es/style-animation-input/src/style-animation-input.vue.mjs +7 -0
  97. package/es/style-animation-input/src/style-animation-input.vue.mjs.map +1 -0
  98. package/es/style-animation-input/src/style-animation-input.vue2.mjs +116 -0
  99. package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -0
  100. package/es/style-animation-input/style/index.css +1 -0
  101. package/es/style-animation-input/style/index.scss +14 -0
  102. package/es/style-box-input/index.d.ts +1 -1
  103. package/es/style-box-input/src/style-box-input.vue.d.ts +1 -1
  104. package/es/style-input/index.d.ts +1 -1
  105. package/es/style-input/src/style-input.vue.d.ts +1 -1
  106. package/es/style-number-input/index.d.ts +3 -2
  107. package/es/style-number-input/src/style-number-input.vue.d.ts +3 -2
  108. package/es/style-number-input/src/style-number-input.vue2.mjs +3 -2
  109. package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
  110. package/es/style-position-input/src/style-position-input.vue2.mjs +23 -39
  111. package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
  112. package/es/style-shadow-input/index.d.ts +2 -2
  113. package/es/style-shadow-input/src/style-shadow-content.vue.d.ts +1 -1
  114. package/es/style-shadow-input/src/style-shadow-input.vue.d.ts +1 -1
  115. package/es/table/index.d.ts +2 -2
  116. package/es/tiny-editor/index.d.ts +4 -4
  117. package/es/tiny-editor/src/tiny-editor.vue.d.ts +4 -4
  118. package/es/video-input/index.d.ts +4 -4
  119. package/es/video-input/src/video-input.vue.d.ts +4 -4
  120. package/es/video-list-input/index.d.ts +3 -3
  121. package/es/video-list-input/src/video-list-input.vue.d.ts +3 -3
  122. package/lib/animate-select/index.d.ts +19 -0
  123. package/lib/animate-select/index.js +14 -0
  124. package/lib/animate-select/index.js.map +1 -0
  125. package/lib/animate-select/src/animate-select.vue.d.ts +18 -0
  126. package/lib/animate-select/src/animate-select.vue.js +11 -0
  127. package/lib/animate-select/src/animate-select.vue.js.map +1 -0
  128. package/lib/animate-select/src/animate-select.vue2.js +172 -0
  129. package/lib/animate-select/src/animate-select.vue2.js.map +1 -0
  130. package/lib/animate-select/src/animates.d.ts +9 -0
  131. package/lib/animate-select/src/animates.js +102 -0
  132. package/lib/animate-select/src/animates.js.map +1 -0
  133. package/lib/animate-select/src/props.d.ts +11 -0
  134. package/lib/animate-select/src/props.js +13 -0
  135. package/lib/animate-select/src/props.js.map +1 -0
  136. package/lib/animate-select/style/index.css +1 -0
  137. package/lib/animate-select/style/index.scss +41 -0
  138. package/lib/audio-input/index.d.ts +4 -4
  139. package/lib/audio-input/src/audio-input.vue.d.ts +4 -4
  140. package/lib/audio-list-input/index.d.ts +3 -3
  141. package/lib/audio-list-input/src/audio-list-input.vue.d.ts +3 -3
  142. package/lib/box-size-input/index.d.ts +1 -1
  143. package/lib/box-size-input/src/box-size-input.vue.d.ts +1 -1
  144. package/lib/color-input/index.d.ts +3 -3
  145. package/lib/color-input/src/color-input.vue.d.ts +3 -3
  146. package/lib/dialog/index.d.ts +11 -11
  147. package/lib/dialog/src/dialog.vue.d.ts +3 -3
  148. package/lib/file-input/index.d.ts +4 -4
  149. package/lib/file-input/src/file-input.vue.d.ts +4 -4
  150. package/lib/file-list-input/index.d.ts +4 -4
  151. package/lib/file-list-input/src/file-list-input.vue.d.ts +4 -4
  152. package/lib/form/index.d.ts +10 -10
  153. package/lib/form/src/form.vue.d.ts +2 -2
  154. package/lib/group/index.d.ts +6 -6
  155. package/lib/group/src/group.vue.d.ts +6 -6
  156. package/lib/icon/index.d.ts +3 -3
  157. package/lib/icon-input/index.d.ts +5 -5
  158. package/lib/icon-input/src/icon-content.vue.d.ts +1 -1
  159. package/lib/icon-input/src/icon-dialog.vue.d.ts +1 -1
  160. package/lib/icon-input/src/icon-input.vue.d.ts +3 -3
  161. package/lib/image-input/index.d.ts +4 -4
  162. package/lib/image-input/src/image-input.vue.d.ts +4 -4
  163. package/lib/image-list-input/index.d.ts +3 -3
  164. package/lib/image-list-input/src/image-list-input.vue.d.ts +3 -3
  165. package/lib/index.d.ts +2 -0
  166. package/lib/index.js +14 -2
  167. package/lib/index.js.map +1 -1
  168. package/lib/index.scss +14 -0
  169. package/lib/page-diy/index.d.ts +70 -4
  170. package/lib/page-diy/src/components/DragTool.vue.d.ts +2 -1
  171. package/lib/page-diy/src/components/DragTool.vue.js +12 -15
  172. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  173. package/lib/page-diy/src/components/PreviewPhone.vue2.js +73 -1
  174. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  175. package/lib/page-diy/src/config/base/dkSetting.d.ts +68 -2
  176. package/lib/page-diy/src/config/base/dkSetting.js +83 -0
  177. package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
  178. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
  179. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +2 -1
  180. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
  181. package/lib/page-diy/src/config/rule/min/common/index.d.ts +2 -0
  182. package/lib/page-diy/src/config/rule/min/index.d.ts +2 -0
  183. package/lib/page-diy/src/page-diy.vue.d.ts +70 -4
  184. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.d.ts +1 -1
  185. package/lib/page-diy/src/views/min/DkMinTitle.vue.d.ts +1 -1
  186. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.d.ts +2 -2
  187. package/lib/page-diy/src/views/web/DkViewDialog.vue.d.ts +2 -2
  188. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.d.ts +1 -1
  189. package/lib/page-diy/src/views/web/DkViewImage.vue.d.ts +2 -2
  190. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.d.ts +2 -2
  191. package/lib/page-diy/src/views/web/DkViewSwipe.vue.d.ts +1 -1
  192. package/lib/page-diy/src/views/web/DkViewTitle.vue.d.ts +2 -2
  193. package/lib/page-diy/style/drag-tool.css +1 -1
  194. package/lib/page-diy/style/drag-tool.scss +1 -1
  195. package/lib/page-diy/style/index.css +1 -1
  196. package/lib/poster-input/index.d.ts +6 -6
  197. package/lib/poster-input/src/component/poster.vue.d.ts +3 -3
  198. package/lib/poster-input/src/poster-input.vue.d.ts +3 -3
  199. package/lib/select/src/select.vue.d.ts +3 -3
  200. package/lib/style-animation-input/index.d.ts +25 -0
  201. package/lib/style-animation-input/index.js +14 -0
  202. package/lib/style-animation-input/index.js.map +1 -0
  203. package/lib/style-animation-input/src/props.d.ts +15 -0
  204. package/lib/style-animation-input/src/props.js +18 -0
  205. package/lib/style-animation-input/src/props.js.map +1 -0
  206. package/lib/style-animation-input/src/style-animation-input.vue.d.ts +24 -0
  207. package/lib/style-animation-input/src/style-animation-input.vue.js +11 -0
  208. package/lib/style-animation-input/src/style-animation-input.vue.js.map +1 -0
  209. package/lib/style-animation-input/src/style-animation-input.vue2.js +120 -0
  210. package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -0
  211. package/lib/style-animation-input/style/index.css +1 -0
  212. package/lib/style-animation-input/style/index.scss +14 -0
  213. package/lib/style-box-input/index.d.ts +1 -1
  214. package/lib/style-box-input/src/style-box-input.vue.d.ts +1 -1
  215. package/lib/style-input/index.d.ts +1 -1
  216. package/lib/style-input/src/style-input.vue.d.ts +1 -1
  217. package/lib/style-number-input/index.d.ts +3 -2
  218. package/lib/style-number-input/src/style-number-input.vue.d.ts +3 -2
  219. package/lib/style-number-input/src/style-number-input.vue2.js +3 -2
  220. package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
  221. package/lib/style-position-input/src/style-position-input.vue2.js +22 -38
  222. package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
  223. package/lib/style-shadow-input/index.d.ts +2 -2
  224. package/lib/style-shadow-input/src/style-shadow-content.vue.d.ts +1 -1
  225. package/lib/style-shadow-input/src/style-shadow-input.vue.d.ts +1 -1
  226. package/lib/table/index.d.ts +2 -2
  227. package/lib/tiny-editor/index.d.ts +4 -4
  228. package/lib/tiny-editor/src/tiny-editor.vue.d.ts +4 -4
  229. package/lib/video-input/index.d.ts +4 -4
  230. package/lib/video-input/src/video-input.vue.d.ts +4 -4
  231. package/lib/video-list-input/index.d.ts +3 -3
  232. package/lib/video-list-input/src/video-list-input.vue.d.ts +3 -3
  233. package/package.json +4 -4
@@ -0,0 +1,25 @@
1
+ export declare const StyleAnimationInput: import("@vipl520/utils").WithInstall<import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: ObjectConstructor;
4
+ default: () => {
5
+ animationDelay: string;
6
+ animationDuration: string;
7
+ animationIterationCount: string;
8
+ };
9
+ };
10
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ modelValue: {
12
+ type: ObjectConstructor;
13
+ default: () => {
14
+ animationDelay: string;
15
+ animationDuration: string;
16
+ animationIterationCount: string;
17
+ };
18
+ };
19
+ }>> & {
20
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
+ }, {
22
+ modelValue: Record<string, any>;
23
+ }, {}>>;
24
+ export default StyleAnimationInput;
25
+ export * from './src/props';
@@ -0,0 +1,8 @@
1
+ import { withInstall } from '@vipl520/utils';
2
+ import _StyleAnimationInput from './src/style-animation-input.vue.mjs';
3
+ export { styleAnimationInputProps } from './src/props.mjs';
4
+
5
+ const StyleAnimationInput = withInstall(_StyleAnimationInput);
6
+
7
+ export { StyleAnimationInput, StyleAnimationInput as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/style-animation-input/index.ts"],"sourcesContent":["import { withInstall } from '@vipl520/utils'\nimport _StyleAnimationInput from './src/style-animation-input.vue'\n\nexport const StyleAnimationInput = withInstall(_StyleAnimationInput)\nexport default StyleAnimationInput\n\nexport * from './src/props'\n"],"names":[],"mappings":";;;;AAGa,MAAA,mBAAA,GAAsB,YAAY,oBAAoB;;;;"}
@@ -0,0 +1,15 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ export declare const styleAnimationInputProps: {
3
+ /**
4
+ * 类型定义
5
+ */
6
+ modelValue: {
7
+ type: ObjectConstructor;
8
+ default: () => {
9
+ animationDelay: string;
10
+ animationDuration: string;
11
+ animationIterationCount: string;
12
+ };
13
+ };
14
+ };
15
+ export type StyleAnimationInputProps = ExtractPropTypes<typeof styleAnimationInputProps>;
@@ -0,0 +1,16 @@
1
+ const styleAnimationInputProps = {
2
+ /**
3
+ * 类型定义
4
+ */
5
+ modelValue: {
6
+ type: Object,
7
+ default: () => ({
8
+ animationDelay: "0s",
9
+ animationDuration: "1s",
10
+ animationIterationCount: "infinite"
11
+ })
12
+ }
13
+ };
14
+
15
+ export { styleAnimationInputProps };
16
+ //# sourceMappingURL=props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.mjs","sources":["../../../src/style-animation-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleAnimationInputProps = {\n /**\n * 类型定义\n */\n modelValue: {\n type: Object,\n default: () => ({\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n }),\n },\n}\n\nexport type StyleAnimationInputProps = ExtractPropTypes<typeof styleAnimationInputProps>\n"],"names":[],"mappings":"AAEO,MAAM,wBAA2B,GAAA;AAAA;AAAA;AAAA;AAAA,EAItC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO;AAAA,MACd,cAAgB,EAAA,IAAA;AAAA,MAChB,iBAAmB,EAAA,IAAA;AAAA,MACnB,uBAAyB,EAAA,UAAA;AAAA,KAC3B,CAAA;AAAA,GACF;AACF;;;;"}
@@ -0,0 +1,24 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: ObjectConstructor;
4
+ default: () => {
5
+ animationDelay: string;
6
+ animationDuration: string;
7
+ animationIterationCount: string;
8
+ };
9
+ };
10
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ modelValue: {
12
+ type: ObjectConstructor;
13
+ default: () => {
14
+ animationDelay: string;
15
+ animationDuration: string;
16
+ animationIterationCount: string;
17
+ };
18
+ };
19
+ }>> & {
20
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
+ }, {
22
+ modelValue: Record<string, any>;
23
+ }, {}>;
24
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from './style-animation-input.vue2.mjs';
2
+ import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
3
+
4
+ var _StyleAnimationInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\style-animation-input\\src\\style-animation-input.vue"]]);
5
+
6
+ export { _StyleAnimationInput as default };
7
+ //# sourceMappingURL=style-animation-input.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-animation-input.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,116 @@
1
+ import { createElementVNode, defineComponent, reactive, watch, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx } from 'vue';
2
+ import { styleAnimationInputProps } from './props.mjs';
3
+
4
+ const _hoisted_1 = { class: "dk-style-animation-input" };
5
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode(
6
+ "p",
7
+ { class: "form-help" },
8
+ "\u8BBE\u7F6E\u52A8\u753B\u9875\u9762\u52A0\u8F7D\u5B8C\u6BD5\u591A\u5C11\u79D2\u540E\u6267\u884C",
9
+ -1
10
+ /* HOISTED */
11
+ );
12
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode(
13
+ "p",
14
+ { class: "form-help" },
15
+ "\u8BBE\u7F6E\u6BCF\u6B21\u52A8\u753B\u52A0\u8F7D\u7684\u52A8\u753B\u65F6\u957F",
16
+ -1
17
+ /* HOISTED */
18
+ );
19
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode(
20
+ "p",
21
+ { class: "form-help" },
22
+ "\u5F53\u5FAA\u73AF\u6B21\u6570\u8BBE\u7F6E\u4E3A0\u7684\u65F6\u5019\uFF0C\u8868\u793A\u65E0\u9650\u5FAA\u73AF\uFF0C\u5165\u573A\u52A8\u753B\u5EFA\u8BAE\u4E3A1",
23
+ -1
24
+ /* HOISTED */
25
+ );
26
+ const __default__ = defineComponent({
27
+ name: "DkStyleAnimationInput"
28
+ });
29
+ var _sfc_main = /* @__PURE__ */ defineComponent({
30
+ ...__default__,
31
+ props: styleAnimationInputProps,
32
+ emits: ["update:modelValue"],
33
+ setup(__props, { emit }) {
34
+ const props = __props;
35
+ const form = reactive({
36
+ animationDelay: 0,
37
+ animationDuration: 1,
38
+ animationIterationCount: 0
39
+ });
40
+ watch(
41
+ form,
42
+ () => {
43
+ const value = {};
44
+ value.animationDelay = form.animationDelay + "s";
45
+ value.animationDuration = form.animationDuration + "s";
46
+ value.animationIterationCount = form.animationIterationCount == 0 ? "infinite" : form.animationIterationCount;
47
+ emit("update:modelValue", value);
48
+ },
49
+ { deep: true }
50
+ );
51
+ const init = () => {
52
+ const value = props.modelValue;
53
+ form.animationDelay = parseFloat(value.animationDelay || "0s");
54
+ form.animationDuration = parseFloat(value.animationDuration || "1");
55
+ form.animationIterationCount = parseInt(
56
+ (value.animationIterationCount === "infinite" ? 0 : value.animationIterationCount) || 0
57
+ );
58
+ };
59
+ watch(
60
+ () => props.modelValue,
61
+ () => {
62
+ init();
63
+ }
64
+ );
65
+ onMounted(() => {
66
+ init();
67
+ });
68
+ return (_ctx, _cache) => {
69
+ const _component_el_input_number = resolveComponent("el-input-number");
70
+ const _component_el_form_item = resolveComponent("el-form-item");
71
+ return openBlock(), createElementBlock("div", _hoisted_1, [
72
+ createVNode(_component_el_form_item, { label: "\u5EF6\u8FDF\u6267\u884C" }, {
73
+ default: withCtx(() => [
74
+ createVNode(_component_el_input_number, {
75
+ modelValue: form.animationDelay,
76
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.animationDelay = $event),
77
+ step: 0.1,
78
+ min: 0
79
+ }, null, 8, ["modelValue"]),
80
+ _hoisted_2
81
+ ]),
82
+ _: 1
83
+ /* STABLE */
84
+ }),
85
+ createVNode(_component_el_form_item, { label: "\u52A8\u753B\u65F6\u957F" }, {
86
+ default: withCtx(() => [
87
+ createVNode(_component_el_input_number, {
88
+ modelValue: form.animationDuration,
89
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.animationDuration = $event),
90
+ step: 0.1,
91
+ min: 0
92
+ }, null, 8, ["modelValue"]),
93
+ _hoisted_3
94
+ ]),
95
+ _: 1
96
+ /* STABLE */
97
+ }),
98
+ createVNode(_component_el_form_item, { label: "\u5FAA\u73AF\u6B21\u6570" }, {
99
+ default: withCtx(() => [
100
+ createVNode(_component_el_input_number, {
101
+ modelValue: form.animationIterationCount,
102
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.animationIterationCount = $event),
103
+ min: 0
104
+ }, null, 8, ["modelValue"]),
105
+ _hoisted_4
106
+ ]),
107
+ _: 1
108
+ /* STABLE */
109
+ })
110
+ ]);
111
+ };
112
+ }
113
+ });
114
+
115
+ export { _sfc_main as default };
116
+ //# sourceMappingURL=style-animation-input.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-animation-input.vue2.mjs","sources":["../../../src/style-animation-input/src/style-animation-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleAnimationInput',\n});\n</script>\n<template>\n <div class=\"dk-style-animation-input\">\n <el-form-item label=\"延迟执行\">\n <el-input-number v-model=\"form.animationDelay\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置动画页面加载完毕多少秒后执行</p>\n </el-form-item>\n <el-form-item label=\"动画时长\">\n <el-input-number v-model=\"form.animationDuration\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置每次动画加载的动画时长</p>\n </el-form-item>\n <el-form-item label=\"循环次数\">\n <el-input-number v-model=\"form.animationIterationCount\" :min=\"0\" />\n <p class=\"form-help\">当循环次数设置为0的时候,表示无限循环,入场动画建议为1</p>\n </el-form-item>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleAnimationInputProps } from './props'\nimport { onMounted, reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleAnimationInputProps)\n\nconst form: any = reactive({\n animationDelay: 0,\n animationDuration: 1,\n animationIterationCount: 0,\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(\n form,\n () => {\n const value: any = {}\n value.animationDelay = form.animationDelay + 's'\n value.animationDuration = form.animationDuration + 's'\n value.animationIterationCount = form.animationIterationCount == 0 ? 'infinite' : form.animationIterationCount\n emit('update:modelValue', value)\n },\n { deep: true }\n)\nconst init = () => {\n const value = props.modelValue\n form.animationDelay = parseFloat(value.animationDelay || '0s')\n form.animationDuration = parseFloat(value.animationDuration || '1')\n form.animationIterationCount = parseInt(\n (value.animationIterationCount === 'infinite' ? 0 : value.animationIterationCount) || 0\n )\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n // emit('update:modelValue', value)\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,uBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA2BD,IAAA,MAAM,OAAY,QAAS,CAAA;AAAA,MACzB,cAAgB,EAAA,CAAA;AAAA,MAChB,iBAAmB,EAAA,CAAA;AAAA,MACnB,uBAAyB,EAAA,CAAA;AAAA,KAC1B,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,IAAA;AAAA,MACA,MAAM;AACJ,QAAA,MAAM,QAAa,EAAC,CAAA;AACpB,QAAM,KAAA,CAAA,cAAA,GAAiB,KAAK,cAAiB,GAAA,GAAA,CAAA;AAC7C,QAAM,KAAA,CAAA,iBAAA,GAAoB,KAAK,iBAAoB,GAAA,GAAA,CAAA;AACnD,QAAA,KAAA,CAAM,uBAA0B,GAAA,IAAA,CAAK,uBAA2B,IAAA,CAAA,GAAI,aAAa,IAAK,CAAA,uBAAA,CAAA;AACtF,QAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAAA,OACjC;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AACA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,MAAM,QAAQ,KAAM,CAAA,UAAA,CAAA;AACpB,MAAA,IAAA,CAAK,cAAiB,GAAA,UAAA,CAAW,KAAM,CAAA,cAAA,IAAkB,IAAI,CAAA,CAAA;AAC7D,MAAA,IAAA,CAAK,iBAAoB,GAAA,UAAA,CAAW,KAAM,CAAA,iBAAA,IAAqB,GAAG,CAAA,CAAA;AAClE,MAAA,IAAA,CAAK,uBAA0B,GAAA,QAAA;AAAA,QAAA,CAC5B,KAAM,CAAA,uBAAA,KAA4B,UAAa,GAAA,CAAA,GAAI,MAAM,uBAA4B,KAAA,CAAA;AAAA,OACxF,CAAA;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OAEP;AAAA,KACF,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ .dk-style-animation-input .el-form-item__content{display:block}.dk-style-animation-input .form-help{margin-top:4px;margin-bottom:0;font-size:12px;line-height:1.5;color:#888}
@@ -0,0 +1,14 @@
1
+ /* stylelint-disable */
2
+ .dk-style-animation-input {
3
+ .el-form-item__content {
4
+ display: block;
5
+ }
6
+ .form-help {
7
+ margin-top: 4px;
8
+ margin-bottom: 0;
9
+ font-size: 12px;
10
+ line-height: 1.5;
11
+ color: #888;
12
+ }
13
+ }
14
+ /* stylelint-enable */
@@ -27,8 +27,8 @@ export declare const StyleBoxInput: import("@vipl520/utils").WithInstall<import(
27
27
  }>> & {
28
28
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
29
  }, {
30
- height: number;
31
30
  modelValue: Record<string, any>;
31
+ height: number;
32
32
  help: string;
33
33
  }, {}>>;
34
34
  export default StyleBoxInput;
@@ -27,8 +27,8 @@ declare const _default: import("vue").DefineComponent<{
27
27
  }>> & {
28
28
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
29
  }, {
30
- height: number;
31
30
  modelValue: Record<string, any>;
31
+ height: number;
32
32
  help: string;
33
33
  }, {}>;
34
34
  export default _default;
@@ -19,8 +19,8 @@ export declare const StyleInput: import("@vipl520/utils").WithInstall<import("vu
19
19
  }>> & {
20
20
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
21
  }, {
22
- components: import("./src/default").StyleInputConfig;
23
22
  modelValue: Record<string, any>;
23
+ components: import("./src/default").StyleInputConfig;
24
24
  }, {}>>;
25
25
  export default StyleInput;
26
26
  export * from './src/props';
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  }>> & {
20
20
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
21
  }, {
22
- components: import("./default").StyleInputConfig;
23
22
  modelValue: Record<string, any>;
23
+ components: import("./default").StyleInputConfig;
24
24
  }, {}>;
25
25
  export default _default;
@@ -23,7 +23,7 @@ export declare const StyleNumberInput: import("@vipl520/utils").WithInstall<impo
23
23
  default: string;
24
24
  type: StringConstructor;
25
25
  };
26
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue")[], "input" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  modelValue: {
28
28
  default: string;
29
29
  type: StringConstructor;
@@ -49,11 +49,12 @@ export declare const StyleNumberInput: import("@vipl520/utils").WithInstall<impo
49
49
  type: StringConstructor;
50
50
  };
51
51
  }>> & {
52
+ onInput?: ((...args: any[]) => any) | undefined;
52
53
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
53
54
  }, {
55
+ modelValue: string;
54
56
  icon: string;
55
57
  direction: string;
56
- modelValue: string;
57
58
  units: string[];
58
59
  showUnit: boolean;
59
60
  tooltipContent: string;
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
23
23
  default: string;
24
24
  type: StringConstructor;
25
25
  };
26
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
26
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue")[], "input" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  modelValue: {
28
28
  default: string;
29
29
  type: StringConstructor;
@@ -49,11 +49,12 @@ declare const _default: import("vue").DefineComponent<{
49
49
  type: StringConstructor;
50
50
  };
51
51
  }>> & {
52
+ onInput?: ((...args: any[]) => any) | undefined;
52
53
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
53
54
  }, {
55
+ modelValue: string;
54
56
  icon: string;
55
57
  direction: string;
56
- modelValue: string;
57
58
  units: string[];
58
59
  showUnit: boolean;
59
60
  tooltipContent: string;
@@ -8,7 +8,7 @@ const __default__ = defineComponent({
8
8
  var _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  ...__default__,
10
10
  props: styleNumberInputProps,
11
- emits: ["update:modelValue"],
11
+ emits: ["input", "update:modelValue"],
12
12
  setup(__props, { emit }) {
13
13
  const props = __props;
14
14
  const values = splitUnit(props.modelValue, props.units);
@@ -90,7 +90,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
90
90
  modelValue: form.number,
91
91
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.number = $event),
92
92
  type: "text",
93
- controls: false
93
+ controls: false,
94
+ onInput: _cache[2] || (_cache[2] = ($event) => emit("input", $event))
94
95
  }, createSlots({
95
96
  prefix: withCtx(() => [
96
97
  createElementVNode(
@@ -1 +1 @@
1
- {"version":3,"file":"style-number-input.vue2.mjs","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input v-model=\"form.number\" type=\"text\" :controls=\"false\">\n <template #prefix>\n <span\n class=\"w-resize\"\n :class=\"[`${props.direction}-resize`]\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :disabled=\"!props.tooltipContent\"\n :content=\"props.tooltipContent\"\n placement=\"top\"\n :open-delay=\"500\"\n >\n <dk-icon :icon=\"props.icon || 'Rank'\"></dk-icon>\n </el-tooltip>\n </span>\n </template>\n <template v-if=\"showUnit\" #append>\n <el-select v-model=\"form.unit\" style=\"width: 40px\" suffix-icon=\"\">\n <el-option v-for=\"(item, index) in units\" :key=\"index\" :label=\"item\" :value=\"item\" />\n </el-select>\n </template>\n </el-input>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { styleNumberInputProps } from './props'\nimport { reactive, ref, watch } from 'vue'\nimport { splitUnit } from '@vipl520/utils'\n\n\nconst props = defineProps(styleNumberInputProps)\nconst values = splitUnit(props.modelValue, props.units)\nconst form: any = reactive({\n number: values.number,\n unit: values.unit || 'px',\n})\n\nconst isDragging = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst startY = ref(0) // 开始的Y坐标\nconst startX = ref(0) // 开始的X坐标\nconst handleMouseDown = (event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n startY.value = event.clientY\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n let increment\n if (props.direction === 'horizontal') {\n const dx = event.clientX - startX.value\n increment = Math.floor(dx / 10)\n startX.value += increment * 10\n } else if (props.direction === 'vertical') {\n const dy = event.clientY - startY.value\n increment = Math.floor(dy / 10)\n startY.value += increment * 10\n }\n form.number = parseInt(form.number + increment)\n }\n}\n\nconst handleMouseUp = () => {\n console.log('up')\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n}\nconst emit = defineEmits(['update:modelValue'])\n\nwatch(\n () => form,\n () => {\n if (form.number === '') {\n emit('update:modelValue', '')\n } else {\n emit('update:modelValue', form.number + form.unit)\n }\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n const values = splitUnit(props.modelValue, props.units)\n form.number = values.number\n form.unit = values.unit || 'px'\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","values"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAyCD,IAAA,MAAM,MAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,IAAA,MAAM,OAAY,QA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ACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAMC,OAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,QAAA,IAAA,CAAK,SAASA,OAAO,CAAA,MAAA,CAAA;AACrB,QAAK,IAAA,CAAA,IAAA,GAAOA,QAAO,IAAQ,IAAA,IAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-number-input.vue2.mjs","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input v-model=\"form.number\" type=\"text\" :controls=\"false\" @input=\"emit('input', $event)\">\n <template #prefix>\n <span\n class=\"w-resize\"\n :class=\"[`${props.direction}-resize`]\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :disabled=\"!props.tooltipContent\"\n :content=\"props.tooltipContent\"\n placement=\"top\"\n :open-delay=\"500\"\n >\n <dk-icon :icon=\"props.icon || 'Rank'\"></dk-icon>\n </el-tooltip>\n </span>\n </template>\n <template v-if=\"showUnit\" #append>\n <el-select v-model=\"form.unit\" style=\"width: 40px\" suffix-icon=\"\">\n <el-option v-for=\"(item, index) in units\" :key=\"index\" :label=\"item\" :value=\"item\" />\n </el-select>\n </template>\n </el-input>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { styleNumberInputProps } from './props'\nimport { reactive, ref, watch } from 'vue'\nimport { splitUnit } from '@vipl520/utils'\n\n\nconst props = defineProps(styleNumberInputProps)\nconst values = splitUnit(props.modelValue, props.units)\nconst form: any = reactive({\n number: values.number,\n unit: values.unit || 'px',\n})\n\nconst isDragging = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst startY = ref(0) // 开始的Y坐标\nconst startX = ref(0) // 开始的X坐标\nconst handleMouseDown = (event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n startY.value = event.clientY\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n let increment\n if (props.direction === 'horizontal') {\n const dx = event.clientX - startX.value\n increment = Math.floor(dx / 10)\n startX.value += increment * 10\n } else if (props.direction === 'vertical') {\n const dy = event.clientY - startY.value\n increment = Math.floor(dy / 10)\n startY.value += increment * 10\n }\n form.number = parseInt(form.number + increment)\n }\n}\n\nconst handleMouseUp = () => {\n console.log('up')\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n}\nconst emit = defineEmits(['input', 'update:modelValue'])\n\nwatch(\n () => form,\n () => {\n if (form.number === '') {\n emit('update:modelValue', '')\n } else {\n emit('update:modelValue', form.number + form.unit)\n }\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n const values = splitUnit(props.modelValue, props.units)\n form.number = values.number\n form.unit = values.unit || 'px'\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","values"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM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,CAAK,qBAAqB,EAAE,CAAA,CAAA;AAAA,SACvB,MAAA;AACL,UAAA,IAAA,CAAK,mBAAqB,EAAA,IAAA,CAAK,MAAS,GAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,SACnD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAMC,OAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,QAAA,IAAA,CAAK,SAASA,OAAO,CAAA,MAAA,CAAA;AACrB,QAAK,IAAA,CAAA,IAAA,GAAOA,QAAO,IAAQ,IAAA,IAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle } from 'vue';
1
+ import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, Fragment, renderList, createTextVNode, toDisplayString, normalizeStyle } from 'vue';
2
2
  import { stylePositionInputProps } from './props.mjs';
3
3
  import { useElementSize } from '@vueuse/core';
4
4
 
@@ -40,49 +40,40 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
40
40
  { label: "\u5DE6\u4E0A", value: "left-top" },
41
41
  { label: "\u5DE6\u4E0B", value: "left-down" },
42
42
  { label: "\u53F3\u4E0A", value: "right-top" },
43
- { label: "\u53F3\u4E0B", value: "right-down" }
43
+ { label: "\u53F3\u4E0B", value: "right-down" },
44
+ { label: "\u4E0B\u5C45\u4E2D", value: "down-center" },
45
+ { label: "\u4E0A\u5C45\u4E2D", value: "up-center" }
44
46
  ];
47
+ const change = ref(false);
45
48
  const positionChange = (value) => {
49
+ change.value = true;
46
50
  switch (value) {
47
51
  case "left-top":
48
- form.value = {
49
- left: "1px",
50
- top: "0px",
51
- right: "",
52
- bottom: ""
53
- };
52
+ form.value = { left: "1px", top: "1px", right: "", bottom: "" };
54
53
  break;
55
54
  case "left-down":
56
- form.value = {
57
- left: "0px",
58
- top: "",
59
- right: "",
60
- bottom: "0px"
61
- };
55
+ form.value = { left: "1px", bottom: "1px", right: "", up: "" };
62
56
  break;
63
57
  case "right-top":
64
- form.value = {
65
- left: "",
66
- top: "0px",
67
- right: "0px",
68
- bottom: ""
69
- };
58
+ form.value = { top: "1px", right: "1px", left: "", bottom: "" };
70
59
  break;
71
60
  case "right-down":
72
- form.value = {
73
- left: "",
74
- top: "",
75
- right: "0px",
76
- bottom: "0px"
77
- };
61
+ form.value = { right: "1px", bottom: "1px", left: "", up: "" };
62
+ break;
63
+ case "down-center":
64
+ form.value = { left: "1px", right: "1px", bottom: "1px", up: "" };
65
+ break;
66
+ case "up-center":
67
+ form.value = { left: "1px", top: "1px", right: "1px", bottom: "" };
78
68
  break;
79
69
  }
80
- emitValue();
81
70
  };
82
71
  const emitValue = () => {
83
72
  const data = Object.keys(form.value).reduce((prev, cur) => {
84
- if (form.value[cur] && cur !== "position") {
85
- prev[cur] = form.value[cur];
73
+ if (change.value && form.value[cur] != "0px" || !change.value && cur !== "position") {
74
+ if (form.value[cur]) {
75
+ prev[cur] = form.value[cur];
76
+ }
86
77
  }
87
78
  return prev;
88
79
  }, {});
@@ -159,15 +150,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
159
150
  ]),
160
151
  _: 1
161
152
  /* STABLE */
162
- }),
163
- createCommentVNode(' <el-select v-model="form.position" placeholder="Select">'),
164
- createCommentVNode(" <el-option"),
165
- createCommentVNode(' v-for="item in positions"'),
166
- createCommentVNode(' :key="item.value"'),
167
- createCommentVNode(' :label="item.label"'),
168
- createCommentVNode(' :value="item.value"'),
169
- createCommentVNode(" />"),
170
- createCommentVNode(" </el-select>")
153
+ })
171
154
  ]),
172
155
  _: 1
173
156
  /* STABLE */
@@ -209,7 +192,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
209
192
  default: withCtx(() => [
210
193
  createVNode(_component_dk_style_number_input, {
211
194
  modelValue: form.value[item.value],
212
- "onUpdate:modelValue": ($event) => form.value[item.value] = $event
195
+ "onUpdate:modelValue": ($event) => form.value[item.value] = $event,
196
+ onInput: _cache[0] || (_cache[0] = ($event) => change.value = false)
213
197
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
214
198
  ]),
215
199
  _: 2
@@ -1 +1 @@
1
- {"version":3,"file":"style-position-input.vue2.mjs","sources":["../../../src/style-position-input/src/style-position-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStylePositionInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-position-input\">\n <el-form label-width=\"50px\" label-position=\"left\">\n <div>\n <el-form-item label=\"常用\">\n <el-radio-group @change=\"positionChange\">\n <el-radio-button v-for=\"(item, key) in positions\" :key=\"key\" :label=\"item.value\">\n {{ item.label }}\n </el-radio-button>\n </el-radio-group>\n <!-- <el-select v-model=\"form.position\" placeholder=\"Select\">-->\n <!-- <el-option-->\n <!-- v-for=\"item in positions\"-->\n <!-- :key=\"item.value\"-->\n <!-- :label=\"item.label\"-->\n <!-- :value=\"item.value\"-->\n <!-- />-->\n <!-- </el-select>-->\n </el-form-item>\n </div>\n <div class=\"m-t-10px\">\n <el-row :gutter=\"20\">\n <el-col v-for=\"(item, key) in custom\" :key=\"key\" :span=\"span\" class=\"m-b-5px\">\n <el-form-item :label=\"item.label\">\n <template #label>\n <el-tooltip class=\"item\" effect=\"dark\" :content=\"item.tip\" placement=\"top\">\n <span\n style=\"cursor: pointer\"\n :style=\"form[item.value] ? 'color:var(--el-color-primary)' : ''\"\n @click=\"form[item.value] = ''\"\n >\n {{ item.label }}:</span\n >\n </el-tooltip>\n </template>\n <dk-style-number-input v-model=\"form[item.value]\"></dk-style-number-input>\n </el-form-item>\n </el-col>\n </el-row>\n </div>\n </el-form>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { stylePositionInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\nconst span = computed(() => {\n if (width.value <= 300) {\n return 24\n } else if (width.value < 800) {\n return 12\n } else {\n return 6\n }\n})\n\n\n\nconst props = defineProps(stylePositionInputProps)\n\nconst form: any = ref({\n left: props.modelValue.left || '',\n top: props.modelValue.top || '',\n right: props.modelValue.right || '',\n bottom: props.modelValue.bottom || '',\n})\n\nconst custom = [\n { label: '上', value: 'top', tip: '当前距离顶部距离,点击清除' },\n { label: '右', value: 'right', tip: '当前距离右侧的距离,点击清除' },\n { label: '下', value: 'bottom', tip: '当前距离底部的距离,点击清除' },\n { label: '左', value: 'left', tip: '当前距离左侧的距离,点击清除' },\n]\n\nconst positions = [\n { label: '左上', value: 'left-top' },\n { label: '左下', value: 'left-down' },\n { label: '右上', value: 'right-top' },\n { label: '右下', value: 'right-down' },\n]\nconst emit = defineEmits(['update:modelValue'])\nconst positionChange = (value: string) => {\n switch (value) {\n case 'left-top':\n form.value = {\n left: '1px',\n top: '0px',\n right: '',\n bottom: '',\n }\n break\n case 'left-down':\n form.value = {\n left: '0px',\n top: '',\n right: '',\n bottom: '0px',\n }\n break\n case 'right-top':\n form.value = {\n left: '',\n top: '0px',\n right: '0px',\n bottom: '',\n }\n break\n case 'right-down':\n form.value = {\n left: '',\n top: '',\n right: '0px',\n bottom: '0px',\n }\n break\n }\n emitValue()\n}\nconst emitValue = () => {\n // 只保留form中有的值,并移除position\n const data = Object.keys(form.value).reduce((prev: any, cur) => {\n if (form.value[cur] && cur !== 'position') {\n prev[cur] = form.value[cur]\n }\n return prev\n }, {})\n emit('update:modelValue', data)\n}\nwatch(\n () => form.value,\n () => {\n emitValue()\n },\n { deep: true }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n Object.keys(props.modelValue).reduce((prev: any, cur) => {\n if (cur !== 'position') {\n prev[cur] = props.modelValue[cur]\n }\n return prev\n }, form.value)\n },\n { deep: true }\n)\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAmDD,IAAM,MAAA,EAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAA,cAAA,CAAe,EAAE,CAAA,CAAA;AAEnC,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAI,IAAA,KAAA,CAAM,SAAS,GAAK,EAAA;AACtB,QAAO,OAAA,EAAA,CAAA;AAAA,OACT,MAAA,IAAW,KAAM,CAAA,KAAA,GAAQ,GAAK,EAAA;AAC5B,QAAO,OAAA,EAAA,CAAA;AAAA,OACF,MAAA;AACL,QAAO,OAAA,CAAA,CAAA;AAAA,OACT;AAAA,KACD,CAAA,CAAA;AAMD,IAAA,MAAM,OAAY,GAAI,CAAA;AAAA,MACpB,IAAA,EAAM,KAAM,CAAA,UAAA,CAAW,IAAQ,IAAA,EAAA;AAAA,MAC/B,GAAA,EAAK,KAAM,CAAA,UAAA,CAAW,GAAO,IAAA,EAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,MAAA,EAAQ,KAAM,CAAA,UAAA,CAAW,MAAU,IAAA,EAAA;AAAA,KACpC,CAAA,CAAA;AAED,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAA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YAAA,IAAA,CAAK,GAAG,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AAAA,WAClC;AACA,UAAO,OAAA,IAAA,CAAA;AAAA,SACT,EAAG,KAAK,KAAK,CAAA,CAAA;AAAA,OACf;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-position-input.vue2.mjs","sources":["../../../src/style-position-input/src/style-position-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStylePositionInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-position-input\">\n <el-form label-width=\"50px\" label-position=\"left\">\n <div>\n <el-form-item label=\"常用\">\n <el-radio-group @change=\"positionChange\">\n <el-radio-button v-for=\"(item, key) in positions\" :key=\"key\" :label=\"item.value\">\n {{ item.label }}\n </el-radio-button>\n </el-radio-group>\n </el-form-item>\n </div>\n <div class=\"m-t-10px\">\n <el-row :gutter=\"20\">\n <el-col v-for=\"(item, key) in custom\" :key=\"key\" :span=\"span\" class=\"m-b-5px\">\n <el-form-item :label=\"item.label\">\n <template #label>\n <el-tooltip class=\"item\" effect=\"dark\" :content=\"item.tip\" placement=\"top\">\n <span\n style=\"cursor: pointer\"\n :style=\"form[item.value] ? 'color:var(--el-color-primary)' : ''\"\n @click=\"form[item.value] = ''\"\n >\n {{ item.label }}:</span\n >\n </el-tooltip>\n </template>\n <dk-style-number-input v-model=\"form[item.value]\" @input=\"change = false\"></dk-style-number-input>\n </el-form-item>\n </el-col>\n </el-row>\n </div>\n </el-form>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { stylePositionInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\nconst span = computed(() => {\n if (width.value <= 300) {\n return 24\n } else if (width.value < 800) {\n return 12\n } else {\n return 6\n }\n})\n\n\n\nconst props = defineProps(stylePositionInputProps)\n\nconst form: any = ref({\n left: props.modelValue.left || '',\n top: props.modelValue.top || '',\n right: props.modelValue.right || '',\n bottom: props.modelValue.bottom || '',\n})\n\nconst custom = [\n { label: '上', value: 'top', tip: '当前距离顶部距离,点击清除' },\n { label: '右', value: 'right', tip: '当前距离右侧的距离,点击清除' },\n { label: '下', value: 'bottom', tip: '当前距离底部的距离,点击清除' },\n { label: '左', value: 'left', tip: '当前距离左侧的距离,点击清除' },\n]\n\nconst positions = [\n { label: '左上', value: 'left-top' },\n { label: '左下', value: 'left-down' },\n { label: '右上', value: 'right-top' },\n { label: '右下', value: 'right-down' },\n { label: '下居中', value: 'down-center' },\n { label: '上居中', value: 'up-center' },\n]\nconst emit = defineEmits(['update:modelValue'])\n\nconst change = ref(false)\n\nconst positionChange = (value: string) => {\n change.value = true\n switch (value) {\n case 'left-top':\n form.value = { left: '1px', top: '1px', right: '', bottom: '' }\n break\n case 'left-down':\n form.value = { left: '1px', bottom: '1px', right: '', up: '' }\n break\n case 'right-top':\n form.value = { top: '1px', right: '1px', left: '', bottom: '' }\n break\n case 'right-down':\n form.value = { right: '1px', bottom: '1px', left: '', up: '' }\n break\n case 'down-center':\n form.value = { left: '1px', right: '1px', bottom: '1px', up: '' }\n break\n case 'up-center':\n form.value = { left: '1px', top: '1px', right: '1px', bottom: '' }\n break\n }\n // emitValue()\n}\nconst emitValue = () => {\n const data = Object.keys(form.value).reduce((prev: any, cur) => {\n // 当 change.value 存在时检查是否不等于 '0px',否则只检查当前 key 是否不等于 'position'\n if ((change.value && form.value[cur] != '0px') || (!change.value && cur !== 'position')) {\n if (form.value[cur]) {\n prev[cur] = form.value[cur]\n }\n }\n return prev\n }, {})\n emit('update:modelValue', data)\n}\nwatch(\n () => form.value,\n () => {\n emitValue()\n },\n { deep: true }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n Object.keys(props.modelValue).reduce((prev: any, cur) => {\n if (cur !== 'position') {\n prev[cur] = props.modelValue[cur]\n }\n return prev\n }, form.value)\n },\n { deep: true }\n)\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA2CD,IAAM,MAAA,EAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAA,cAAA,CAAe,EAAE,CAAA,CAAA;AAEnC,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAI,IAAA,KAAA,CAAM,SAAS,GAAK,EAAA;AACtB,QAAO,OAAA,EAAA,CAAA;AAAA,OACT,MAAA,IAAW,KAAM,CAAA,KAAA,GAAQ,GAAK,EAAA;AAC5B,QAAO,OAAA,EAAA,CAAA;AAAA,OACF,MAAA;AACL,QAAO,OAAA,CAAA,CAAA;AAAA,OACT;AAAA,KACD,CAAA,CAAA;AAMD,IAAA,MAAM,OAAY,GAAI,CAAA;AAAA,MACpB,IAAA,EAAM,KAAM,CAAA,UAAA,CAAW,IAAQ,IAAA,EAAA;AAAA,MAC/B,GAAA,EAAK,KAAM,CAAA,UAAA,CAAW,GAAO,IAAA,EAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,MAAA,EAAQ,KAAM,CAAA,UAAA,CAAW,MAAU,IAAA,EAAA;AAAA,KACpC,CAAA,CAAA;AAED,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,EAAE,KAAO,EAAA,QAAA,EAAK,KAAO,EAAA,KAAA,E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,KAAA,CAAM,GAAG,CAAA,CAAA;AAAA,WAC5B;AAAA,SACF;AACA,QAAO,OAAA,IAAA,CAAA;AAAA,OACT,EAAG,EAAE,CAAA,CAAA;AACL,MAAA,IAAA,CAAK,qBAAqB,IAAI,CAAA,CAAA;AAAA,KAChC,CAAA;AACA,IAAA,KAAA;AAAA,MACE,MAAM,IAAK,CAAA,KAAA;AAAA,MACX,MAAM;AACJ,QAAU,SAAA,EAAA,CAAA;AAAA,OACZ;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAA,CAAO,KAAK,KAAM,CAAA,UAAU,EAAE,MAAO,CAAA,CAAC,MAAW,GAAQ,KAAA;AACvD,UAAA,IAAI,QAAQ,UAAY,EAAA;AACtB,YAAA,IAAA,CAAK,GAAG,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AAAA,WAClC;AACA,UAAO,OAAA,IAAA,CAAA;AAAA,SACT,EAAG,KAAK,KAAK,CAAA,CAAA;AAAA,OACf;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -19,8 +19,8 @@ export declare const StyleShadowInput: import("@vipl520/utils").WithInstall<impo
19
19
  }>> & {
20
20
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
21
  }, {
22
- type: "input" | "collapse";
23
22
  modelValue: Record<string, any>;
23
+ type: "input" | "collapse";
24
24
  }, {}>>;
25
25
  export declare const StyleShadowContent: import("@vipl520/utils").WithInstall<import("vue").DefineComponent<{
26
26
  boxSize: {
@@ -73,9 +73,9 @@ export declare const StyleShadowContent: import("@vipl520/utils").WithInstall<im
73
73
  }>> & {
74
74
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
75
75
  }, {
76
+ modelValue: string;
76
77
  max: number;
77
78
  size: string;
78
- modelValue: string;
79
79
  boxSize: number;
80
80
  defaultStyles: any;
81
81
  }, {}>>;
@@ -49,9 +49,9 @@ declare const _default: import("vue").DefineComponent<{
49
49
  }>> & {
50
50
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
51
51
  }, {
52
+ modelValue: string;
52
53
  max: number;
53
54
  size: string;
54
- modelValue: string;
55
55
  boxSize: number;
56
56
  defaultStyles: any;
57
57
  }, {}>;
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  }>> & {
20
20
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
21
21
  }, {
22
- type: "input" | "collapse";
23
22
  modelValue: Record<string, any>;
23
+ type: "input" | "collapse";
24
24
  }, {}>;
25
25
  export default _default;
@@ -5,9 +5,8 @@ export declare const Table: import("@vipl520/utils").WithInstall<{
5
5
  $props: {
6
6
  tableApi?: string | undefined;
7
7
  cacheTable?: boolean | undefined;
8
- key?: string | number | symbol | undefined;
9
8
  style?: unknown;
10
- class?: unknown;
9
+ key?: string | number | symbol | undefined;
11
10
  ref?: import("vue").VNodeRef | undefined;
12
11
  ref_for?: boolean | undefined;
13
12
  ref_key?: string | undefined;
@@ -49,6 +48,7 @@ export declare const Table: import("@vipl520/utils").WithInstall<{
49
48
  }>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
50
49
  [key: string]: any;
51
50
  }>) => void)[] | undefined;
51
+ class?: unknown;
52
52
  };
53
53
  $attrs: {
54
54
  [x: string]: unknown;