@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
@@ -19,7 +19,7 @@ export declare const ImageListInput: import("@vipl520/utils").WithInstall<import
19
19
  default: string;
20
20
  type: StringConstructor;
21
21
  };
22
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "input" | "update:modelValue")[], "change" | "input" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "change")[], "input" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
23
  modelValue: {
24
24
  default: () => never[];
25
25
  type: ArrayConstructor;
@@ -41,13 +41,13 @@ export declare const ImageListInput: import("@vipl520/utils").WithInstall<import
41
41
  type: StringConstructor;
42
42
  };
43
43
  }>> & {
44
- onChange?: ((...args: any[]) => any) | undefined;
45
44
  onInput?: ((...args: any[]) => any) | undefined;
46
45
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
46
+ onChange?: ((...args: any[]) => any) | undefined;
47
47
  }, {
48
- accept: string;
49
48
  modelValue: unknown[];
50
49
  disabled: boolean;
50
+ accept: string;
51
51
  imgSize: number;
52
52
  limit: number;
53
53
  }, {}>>;
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
19
19
  default: string;
20
20
  type: StringConstructor;
21
21
  };
22
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "input" | "update:modelValue")[], "change" | "input" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "change")[], "input" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
23
  modelValue: {
24
24
  default: () => never[];
25
25
  type: ArrayConstructor;
@@ -41,13 +41,13 @@ declare const _default: import("vue").DefineComponent<{
41
41
  type: StringConstructor;
42
42
  };
43
43
  }>> & {
44
- onChange?: ((...args: any[]) => any) | undefined;
45
44
  onInput?: ((...args: any[]) => any) | undefined;
46
45
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
46
+ onChange?: ((...args: any[]) => any) | undefined;
47
47
  }, {
48
- accept: string;
49
48
  modelValue: unknown[];
50
49
  disabled: boolean;
50
+ accept: string;
51
51
  imgSize: number;
52
52
  limit: number;
53
53
  }, {}>;
package/es/index.d.ts CHANGED
@@ -30,6 +30,8 @@ export * from './style-number-input';
30
30
  export * from './table';
31
31
  export * from './select';
32
32
  export * from './poster-input';
33
+ export * from './style-animation-input';
34
+ export * from './animate-select';
33
35
  export declare const install: (app: App, option?: any) => void;
34
36
  declare const _default: {
35
37
  install: (app: App<any>, option?: any) => void;
package/es/index.mjs CHANGED
@@ -30,6 +30,8 @@ import { PageDiy } from './page-diy/index.mjs';
30
30
  import { Table } from './table/index.mjs';
31
31
  import { Select } from './select/index.mjs';
32
32
  import { PosterInput, Poster } from './poster-input/index.mjs';
33
+ import { StyleAnimationInput } from './style-animation-input/index.mjs';
34
+ import { AnimateSelect } from './animate-select/index.mjs';
33
35
  import { directives, setGlobalConfig } from '@vipl520/utils';
34
36
  import Vue3DraggableResizable from 'vue3-draggable-resizable';
35
37
  export { tinyEditorProps } from './tiny-editor/src/props.mjs';
@@ -63,6 +65,8 @@ export { styleNumberInputProps } from './style-number-input/src/props.mjs';
63
65
  export { tableProps } from './table/src/props.mjs';
64
66
  export { selectProps } from './select/src/props.mjs';
65
67
  export { posterInputProps } from './poster-input/src/props.mjs';
68
+ export { styleAnimationInputProps } from './style-animation-input/src/props.mjs';
69
+ export { animateSelectProps } from './animate-select/src/props.mjs';
66
70
 
67
71
  const components = [
68
72
  Test,
@@ -127,6 +131,10 @@ const components = [
127
131
  StylePositionInput,
128
132
  // 样式文字
129
133
  StyleNumberInput,
134
+ // 动画配置
135
+ StyleAnimationInput,
136
+ // 动画class选择
137
+ AnimateSelect,
130
138
  // 数据表格
131
139
  Table,
132
140
  // 选择
@@ -164,5 +172,5 @@ var index = {
164
172
  install
165
173
  };
166
174
 
167
- export { Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, VideoInput, VideoListInput, index as default, install };
175
+ export { AnimateSelect, Attachment, AttachmentDialog, AudioInput, AudioListInput, BoxSizeInput, ColorInput, FileInput, FileListInput, Form, Group, HotAreaInput, Icon, IconContent, IconDialog, IconInput, ImageInput, ImageListInput, PageDiy, Poster, PosterInput, Select, StyleAnimationInput, StyleBackgroundInput, StyleBorderInput, StyleBoxInput, StyleFontInput, StyleInput, StyleNumberInput, StylePositionInput, StyleShadowContent, StyleShadowInput, Table, Test, TinyEditor, VideoInput, VideoListInput, index as default, install };
168
176
  //# sourceMappingURL=index.mjs.map
package/es/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 海报编辑器 poster-input\n // TODO Layout布局组件 layout\n // TODO 应用信息组件 addon-info\n // TODO 用户信息组件 user-info\n // TODO 全局Hook组件 global-hook\n // TODO 前端DIY匹配\n // TODO 开发者工具(自动CRUD)\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,MAAM,UAAa,GAAA;AAAA,EACjB,IAAA;AAAA,EACA,KAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA,MAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,gBAAA;AAAA;AAAA,EAEA,SAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,SAAA;AAAA;AAAA,EAEA,WAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,OAAA;AAAA;AAAA,EAEA,YAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,cAAA;AAAA;AAAA,EAEA,gBAAA;AAAA;AAAA,EAEA,gBAAA;AAAA;AAAA,EAEA,kBAAA;AAAA;AAAA,EAEA,oBAAA;AAAA;AAAA,EAEA,UAAA;AAAA;AAAA,EAEA,kBAAA;AAAA;AAAA,EAEA,gBAAA;AAAA;AAAA,EAEA,KAAA;AAAA;AAAA,EAEA,MAAA;AAAA;AAAA;AAAA,EAGA,WAAA;AAAA;AAAA,EAEA,MAAA;AAAA,EACA,sBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYF,CAAA,CAAA;AAEO,MAAM,OAAU,GAAA,CAAC,GAAU,EAAA,MAAA,GAAc,EAAO,KAAA;AACrD,EAAW,UAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AAC3B,IAAA,IAAI,KAAK,OAAU,EAAA;AACjB,MAAA,GAAA,CAAI,IAAI,IAAI,CAAA,CAAA;AAAA,KACd,MAAA,IAAW,KAAK,IAAM,EAAA;AACpB,MAAI,GAAA,CAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KAC/B;AAAA,GACD,CAAA,CAAA;AACD,EAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 海报编辑器 poster-input\n // TODO Layout布局组件 layout\n // TODO 应用信息组件 addon-info\n // TODO 用户信息组件 user-info\n // TODO 全局Hook组件 global-hook\n // TODO 前端DIY匹配\n // TODO 开发者工具(自动CRUD)\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)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AAc,EAAO,KAAA;AACrD,EAAW,UAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AAC3B,IAAA,IAAI,KAAK,OAAU,EAAA;AACjB,MAAA,GAAA,CAAI,IAAI,IAAI,CAAA,CAAA;AAAA,KACd,MAAA,IAAW,KAAK,IAAM,EAAA;AACpB,MAAI,GAAA,CAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KAC/B;AAAA,GACD,CAAA,CAAA;AACD,EAAA,UAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAA,eAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;"}
package/es/index.scss CHANGED
@@ -22,6 +22,8 @@
22
22
  @import './table/style/index.scss';
23
23
  @import './poster-input/style/index.scss';
24
24
  @import './hot-area-input/style/index.scss';
25
+ @import './animate-select/style/index.scss';
26
+ @import './style-animation-input/style/index.scss';
25
27
 
26
28
  //
27
29
  ::-webkit-scrollbar {
@@ -46,4 +48,16 @@
46
48
  *::after {
47
49
  box-sizing: border-box;
48
50
  }
51
+
52
+ .cl:after {
53
+ content: '.';
54
+ display: block;
55
+ height: 0;
56
+ clear: both;
57
+ visibility: hidden;
58
+ }
59
+
60
+ .cl {
61
+ zoom: 1;
62
+ }
49
63
  /* stylelint-enable */
@@ -148,7 +148,7 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
148
148
  };
149
149
  }>;
150
150
  dkSettingForm: import("vue").Ref<{
151
- rule: {
151
+ rule: ({
152
152
  type: string;
153
153
  props: {
154
154
  modelValue: string;
@@ -182,7 +182,73 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
182
182
  };
183
183
  })[];
184
184
  }[];
185
- }[];
185
+ } | {
186
+ type: string;
187
+ props: {
188
+ modelValue: string;
189
+ };
190
+ style: string;
191
+ children: {
192
+ type: string;
193
+ props: {
194
+ name: string;
195
+ };
196
+ children: ({
197
+ type: string;
198
+ slot: string;
199
+ style: string;
200
+ children: ({
201
+ type: string;
202
+ style: string;
203
+ children?: undefined;
204
+ } | {
205
+ type: string;
206
+ children: any[];
207
+ style?: undefined;
208
+ })[];
209
+ } | {
210
+ type: string;
211
+ field: string;
212
+ value: string;
213
+ title: string;
214
+ control: ({
215
+ handle: (val: any) => boolean;
216
+ rule: {
217
+ type: string;
218
+ field: string;
219
+ title: string;
220
+ value: {
221
+ animationDelay: string;
222
+ animationDuration: string;
223
+ animationIterationCount: string;
224
+ };
225
+ }[];
226
+ } | {
227
+ handle: (val: any) => boolean;
228
+ rule: {
229
+ type: string;
230
+ field: string;
231
+ title: string;
232
+ value: {
233
+ animationDelay: string;
234
+ animationDuration: string;
235
+ animationIterationCount: number;
236
+ };
237
+ }[];
238
+ })[];
239
+ effect?: undefined;
240
+ } | {
241
+ type: string;
242
+ field: string;
243
+ title: string;
244
+ value: boolean;
245
+ effect: {
246
+ help: string;
247
+ };
248
+ control?: undefined;
249
+ })[];
250
+ }[];
251
+ })[];
186
252
  api: {};
187
253
  options: {
188
254
  form: {
@@ -290,10 +356,10 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
290
356
  };
291
357
  }>>, {
292
358
  type: string;
293
- config: Record<string, any>;
294
- loading: boolean;
295
359
  menu: Record<string, any>;
296
360
  mask: string;
361
+ config: Record<string, any>;
362
+ loading: boolean;
297
363
  height: string;
298
364
  rightAsideWidth: string;
299
365
  leftAsideWidth: string;
@@ -22,10 +22,11 @@ declare const _default: import("vue").DefineComponent<{
22
22
  }, {
23
23
  id: import("vue").ComputedRef<string | number>;
24
24
  state: any;
25
+ previewSetting: any;
25
26
  }, any, {
26
27
  pageConfig(): {};
27
28
  _style(): any;
28
- _animate(): "";
29
+ _animate(): string;
29
30
  }, {
30
31
  active(): void;
31
32
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -30,9 +30,11 @@ const _sfc_main = defineComponent({
30
30
  const { unique } = toRefs(props);
31
31
  const id = computed(() => unique.value || uni++);
32
32
  const state = inject('fcx');
33
+ const previewSetting = inject('previewSetting');
33
34
  return {
34
35
  id,
35
36
  state,
37
+ previewSetting,
36
38
  }
37
39
  },
38
40
  computed: {
@@ -40,26 +42,21 @@ const _sfc_main = defineComponent({
40
42
  return {}
41
43
  },
42
44
  _style() {
45
+ let style = { ...this.setting.style, ...this.setting.animation };
43
46
  if (this.setting.is_position) {
44
- return {
45
- ...this.setting.style,
47
+ style = Object.assign(style, {
46
48
  ...this.setting.position,
47
49
  position: 'absolute',
48
- }
49
- } else {
50
- return {
51
- ...this.setting.style,
52
- }
50
+ });
53
51
  }
52
+ return style
54
53
  },
55
54
  _animate() {
56
- // if (this.setting.loop_animate) {
57
- // return 'animate__' + this.setting.loop_animate + ' '
58
- // } else if (this.setting.animate) {
59
- // return 'animate__' + this.setting.animate
60
- // } else {
61
- return ''
62
- // }
55
+ if (this.setting.animation_preview !== false && this.setting.animate && !this.previewSetting.closeAnimate) {
56
+ return 'animate__' + this.setting.animate
57
+ } else {
58
+ return ''
59
+ }
63
60
  },
64
61
  },
65
62
  beforeUnmount() {
@@ -84,7 +81,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
81
  const _component_dk_icon = resolveComponent("dk-icon");
85
82
 
86
83
  return (openBlock(), createElementBlock("div", {
87
- class: normalizeClass(["drag-tool animate__animated", { active: _ctx.state.active === _ctx.id }]),
84
+ class: normalizeClass(["drag-tool animate__animated", [{ active: _ctx.state.active === _ctx.id }, _ctx._animate]]),
88
85
  style: normalizeStyle(_ctx._style),
89
86
  onClick: _cache[4] || (_cache[4] = withModifiers((...args) => (_ctx.active && _ctx.active(...args)), ["stop"]))
90
87
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"DragTool.vue.mjs","sources":["../../../../src/page-diy/src/components/DragTool.vue"],"sourcesContent":["<template>\n <div\n class=\"drag-tool animate__animated\"\n :class=\"{ active: state.active === id }\"\n :style=\"_style\"\n @click.stop=\"active\"\n >\n <div v-if=\"mask\" class=\"drag-mask\"></div>\n <div class=\"drag-r\">\n <div class=\"drag-btn\" title=\"添加当前组件\" @click=\"$emit('create')\">\n <dk-icon icon=\"CirclePlus\"></dk-icon>\n </div>\n <div class=\"drag-btn\" title=\"复制当前组件\" @click=\"$emit('copy')\">\n <dk-icon icon=\"CopyDocument\"></dk-icon>\n </div>\n <div v-if=\"children\" class=\"drag-btn\" title=\"添加子组件\" @click=\"$emit('addChild')\">\n <dk-icon icon=\"fluent:tab-add-20-regular\"></dk-icon>\n </div>\n <div class=\"drag-btn drag-btn-danger\" title=\"删除组件\" @click=\"$emit('delete')\">\n <dk-icon icon=\"Close\"></dk-icon>\n </div>\n </div>\n <slot name=\"default\"></slot>\n </div>\n</template>\n\n<script>\nimport { computed, inject, toRefs, defineComponent } from 'vue'\n\nlet uni = 1\nexport default defineComponent({\n name: 'DragTool',\n props: {\n dragBtn: {\n default: false,\n type: Boolean,\n },\n children: {\n default: '',\n type: String,\n },\n unique: {\n default: '',\n type: String,\n },\n mask: {\n default: false,\n type: Boolean,\n },\n setting: {\n default: () => {},\n type: [Object],\n },\n },\n setup(props) {\n const { unique } = toRefs(props)\n const id = computed(() => unique.value || uni++)\n const state = inject('fcx')\n return {\n id,\n state,\n }\n },\n computed: {\n pageConfig() {\n return {}\n },\n _style() {\n if (this.setting.is_position) {\n return {\n ...this.setting.style,\n ...this.setting.position,\n position: 'absolute',\n }\n } else {\n return {\n ...this.setting.style,\n }\n }\n },\n _animate() {\n // if (this.setting.loop_animate) {\n // return 'animate__' + this.setting.loop_animate + ' '\n // } else if (this.setting.animate) {\n // return 'animate__' + this.setting.animate\n // } else {\n return ''\n // }\n },\n },\n beforeUnmount() {\n this.state = {}\n },\n methods: {\n active() {\n if (this.state.active === this.id) return\n this.state.active = this.id\n this.$emit('active')\n },\n },\n})\n</script>\n"],"names":["_createElementBlock","_openBlock","_createElementVNode","_createVNode","_renderSlot"],"mappings":";;;AA6BA,IAAI,MAAM,EAAA;AACV,MAAK,SAAU,GAAG,eAAa,CAAA;AAC7B,EAAA,IAAI,EAAE,UAAU;AAChB,EAAA,KAAK,EAAE;AACL,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;AACD,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;AACD,IAAA,OAAO,EAAE;AACP,MAAA,OAAO,EAAE,MAAM,EAAE;MACjB,IAAI,EAAE,CAAC,MAAM,CAAC;KACf;GACF;EACD,KAAK,CAAC,KAAK,EAAE;IACX,MAAM,EAAE,MAAO,EAAA,GAAI,MAAM,CAAC,KAAK,EAAA;AAC/B,IAAA,MAAM,KAAK,QAAQ,CAAC,MAAM,MAAM,CAAC,SAAS,GAAG,EAAE,EAAA;IAC/C,MAAM,KAAM,GAAE,MAAM,CAAC,KAAK,EAAA;AAC1B,IAAA,OAAO;AACL,MAAA,EAAE;MACF,KAAK;AACP,KAAA;GACD;AACD,EAAA,QAAQ,EAAE;IACR,UAAU,GAAG;AACX,MAAA,OAAO,EAAC;KACT;AACD,IAAA,MAAM,GAAG;MACP,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;AAC5B,QAAA,OAAO;AACL,UAAA,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK;UACrB,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ;AACxB,UAAA,QAAQ,EAAE,UAAU;AACtB,SAAA;OACA,MAAK;AACL,QAAA,OAAO;AACL,UAAA,GAAG,IAAI,CAAC,OAAO,CAAC,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C,YAAY,EAAA,CAAA;;MAE5BD,kBAEM,CAAA,KAAA,EAAA;AAFD,QAAA,KAAK,EAAC,UAAU;AAAC,QAAA,KAAK,EAAC,QAAQ;AAAE,QAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;QAChDC,WAAuC,CAAA,kBAAA,EAAA,EAA9B,IAAI,EAAC,cAAc,EAAA,CAAA;;OAEnB,IAAQ,CAAA,QAAA;wBAAnBH,kBAEM,CAAA,KAAA,EAAA;;AAFe,YAAA,KAAK,EAAC,UAAU;AAAC,YAAA,KAAK,EAAC,OAAO;AAAE,YAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,UAAA,CAAA,CAAA,CAAA;;YAC/DG,WAAoD,CAAA,kBAAA,EAAA,EAA3C,IAAI,EAAC,2BAA2B,EAAA,CAAA;;;MAE3CD,kBAEM,CAAA,KAAA,EAAA;AAFD,QAAA,KAAK,EAAC,0BAA0B;AAAC,QAAA,KAAK,EAAC,MAAM;AAAE,QAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,QAAA,CAAA,CAAA,CAAA;;QAC9DC,WAAgC,CAAA,kBAAA,EAAA,EAAvB,IAAI,EAAC,OAAO,EAAA,CAAA;;;IAGzBC,UAA4B,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;;;;;;;"}
1
+ {"version":3,"file":"DragTool.vue.mjs","sources":["../../../../src/page-diy/src/components/DragTool.vue"],"sourcesContent":["<template>\n <div\n class=\"drag-tool animate__animated\"\n :class=\"[{ active: state.active === id }, _animate]\"\n :style=\"_style\"\n @click.stop=\"active\"\n >\n <div v-if=\"mask\" class=\"drag-mask\"></div>\n <div class=\"drag-r\">\n <div class=\"drag-btn\" title=\"添加当前组件\" @click=\"$emit('create')\">\n <dk-icon icon=\"CirclePlus\"></dk-icon>\n </div>\n <div class=\"drag-btn\" title=\"复制当前组件\" @click=\"$emit('copy')\">\n <dk-icon icon=\"CopyDocument\"></dk-icon>\n </div>\n <div v-if=\"children\" class=\"drag-btn\" title=\"添加子组件\" @click=\"$emit('addChild')\">\n <dk-icon icon=\"fluent:tab-add-20-regular\"></dk-icon>\n </div>\n <div class=\"drag-btn drag-btn-danger\" title=\"删除组件\" @click=\"$emit('delete')\">\n <dk-icon icon=\"Close\"></dk-icon>\n </div>\n </div>\n <slot name=\"default\"></slot>\n </div>\n</template>\n\n<script>\nimport { computed, inject, toRefs, defineComponent } from 'vue'\nlet uni = 1\nexport default defineComponent({\n name: 'DragTool',\n props: {\n dragBtn: {\n default: false,\n type: Boolean,\n },\n children: {\n default: '',\n type: String,\n },\n unique: {\n default: '',\n type: String,\n },\n mask: {\n default: false,\n type: Boolean,\n },\n setting: {\n default: () => {},\n type: [Object],\n },\n },\n setup(props) {\n const { unique } = toRefs(props)\n const id = computed(() => unique.value || uni++)\n const state = inject('fcx')\n const previewSetting = inject('previewSetting')\n return {\n id,\n state,\n previewSetting,\n }\n },\n computed: {\n pageConfig() {\n return {}\n },\n _style() {\n let style = { ...this.setting.style, ...this.setting.animation }\n if (this.setting.is_position) {\n style = Object.assign(style, {\n ...this.setting.position,\n position: 'absolute',\n })\n }\n return style\n },\n _animate() {\n if (this.setting.animation_preview !== false && this.setting.animate && !this.previewSetting.closeAnimate) {\n return 'animate__' + this.setting.animate\n } else {\n return ''\n }\n },\n },\n beforeUnmount() {\n this.state = {}\n },\n methods: {\n active() {\n if (this.state.active === this.id) return\n this.state.active = this.id\n this.$emit('active')\n },\n },\n})\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_openBlock","_createElementVNode","_createVNode","_renderSlot"],"mappings":";;;AA4BA,IAAI,MAAM,EAAA;AACV,MAAK,SAAU,GAAG,eAAa,CAAA;AAC7B,EAAA,IAAI,EAAE,UAAU;AAChB,EAAA,KAAK,EAAE;AACL,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;AACD,IAAA,QAAQ,EAAE;MACR,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AA,CAAA,CAAA;;QAChDC,WAAqC,CAAA,kBAAA,EAAA,EAA5B,IAAI,EAAC,YAAY,EAAA,CAAA;;MAE5BD,kBAEM,CAAA,KAAA,EAAA;AAFD,QAAA,KAAK,EAAC,UAAU;AAAC,QAAA,KAAK,EAAC,QAAQ;AAAE,QAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA;;QAChDC,WAAuC,CAAA,kBAAA,EAAA,EAA9B,IAAI,EAAC,cAAc,EAAA,CAAA;;OAEnB,IAAQ,CAAA,QAAA;wBAAnBJ,kBAEM,CAAA,KAAA,EAAA;;AAFe,YAAA,KAAK,EAAC,UAAU;AAAC,YAAA,KAAK,EAAC,OAAO;AAAE,YAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,UAAA,CAAA,CAAA,CAAA;;YAC/DI,WAAoD,CAAA,kBAAA,EAAA,EAA3C,IAAI,EAAC,2BAA2B,EAAA,CAAA;;;MAE3CD,kBAEM,CAAA,KAAA,EAAA;AAFD,QAAA,KAAK,EAAC,0BAA0B;AAAC,QAAA,KAAK,EAAC,MAAM;AAAE,QAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,QAAA,CAAA,CAAA,CAAA;;QAC9DC,WAAgC,CAAA,kBAAA,EAAA,EAAvB,IAAI,EAAC,OAAO,EAAA,CAAA;;;IAGzBC,UAA4B,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { createElementVNode, defineComponent, inject, ref, computed, resolveComponent, openBlock, createElementBlock, toDisplayString, createVNode, withCtx, createTextVNode, normalizeStyle, renderSlot } from 'vue';
1
+ import { createElementVNode, defineComponent, inject, ref, provide, computed, resolveComponent, openBlock, createElementBlock, toDisplayString, createVNode, withCtx, createTextVNode, normalizeStyle, renderSlot } from 'vue';
2
2
  import { storage } from '@vipl520/utils';
3
3
  import { ElMessageBox, ElMessage } from 'element-plus';
4
4
 
@@ -56,8 +56,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
56
56
  const form = ref({
57
57
  showLine: cache.showLine || false,
58
58
  margin: cache.margin || 0,
59
- preview: cache.preview || false
59
+ preview: cache.preview || false,
60
+ closeAnimate: cache.closeAnimate || false
60
61
  });
62
+ provide("previewSetting", form);
61
63
  const changeForm = () => {
62
64
  storage.set(key, JSON.stringify(form.value));
63
65
  };
@@ -91,9 +93,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
91
93
  if (form.value.preview) {
92
94
  line["--padding"] = "0";
93
95
  line["--overflow"] = "hidden";
96
+ line["--minHeight"] = "0px";
94
97
  } else {
95
98
  line["--padding"] = "2px 0";
96
99
  line["--overflow"] = "initial";
100
+ line["--minHeight"] = "30px";
97
101
  }
98
102
  return {
99
103
  ...props.pageConfig.style,
@@ -112,6 +116,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
112
116
  const _component_el_dropdown_item = resolveComponent("el-dropdown-item");
113
117
  const _component_el_dropdown_menu = resolveComponent("el-dropdown-menu");
114
118
  const _component_el_dropdown = resolveComponent("el-dropdown");
119
+ const _component_el_tooltip = resolveComponent("el-tooltip");
115
120
  const _component_el_switch = resolveComponent("el-switch");
116
121
  const _component_el_form_item = resolveComponent("el-form-item");
117
122
  const _component_el_slider = resolveComponent("el-slider");
@@ -205,6 +210,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
205
210
  ]),
206
211
  default: withCtx(() => [
207
212
  createVNode(_component_el_form_item, { label: "\u663E\u793A\u7F51\u683C" }, {
213
+ label: withCtx(() => [
214
+ createVNode(_component_el_tooltip, {
215
+ class: "box-item",
216
+ effect: "dark",
217
+ content: "\u663E\u793A\u7EC4\u4EF6\u7F51\u683C\u7EBF",
218
+ placement: "right-start"
219
+ }, {
220
+ default: withCtx(() => [
221
+ createTextVNode(" \u663E\u793A\u7F51\u683C ")
222
+ ]),
223
+ _: 1
224
+ /* STABLE */
225
+ })
226
+ ]),
208
227
  default: withCtx(() => [
209
228
  createVNode(_component_el_switch, {
210
229
  modelValue: form.value.showLine,
@@ -216,6 +235,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
216
235
  /* STABLE */
217
236
  }),
218
237
  createVNode(_component_el_form_item, { label: "\u7F51\u683C\u95F4\u8DDD" }, {
238
+ label: withCtx(() => [
239
+ createVNode(_component_el_tooltip, {
240
+ class: "box-item",
241
+ effect: "dark",
242
+ content: "\u8BBE\u7F6E\u7EC4\u4EF6\u4E4B\u95F4\u7684\u7F51\u683C\u95F4\u8DDD",
243
+ placement: "right-start"
244
+ }, {
245
+ default: withCtx(() => [
246
+ createTextVNode(" \u7F51\u683C\u95F4\u8DDD ")
247
+ ]),
248
+ _: 1
249
+ /* STABLE */
250
+ })
251
+ ]),
219
252
  default: withCtx(() => [
220
253
  createVNode(_component_el_slider, {
221
254
  modelValue: form.value.margin,
@@ -231,6 +264,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
231
264
  /* STABLE */
232
265
  }),
233
266
  createVNode(_component_el_form_item, { label: "\u6548\u679C\u9884\u89C8" }, {
267
+ label: withCtx(() => [
268
+ createVNode(_component_el_tooltip, {
269
+ class: "box-item",
270
+ effect: "dark",
271
+ content: "\u6E05\u9664\u6240\u6709\u7F51\u683C\u3001\u95F4\u8DDD\u6548\u679C\uFF0C\u5927\u81F4\u548C\u771F\u5B9E\u5DEE\u4E0D\u591A",
272
+ placement: "right-start"
273
+ }, {
274
+ default: withCtx(() => [
275
+ createTextVNode(" \u6548\u679C\u9884\u89C8 ")
276
+ ]),
277
+ _: 1
278
+ /* STABLE */
279
+ })
280
+ ]),
234
281
  default: withCtx(() => [
235
282
  createVNode(_component_el_switch, {
236
283
  modelValue: form.value.preview,
@@ -240,6 +287,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
240
287
  ]),
241
288
  _: 1
242
289
  /* STABLE */
290
+ }),
291
+ createVNode(_component_el_form_item, { label: "\u5173\u95ED\u52A8\u753B" }, {
292
+ label: withCtx(() => [
293
+ createVNode(_component_el_tooltip, {
294
+ class: "box-item",
295
+ effect: "dark",
296
+ content: "\u5173\u95ED\u6240\u6709\u9884\u89C8\u7684\u52A8\u753B\u6548\u679C",
297
+ placement: "right-start"
298
+ }, {
299
+ default: withCtx(() => [
300
+ createTextVNode(" \u5173\u95ED\u52A8\u753B ")
301
+ ]),
302
+ _: 1
303
+ /* STABLE */
304
+ })
305
+ ]),
306
+ default: withCtx(() => [
307
+ createVNode(_component_el_switch, {
308
+ modelValue: form.value.closeAnimate,
309
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => form.value.closeAnimate = $event),
310
+ onChange: _cache[9] || (_cache[9] = ($event) => changeForm())
311
+ }, null, 8, ["modelValue"])
312
+ ]),
313
+ _: 1
314
+ /* STABLE */
243
315
  })
244
316
  ]),
245
317
  _: 1
@@ -1 +1 @@
1
- {"version":3,"file":"PreviewPhone.vue2.mjs","sources":["../../../../src/page-diy/src/components/PreviewPhone.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'PreviewPhone',\n});\n</script>\n<template>\n <div class=\"preview-phone\">\n <div class=\"phone\">\n <div class=\"phone-header\">\n <div class=\"phone-header-top\">\n <div class=\"phone-time\">\n <span>{{ time }}</span>\n <van-icon name=\"wechat\" color=\"#2ddd71\" />\n </div>\n <div />\n <div class=\"phone-battery\">\n <span class=\"m-r-4px\">100%</span>\n <dk-icon icon=\"gg:battery-full\" :size=\"18\" color=\"#555\" hover-color=\"#f00\"></dk-icon>\n </div>\n </div>\n <div class=\"phone-title\">\n <div class=\"phone-title-icon\">\n <el-dropdown trigger=\"click\" placement=\"bottom-start\">\n <dk-icon icon=\"Close\" hover-color=\"var(--el-color-primary)\" :size=\"20\" style=\"cursor: pointer\"></dk-icon>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"clear('rule')\">清除组件</el-dropdown-item>\n <el-dropdown-item @click=\"clear('page')\">清除页面</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n <div>页面标题</div>\n <div class=\"phone-title-icon\">\n <el-popover placement=\"bottom\" :width=\"200\" trigger=\"click\">\n <template #reference>\n <dk-icon icon=\"MoreFilled\" :size=\"20\" hover-color=\"var(--el-color-primary)\" style=\"cursor: pointer\" />\n </template>\n <el-form-item label=\"显示网格\">\n <el-switch v-model=\"form.showLine\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"网格间距\">\n <el-slider v-model=\"form.margin\" :min=\"0\" :step=\"1\" show-stops :max=\"20\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"效果预览\">\n <el-switch v-model=\"form.preview\" @change=\"changeForm()\" />\n </el-form-item>\n </el-popover>\n </div>\n </div>\n </div>\n <div class=\"phone-body _fc-m-drag\" :style=\"_style\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, inject } from 'vue'\nimport { storage } from '@vipl520/utils'\nimport { ElMessage, ElMessageBox } from 'element-plus'\n\nconst diy: any = inject('diy')\nconst props = defineProps({\n value: {\n default: '',\n type: String,\n },\n pageConfig: {\n default: () => {},\n type: [Object],\n },\n})\n\nconst key = 'preview-phone'\nconst cache: any = JSON.parse(storage.get(key) || '{}')\n\nconst form = ref({\n showLine: cache.showLine || false,\n margin: cache.margin || 0,\n preview: cache.preview || false,\n})\n\nconst changeForm = () => {\n storage.set(key, JSON.stringify(form.value))\n}\nconst clear = (type = '') => {\n const { proxy } = diy\n const typeName: any = {\n rule: '组件',\n config: '配置',\n }\n ElMessageBox.confirm('当前要清除' + typeName[type] + ',是否继续?', '警告', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n proxy.clear(type)\n ElMessage.success('清除成功')\n })\n .catch(() => {})\n}\nconst _style = computed(() => {\n let line: any = {\n '--padding': '0',\n '--overflow': 'initial',\n }\n if (form.value.showLine && !form.value.preview) {\n line = {\n '--margin': form.value.margin + 'px',\n '--showDashed': '1px',\n }\n }\n if (form.value.preview) {\n line['--padding'] = '0'\n line['--overflow'] = 'hidden'\n } else {\n line['--padding'] = '2px 0'\n line['--overflow'] = 'initial'\n }\n return {\n ...props.pageConfig.style,\n ...line,\n }\n})\n\nconst time = computed(() => {\n const d = new Date()\n const hour = d.getHours() // 得到小时数\n const minute = d.getMinutes() // 得到分钟数\n return hour + ':' + minute\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;AA4DD,IAAM,MAAA,GAAA,GAAW,OAAO,KAAK,CAAA,CAAA;AAY7B,IAAA,MAAM,GAAM,GAAA,eAAA,CAAA;AACZ,IAAA,MAAM,QAAa,IAAK,CAAA,KAAA,CAAM,QAAQ,GAAI,CAAA,GAAG,KAAK,IAAI,CAAA,CAAA;AAEtD,IAAA,MAAM,OAAO,GAAI,CAAA;AAAA,MACf,QAAA,EAAU,MAAM,QAAY,IAAA,KAAA;AAAA,MAC5B,MAAA,EAAQ,MAAM,MAAU,IAAA,CAAA;AAAA,MACxB,OAAA,EAAS,MAAM,OAAW,IAAA,KAAA;AAAA,KAC3B,CAAA,CAAA;AAED,IAAA,MAAM,aAAa,MAAM;AACvB,MAAA,OAAA,CAAQ,IAAI,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,IAAA,CAAK,KAAK,CAAC,CAAA,CAAA;AAAA,KAC7C,CAAA;AACA,IAAM,MAAA,KAAA,GAAQ,CAAC,IAAA,GAAO,EAAO,KAAA;AAC3B,MAAM,MAAA,EAAE,OAAU,GAAA,GAAA,CAAA;AAClB,MAAA,MAAM,QAAgB,GAAA;AAAA,QACpB,IAAM,EAAA,cAAA;AAAA,QACN,MA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CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAM,MAAA,CAAA,uBAAQ,IAAK,EAAA,CAAA;AACnB,MAAM,MAAA,IAAA,GAAO,EAAE,QAAS,EAAA,CAAA;AACxB,MAAM,MAAA,MAAA,GAAS,EAAE,UAAW,EAAA,CAAA;AAC5B,MAAA,OAAO,OAAO,GAAM,GAAA,MAAA,CAAA;AAAA,KACrB,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PreviewPhone.vue2.mjs","sources":["../../../../src/page-diy/src/components/PreviewPhone.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'PreviewPhone',\n});\n</script>\n<template>\n <div class=\"preview-phone\">\n <div class=\"phone\">\n <div class=\"phone-header\">\n <div class=\"phone-header-top\">\n <div class=\"phone-time\">\n <span>{{ time }}</span>\n <van-icon name=\"wechat\" color=\"#2ddd71\" />\n </div>\n <div />\n <div class=\"phone-battery\">\n <span class=\"m-r-4px\">100%</span>\n <dk-icon icon=\"gg:battery-full\" :size=\"18\" color=\"#555\" hover-color=\"#f00\"></dk-icon>\n </div>\n </div>\n <div class=\"phone-title\">\n <div class=\"phone-title-icon\">\n <el-dropdown trigger=\"click\" placement=\"bottom-start\">\n <dk-icon icon=\"Close\" hover-color=\"var(--el-color-primary)\" :size=\"20\" style=\"cursor: pointer\"></dk-icon>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"clear('rule')\">清除组件</el-dropdown-item>\n <el-dropdown-item @click=\"clear('page')\">清除页面</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n <div>页面标题</div>\n <div class=\"phone-title-icon\">\n <el-popover placement=\"bottom\" :width=\"200\" trigger=\"click\">\n <template #reference>\n <dk-icon icon=\"MoreFilled\" :size=\"20\" hover-color=\"var(--el-color-primary)\" style=\"cursor: pointer\" />\n </template>\n <el-form-item label=\"显示网格\">\n <template #label>\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"显示组件网格线\" placement=\"right-start\">\n 显示网格\n </el-tooltip>\n </template>\n <el-switch v-model=\"form.showLine\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"网格间距\">\n <template #label>\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"设置组件之间的网格间距\" placement=\"right-start\">\n 网格间距\n </el-tooltip>\n </template>\n <el-slider v-model=\"form.margin\" :min=\"0\" :step=\"1\" show-stops :max=\"20\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"效果预览\">\n <template #label>\n <el-tooltip\n class=\"box-item\"\n effect=\"dark\"\n content=\"清除所有网格、间距效果,大致和真实差不多\"\n placement=\"right-start\"\n >\n 效果预览\n </el-tooltip>\n </template>\n <el-switch v-model=\"form.preview\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"关闭动画\">\n <template #label>\n <el-tooltip class=\"box-item\" effect=\"dark\" content=\"关闭所有预览的动画效果\" placement=\"right-start\">\n 关闭动画\n </el-tooltip>\n </template>\n <el-switch v-model=\"form.closeAnimate\" @change=\"changeForm()\" />\n </el-form-item>\n </el-popover>\n </div>\n </div>\n </div>\n <div class=\"phone-body _fc-m-drag\" :style=\"_style\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, inject, provide } from 'vue'\nimport { storage } from '@vipl520/utils'\nimport { ElMessage, ElMessageBox } from 'element-plus'\n\nconst diy: any = inject('diy')\nconst props = defineProps({\n value: {\n default: '',\n type: String,\n },\n pageConfig: {\n default: () => {},\n type: [Object],\n },\n})\n\nconst key = 'preview-phone'\nconst cache: any = JSON.parse(storage.get(key) || '{}')\n\nconst form = ref({\n showLine: cache.showLine || false,\n margin: cache.margin || 0,\n preview: cache.preview || false,\n closeAnimate: cache.closeAnimate || false,\n})\n\nprovide('previewSetting', form)\n\nconst changeForm = () => {\n storage.set(key, JSON.stringify(form.value))\n}\nconst clear = (type = '') => {\n const { proxy } = diy\n const typeName: any = {\n rule: '组件',\n config: '配置',\n }\n ElMessageBox.confirm('当前要清除' + typeName[type] + ',是否继续?', '警告', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n proxy.clear(type)\n ElMessage.success('清除成功')\n })\n .catch(() => {})\n}\nconst _style = computed(() => {\n let line: any = {\n '--padding': '0',\n '--overflow': 'initial',\n }\n if (form.value.showLine && !form.value.preview) {\n line = {\n '--margin': form.value.margin + 'px',\n '--showDashed': '1px',\n }\n }\n if (form.value.preview) {\n line['--padding'] = '0'\n line['--overflow'] = 'hidden'\n line['--minHeight'] = '0px'\n } else {\n line['--padding'] = '2px 0'\n line['--overflow'] = 'initial'\n line['--minHeight'] = '30px'\n }\n return {\n ...props.pageConfig.style,\n ...line,\n }\n})\n\nconst time = computed(() => {\n const d = new Date()\n const hour = d.getHours() // 得到小时数\n const minute = d.getMinutes() // 得到分钟数\n return hour + ':' + minute\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;AAwFD,IAAM,MAAA,GAAA,GAAW,OAAO,KAAK,CAAA,CAAA;AAY7B,IAAA,MAAM,GAAM,GAAA,eAAA,CAAA;AACZ,IAAA,MAAM,QAAa,IAAK,CAAA,KAAA,CAAM,QAAQ,GAAI,CAAA,GAAG,KAAK,IAAI,CAAA,CAAA;AAEtD,IAAA,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export default function dkSetting(rule?: null): {
1
+ export default function dkSetting(rule?: null): ({
2
2
  type: string;
3
3
  props: {
4
4
  modelValue: string;
@@ -32,4 +32,70 @@ export default function dkSetting(rule?: null): {
32
32
  };
33
33
  })[];
34
34
  }[];
35
- }[];
35
+ } | {
36
+ type: string;
37
+ props: {
38
+ modelValue: string;
39
+ };
40
+ style: string;
41
+ children: {
42
+ type: string;
43
+ props: {
44
+ name: string;
45
+ };
46
+ children: ({
47
+ type: string;
48
+ slot: string;
49
+ style: string;
50
+ children: ({
51
+ type: string;
52
+ style: string;
53
+ children?: undefined;
54
+ } | {
55
+ type: string;
56
+ children: any[];
57
+ style?: undefined;
58
+ })[];
59
+ } | {
60
+ type: string;
61
+ field: string;
62
+ value: string;
63
+ title: string;
64
+ control: ({
65
+ handle: (val: any) => boolean;
66
+ rule: {
67
+ type: string;
68
+ field: string;
69
+ title: string;
70
+ value: {
71
+ animationDelay: string;
72
+ animationDuration: string;
73
+ animationIterationCount: string;
74
+ };
75
+ }[];
76
+ } | {
77
+ handle: (val: any) => boolean;
78
+ rule: {
79
+ type: string;
80
+ field: string;
81
+ title: string;
82
+ value: {
83
+ animationDelay: string;
84
+ animationDuration: string;
85
+ animationIterationCount: number;
86
+ };
87
+ }[];
88
+ })[];
89
+ effect?: undefined;
90
+ } | {
91
+ type: string;
92
+ field: string;
93
+ title: string;
94
+ value: boolean;
95
+ effect: {
96
+ help: string;
97
+ };
98
+ control?: undefined;
99
+ })[];
100
+ }[];
101
+ })[];