@vipl520/dk-ui 1.0.44 → 1.0.46

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. package/dist/attributes.json +16 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +3041 -1074
  4. package/dist/index.min.js +4 -4
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +4 -4
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +3038 -1075
  9. package/dist/tags.json +14 -0
  10. package/dist/uniicons.ttf +0 -0
  11. package/dist/web-types.json +69 -1
  12. package/es/animate-select/src/animate-select.vue2.mjs.map +1 -1
  13. package/es/api/attachment.mjs.map +1 -1
  14. package/es/attachment/src/attachment.vue2.mjs +1 -7
  15. package/es/attachment/src/attachment.vue2.mjs.map +1 -1
  16. package/es/audio-list-input/src/audio-list-input.vue2.mjs.map +1 -1
  17. package/es/dialog/src/dialog.vue2.mjs +2 -4
  18. package/es/dialog/src/dialog.vue2.mjs.map +1 -1
  19. package/es/dialog/style/index.css +1 -1
  20. package/es/dialog/style/index.scss +1 -1
  21. package/es/file-input/src/file-input.vue2.mjs.map +1 -1
  22. package/es/file-list-input/src/file-list-input.vue2.mjs.map +1 -1
  23. package/es/form/index.d.ts +3 -15
  24. package/es/form/src/form.vue.d.ts +2 -10
  25. package/es/form/src/form.vue2.mjs +1 -0
  26. package/es/form/src/form.vue2.mjs.map +1 -1
  27. package/es/form/src/props.d.ts +1 -5
  28. package/es/form/src/props.mjs +1 -5
  29. package/es/form/src/props.mjs.map +1 -1
  30. package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
  31. package/es/hot-area-input/src/hot-area-input.vue2.mjs.map +1 -1
  32. package/es/icon/src/icon.vue2.mjs.map +1 -1
  33. package/es/icon-input/src/icon-content.vue2.mjs +1 -1
  34. package/es/icon-input/src/icon-content.vue2.mjs.map +1 -1
  35. package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
  36. package/es/index.d.ts +2 -0
  37. package/es/index.mjs +8 -2
  38. package/es/index.mjs.map +1 -1
  39. package/es/index.scss +2 -0
  40. package/es/page-diy/src/components/DiyCloud.vue.mjs.map +1 -1
  41. package/es/page-diy/src/components/DragTool.vue.mjs +1 -5
  42. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  43. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  44. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +9 -11
  45. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs.map +1 -1
  46. package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
  47. package/es/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
  48. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +2 -1
  49. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
  50. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +1 -3
  51. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs.map +1 -1
  52. package/es/page-diy/src/config/rule/min/common/index.d.ts +2 -0
  53. package/es/page-diy/src/config/rule/min/common/index.mjs +1 -8
  54. package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
  55. package/es/page-diy/src/config/rule/min/index.d.ts +2 -0
  56. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs +1 -3
  57. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs.map +1 -1
  58. package/es/page-diy/src/config/rule/web/common/DkViewBulletChat.mjs.map +1 -1
  59. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +3 -9
  60. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
  61. package/es/page-diy/src/utils/eventData.mjs.map +1 -1
  62. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +5 -18
  63. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
  64. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
  65. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
  66. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs.map +1 -1
  67. package/es/page-diy/src/views/web/DkViewCell.vue.mjs.map +1 -1
  68. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +1 -3
  69. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +1 -1
  70. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs.map +1 -1
  71. package/es/page-diy/src/views/web/DkViewImage.vue.mjs.map +1 -1
  72. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +1 -1
  73. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs.map +1 -1
  74. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs.map +1 -1
  75. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
  76. package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
  77. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +1 -1
  78. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs +1 -1
  79. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs.map +1 -1
  80. package/es/poster-input/src/component/views/DkPosterViewName.vue2.mjs.map +1 -1
  81. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
  82. package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
  83. package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +1 -1
  84. package/es/poster-input/src/poster-input.vue2.mjs.map +1 -1
  85. package/es/poster-input/style/index.scss +2 -4
  86. package/es/select/src/select.vue2.mjs +1 -9
  87. package/es/select/src/select.vue2.mjs.map +1 -1
  88. package/es/style-animation-input/src/props.mjs.map +1 -1
  89. package/es/style-animation-input/src/style-animation-input.vue2.mjs +1 -1
  90. package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -1
  91. package/es/style-font-input/src/style-font-input.vue2.mjs +1 -1
  92. package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
  93. package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
  94. package/es/style-position-input/src/style-position-input.vue2.mjs +1 -4
  95. package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
  96. package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
  97. package/es/table/src/components/FieldRender.vue2.mjs +1 -1
  98. package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
  99. package/es/table/src/components/RecycleDialog.vue2.mjs +1 -3
  100. package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
  101. package/es/table/src/components/header.vue2.mjs +3 -17
  102. package/es/table/src/components/header.vue2.mjs.map +1 -1
  103. package/es/table/src/props.mjs +1 -11
  104. package/es/table/src/props.mjs.map +1 -1
  105. package/es/table/src/table.vue2.mjs +3 -13
  106. package/es/table/src/table.vue2.mjs.map +1 -1
  107. package/es/table/utils/dkTable.mjs +8 -31
  108. package/es/table/utils/dkTable.mjs.map +1 -1
  109. package/es/table/utils/dkTableApi.mjs.map +1 -1
  110. package/es/tiny-editor/src/tiny-editor.vue2.mjs +1 -1
  111. package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
  112. package/es/uni-icon/index.d.ts +174 -0
  113. package/es/uni-icon/index.mjs +8 -0
  114. package/es/uni-icon/index.mjs.map +1 -0
  115. package/es/uni-icon/src/props.d.ts +24 -0
  116. package/es/uni-icon/src/props.mjs +25 -0
  117. package/es/uni-icon/src/props.mjs.map +1 -0
  118. package/es/uni-icon/src/uni-icon.vue.d.ts +57 -0
  119. package/es/uni-icon/src/uni-icon.vue.mjs +7 -0
  120. package/es/uni-icon/src/uni-icon.vue.mjs.map +1 -0
  121. package/es/uni-icon/src/uni-icon.vue2.mjs +43 -0
  122. package/es/uni-icon/src/uni-icon.vue2.mjs.map +1 -0
  123. package/es/uni-icon/style/index.css +1 -0
  124. package/es/uni-icon/style/index.scss +17 -0
  125. package/es/uni-icon/style/uniicons.css +1 -0
  126. package/es/uni-icon/style/uniicons.scss +663 -0
  127. package/es/uni-icon/style/uniicons_file_vue.d.ts +4 -0
  128. package/es/uni-icon/style/uniicons_file_vue.mjs +649 -0
  129. package/es/uni-icon/style/uniicons_file_vue.mjs.map +1 -0
  130. package/es/uni-icon-input/index.d.ts +17 -0
  131. package/es/uni-icon-input/index.mjs +8 -0
  132. package/es/uni-icon-input/index.mjs.map +1 -0
  133. package/es/uni-icon-input/src/props.d.ts +11 -0
  134. package/es/uni-icon-input/src/props.mjs +11 -0
  135. package/es/uni-icon-input/src/props.mjs.map +1 -0
  136. package/es/uni-icon-input/src/uni-icon-input.vue.d.ts +16 -0
  137. package/es/uni-icon-input/src/uni-icon-input.vue.mjs +7 -0
  138. package/es/uni-icon-input/src/uni-icon-input.vue.mjs.map +1 -0
  139. package/es/uni-icon-input/src/uni-icon-input.vue2.mjs +112 -0
  140. package/es/uni-icon-input/src/uni-icon-input.vue2.mjs.map +1 -0
  141. package/es/uni-icon-input/style/index.css +1 -0
  142. package/es/uni-icon-input/style/index.scss +13 -0
  143. package/es/video-list-input/src/video-list-input.vue2.mjs.map +1 -1
  144. package/lib/animate-select/src/animate-select.vue2.js.map +1 -1
  145. package/lib/api/attachment.js.map +1 -1
  146. package/lib/attachment/src/attachment.vue2.js +1 -7
  147. package/lib/attachment/src/attachment.vue2.js.map +1 -1
  148. package/lib/audio-list-input/src/audio-list-input.vue2.js.map +1 -1
  149. package/lib/dialog/src/dialog.vue2.js +2 -4
  150. package/lib/dialog/src/dialog.vue2.js.map +1 -1
  151. package/lib/dialog/style/index.css +1 -1
  152. package/lib/dialog/style/index.scss +1 -1
  153. package/lib/file-input/src/file-input.vue2.js.map +1 -1
  154. package/lib/file-list-input/src/file-list-input.vue2.js.map +1 -1
  155. package/lib/form/index.d.ts +3 -15
  156. package/lib/form/src/form.vue.d.ts +2 -10
  157. package/lib/form/src/form.vue2.js +1 -0
  158. package/lib/form/src/form.vue2.js.map +1 -1
  159. package/lib/form/src/props.d.ts +1 -5
  160. package/lib/form/src/props.js +1 -5
  161. package/lib/form/src/props.js.map +1 -1
  162. package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
  163. package/lib/hot-area-input/src/hot-area-input.vue2.js.map +1 -1
  164. package/lib/icon/src/icon.vue2.js.map +1 -1
  165. package/lib/icon-input/src/icon-content.vue2.js +1 -1
  166. package/lib/icon-input/src/icon-content.vue2.js.map +1 -1
  167. package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
  168. package/lib/index.d.ts +2 -0
  169. package/lib/index.js +13 -3
  170. package/lib/index.js.map +1 -1
  171. package/lib/index.scss +2 -0
  172. package/lib/page-diy/src/components/DiyCloud.vue.js.map +1 -1
  173. package/lib/page-diy/src/components/DragTool.vue.js +1 -5
  174. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  175. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  176. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +9 -11
  177. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js.map +1 -1
  178. package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
  179. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
  180. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +2 -1
  181. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
  182. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +1 -3
  183. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js.map +1 -1
  184. package/lib/page-diy/src/config/rule/min/common/index.d.ts +2 -0
  185. package/lib/page-diy/src/config/rule/min/common/index.js +1 -8
  186. package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
  187. package/lib/page-diy/src/config/rule/min/index.d.ts +2 -0
  188. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js +1 -3
  189. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js.map +1 -1
  190. package/lib/page-diy/src/config/rule/web/common/DkViewBulletChat.js.map +1 -1
  191. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +3 -9
  192. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
  193. package/lib/page-diy/src/utils/eventData.js.map +1 -1
  194. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +5 -18
  195. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
  196. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
  197. package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
  198. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js.map +1 -1
  199. package/lib/page-diy/src/views/web/DkViewCell.vue.js.map +1 -1
  200. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +1 -3
  201. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +1 -1
  202. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js.map +1 -1
  203. package/lib/page-diy/src/views/web/DkViewImage.vue.js.map +1 -1
  204. package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +1 -1
  205. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js.map +1 -1
  206. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js.map +1 -1
  207. package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
  208. package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
  209. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +1 -1
  210. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js +1 -1
  211. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js.map +1 -1
  212. package/lib/poster-input/src/component/views/DkPosterViewName.vue2.js.map +1 -1
  213. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
  214. package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
  215. package/lib/poster-input/src/component/views/quick-action.vue2.js.map +1 -1
  216. package/lib/poster-input/src/poster-input.vue2.js.map +1 -1
  217. package/lib/poster-input/style/index.scss +2 -4
  218. package/lib/select/src/select.vue2.js +1 -9
  219. package/lib/select/src/select.vue2.js.map +1 -1
  220. package/lib/style-animation-input/src/props.js.map +1 -1
  221. package/lib/style-animation-input/src/style-animation-input.vue2.js +1 -1
  222. package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -1
  223. package/lib/style-font-input/src/style-font-input.vue2.js +1 -1
  224. package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
  225. package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
  226. package/lib/style-position-input/src/style-position-input.vue2.js +1 -4
  227. package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
  228. package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
  229. package/lib/table/src/components/FieldRender.vue2.js +1 -1
  230. package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
  231. package/lib/table/src/components/RecycleDialog.vue2.js +1 -3
  232. package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
  233. package/lib/table/src/components/header.vue2.js +3 -17
  234. package/lib/table/src/components/header.vue2.js.map +1 -1
  235. package/lib/table/src/props.js +1 -11
  236. package/lib/table/src/props.js.map +1 -1
  237. package/lib/table/src/table.vue2.js +3 -13
  238. package/lib/table/src/table.vue2.js.map +1 -1
  239. package/lib/table/utils/dkTable.js +8 -31
  240. package/lib/table/utils/dkTable.js.map +1 -1
  241. package/lib/table/utils/dkTableApi.js.map +1 -1
  242. package/lib/tiny-editor/src/tiny-editor.vue2.js +1 -1
  243. package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
  244. package/lib/uni-icon/index.d.ts +174 -0
  245. package/lib/uni-icon/index.js +14 -0
  246. package/lib/uni-icon/index.js.map +1 -0
  247. package/lib/uni-icon/src/props.d.ts +24 -0
  248. package/lib/uni-icon/src/props.js +27 -0
  249. package/lib/uni-icon/src/props.js.map +1 -0
  250. package/lib/uni-icon/src/uni-icon.vue.d.ts +57 -0
  251. package/lib/uni-icon/src/uni-icon.vue.js +11 -0
  252. package/lib/uni-icon/src/uni-icon.vue.js.map +1 -0
  253. package/lib/uni-icon/src/uni-icon.vue2.js +47 -0
  254. package/lib/uni-icon/src/uni-icon.vue2.js.map +1 -0
  255. package/lib/uni-icon/style/index.css +1 -0
  256. package/lib/uni-icon/style/index.scss +17 -0
  257. package/lib/uni-icon/style/uniicons.css +1 -0
  258. package/lib/uni-icon/style/uniicons.scss +663 -0
  259. package/lib/uni-icon/style/uniicons_file_vue.d.ts +4 -0
  260. package/lib/uni-icon/style/uniicons_file_vue.js +651 -0
  261. package/lib/uni-icon/style/uniicons_file_vue.js.map +1 -0
  262. package/lib/uni-icon-input/index.d.ts +17 -0
  263. package/lib/uni-icon-input/index.js +14 -0
  264. package/lib/uni-icon-input/index.js.map +1 -0
  265. package/lib/uni-icon-input/src/props.d.ts +11 -0
  266. package/lib/uni-icon-input/src/props.js +13 -0
  267. package/lib/uni-icon-input/src/props.js.map +1 -0
  268. package/lib/uni-icon-input/src/uni-icon-input.vue.d.ts +16 -0
  269. package/lib/uni-icon-input/src/uni-icon-input.vue.js +11 -0
  270. package/lib/uni-icon-input/src/uni-icon-input.vue.js.map +1 -0
  271. package/lib/uni-icon-input/src/uni-icon-input.vue2.js +116 -0
  272. package/lib/uni-icon-input/src/uni-icon-input.vue2.js.map +1 -0
  273. package/lib/uni-icon-input/style/index.css +1 -0
  274. package/lib/uni-icon-input/style/index.scss +13 -0
  275. package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
  276. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"hot-area-content.vue2.mjs","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div\n class=\"hot-item-content\"\n style=\"\n position: relative;\n width: 100%;\n height: 100%;\n background: #0003;\n \"\n >\n {{ key + 1 }}\n </div>\n </vue3-draggable-resizable>\n </div>\n <div v-else style=\"width: 500px; height: 500px\">\n <el-empty description=\"请上传图片\"></el-empty>\n </div>\n </div>\n <div class=\"hot-area-form\">\n <h3 style=\"margin-top: 0; font-size: 16px; font-weight: 500\">热区管理</h3>\n <el-form label-width=\"80px\" label-position=\"left\">\n <el-form-item label=\"背景图 \">\n <dk-image-input v-model=\"hotData.background\" />\n </el-form-item>\n <el-form-item\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n :label=\"'热区' + (key + 1)\"\n >\n <el-input v-model=\"hotData.views[key].url\" placeholder=\"填写跳转地址\">\n <template #append>\n <el-button @click=\"delView(key)\">删除</el-button>\n </template>\n </el-input>\n </el-form-item>\n </el-form>\n <el-button\n :disabled=\"!hotData.background\"\n type=\"primary\"\n @click=\"addView()\"\n >{{ hotData.background ? '添加热区' : '请先上传图片' }}</el-button\n >\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport { reactive, ref, watch, onMounted } from 'vue'\n\n\nconst props = defineProps({\n hotDataValue: {\n default: () => {\n return {\n views: [],\n width: 400,\n height: 400,\n background: null,\n }\n },\n type: Object,\n },\n})\nconst index = ref(0)\nconst hotData = reactive(props.hotDataValue)\nconst addView = () => {\n // 这里hotData可以能没有views,如果没有就添加上views\n if (!Array.isArray(hotData.views)) {\n hotData.views = []\n }\n hotData.views.push({\n css: {\n left: 0,\n top: 0,\n width: 80,\n height: 80,\n borderRadius: 0,\n borderColor: '#fff',\n },\n url: '',\n })\n}\n\nconst delView = (indexToDelete: any) => {\n if (indexToDelete >= 0 && indexToDelete < hotData.views.length) {\n hotData.views.splice(indexToDelete, 1)\n }\n}\n\nconst onDrag = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n css.width = p.w\n css.height = p.h\n}\n\nonMounted(() => {\n resetSize()\n})\n\nwatch(\n () => hotData?.background,\n () => {\n resetSize()\n }\n)\n\nconst resetSize = () => {\n if (hotData.background) {\n getImageSize(hotData.background)\n .then((image: any) => {\n hotData.width = 500\n hotData.height = (image.height * 500) / image.width\n setTimeout(() => {\n // checkParentSize()\n }, 200)\n })\n .catch(() => {})\n }\n}\n\nconst getImageSize = (url: any) => {\n return new Promise(function (resolve, reject) {\n const image = new Image()\n image.onload = function () {\n resolve({\n width: image.width,\n height: image.height,\n })\n }\n image.onerror = function () {\n reject(new Error('error'))\n }\n image.src = url\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA+FD,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,OAAA,GAAU,QAAS,CAAA,KAAA,CAAM,YAAY,CAAA,CAAA;AAC3C,IAAA,MAAM,UAAU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AAA,CAAA;AAAA,SAC3B,CAAA;AACA,QAAA,KAAA,CAAM,GAAM,GAAA,GAAA,CAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hot-area-content.vue2.mjs","sources":["../../../../src/hot-area-input/src/component/hot-area-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'HotAreaContent',\n});\n</script>\n<template>\n <div class=\"hot-area-content\">\n <div class=\"hot-area-draggable\">\n <div\n v-if=\"hotData.background\"\n :style=\"{\n width: hotData.width + 'px',\n height: hotData.height + 'px',\n backgroundImage: 'url(' + hotData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in hotData.views\"\n :key=\"key\"\n ref=\"draggables\"\n v-model:h=\"item.css.height\"\n v-model:x=\"item.css.left\"\n v-model:y=\"item.css.top\"\n v-model:w=\"item.css.width\"\n :init-w=\"item.css.width\"\n :init-h=\"item.css.height\"\n :parent=\"true\"\n style=\"cursor: move\"\n :min-width=\"20\"\n :min-height=\"20\"\n @resizing=\"onResize\"\n @dragging=\"onDrag\"\n @mousedown=\"index = key\"\n >\n <div class=\"hot-item-content\" style=\"position: relative; width: 100%; height: 100%; background: #0003\">\n {{ key + 1 }}\n </div>\n </vue3-draggable-resizable>\n </div>\n <div v-else style=\"width: 500px; height: 500px\">\n <el-empty description=\"请上传图片\"></el-empty>\n </div>\n </div>\n <div class=\"hot-area-form\">\n <h3 style=\"margin-top: 0; font-size: 16px; font-weight: 500\">热区管理</h3>\n <el-form label-width=\"80px\" label-position=\"left\">\n <el-form-item label=\"背景图 \">\n <dk-image-input v-model=\"hotData.background\" />\n </el-form-item>\n <el-form-item v-for=\"(item, key) in hotData.views\" :key=\"key\" :label=\"'热区' + (key + 1)\">\n <el-input v-model=\"hotData.views[key].url\" placeholder=\"填写跳转地址\">\n <template #append>\n <el-button @click=\"delView(key)\">删除</el-button>\n </template>\n </el-input>\n </el-form-item>\n </el-form>\n <el-button :disabled=\"!hotData.background\" type=\"primary\" @click=\"addView()\">{{\n hotData.background ? '添加热区' : '请先上传图片'\n }}</el-button>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport { reactive, ref, watch, onMounted } from 'vue'\n\n\nconst props = defineProps({\n hotDataValue: {\n default: () => {\n return {\n views: [],\n width: 400,\n height: 400,\n background: null,\n }\n },\n type: Object,\n },\n})\nconst index = ref(0)\nconst hotData = reactive(props.hotDataValue)\nconst addView = () => {\n // 这里hotData可以能没有views,如果没有就添加上views\n if (!Array.isArray(hotData.views)) {\n hotData.views = []\n }\n hotData.views.push({\n css: {\n left: 0,\n top: 0,\n width: 80,\n height: 80,\n borderRadius: 0,\n borderColor: '#fff',\n },\n url: '',\n })\n}\n\nconst delView = (indexToDelete: any) => {\n if (indexToDelete >= 0 && indexToDelete < hotData.views.length) {\n hotData.views.splice(indexToDelete, 1)\n }\n}\n\nconst onDrag = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = hotData.views[index.value].css\n css.left = p.x\n css.top = p.y\n css.width = p.w\n css.height = p.h\n}\n\nonMounted(() => {\n resetSize()\n})\n\nwatch(\n () => hotData?.background,\n () => {\n resetSize()\n }\n)\n\nconst resetSize = () => {\n if (hotData.background) {\n getImageSize(hotData.background)\n .then((image: any) => {\n hotData.width = 500\n hotData.height = (image.height * 500) / image.width\n setTimeout(() => {\n // checkParentSize()\n }, 200)\n })\n .catch(() => {})\n }\n}\n\nconst getImageSize = (url: any) => {\n return new Promise(function (resolve, reject) {\n const image = new Image()\n image.onload = function () {\n resolve({\n width: image.width,\n height: image.height,\n })\n }\n image.onerror = function () {\n reject(new Error('error'))\n }\n image.src = url\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;AAgFD,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,OAAA,GAAU,QAAS,CAAA,KAAA,CAAM,YAAY,CAAA,CAAA;AAC3C,IAAA,MAAM,UAAU,MAAM;AAEpB,MAAA,IAAI,CAAC,KAAA,CAAM,OAAQ,CAAA,OAAA,CAAQ,KAAK,CAAG,EAAA;AACjC,QAAA,OAAA,CAAQ,QAAQ,EAAC,CAAA;AAAA,OACnB;AACA,MAAA,OAAA,CAAQ,MAAM,IAAK,CAAA;AAAA,QACjB,GAAK,EAAA;AAAA,UACH,IAAM,EAAA,CAAA;AAAA,UACN,GAAK,EAAA,CAAA;AAAA,UACL,KAAO,EAAA,EAAA;AAAA,UACP,MAAQ,EAAA,EAAA;AAAA,UACR,YAAc,EAAA,CAAA;AAAA,UACd,WAAa,EAAA,MAAA;AAAA,SACf;AAAA,QACA,GAAK,EAAA,EAAA;AAAA,OACN,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,OAAA,GAAU,CAAC,aAAuB,KAAA;AACtC,MAAA,IAAI,aAAiB,IAAA,CAAA,IAAK,aAAgB,GAAA,OAAA,CAAQ,MAAM,MAAQ,EAAA;AAC9D,QAAQ,OAAA,CAAA,KAAA,CAAM,MAAO,CAAA,aAAA,EAAe,CAAC,CAAA,CAAA;AAAA,OACvC;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,MAAA,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AAM;AAAA,SAAE,CAAA,CAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,CAAC,GAAa,KAAA;AACjC,MAAA,OAAO,IAAI,OAAA,CAAQ,SAAU,OAAA,EAAS,MAAQ,EAAA;AAC5C,QAAM,MAAA,KAAA,GAAQ,IAAI,KAAM,EAAA,CAAA;AACxB,QAAA,KAAA,CAAM,SAAS,WAAY;AACzB,UAAQ,OAAA,CAAA;AAAA,YACN,OAAO,KAAM,CAAA,KAAA;AAAA,YACb,QAAQ,KAAM,CAAA,MAAA;AAAA,WACf,CAAA,CAAA;AAAA,SACH,CAAA;AACA,QAAA,KAAA,CAAM,UAAU,WAAY;AAC1B,UAAO,MAAA,CAAA,IAAI,KAAM,CAAA,OAAO,CAAC,CAAA,CAAA;AAAA,SAC3B,CAAA;AACA,QAAA,KAAA,CAAM,GAAM,GAAA,GAAA,CAAA;AAAA,OACb,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"hot-area-input.vue2.mjs","sources":["../../../src/hot-area-input/src/hot-area-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkHotAreaInput',\n});\n</script>\n<template>\n <div class=\"dk-hot-area-input\">\n <el-button type=\"primary\" @click=\"dialog = true\">设置热区</el-button>\n <dk-dialog v-model=\"dialog\" width=\"1000px\" title=\"设置热区\">\n <hot-area-content :hot-data-value=\"input\"></hot-area-content>\n <template #footer>\n <div class=\"text-center\">\n <el-button\n size=\"default\"\n style=\"width: 200px\"\n type=\"primary\"\n @click=\"dialog = false\"\n >确定</el-button\n >\n </div>\n </template>\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { hotAreaInputProps } from './props'\nimport { ref, reactive } from 'vue'\nimport HotAreaContent from './component/hot-area-content.vue'\n\n\nconst props = defineProps(hotAreaInputProps)\nconst input = reactive(props.modelValue)\nconst dialog = ref(false)\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA6BD,IAAM,MAAA,KAAA,GAAQ,QAAS,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACvC,IAAM,MAAA,MAAA,GAAS,IAAI,KAAK,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hot-area-input.vue2.mjs","sources":["../../../src/hot-area-input/src/hot-area-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkHotAreaInput',\n});\n</script>\n<template>\n <div class=\"dk-hot-area-input\">\n <el-button type=\"primary\" @click=\"dialog = true\">设置热区</el-button>\n <dk-dialog v-model=\"dialog\" width=\"1000px\" title=\"设置热区\">\n <hot-area-content :hot-data-value=\"input\"></hot-area-content>\n <template #footer>\n <div class=\"text-center\">\n <el-button size=\"default\" style=\"width: 200px\" type=\"primary\" @click=\"dialog = false\">确定</el-button>\n </div>\n </template>\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { hotAreaInputProps } from './props'\nimport { ref, reactive } from 'vue'\nimport HotAreaContent from './component/hot-area-content.vue'\n\n\nconst props = defineProps(hotAreaInputProps)\nconst input = reactive(props.modelValue)\nconst dialog = ref(false)\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAuBD,IAAM,MAAA,KAAA,GAAQ,QAAS,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACvC,IAAM,MAAA,MAAA,GAAS,IAAI,KAAK,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon.vue2.mjs","sources":["../../../src/icon/src/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIcon',\n});\n</script>\n<template>\n <el-icon :class=\"bem()\" :style=\"getIconifyStyle\">\n <slot>\n <Icon v-if=\"iconType === 'cloud'\" :icon=\"props.icon\" />\n <component :is=\"props.icon\" v-if=\"iconType === 'el'\" />\n <van-icon\n v-if=\"iconType === 'vant'\"\n :class=\"bem()\"\n :name=\"props.icon\"\n :style=\"getIconifyStyle\"\n ></van-icon>\n </slot>\n </el-icon>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Icon } from '@iconify/vue'\nimport { computed } from 'vue'\nimport { createNamespace } from '@vipl520/utils'\nimport { iconProps } from './props'\nimport * as ElementPlusIconsVue from '@element-plus/icons-vue'\nimport icons from '@vant/icons'\n\nconst [_, bem] = createNamespace('icon')\n\n\nconst props = defineProps(iconProps)\n// 获取element-plus所有图标\nconst elIcons = Object.keys(ElementPlusIconsVue).map((key) => {\n return key\n})\nconst getIconifyStyle = computed(() => {\n const { color, size, hoverColor } = props\n const style: any = {}\n if (color) style.color = color\n if (size) style.fontSize = `${size}px`\n if (hoverColor) style['--hover-color'] = hoverColor\n return style\n})\n\nconst iconType = computed(() => {\n let type = 'cloud'\n if (elIcons.includes(props.icon) && props.showEl) {\n type = 'el'\n }\n if (props.showVant) {\n // 这里类型有些问题\n if (icons.basic.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.outline.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.filled.includes(props.icon)) {\n type = 'vant'\n }\n }\n return type\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAyBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAKvC,IAAA,MAAM,UAAU,MAAO,CAAA,IAAA,CAAK,mBAAmB,CAAE,CAAA,GAAA,CAAI,CAAC,GAAQ,KAAA;AAC5D,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,eAAA,GAAkB,SAAS,MAAM;AACrC,MAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACpC,MAAA,MAAM,QAAa,EAAC,CAAA;AACpB,MAAI,IAAA,KAAA;AAAO,QAAA,KAAA,CAAM,KAAQ,GAAA,KAAA,CAAA;AACzB,MAAI,IAAA,IAAA;AAAM,QAAM,KAAA,CAAA,QAAA,GAAW,GAAG,IAAI,CAAA,EAAA,CAAA,CAAA;AAClC,MAAI,IAAA,UAAA;AAAY,QAAA,KAAA,CAAM,eAAe,CAAI,GAAA,UAAA,CAAA;AACzC,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC9B,MAAA,IAAI,IAAO,GAAA,OAAA,CAAA;AACX,MAAA,IAAI,QAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,IAAK,MAAM,MAAQ,EAAA;AAChD,QAAO,IAAA,GAAA,IAAA,CAAA;AAAA,OACT;AACA,MAAA,IAAI,MAAM,QAAU,EAAA;AAElB,QAAA,IAAI,KAAM,CAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACpC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,OAAA,CAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACtC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,MAAA,CAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACrC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AAAA,OACF;AACA,MAAO,OAAA,IAAA,CAAA;AAAA,KACR,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icon.vue2.mjs","sources":["../../../src/icon/src/icon.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIcon',\n});\n</script>\n<template>\n <el-icon :class=\"bem()\" :style=\"getIconifyStyle\">\n <slot>\n <Icon v-if=\"iconType === 'cloud'\" :icon=\"props.icon\" />\n <component :is=\"props.icon\" v-if=\"iconType === 'el'\" />\n <van-icon v-if=\"iconType === 'vant'\" :class=\"bem()\" :name=\"props.icon\" :style=\"getIconifyStyle\"></van-icon>\n </slot>\n </el-icon>\n</template>\n\n<script lang=\"ts\" setup>\nimport { Icon } from '@iconify/vue'\nimport { computed } from 'vue'\nimport { createNamespace } from '@vipl520/utils'\nimport { iconProps } from './props'\nimport * as ElementPlusIconsVue from '@element-plus/icons-vue'\nimport icons from '@vant/icons'\n\nconst [_, bem] = createNamespace('icon')\n\n\nconst props = defineProps(iconProps)\n// 获取element-plus所有图标\nconst elIcons = Object.keys(ElementPlusIconsVue).map((key) => {\n return key\n})\nconst getIconifyStyle = computed(() => {\n const { color, size, hoverColor } = props\n const style: any = {}\n if (color) style.color = color\n if (size) style.fontSize = `${size}px`\n if (hoverColor) style['--hover-color'] = hoverColor\n return style\n})\n\nconst iconType = computed(() => {\n let type = 'cloud'\n if (elIcons.includes(props.icon) && props.showEl) {\n type = 'el'\n }\n if (props.showVant) {\n // 这里类型有些问题\n if (icons.basic.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.outline.includes(props.icon)) {\n type = 'vant'\n }\n if (icons.filled.includes(props.icon)) {\n type = 'vant'\n }\n }\n return type\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAoBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAKvC,IAAA,MAAM,UAAU,MAAO,CAAA,IAAA,CAAK,mBAAmB,CAAE,CAAA,GAAA,CAAI,CAAC,GAAQ,KAAA;AAC5D,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,eAAA,GAAkB,SAAS,MAAM;AACrC,MAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACpC,MAAA,MAAM,QAAa,EAAC,CAAA;AACpB,MAAI,IAAA,KAAA;AAAO,QAAA,KAAA,CAAM,KAAQ,GAAA,KAAA,CAAA;AACzB,MAAI,IAAA,IAAA;AAAM,QAAM,KAAA,CAAA,QAAA,GAAW,GAAG,IAAI,CAAA,EAAA,CAAA,CAAA;AAClC,MAAI,IAAA,UAAA;AAAY,QAAA,KAAA,CAAM,eAAe,CAAI,GAAA,UAAA,CAAA;AACzC,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,QAAA,GAAW,SAAS,MAAM;AAC9B,MAAA,IAAI,IAAO,GAAA,OAAA,CAAA;AACX,MAAA,IAAI,QAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,IAAK,MAAM,MAAQ,EAAA;AAChD,QAAO,IAAA,GAAA,IAAA,CAAA;AAAA,OACT;AACA,MAAA,IAAI,MAAM,QAAU,EAAA;AAElB,QAAA,IAAI,KAAM,CAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACpC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,OAAA,CAAQ,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACtC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AACA,QAAA,IAAI,KAAM,CAAA,MAAA,CAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAG,EAAA;AACrC,UAAO,IAAA,GAAA,MAAA,CAAA;AAAA,SACT;AAAA,OACF;AACA,MAAO,OAAA,IAAA,CAAA;AAAA,KACR,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -210,7 +210,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
210
210
  128
211
211
  /* KEYED_FRAGMENT */
212
212
  )),
213
- !searchIcon.value ? (openBlock(), createElementBlock("p", _hoisted_2, " \u5F53\u524D\u663E\u793A\u5DF2\u7F13\u5B58\u7684\u56FE\u6807 ")) : createCommentVNode("v-if", true)
213
+ !searchIcon.value ? (openBlock(), createElementBlock("p", _hoisted_2, "\u5F53\u524D\u663E\u793A\u5DF2\u7F13\u5B58\u7684\u56FE\u6807")) : createCommentVNode("v-if", true)
214
214
  ],
215
215
  64
216
216
  /* STABLE_FRAGMENT */
@@ -1 +1 @@
1
- {"version":3,"file":"icon-content.vue2.mjs","sources":["../../../src/icon-input/src/icon-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIconContent',\n});\n</script>\n<template>\n <div class=\"dk-icon-content\">\n <el-tabs v-model=\"activeName\">\n <el-tab-pane\n v-if=\"props.showTab.el\"\n label=\"element图标\"\n name=\"element\"\n class=\"dk-tab-pane\"\n >\n <dk-icon\n v-for=\"(item, key) in _elIcons\"\n :key=\"key\"\n :size=\"36\"\n :color=\"item == chooseIcon ? 'var(--el-color-primary)' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"onChooseIcon(item)\"\n >\n <component :is=\"item\" />\n </dk-icon>\n </el-tab-pane>\n <el-tab-pane\n v-if=\"props.showTab.vant\"\n label=\"vant图标\"\n name=\"vant\"\n class=\"dk-tab-pane\"\n >\n <dk-icon\n v-for=\"(item, key) in _vantIcons\"\n :key=\"key\"\n :size=\"36\"\n :color=\"item == chooseIcon ? '#409eff' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n hover-color=\"var(--el-color-primary)\"\n :icon=\"item\"\n @click=\"onChooseIcon(item)\"\n >\n </dk-icon>\n </el-tab-pane>\n <el-tab-pane\n v-if=\"props.showTab.cloud\"\n label=\"云端图标\"\n name=\"cloud\"\n class=\"dk-tab-pane\"\n >\n <template v-if=\"_iconifyIcons.length > 0\">\n <dk-icon\n v-for=\"(item, key) in _iconifyIcons\"\n :key=\"key\"\n :icon=\"item\"\n :size=\"36\"\n hover-color=\"var(--el-color-primary)\"\n :color=\"item == chooseIcon ? '#409eff' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n @click=\"onChooseIcon(item)\"\n >\n </dk-icon>\n <p\n v-if=\"!searchIcon\"\n class=\"text-center\"\n style=\"font-size: 12px; color: #999\"\n >\n 当前显示已缓存的图标\n </p>\n </template>\n <el-empty v-else description=\"暂无图标,请搜索\"></el-empty>\n </el-tab-pane>\n </el-tabs>\n <div class=\"search-icon\">\n <el-input\n v-model=\"searchIcon\"\n clearable\n :placeholder=\"searchPlaceholder\"\n @clear=\"onClear\"\n >\n <template #append>\n <el-button :icon=\"Search\" @click=\"onSearch()\" />\n </template>\n </el-input>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, ref, watch, watchEffect } from 'vue'\nimport * as ElementPlusIconsVue from '@element-plus/icons-vue'\nimport { Search } from '@element-plus/icons-vue'\nimport { listIcons, disableCache } from '@iconify/vue'\nimport { getIcons } from '../../api/common'\nimport icons from '@vant/icons'\nimport { iconContentProps } from './props'\n\n// Disable all caching\ndisableCache('all')\n// List all icons\n\nconst props = defineProps(iconContentProps)\n\nfunction convertIconsToArray(iconsObj: any) {\n let iconArray: any = []\n for (const key in iconsObj) {\n // eslint-disable-next-line no-prototype-builtins\n if (iconsObj.hasOwnProperty(key) && Array.isArray(iconsObj[key])) {\n iconArray = iconArray.concat(iconsObj[key])\n }\n }\n return iconArray\n}\n\n// 获取element-plus所有图标\nconst elIcons = Object.keys(ElementPlusIconsVue).map((key) => {\n return key\n})\n\nconst vantIcons = convertIconsToArray(icons)\n\nconst _elIcons = ref(elIcons)\nconst _vantIcons = ref(vantIcons)\n\nconst iconifyIcons = listIcons()\nconst _iconifyIcons = ref(iconifyIcons)\n\n// 选中的tab\n// const activeName = ref(props.type)\nconst determineActiveName = () => {\n const { el, vant, cloud } = props.showTab\n\n if (el) {\n return 'element'\n } else if (vant) {\n return 'vant'\n } else if (cloud) {\n return 'cloud'\n }\n\n return props.type // 如果所有的选项都是 false,使用 type 的默认值\n}\n\n// 初始化 activeName\nconst activeName = ref(determineActiveName())\n\nconst searchIcon = ref('')\nconst searchPlaceholder = computed(() => {\n if (activeName.value === 'element') {\n return '搜索element-plus图标'\n } else if (activeName.value === 'vant') {\n return '搜索vant图标'\n } else {\n return '搜索云端图标'\n }\n})\n// 选中的图标\nconst chooseIcon = ref('')\nconst emit = defineEmits(['choose'])\n\n// 选择图标\nconst onChooseIcon = (icon: string) => {\n chooseIcon.value = icon\n emit('choose', icon)\n}\nconst onSearch = () => {\n if (activeName.value === 'element') {\n const searchTerm = searchIcon.value.toLowerCase() // 将搜索关键字转换为小写\n console.log(searchTerm)\n _elIcons.value = elIcons.filter((item) => {\n if (searchTerm) {\n const lowerItem = item.toLowerCase() // 将图标名转换为小写\n // 模糊查询匹配\n if (lowerItem.includes(searchTerm)) {\n return true // 匹配成功,返回 true\n }\n }\n return false // 没有匹配,返回 false\n })\n } else if (activeName.value === 'vant') {\n console.log('use')\n _vantIcons.value = vantIcons.filter((item: any) => {\n if (searchIcon.value) {\n const lowerItem = item.toLowerCase() // 将图标名转换为小写\n // 模糊查询匹配\n if (lowerItem.includes(searchIcon.value)) {\n return true // 匹配成功,返回 true\n }\n }\n return false // 没有匹配,返回 false\n })\n } else {\n // 云端\n getIcons(searchIcon.value)\n .then((res) => {\n _iconifyIcons.value = res.data\n })\n .catch((res) => {\n console.log(res)\n })\n }\n}\n\nconst onClear = () => {\n searchIcon.value = ''\n _elIcons.value = elIcons\n _iconifyIcons.value = iconifyIcons\n _vantIcons.value = vantIcons\n}\n\n// 导出ref\ndefineExpose({\n chooseIcon,\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAiGD,IAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAKlB,IAAA,SAAS,oBAAoB,QAAe,EAAA;AAC1C,MAAA,IAAI,YAAiB,EAAC,CAAA;AACtB,MAAA,KAAA,MAAW,OAAO,QAAU,EAAA;AAE1B,QAAI,IAAA,QAAA,CAAS,eAAe,GAAG,CAAA,IAAK,MAAM,OAAQ,CAAA,QAAA,CAAS,GAAG,CAAC,CAAG,EAAA;AAChE,UAAA,SAAA,GAAY,SAAU,CAAA,MAAA,CAAO,QAAS,CAAA,GAAG,CAAC,CAAA,CAAA;AAAA,SAC5C;AAAA,OAC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,QAAA,CAAS,UAAW,CAAA,KAAK,CACtB,CAAA,IAAA,CAAK,CAAC,GAAQ,KAAA;AACb,UAAA,aAAA,CAAc,QAAQ,GAAI,CAAA,IAAA,CAAA;AAAA,SAC3B,CAAA,CACA,KAAM,CAAA,CAAC,GAAQ,KAAA;AACd,UAAA,OAAA,CAAQ,IAAI,GAAG,CAAA,CAAA;AAAA,SAChB,CAAA,CAAA;AAAA,OACL;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,UAAA,CAAW,KAAQ,GAAA,EAAA,CAAA;AACnB,MAAA,QAAA,CAAS,KAAQ,GAAA,OAAA,CAAA;AACjB,MAAA,aAAA,CAAc,KAAQ,GAAA,YAAA,CAAA;AACtB,MAAA,UAAA,CAAW,KAAQ,GAAA,SAAA,CAAA;AAAA,KACrB,CAAA;AAGA,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icon-content.vue2.mjs","sources":["../../../src/icon-input/src/icon-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkIconContent',\n});\n</script>\n<template>\n <div class=\"dk-icon-content\">\n <el-tabs v-model=\"activeName\">\n <el-tab-pane v-if=\"props.showTab.el\" label=\"element图标\" name=\"element\" class=\"dk-tab-pane\">\n <dk-icon\n v-for=\"(item, key) in _elIcons\"\n :key=\"key\"\n :size=\"36\"\n :color=\"item == chooseIcon ? 'var(--el-color-primary)' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"onChooseIcon(item)\"\n >\n <component :is=\"item\" />\n </dk-icon>\n </el-tab-pane>\n <el-tab-pane v-if=\"props.showTab.vant\" label=\"vant图标\" name=\"vant\" class=\"dk-tab-pane\">\n <dk-icon\n v-for=\"(item, key) in _vantIcons\"\n :key=\"key\"\n :size=\"36\"\n :color=\"item == chooseIcon ? '#409eff' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n hover-color=\"var(--el-color-primary)\"\n :icon=\"item\"\n @click=\"onChooseIcon(item)\"\n >\n </dk-icon>\n </el-tab-pane>\n <el-tab-pane v-if=\"props.showTab.cloud\" label=\"云端图标\" name=\"cloud\" class=\"dk-tab-pane\">\n <template v-if=\"_iconifyIcons.length > 0\">\n <dk-icon\n v-for=\"(item, key) in _iconifyIcons\"\n :key=\"key\"\n :icon=\"item\"\n :size=\"36\"\n hover-color=\"var(--el-color-primary)\"\n :color=\"item == chooseIcon ? '#409eff' : ''\"\n :class=\"item == chooseIcon ? 'choose-icon' : 'dk-icon'\"\n class=\"cursor-pointer\"\n @click=\"onChooseIcon(item)\"\n >\n </dk-icon>\n <p v-if=\"!searchIcon\" class=\"text-center\" style=\"font-size: 12px; color: #999\">当前显示已缓存的图标</p>\n </template>\n <el-empty v-else description=\"暂无图标,请搜索\"></el-empty>\n </el-tab-pane>\n </el-tabs>\n <div class=\"search-icon\">\n <el-input v-model=\"searchIcon\" clearable :placeholder=\"searchPlaceholder\" @clear=\"onClear\">\n <template #append>\n <el-button :icon=\"Search\" @click=\"onSearch()\" />\n </template>\n </el-input>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, ref, watch, watchEffect } from 'vue'\nimport * as ElementPlusIconsVue from '@element-plus/icons-vue'\nimport { Search } from '@element-plus/icons-vue'\nimport { listIcons, disableCache } from '@iconify/vue'\nimport { getIcons } from '../../api/common'\nimport icons from '@vant/icons'\nimport { iconContentProps } from './props'\n\n// Disable all caching\ndisableCache('all')\n// List all icons\n\nconst props = defineProps(iconContentProps)\n\nfunction convertIconsToArray(iconsObj: any) {\n let iconArray: any = []\n for (const key in iconsObj) {\n // eslint-disable-next-line no-prototype-builtins\n if (iconsObj.hasOwnProperty(key) && Array.isArray(iconsObj[key])) {\n iconArray = iconArray.concat(iconsObj[key])\n }\n }\n return iconArray\n}\n\n// 获取element-plus所有图标\nconst elIcons = Object.keys(ElementPlusIconsVue).map((key) => {\n return key\n})\n\nconst vantIcons = convertIconsToArray(icons)\n\nconst _elIcons = ref(elIcons)\nconst _vantIcons = ref(vantIcons)\n\nconst iconifyIcons = listIcons()\nconst _iconifyIcons = ref(iconifyIcons)\n\n// 选中的tab\n// const activeName = ref(props.type)\nconst determineActiveName = () => {\n const { el, vant, cloud } = props.showTab\n\n if (el) {\n return 'element'\n } else if (vant) {\n return 'vant'\n } else if (cloud) {\n return 'cloud'\n }\n\n return props.type // 如果所有的选项都是 false,使用 type 的默认值\n}\n\n// 初始化 activeName\nconst activeName = ref(determineActiveName())\n\nconst searchIcon = ref('')\nconst searchPlaceholder = computed(() => {\n if (activeName.value === 'element') {\n return '搜索element-plus图标'\n } else if (activeName.value === 'vant') {\n return '搜索vant图标'\n } else {\n return '搜索云端图标'\n }\n})\n// 选中的图标\nconst chooseIcon = ref('')\nconst emit = defineEmits(['choose'])\n\n// 选择图标\nconst onChooseIcon = (icon: string) => {\n chooseIcon.value = icon\n emit('choose', icon)\n}\nconst onSearch = () => {\n if (activeName.value === 'element') {\n const searchTerm = searchIcon.value.toLowerCase() // 将搜索关键字转换为小写\n console.log(searchTerm)\n _elIcons.value = elIcons.filter((item) => {\n if (searchTerm) {\n const lowerItem = item.toLowerCase() // 将图标名转换为小写\n // 模糊查询匹配\n if (lowerItem.includes(searchTerm)) {\n return true // 匹配成功,返回 true\n }\n }\n return false // 没有匹配,返回 false\n })\n } else if (activeName.value === 'vant') {\n console.log('use')\n _vantIcons.value = vantIcons.filter((item: any) => {\n if (searchIcon.value) {\n const lowerItem = item.toLowerCase() // 将图标名转换为小写\n // 模糊查询匹配\n if (lowerItem.includes(searchIcon.value)) {\n return true // 匹配成功,返回 true\n }\n }\n return false // 没有匹配,返回 false\n })\n } else {\n // 云端\n getIcons(searchIcon.value)\n .then((res) => {\n _iconifyIcons.value = res.data\n })\n .catch((res) => {\n console.log(res)\n })\n }\n}\n\nconst onClear = () => {\n searchIcon.value = ''\n _elIcons.value = elIcons\n _iconifyIcons.value = iconifyIcons\n _vantIcons.value = vantIcons\n}\n\n// 导出ref\ndefineExpose({\n chooseIcon,\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAuED,IAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAKlB,IAAA,SAAS,oBAAoB,QAAe,EAAA;AAC1C,MAAA,IAAI,YAAiB,EAAC,CAAA;AACtB,MAAA,KAAA,MAAW,OAAO,QAAU,EAAA;AAE1B,QAAI,IAAA,QAAA,CAAS,eAAe,GAAG,CAAA,IAAK,MAAM,OAAQ,CAAA,QAAA,CAAS,GAAG,CAAC,CAAG,EAAA;AAChE,UAAA,SAAA,GAAY,SAAU,CAAA,MAAA,CAAO,QAAS,CAAA,GAAG,CAAC,CAAA,CAAA;AAAA,SAC5C;AAAA,OACF;AACA,MAAO,OAAA,SAAA,CAAA;AAAA,KACT;AAGA,IAAA,MAAM,UAAU,MAAO,CAAA,IAAA,CAAK,mBAAmB,CAAE,CAAA,GAAA,CAAI,CAAC,GAAQ,KAAA;AAC5D,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAY,oBAAoB,KAAK,CAAA,CAAA;AAE3C,IAAM,MAAA,QAAA,GAAW,IAAI,OAAO,CAAA,CAAA;AAC5B,IAAM,MAAA,UAAA,G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AAW,KAAQ,GAAA,EAAA,CAAA;AACnB,MAAA,QAAA,CAAS,KAAQ,GAAA,OAAA,CAAA;AACjB,MAAA,aAAA,CAAc,KAAQ,GAAA,YAAA,CAAA;AACtB,MAAA,UAAA,CAAW,KAAQ,GAAA,SAAA,CAAA;AAAA,KACrB,CAAA;AAGA,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"image-list-input.vue2.mjs","sources":["../../../src/image-list-input/src/image-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkImageListInput',\n});\n</script>\n<template>\n <dk-file-list-input\n v-bind=\"$props\"\n v-model=\"input\"\n :class=\"bem()\"\n :type=\"1\"\n @change=\"handleInput(input)\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { imageListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('image-list-input')\n\n\n\nconst props = defineProps(imageListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQ,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"image-list-input.vue2.mjs","sources":["../../../src/image-list-input/src/image-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkImageListInput',\n});\n</script>\n<template>\n <dk-file-list-input v-bind=\"$props\" v-model=\"input\" :class=\"bem()\" :type=\"1\" @change=\"handleInput(input)\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { imageListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('image-list-input')\n\n\n\nconst props = defineProps(imageListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAUD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQ,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
package/es/index.d.ts CHANGED
@@ -32,6 +32,8 @@ export * from './select';
32
32
  export * from './poster-input';
33
33
  export * from './style-animation-input';
34
34
  export * from './animate-select';
35
+ export * from './uni-icon';
36
+ export * from './uni-icon-input';
35
37
  export declare const install: (app: App, option?: any) => void;
36
38
  declare const _default: {
37
39
  install: (app: App<any>, option?: any) => void;
package/es/index.mjs CHANGED
@@ -34,6 +34,8 @@ import { Select } from './select/index.mjs';
34
34
  import { PosterInput, Poster } from './poster-input/index.mjs';
35
35
  import { StyleAnimationInput } from './style-animation-input/index.mjs';
36
36
  import { AnimateSelect } from './animate-select/index.mjs';
37
+ import { UniIconInput } from './uni-icon-input/index.mjs';
38
+ import { UniIcon } from './uni-icon/index.mjs';
37
39
  import { directives, setGlobalConfig } from '@vipl520/utils';
38
40
  export { tinyEditorProps } from './tiny-editor/src/props.mjs';
39
41
  export { iconProps } from './icon/src/props.mjs';
@@ -68,6 +70,8 @@ export { selectProps } from './select/src/props.mjs';
68
70
  export { posterInputProps } from './poster-input/src/props.mjs';
69
71
  export { styleAnimationInputProps } from './style-animation-input/src/props.mjs';
70
72
  export { animateSelectProps } from './animate-select/src/props.mjs';
73
+ export { uniIconProps } from './uni-icon/src/props.mjs';
74
+ export { uniIconInputProps } from './uni-icon-input/src/props.mjs';
71
75
 
72
76
  const components = [
73
77
  Test,
@@ -146,7 +150,9 @@ const components = [
146
150
  // 海报
147
151
  Poster,
148
152
  Vue3DraggableResizable,
149
- draggable
153
+ draggable,
154
+ UniIconInput,
155
+ UniIcon
150
156
  // TODO 普通上传 upload
151
157
  // TODO tag选择器 tag-input
152
158
  // TODO 链接选择器 link-input
@@ -167,5 +173,5 @@ var index = {
167
173
  install
168
174
  };
169
175
 
170
- 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 };
176
+ 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, UniIcon, UniIconInput, VideoInput, VideoListInput, index as default, install };
171
177
  //# 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 draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\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'\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 draggable,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,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,mBAAA;AAAA;AAAA,EAEA,aAAA;AAAA;AAAA,EAEA,KAAA;AAAA;AAAA,EAEA,MAAA;AAAA;AAAA;AAAA,EAGA,WAAA;AAAA;AAAA,EAEA,MAAA;AAAA,EACA,sBAAA;AAAA,EACA,SAAA;AAAA;AAAA;AAAA;AAAA;AAKF,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 draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\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 { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\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'\nexport * from './uni-icon'\nexport * from './uni-icon-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 StyleAnimationInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,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,E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AAA,EACb,OAAA;AACF,CAAA;;;;"}
package/es/index.scss CHANGED
@@ -24,6 +24,8 @@
24
24
  @import './hot-area-input/style/index.scss';
25
25
  @import './animate-select/style/index.scss';
26
26
  @import './style-animation-input/style/index.scss';
27
+ @import './uni-icon/style/index.scss';
28
+ @import './uni-icon-input/style/index.scss';
27
29
 
28
30
  //
29
31
  ::-webkit-scrollbar {
@@ -1 +1 @@
1
- {"version":3,"file":"DiyCloud.vue.mjs","sources":["../../../../src/page-diy/src/components/DiyCloud.vue"],"sourcesContent":["<template>\n <div class=\"diy-cloud\">\n <div class=\"diy-header\">\n <div class=\"diy-search\">\n <el-select v-model=\"search.state\" placeholder=\"状态\">\n <el-option label=\"全部状态\" value=\"\" />\n <el-option v-if=\"site.level > 0\" label=\"未通过\" value=\"-1\" />\n <el-option v-if=\"site.level > 0\" label=\"未审核\" value=\"0\" />\n <el-option label=\"已审核\" value=\"1\" />\n <el-option label=\"已推荐\" value=\"2\" />\n </el-select>\n <el-select v-model=\"search.look\" placeholder=\"查看\" class=\"u-m-l-10\">\n <el-option label=\"全部模板\" value=\"\" />\n <el-option label=\"我的模板\" value=\"me\" />\n <el-option label=\"他人模板\" value=\"other\" />\n </el-select>\n <el-input\n v-model=\"search['name like']\"\n placeholder=\"请输入模板名称\"\n clearable\n @clear=\"getDiyList(0)\"\n >\n <template #append>\n <el-button icon=\"Search\" @click=\"getDiyList(1)\" />\n </template>\n </el-input>\n </div>\n <div>\n <el-button\n v-if=\"site.level > 0\"\n type=\"warning\"\n :disabled=\"!chooseDiy.id\"\n @click=\"getCheckForm\"\n >审核\n </el-button>\n <el-button\n v-if=\"site.level > 1\"\n type=\"danger\"\n :disabled=\"!chooseDiy.id\"\n @click=\"delDiy\"\n >删除</el-button\n >\n <el-button\n v-if=\"site.level > 0 || site.site_id === chooseDiy.site_id\"\n type=\"info\"\n :disabled=\"!chooseDiy.id\"\n @click=\"getDiyForm(chooseDiy.id)\"\n >编辑\n </el-button>\n <el-button type=\"primary\" icon=\"Upload\" @click=\"getDiyForm()\"\n >上传新模板</el-button\n >\n </div>\n </div>\n <!---------------模板列表-------------------------->\n <div v-loading=\"loading\" class=\"diy-content\">\n <ul v-if=\"!loading && list.length > 0\" class=\"cl\">\n <li\n v-for=\"(item, key) in list\"\n :key=\"key\"\n :class=\"{ choose: chooseDiy.id === item.id }\"\n @click=\"onChooseDiy(item)\"\n >\n <el-image :src=\"item.cover_image\" class=\"cover\" fit=\"contain\" />\n <div v-if=\"item.state <= 0\" class=\"mask\" />\n <div class=\"type\">\n <el-tag v-if=\"item.state === '0'\" effect=\"dark\">审核中</el-tag>\n <el-tag v-if=\"item.state === '-1'\" type=\"danger\" effect=\"dark\"\n >审核未通过</el-tag\n >\n </div>\n <div v-if=\"item.state > 0\" class=\"tag-list\">\n <span v-if=\"item.state >= 2\" class=\"tag\"\n ><van-icon name=\"good-job\" />推荐</span\n >\n <span v-if=\"item.down_count > 100\" class=\"tag\"\n ><van-icon name=\"fire\" />热门</span\n >\n </div>\n <div class=\"title over\">{{ item.name }}</div>\n </li>\n </ul>\n <div\n v-else\n style=\"\n display: flex;\n align-items: center;\n justify-content: center;\n height: 500px;\n \"\n >\n <el-empty\n v-if=\"errCode === 0\"\n description=\"当前还没模板,点击右上角上传自己的模板吧\"\n />\n <el-empty v-else :description=\"errMsg\" />\n </div>\n <el-pagination\n background\n layout=\"total,prev, pager, next\"\n :total=\"total\"\n :current-page=\"page\"\n :page-size=\"pageSize\"\n hide-on-single-page\n @current-change=\"getDiyList\"\n />\n </div>\n <div class=\"diy-footer\">\n <el-button\n type=\"primary\"\n style=\"width: 300px\"\n :disabled=\"!chooseDiy.id\"\n @click=\"submit\"\n >确定</el-button\n >\n </div>\n <dk-form\n ref=\"formRef\"\n :is-dialog=\"true\"\n :form-data=\"formData\"\n @submit=\"onSubmit\"\n />\n </div>\n</template>\n\n<script>\nimport {\n getList,\n down,\n getDiyForm,\n getSiteMsg,\n getCheckForm,\n delDiy,\n} from '../../../api/diy'\nexport default {\n name: 'DiyCloud',\n props: {\n pageName: {\n default: '',\n type: String,\n },\n diyData: {\n default: () => {\n return {}\n },\n type: Object,\n },\n },\n emits: ['submit'],\n data() {\n return {\n total: 0,\n pageSize: 12,\n keyword: '',\n search: {\n state: '',\n look: '',\n },\n chooseDiy: {},\n page: 1,\n formData: null,\n site: {},\n width: '800px',\n list: [],\n loading: true,\n errMsg: '',\n errCode: 0,\n }\n },\n computed: {},\n mounted() {\n this.getDiyList()\n this.getSiteMsg()\n },\n methods: {\n submit() {\n this.$confirm('确定选择此diy模板?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n down(this.chooseDiy.id).then((res) => {\n this.$emit('submit', res.data)\n })\n })\n .catch(() => {})\n },\n onChooseDiy(item) {\n this.chooseDiy = item\n },\n getDiyList(page) {\n this.page = page || this.page\n this.loading = true\n getList(this.pageName, this.page, this.search, this.pageSize)\n .then((res) => {\n this.list = res.data\n this.total = res.msg\n this.loading = false\n })\n .catch((res) => {\n this.errMsg = res.msg\n this.errCode = -1\n this.loading = false\n })\n },\n getSiteMsg() {\n getSiteMsg().then((res) => {\n this.site = res.data\n })\n },\n getDiyForm(id = 0) {\n getDiyForm(id, this.pageName, this.diyData)\n .then((res) => {\n console.log('getDiyForm', res)\n this.formData = res.data\n this.width = '600px'\n this.$refs.formRef.show()\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n },\n getCheckForm() {\n getCheckForm(this.chooseDiy.id, this.chooseDiy.state)\n .then((res) => {\n this.formData = res.data\n this.width = '400px'\n this.$refs.formRef.show()\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n },\n delDiy() {\n this.$confirm('确定要删除当前模板,删除后不可恢复?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n delDiy(this.chooseDiy.id)\n .then((res) => {\n this.$message.success(res.msg)\n this.getDiyList(1)\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n })\n .catch(() => {})\n },\n onSubmit() {\n this.getDiyList(0)\n },\n },\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_createBlock","_createCommentVNode","_withDirectives","_Fragment","_renderList","_toDisplayString"],"mappings":";;;;AAsIA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,UAAU;AAChB,EAAA,KAAK,EAAE;AACL,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,MAAM;AACb,QAAA,OAAO,EAAC;OACT;MACD,IAAI,EAAE,MAAM;KACb;GACF;AACD,EAAA,KAAK,EAAE,CAAC,QAAQ,CAAC;AACjB,EAAA,IAAI,GAAG;AACL,IAAA,OAAO;AACL,MAAA,KAAK,EAAE,CAAC;MACR,QAAQ,EAAE,EAAE;MACZ,OAAO,EAAE,EAAE;AACX,MAAA,MAAM,EAAE;AACN,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,IAAI,EAAE,EAAE;OACT;MACD,SAAS,EAAE,EAAE;AACb,MAAA,IAAI,EAAE,CAAC;MACP,QAAQ,EAAE,IAAI;AACd,MAAA,IAAI,EAAE,EAAE;MACR,KAAK,EAAE,OAAO;AACd,MAAA,IAAI,EAAE,EAAE;MACR,OAAO,EAAE,IAAI;AACb,MAAA,MAAM,EAAE,EAAE;AACV,MAAA,OAAO,EAAE,CAAC;AACZ,KAAA;GACD;EACD,QAAQ,EAAE,EAAE;AACZ,EAAA,OAAO,GAAG;AACR,IAAA,IAAI,CAAC,UAAU,GAAC;AAChB,IAAA,IAAI,CAAC,UAAU,GAAC;GACjB;AACD,EAAA,OAAO,EAAE;AACP,IAAA,MAAM,GAAG;AACP,MAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,EAAE;QACjC,iBAAiB,EAAE,IAAI;AACvB,QAAA,gBAAgB,EAAE,IAAI;AACtB,Q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AQ,CAAA,QAAA;;;;;;;;"}
1
+ {"version":3,"file":"DiyCloud.vue.mjs","sources":["../../../../src/page-diy/src/components/DiyCloud.vue"],"sourcesContent":["<template>\n <div class=\"diy-cloud\">\n <div class=\"diy-header\">\n <div class=\"diy-search\">\n <el-select v-model=\"search.state\" placeholder=\"状态\">\n <el-option label=\"全部状态\" value=\"\" />\n <el-option v-if=\"site.level > 0\" label=\"未通过\" value=\"-1\" />\n <el-option v-if=\"site.level > 0\" label=\"未审核\" value=\"0\" />\n <el-option label=\"已审核\" value=\"1\" />\n <el-option label=\"已推荐\" value=\"2\" />\n </el-select>\n <el-select v-model=\"search.look\" placeholder=\"查看\" class=\"u-m-l-10\">\n <el-option label=\"全部模板\" value=\"\" />\n <el-option label=\"我的模板\" value=\"me\" />\n <el-option label=\"他人模板\" value=\"other\" />\n </el-select>\n <el-input v-model=\"search['name like']\" placeholder=\"请输入模板名称\" clearable @clear=\"getDiyList(0)\">\n <template #append>\n <el-button icon=\"Search\" @click=\"getDiyList(1)\" />\n </template>\n </el-input>\n </div>\n <div>\n <el-button v-if=\"site.level > 0\" type=\"warning\" :disabled=\"!chooseDiy.id\" @click=\"getCheckForm\"\n >审核\n </el-button>\n <el-button v-if=\"site.level > 1\" type=\"danger\" :disabled=\"!chooseDiy.id\" @click=\"delDiy\">删除</el-button>\n <el-button\n v-if=\"site.level > 0 || site.site_id === chooseDiy.site_id\"\n type=\"info\"\n :disabled=\"!chooseDiy.id\"\n @click=\"getDiyForm(chooseDiy.id)\"\n >编辑\n </el-button>\n <el-button type=\"primary\" icon=\"Upload\" @click=\"getDiyForm()\">上传新模板</el-button>\n </div>\n </div>\n <!---------------模板列表-------------------------->\n <div v-loading=\"loading\" class=\"diy-content\">\n <ul v-if=\"!loading && list.length > 0\" class=\"cl\">\n <li\n v-for=\"(item, key) in list\"\n :key=\"key\"\n :class=\"{ choose: chooseDiy.id === item.id }\"\n @click=\"onChooseDiy(item)\"\n >\n <el-image :src=\"item.cover_image\" class=\"cover\" fit=\"contain\" />\n <div v-if=\"item.state <= 0\" class=\"mask\" />\n <div class=\"type\">\n <el-tag v-if=\"item.state === '0'\" effect=\"dark\">审核中</el-tag>\n <el-tag v-if=\"item.state === '-1'\" type=\"danger\" effect=\"dark\">审核未通过</el-tag>\n </div>\n <div v-if=\"item.state > 0\" class=\"tag-list\">\n <span v-if=\"item.state >= 2\" class=\"tag\"><van-icon name=\"good-job\" />推荐</span>\n <span v-if=\"item.down_count > 100\" class=\"tag\"><van-icon name=\"fire\" />热门</span>\n </div>\n <div class=\"title over\">{{ item.name }}</div>\n </li>\n </ul>\n <div v-else style=\"display: flex; align-items: center; justify-content: center; height: 500px\">\n <el-empty v-if=\"errCode === 0\" description=\"当前还没模板,点击右上角上传自己的模板吧\" />\n <el-empty v-else :description=\"errMsg\" />\n </div>\n <el-pagination\n background\n layout=\"total,prev, pager, next\"\n :total=\"total\"\n :current-page=\"page\"\n :page-size=\"pageSize\"\n hide-on-single-page\n @current-change=\"getDiyList\"\n />\n </div>\n <div class=\"diy-footer\">\n <el-button type=\"primary\" style=\"width: 300px\" :disabled=\"!chooseDiy.id\" @click=\"submit\">确定</el-button>\n </div>\n <dk-form ref=\"formRef\" :is-dialog=\"true\" :form-data=\"formData\" @submit=\"onSubmit\" />\n </div>\n</template>\n\n<script>\nimport { getList, down, getDiyForm, getSiteMsg, getCheckForm, delDiy } from '../../../api/diy'\nexport default {\n name: 'DiyCloud',\n props: {\n pageName: {\n default: '',\n type: String,\n },\n diyData: {\n default: () => {\n return {}\n },\n type: Object,\n },\n },\n emits: ['submit'],\n data() {\n return {\n total: 0,\n pageSize: 12,\n keyword: '',\n search: {\n state: '',\n look: '',\n },\n chooseDiy: {},\n page: 1,\n formData: null,\n site: {},\n width: '800px',\n list: [],\n loading: true,\n errMsg: '',\n errCode: 0,\n }\n },\n computed: {},\n mounted() {\n this.getDiyList()\n this.getSiteMsg()\n },\n methods: {\n submit() {\n this.$confirm('确定选择此diy模板?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n down(this.chooseDiy.id).then((res) => {\n this.$emit('submit', res.data)\n })\n })\n .catch(() => {})\n },\n onChooseDiy(item) {\n this.chooseDiy = item\n },\n getDiyList(page) {\n this.page = page || this.page\n this.loading = true\n getList(this.pageName, this.page, this.search, this.pageSize)\n .then((res) => {\n this.list = res.data\n this.total = res.msg\n this.loading = false\n })\n .catch((res) => {\n this.errMsg = res.msg\n this.errCode = -1\n this.loading = false\n })\n },\n getSiteMsg() {\n getSiteMsg().then((res) => {\n this.site = res.data\n })\n },\n getDiyForm(id = 0) {\n getDiyForm(id, this.pageName, this.diyData)\n .then((res) => {\n console.log('getDiyForm', res)\n this.formData = res.data\n this.width = '600px'\n this.$refs.formRef.show()\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n },\n getCheckForm() {\n getCheckForm(this.chooseDiy.id, this.chooseDiy.state)\n .then((res) => {\n this.formData = res.data\n this.width = '400px'\n this.$refs.formRef.show()\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n },\n delDiy() {\n this.$confirm('确定要删除当前模板,删除后不可恢复?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n delDiy(this.chooseDiy.id)\n .then((res) => {\n this.$message.success(res.msg)\n this.getDiyList(1)\n })\n .catch((res) => {\n this.$message.error(res.msg)\n })\n })\n .catch(() => {})\n },\n onSubmit() {\n this.getDiyList(0)\n },\n },\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_createBlock","_createCommentVNode","_withDirectives","_Fragment","_renderList","_toDisplayString"],"mappings":";;;;AAkFA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,UAAU;AAChB,EAAA,KAAK,EAAE;AACL,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,OAAO,EAAE;MACP,OAAO,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kBAAA,WAAW,EAAC,sBAAsB;;8BACjEA,WAAyC,CAAA,mBAAA,EAAA;;AAAvB,kBAAA,WAAW,EAAE,KAAM,CAAA,MAAA;;;MAEvCD,WAQE,CAAA,wBAAA,EAAA;AAPA,QAAA,UAAU,EAAV,EAAU;AACV,QAAA,MAAM,EAAC,yBAAyB;AAC/B,QAAA,KAAK,EAAE,KAAK,CAAA,KAAA;AACZ,QAAA,cAAY,EAAE,KAAI,CAAA,IAAA;AAClB,QAAA,WAAS,EAAE,KAAQ,CAAA,QAAA;AACpB,QAAA,qBAAmB,EAAnB,EAAmB;AAClB,QAAA,eAAc,EAAE,QAAU,CAAA,UAAA;;;2BAhCf,KAAO,CAAA,OAAA,CAAA;;AAmCvB,IAAAD,kBAAA,CAEM,OAFN,WAEM,EAAA;MADJC,WAAuG,CAAA,oBAAA,EAAA;AAA5F,QAAA,IAAI,EAAC,SAAS;AAAC,QAAA,KAAoB,EAApB,CAAoB,OAAA,CAAA,OAAA,CAAA;QAAE,QAAQ,EAAA,CAAG,KAAS,CAAA,SAAA,CAAC,EAAE;AAAG,QAAA,OAAK,EAAE,QAAM,CAAA,MAAA;;yBAAE,MAAE;0BAAF,IAAE,CAAA;;;;;IAE7FA,WAAoF,CAAA,kBAAA,EAAA;AAA3E,MAAA,GAAG,EAAC,SAAS;AAAE,MAAA,WAAS,EAAE,IAAI;AAAG,MAAA,WAAS,EAAE,KAAQ,CAAA,QAAA;AAAG,MAAA,QAAM,EAAE,QAAQ,CAAA,QAAA;;;;;;;;"}
@@ -52,11 +52,7 @@ const _sfc_main = defineComponent({
52
52
  return style
53
53
  },
54
54
  _animate() {
55
- if (
56
- this.setting.animation_preview !== false &&
57
- this.setting.animate &&
58
- !this.previewSetting.closeAnimate
59
- ) {
55
+ if (this.setting.animation_preview !== false && this.setting.animate && !this.previewSetting.closeAnimate) {
60
56
  return 'animate__' + this.setting.animate
61
57
  } else {
62
58
  return ''
@@ -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 }, _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\n v-if=\"children\"\n class=\"drag-btn\"\n title=\"添加子组件\"\n @click=\"$emit('addChild')\"\n >\n <dk-icon icon=\"fluent:tab-add-20-regular\"></dk-icon>\n </div>\n <div\n class=\"drag-btn drag-btn-danger\"\n title=\"删除组件\"\n @click=\"$emit('delete')\"\n >\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 (\n this.setting.animation_preview !== false &&\n this.setting.animate &&\n !this.previewSetting.closeAnimate\n ) {\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":";;;AAqCA,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,MAAM,iBAAiB,MAAM,CAAC,gBAAgB,EAAA;AAC9C,IAAA,OAAO;AACL,MAAA,EAAE;MACF,KAAK;AACL,MAAA,cAAc;AAChB,KAAA;GACD;AACD,EAAA,QAAQ,EAAE;IACR,UAAU,GAAG;AACX,MAAA,OAAO,EAAC;KACT;AACD,IAAA,MAAM,GAAG;MACP,IAAI,KAAM,GAAE,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,SA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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,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,MAAM,iBAAiB,MAAM,CAAC,gBAAgB,EAAA;AAC9C,IAAA,OAAO;AACL,MAAA,EAAE;MACF,KAAK;AACL,MAAA,cAAc;AAChB,KAAA;GACD;AACD,EAAA,QAAQ,EAAE;IACR,UAAU,GAAG;AACX,MAAA,OAAO,EAAC;KACT;AACD,IAAA,MAAM,GAAG;MACP,IAAI,KAAM,GAAE,EAAE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,CAAA,CAAA;;QAC9DC,WAAgC,CAAA,kBAAA,EAAA,EAAvB,IAAI,EAAC,OAAO,EAAA,CAAA;;;IAGzBC,UAA4B,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;;;;;;;"}
@@ -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\n icon=\"gg:battery-full\"\n :size=\"18\"\n color=\"#555\"\n hover-color=\"#f00\"\n ></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\n icon=\"Close\"\n hover-color=\"var(--el-color-primary)\"\n :size=\"20\"\n style=\"cursor: pointer\"\n ></dk-icon>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"clear('rule')\"\n >清除组件</el-dropdown-item\n >\n <el-dropdown-item @click=\"clear('page')\"\n >清除页面</el-dropdown-item\n >\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\n icon=\"MoreFilled\"\n :size=\"20\"\n hover-color=\"var(--el-color-primary)\"\n style=\"cursor: pointer\"\n />\n </template>\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.showLine\" @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-slider\n v-model=\"form.margin\"\n :min=\"0\"\n :step=\"1\"\n show-stops\n :max=\"20\"\n @change=\"changeForm()\"\n />\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\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.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 || true,\n margin: cache.margin || 2,\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;;;;;;;;;;;;;;;;AAiID,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,IAAA;AAAA,MAC5B,MAAA,EAAQ,MAAM,MAAU,IAAA,CAAA;AAAA,MACxB,OAAA,EAAS,MAAM,OAAW,IAAA,KAAA;AAAA,MAC1B,YAAA,EAAc,MAAM,YAA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ClB,CAAA;AAAA,OACF;AACA,MAAI,IAAA,IAAA,CAAK,MAAM,OAAS,EAAA;AACtB,QAAA,IAAA,CAAK,WAAW,CAAI,GAAA,GAAA,CAAA;AACpB,QAAA,IAAA,CAAK,YAAY,CAAI,GAAA,QAAA,CAAA;AACrB,QAAA,IAAA,CAAK,aAAa,CAAI,GAAA,KAAA,CAAA;AAAA,OACjB,MAAA;AACL,QAAA,IAAA,CAAK,WAAW,CAAI,GAAA,OAAA,CAAA;AACpB,QAAA,IAAA,CAAK,YAAY,CAAI,GAAA,SAAA,CAAA;AACrB,QAAA,IAAA,CAAK,aAAa,CAAI,GAAA,MAAA,CAAA;AAAA,OACxB;AACA,MAAO,OAAA;AAAA,QACL,GAAG,MAAM,UAAW,CAAA,KAAA;AAAA,QACpB,GAAG,IAAA;AAAA,OACL,CAAA;AAAA,KACD,CAAA,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 || true,\n margin: cache.margin || 2,\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,MAAM,OAAO,GAAI,CAAA;AAAA,MACf,QAAA,EAAU,MAAM,QAAY,IAAA,IAAA;AAAA,MAC5B,MAAA,EAAQ,MAAM,MAAU,IAAA,CAAA;AAAA,MACxB,OAAA,EAAS,MAAM,OAAW,IAAA,KAAA;AAAA,MAC1B,YAAA,EAAc,MAAM,YAAgB,IAAA,KAAA;AAAA,KACrC,CAAA,CAAA;AAED,IAAA,OAAA,CAAQ,kBAAkB,IAAI,CAAA,CAAA;AAE9B,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,cA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AA,OACxB;AACA,MAAO,OAAA;AAAA,QACL,GAAG,MAAM,UAAW,CAAA,KAAA;AAAA,QACpB,GAAG,IAAA;AAAA,OACL,CAAA;AAAA,KACD,CAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -73,18 +73,16 @@ const _sfc_main = {
73
73
  if (isEvent) {
74
74
  // 表单配置数据
75
75
  const eventProps = config.props();
76
- this.findDkEventCreateInput(eventProps, propsData).forEach(
77
- (item) => {
78
- const data = {
79
- id: children._id,
80
- label: item.props?.label || config.label,
81
- value: propsData[item.field],
82
- };
83
- if (data.value && data.id && data.label) {
84
- this.EventData.addEvent(data);
85
- }
76
+ this.findDkEventCreateInput(eventProps, propsData).forEach((item) => {
77
+ const data = {
78
+ id: children._id,
79
+ label: item.props?.label || config.label,
80
+ value: propsData[item.field],
81
+ };
82
+ if (data.value && data.id && data.label) {
83
+ this.EventData.addEvent(data);
86
84
  }
87
- );
85
+ });
88
86
  }
89
87
  }
90
88
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DkEventSelectInput.vue.mjs","sources":["../../../../../src/page-diy/src/components/forms/DkEventSelectInput.vue"],"sourcesContent":["<template>\n <div style=\"display: flex\">\n <el-select\n v-model=\"data\"\n placeholder=\"请选择要触发事件\"\n style=\"width: 100%\"\n allow-create\n filterable\n >\n <el-option\n v-for=\"item in eventData\"\n :key=\"item.value\"\n :label=\"item.label + '(' + item.value + ')'\"\n :value=\"item.value\"\n >\n <span style=\"float: left\">{{ item.label }}</span>\n <span style=\"float: right; font-size: 13px; color: #8492a6\">{{\n item.value\n }}</span>\n </el-option>\n </el-select>\n <el-button :loading=\"loading\" @click=\"updateEvent\">刷新</el-button>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DkEventSelectInput',\n inject: ['diy'],\n props: {\n modelValue: {\n default: '',\n type: String,\n },\n placeholder: {\n default: '',\n type: String,\n },\n },\n emits: ['update:modelValue'],\n data() {\n return {\n data: '',\n loading: false,\n eventData: [],\n }\n },\n computed: {\n EventData() {\n return this.diy.proxy.eventData\n },\n children() {\n return this.diy.proxy.children\n },\n },\n watch: {\n data() {\n this.$emit('update:modelValue', this.data)\n },\n },\n mounted() {\n this.data = this.modelValue || ''\n this.updateEvent()\n },\n methods: {\n updateEvent() {\n this.loading = true\n this.EventData.removeAllEvent()\n this.onUpdateEvent()\n this.loading = false\n },\n onClick() {\n this.data = this.randomString(10)\n },\n randomString(e) {\n e = e || 32\n const t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'\n const a = t.length\n let n = ''\n for (let i = 0; i < e; i++) {\n n += t.charAt(Math.floor(Math.random() * a))\n }\n return n\n },\n // 更新事件\n onUpdateEvent() {\n for (let i = 0; i < this.children.length; i++) {\n if (this.children[i].children.length > 0) {\n // 当前节点\n const children = this.children[i].children[0]\n // 当前节点的props数据\n const propsData = children.props\n // 当前节点的配置数据\n const config = children.config.config\n const isEvent = config.event || false\n if (isEvent) {\n // 表单配置数据\n const eventProps = config.props()\n this.findDkEventCreateInput(eventProps, propsData).forEach(\n (item) => {\n const data = {\n id: children._id,\n label: item.props?.label || config.label,\n value: propsData[item.field],\n }\n if (data.value && data.id && data.label) {\n this.EventData.addEvent(data)\n }\n }\n )\n }\n }\n }\n this.eventData = this.EventData.getAllEvents()\n },\n // 寻找事件\n findDkEventCreateInput(data, propsData) {\n const result = []\n data.forEach((element) => {\n if (element.children) {\n result.push(...this.findDkEventCreateInput(element.children))\n }\n if (element.control && Array.isArray(element.control)) {\n element.control.forEach((control) => {\n if (control.rule.length > 0) {\n result.push(...this.findDkEventCreateInput(control.rule))\n }\n })\n }\n if (element.type === 'DkEventCreateInput') {\n result.push(element)\n }\n })\n return result\n },\n },\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_Fragment","_renderList","_createBlock","_createElementVNode","_toDisplayString"],"mappings":";;;AA0BA,MAAK,SAAU,GAAA;EACb,IAAI,EAAE,oBAAoB;AAC1B,EAAA,MAAM,EAAE,CAAC,KAAK,CAAC;AACf,EAAA,KAAK,EAAE;IACL,UAAU,EAAE;MACV,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE;MACX,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;GACF;EACD,KAAK,EAAE,CAAC,mBAAmB,CAAC;AAC5B,EAAA,IAAI,GAAG;AACL,IAAA,OAAO;AACL,MAAA,IAAI,EAAE,EAAE;MACR,OAAO,EAAE,KAAK;MACd,SAAS,EAAE,EAAE;AACf,KAAA;GACD;AACD,EAAA,QAAQ,EAAE;IACR,SAAS,GAAG;MACV,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAQ;KAC/B;IACD,QAAQ,GAAG;MACT,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,QAAO;KAC9B;GACF;AACD,EAAA,KAAK,EAAE;AACL,IAAA,IAAI,GAAG;AACL,MAAA,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,IAAI,EAAA;KAC1C;GACF;AACD,EAAA,OAAO,GAAG;IACR,IAAI,CAAC,IAAK,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,GAAA,GAAA;YACpC,KAAK,EAAE,IAAI,CAAC,KAAK;;6BAElB,MAAiD;AAAjD,cAAAC,kBAAA,CAAiD,MAAjD,EAAA,UAAiD,EAApBC,eAAA,CAAA,IAAI,CAAC,KAAK,CAAA,EAAA,CAAA,YAAA;AACvC,cAAAD,kBAAA,CAES,MAFT,EAAA,UAES,EADPC,eAAA,CAAA,IAAI,CAAC,KAAK,CAAA,EAAA,CAAA,YAAA;;;;;;;;IAIhBL,WAAiE,CAAA,oBAAA,EAAA;AAArD,MAAA,OAAO,EAAE,KAAO,CAAA,OAAA;AAAG,MAAA,OAAK,EAAE,QAAW,CAAA,WAAA;;uBAAE,MAAE;wBAAF,IAAE,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"DkEventSelectInput.vue.mjs","sources":["../../../../../src/page-diy/src/components/forms/DkEventSelectInput.vue"],"sourcesContent":["<template>\n <div style=\"display: flex\">\n <el-select v-model=\"data\" placeholder=\"请选择要触发事件\" style=\"width: 100%\" allow-create filterable>\n <el-option\n v-for=\"item in eventData\"\n :key=\"item.value\"\n :label=\"item.label + '(' + item.value + ')'\"\n :value=\"item.value\"\n >\n <span style=\"float: left\">{{ item.label }}</span>\n <span style=\"float: right; font-size: 13px; color: #8492a6\">{{ item.value }}</span>\n </el-option>\n </el-select>\n <el-button :loading=\"loading\" @click=\"updateEvent\">刷新</el-button>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DkEventSelectInput',\n inject: ['diy'],\n props: {\n modelValue: {\n default: '',\n type: String,\n },\n placeholder: {\n default: '',\n type: String,\n },\n },\n emits: ['update:modelValue'],\n data() {\n return {\n data: '',\n loading: false,\n eventData: [],\n }\n },\n computed: {\n EventData() {\n return this.diy.proxy.eventData\n },\n children() {\n return this.diy.proxy.children\n },\n },\n watch: {\n data() {\n this.$emit('update:modelValue', this.data)\n },\n },\n mounted() {\n this.data = this.modelValue || ''\n this.updateEvent()\n },\n methods: {\n updateEvent() {\n this.loading = true\n this.EventData.removeAllEvent()\n this.onUpdateEvent()\n this.loading = false\n },\n onClick() {\n this.data = this.randomString(10)\n },\n randomString(e) {\n e = e || 32\n const t = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'\n const a = t.length\n let n = ''\n for (let i = 0; i < e; i++) {\n n += t.charAt(Math.floor(Math.random() * a))\n }\n return n\n },\n // 更新事件\n onUpdateEvent() {\n for (let i = 0; i < this.children.length; i++) {\n if (this.children[i].children.length > 0) {\n // 当前节点\n const children = this.children[i].children[0]\n // 当前节点的props数据\n const propsData = children.props\n // 当前节点的配置数据\n const config = children.config.config\n const isEvent = config.event || false\n if (isEvent) {\n // 表单配置数据\n const eventProps = config.props()\n this.findDkEventCreateInput(eventProps, propsData).forEach((item) => {\n const data = {\n id: children._id,\n label: item.props?.label || config.label,\n value: propsData[item.field],\n }\n if (data.value && data.id && data.label) {\n this.EventData.addEvent(data)\n }\n })\n }\n }\n }\n this.eventData = this.EventData.getAllEvents()\n },\n // 寻找事件\n findDkEventCreateInput(data, propsData) {\n const result = []\n data.forEach((element) => {\n if (element.children) {\n result.push(...this.findDkEventCreateInput(element.children))\n }\n if (element.control && Array.isArray(element.control)) {\n element.control.forEach((control) => {\n if (control.rule.length > 0) {\n result.push(...this.findDkEventCreateInput(control.rule))\n }\n })\n }\n if (element.type === 'DkEventCreateInput') {\n result.push(element)\n }\n })\n return result\n },\n },\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_Fragment","_renderList","_createBlock","_createElementVNode","_toDisplayString"],"mappings":";;;AAkBA,MAAK,SAAU,GAAA;EACb,IAAI,EAAE,oBAAoB;AAC1B,EAAA,MAAM,EAAE,CAAC,KAAK,CAAC;AACf,EAAA,KAAK,EAAE;IACL,UAAU,EAAE;MACV,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;IACD,WAAW,EAAE;MACX,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;GACF;EACD,KAAK,EAAE,CAAC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EAAA;kBAVQ,KAAI,CAAA,IAAA;mEAAJ,KAAI,CAAA,IAAA,IAAA,MAAA,CAAA,CAAA;AAAE,MAAA,WAAW,EAAC,UAAU;AAAC,MAAA,KAAmB,EAAnB,CAAmB,OAAA,CAAA,MAAA,CAAA;AAAC,MAAA,cAAY,EAAZ,EAAY;AAAC,MAAA,UAAU,EAAV,EAAU;;uBAExF,MAAyB;0BAD3BD,kBAQY,CAAAE,QAAA,EAAA,IAAA,EAAAC,UAAA,CAPK,KAAS,CAAA,SAAA,EAAA,CAAjB,IAAI,KAAA;+BADbC,WAQY,CAAA,oBAAA,EAAA;YANT,GAAG,EAAE,IAAI,CAAC,KAAK;AACf,YAAA,KAAK,EAAE,IAAI,CAAC,KAAK,GAAS,GAAA,GAAA,IAAI,CAAC,KAAK,GAAA,GAAA;YACpC,KAAK,EAAE,IAAI,CAAC,KAAK;;6BAElB,MAAiD;AAAjD,cAAAC,kBAAA,CAAiD,MAAjD,EAAA,UAAiD,EAApBC,eAAA,CAAA,IAAI,CAAC,KAAK,CAAA,EAAA,CAAA,YAAA;AACvC,cAAAD,kBAAA,CAAmF,MAAnF,EAAA,UAAmF,EAApBC,eAAA,CAAA,IAAI,CAAC,KAAK,CAAA,EAAA,CAAA,YAAA;;;;;;;;IAG7EL,WAAiE,CAAA,oBAAA,EAAA;AAArD,MAAA,OAAO,EAAE,KAAO,CAAA,OAAA;AAAG,MAAA,OAAK,EAAE,QAAW,CAAA,WAAA;;uBAAE,MAAE;wBAAF,IAAE,CAAA;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"dkSetting.mjs","sources":["../../../../../src/page-diy/src/config/base/dkSetting.js"],"sourcesContent":["import Animates from '../../../../animate-select/src/animates'\n\nfunction createTitle(title) {\n return {\n type: 'h2',\n slot: 'title',\n style:\n 'display: flex;align-items: center;font-size: 14px;font-weight: 600;margin:0;padding:0',\n children: [\n {\n type: 'em',\n style:\n 'width: 6px; height: 18px; background: rgb(64, 158, 255); display: block; margin-right: 5px;',\n },\n { type: 'span', children: [title] },\n ],\n }\n}\n\nfunction inLoop(val) {\n const animate = Animates[0].animate\n for (let i = 0; i < animate.length; i++) {\n if (animate[i].value === val) {\n return true\n }\n }\n return false\n}\n\nexport default function dkSetting(rule = null) {\n const form = [\n {\n type: 'el-collapse',\n props: {\n modelValue: 'base',\n },\n style: 'width:100%',\n children: [\n // 基础配置\n {\n type: 'el-collapse-item',\n props: { name: 'base' },\n\n children: [\n createTitle('基础配置'),\n {\n type: 'DkStyleInput',\n field: 'style',\n value: {},\n title: '',\n props: { height: 180 },\n },\n ],\n },\n ],\n },\n {\n type: 'el-collapse',\n props: {\n modelValue: 'base',\n },\n style: 'width:100%',\n children: [\n // 基础配置\n {\n type: 'el-collapse-item',\n props: { name: 'base' },\n\n children: [\n createTitle('动画配置'),\n {\n type: 'DkAnimateSelect',\n field: 'animate',\n value: '',\n title: '选择动画',\n control: [\n {\n handle: function (val) {\n if (!val) return false\n return inLoop(val)\n },\n rule: [\n {\n type: 'dk-style-animation-input',\n field: 'animation',\n title: '',\n value: {\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n },\n },\n ],\n },\n {\n handle: function (val) {\n if (!val) return false\n return !inLoop(val)\n },\n rule: [\n {\n type: 'dk-style-animation-input',\n field: 'animation',\n title: '',\n value: {\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 1,\n },\n },\n ],\n },\n ],\n },\n {\n type: 'switch',\n field: 'animation_preview',\n title: '实时预览',\n value: true,\n effect: {\n help: '设置当前组件循环动画实时预览,当前仅为调试项',\n },\n },\n ],\n },\n ],\n },\n ]\n // 判断是否允许开启悬浮\n if (rule) {\n if (rule.config.config.rule().fixed) {\n const fixedChildren = [\n createTitle('悬浮配置'),\n {\n type: 'switch',\n field: 'is_position',\n value: false,\n title: '开启悬浮',\n effect: {\n help: '设置组件是否开启悬浮',\n },\n control: [\n {\n value: true,\n rule: [\n {\n type: 'DkStylePositionInput',\n field: 'position',\n value: {},\n title: '',\n },\n ],\n },\n ],\n },\n ]\n const collapseFixed = {\n type: 'el-collapse-item',\n props: { name: 'fixed' },\n children: fixedChildren,\n }\n form[0].children.push(collapseFixed)\n }\n }\n return form\n}\n"],"names":[],"mappings":";;AAEA,SAAS,YAAY,KAAO,EAAA;AAC1B,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,IAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,KACE,EAAA,uFAAA;AAAA,IACF,QAAU,EAAA;AAAA,MACR;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,QACN,KACE,EAAA,6FAAA;AAAA,OACJ;AAAA,MACA,EAAE,IAAM,EAAA,MAAA,EAAQ,QAAU,EAAA,CAAC,KAAK,CAAE,EAAA;AAAA,KACpC;AAAA,GACF,CAAA;AACF,CAAA;AAEA,SAAS,OAAO,GAAK,EAAA;AACnB,EAAM,MAAA,OAAA,GAAU,QAAS,CAAA,CAAC,CAAE,CAAA,OAAA,CAAA;AAC5B,EAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,OAAA,CAAQ,QAAQ,CAAK,EAAA,EAAA;AACvC,IAAA,IAAI,OAAQ,CAAA,CAAC,CAAE,CAAA,KAAA,KAAU,GAAK,EAAA;AAC5B,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAAA,GACF;AACA,EAAO,OAAA,KAAA,CAAA;AACT,CAAA;AAEwB,SAAA,SAAA,CAAU,OAAO,IAAM,EAAA;AAC7C,EAAA,MAAM,IAAO,GAAA;AAAA,IACX;AAAA,MACE,IAAM,EAAA,aAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,UAAY,EAAA,MAAA;AAAA,OACd;AAAA,MACA,KAAO,EAAA,YAAA;AAAA,MACP,QAAU,EAAA;AAAA;AAAA,QAER;AAAA,UACE,IAAM,EAAA,kBAAA;AAAA,UACN,KAAA,EAAO,EAAE,IAAA,EAAM,MAAO,EAAA;AAAA,UAEtB,Q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A,sBAAA;AAAA,kBACN,KAAO,EAAA,UAAA;AAAA,kBACP,OAAO,EAAC;AAAA,kBACR,KAAO,EAAA,EAAA;AAAA,iBACT;AAAA,eACF;AAAA,aACF;AAAA,WACF;AAAA,SACF;AAAA,OACF,CAAA;AACA,MAAA,MAAM,aAAgB,GAAA;AAAA,QACpB,IAAM,EAAA,kBAAA;AAAA,QACN,KAAA,EAAO,EAAE,IAAA,EAAM,OAAQ,EAAA;AAAA,QACvB,QAAU,EAAA,aAAA;AAAA,OACZ,CAAA;AACA,MAAA,IAAA,CAAK,CAAC,CAAA,CAAE,QAAS,CAAA,IAAA,CAAK,aAAa,CAAA,CAAA;AAAA,KACrC;AAAA,GACF;AACA,EAAO,OAAA,IAAA,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"dkSetting.mjs","sources":["../../../../../src/page-diy/src/config/base/dkSetting.js"],"sourcesContent":["import Animates from '../../../../animate-select/src/animates'\n\nfunction createTitle(title) {\n return {\n type: 'h2',\n slot: 'title',\n style: 'display: flex;align-items: center;font-size: 14px;font-weight: 600;margin:0;padding:0',\n children: [\n {\n type: 'em',\n style: 'width: 6px; height: 18px; background: rgb(64, 158, 255); display: block; margin-right: 5px;',\n },\n { type: 'span', children: [title] },\n ],\n }\n}\n\nfunction inLoop(val) {\n const animate = Animates[0].animate\n for (let i = 0; i < animate.length; i++) {\n if (animate[i].value === val) {\n return true\n }\n }\n return false\n}\n\nexport default function dkSetting(rule = null) {\n const form = [\n {\n type: 'el-collapse',\n props: {\n modelValue: 'base',\n },\n style: 'width:100%',\n children: [\n // 基础配置\n {\n type: 'el-collapse-item',\n props: { name: 'base' },\n\n children: [\n createTitle('基础配置'),\n {\n type: 'DkStyleInput',\n field: 'style',\n value: {},\n title: '',\n props: { height: 180 },\n },\n ],\n },\n ],\n },\n {\n type: 'el-collapse',\n props: {\n modelValue: 'base',\n },\n style: 'width:100%',\n children: [\n // 基础配置\n {\n type: 'el-collapse-item',\n props: { name: 'base' },\n\n children: [\n createTitle('动画配置'),\n {\n type: 'DkAnimateSelect',\n field: 'animate',\n value: '',\n title: '选择动画',\n control: [\n {\n handle: function (val) {\n if (!val) return false\n return inLoop(val)\n },\n rule: [\n {\n type: 'dk-style-animation-input',\n field: 'animation',\n title: '',\n value: {\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n },\n },\n ],\n },\n {\n handle: function (val) {\n if (!val) return false\n return !inLoop(val)\n },\n rule: [\n {\n type: 'dk-style-animation-input',\n field: 'animation',\n title: '',\n value: {\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 1,\n },\n },\n ],\n },\n ],\n },\n {\n type: 'switch',\n field: 'animation_preview',\n title: '实时预览',\n value: true,\n effect: {\n help: '设置当前组件循环动画实时预览,当前仅为调试项',\n },\n },\n ],\n },\n ],\n },\n ]\n // 判断是否允许开启悬浮\n if (rule) {\n if (rule.config.config.rule().fixed) {\n const fixedChildren = [\n createTitle('悬浮配置'),\n {\n type: 'switch',\n field: 'is_position',\n value: false,\n title: '开启悬浮',\n effect: {\n help: '设置组件是否开启悬浮',\n },\n control: [\n {\n value: true,\n rule: [\n {\n type: 'DkStylePositionInput',\n field: 'position',\n value: {},\n title: '',\n },\n ],\n },\n ],\n },\n ]\n const collapseFixed = {\n type: 'el-collapse-item',\n props: { name: 'fixed' },\n children: fixedChildren,\n }\n form[0].children.push(collapseFixed)\n }\n }\n return form\n}\n"],"names":[],"mappings":";;AAEA,SAAS,YAAY,KAAO,EAAA;AAC1B,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,IAAA;AAAA,IACN,IAAM,EAAA,OAAA;AAAA,IACN,KAAO,EAAA,uFAAA;AAAA,IACP,QAAU,EAAA;AAAA,MACR;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,QACN,KAAO,EAAA,6FAAA;AAAA,OACT;AAAA,MACA,EAAE,IAAM,EAAA,MAAA,EAAQ,QAAU,EAAA,CAAC,KAAK,CAAE,EAAA;AAAA,KACpC;AAA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are namespace _default {
10
10
  };
11
11
  showStyle: boolean;
12
12
  fixed: boolean;
13
+ setting: {};
13
14
  };
14
15
  export function props(): {
15
16
  type: string;
@@ -12,7 +12,8 @@ var DkMinTitle = {
12
12
  subtitle: "\u526F\u6807\u9898"
13
13
  },
14
14
  showStyle: true,
15
- fixed: true
15
+ fixed: true,
16
+ setting: {}
16
17
  };
17
18
  },
18
19
  props() {