@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":"DkViewSwipe.vue.mjs","sources":["../../../../../src/page-diy/src/views/web/DkViewSwipe.vue"],"sourcesContent":["<template>\n <van-swipe\n class=\"dk-view-swipe\"\n :autoplay=\"autoplay\"\n indicator-color=\"white\"\n :style=\"{ background: bgColor || '' }\"\n >\n <van-swipe-item v-for=\"(item, key) in swipeList\" :key=\"key\">\n <van-image :src=\"item.img\" :fit=\"fit\" width=\"100%\" :height=\"height\" />\n </van-swipe-item>\n </van-swipe>\n</template>\n\n<script>\nexport default {\n name: 'DkViewSwipe',\n props: {\n value: {\n default: '',\n type: String,\n },\n height: {\n default: '',\n type: [Number, String],\n },\n autoplay: {\n default: 3000,\n type: [Number, String],\n },\n swipeList: {\n default: () => [],\n type: [Array],\n },\n fit: {\n default: 'fill',\n type: String,\n },\n bgColor: {\n default: '',\n type: String,\n },\n },\n data() {\n return {}\n },\n computed: {},\n watch: {\n swipeList(val) {},\n },\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_createBlock","_openBlock","_createElementBlock","_Fragment","_renderList","_createVNode"],"mappings":";;;AAcA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,aAAa;AACnB,EAAA,KAAK,EAAE;AACL,IAAA,KAAK,EAAE;MACL,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;AACX,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;AACD,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,IAAI;AACb,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;IACD,SAAS,EAAE;AACT,MAAA,OAAO,EAAE,MAAM,EAAE;MACjB,IAAI,EAAE,CAAC,KAAK,CAAC;KACd;IACD,GAAG,EAAE;AACH,MAAA,OAAO,EAAE,MAAM;MACf,IAAI,EAAE,MAAM;KACb;AACD,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;GACF;AACD,EAAA,IAAI,GAAG;AACL,IAAA,OAAO,EAAC;GACT;EACD,QAAQ,EAAE,EAAE;AACZ,EAAA,KAAK,EAAE;AACL,IAAA,SAAS,CAAC,GAAG,EAAE,EAAE;GAClB;EACD,OAAO,GAAG,EAAE;EACZ,OAAO,EAAE,EAAE;AACb,EAAA;;;;;;;uBAlDEA,WASY,CAAA,oBAAA,EAAA;AARV,IAAA,KAAK,EAAC,eAAe;AACpB,IAAA,QAAQ,EAAE,MAAQ,CAAA,QAAA;AACnB,IAAA,iBAAe,EAAC,OAAO;AACtB,IAAA,KAAK,+BAAgB,MAAO,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA;;qBAEb,MAAgC;AAAhD,OAAAC,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,CAEiBC,QAFqB,EAAA,IAAA,EAAAC,UAAA,CAAA,MAAA,CAAA,SAAS,EAAvB,CAAA,IAAI,EAAE,GAAG,KAAA;6BAAjCJ,WAEiB,CAAA,yBAAA,EAAA,EAFiC,GAAG,EAAE,GAAG,EAAA,EAAA;2BACxD,MAAsE;YAAtEK,WAAsE,CAAA,oBAAA,EAAA;cAA1D,GAAG,EAAE,IAAI,CAAC,GAAG;AAAG,cAAA,GAAG,EAAE,MAAG,CAAA,GAAA;AAAE,cAAA,KAAK,EAAC,MAAM;AAAE,cAAA,MAAM,EAAE,MAAM,CAAA,MAAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkViewSwipe.vue.mjs","sources":["../../../../../src/page-diy/src/views/web/DkViewSwipe.vue"],"sourcesContent":["<template>\n <van-swipe class=\"dk-view-swipe\" :autoplay=\"autoplay\" indicator-color=\"white\" :style=\"{ background: bgColor || '' }\">\n <van-swipe-item v-for=\"(item, key) in swipeList\" :key=\"key\">\n <van-image :src=\"item.img\" :fit=\"fit\" width=\"100%\" :height=\"height\" />\n </van-swipe-item>\n </van-swipe>\n</template>\n\n<script>\nexport default {\n name: 'DkViewSwipe',\n props: {\n value: {\n default: '',\n type: String,\n },\n height: {\n default: '',\n type: [Number, String],\n },\n autoplay: {\n default: 3000,\n type: [Number, String],\n },\n swipeList: {\n default: () => [],\n type: [Array],\n },\n fit: {\n default: 'fill',\n type: String,\n },\n bgColor: {\n default: '',\n type: String,\n },\n },\n data() {\n return {}\n },\n computed: {},\n watch: {\n swipeList(val) {},\n },\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_createBlock","_openBlock","_createElementBlock","_Fragment","_renderList","_createVNode"],"mappings":";;;AASA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,aAAa;AACnB,EAAA,KAAK,EAAE;AACL,IAAA,KAAK,EAAE;MACL,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;AACX,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;AACD,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,IAAI;AACb,MAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;KACvB;IACD,SAAS,EAAE;AACT,MAAA,OAAO,EAAE,MAAM,EAAE;MACjB,IAAI,EAAE,CAAC,KAAK,CAAC;KACd;IACD,GAAG,EAAE;AACH,MAAA,OAAO,EAAE,MAAM;MACf,IAAI,EAAE,MAAM;KACb;AACD,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;GACF;AACD,EAAA,IAAI,GAAG;AACL,IAAA,OAAO,EAAC;GACT;EACD,QAAQ,EAAE,EAAE;AACZ,EAAA,KAAK,EAAE;AACL,IAAA,SAAS,CAAC,GAAG,EAAE,EAAE;GAClB;EACD,OAAO,GAAG,EAAE;EACZ,OAAO,EAAE,EAAE;AACb,EAAA;;;;;;;uBA7CEA,WAIY,CAAA,oBAAA,EAAA;AAJD,IAAA,KAAK,EAAC,eAAe;AAAE,IAAA,QAAQ,EAAE,MAAQ,CAAA,QAAA;AAAE,IAAA,iBAAe,EAAC,OAAO;AAAE,IAAA,KAAK,+BAAgB,MAAO,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA;;qBACzF,MAAgC;AAAhD,OAAAC,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,CAEiBC,QAFqB,EAAA,IAAA,EAAAC,UAAA,CAAA,MAAA,CAAA,SAAS,EAAvB,CAAA,IAAI,EAAE,GAAG,KAAA;6BAAjCJ,WAEiB,CAAA,yBAAA,EAAA,EAFiC,GAAG,EAAE,GAAG,EAAA,EAAA;2BACxD,MAAsE;YAAtEK,WAAsE,CAAA,oBAAA,EAAA;cAA1D,GAAG,EAAE,IAAI,CAAC,GAAG;AAAG,cAAA,GAAG,EAAE,MAAG,CAAA,GAAA;AAAE,cAAA,KAAK,EAAC,MAAM;AAAE,cAAA,MAAM,EAAE,MAAM,CAAA,MAAA;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DkViewTitle.vue.mjs","sources":["../../../../../src/page-diy/src/views/web/DkViewTitle.vue"],"sourcesContent":["<template>\n <div class=\"dk-view-title\">\n <div class=\"title-left\">\n <van-icon\n v-if=\"prefix === 'icon'\"\n :name=\"icon\"\n :style=\"{ color: prefixColor, fontSize: iconSize + 'px' }\"\n />\n <van-image\n v-if=\"prefix === 'image'\"\n :src=\"prefixImage\"\n alt=\"\"\n class=\"dk-title-img\"\n :width=\"imageWidth\"\n :height=\"imageHeight\"\n />\n <div\n v-if=\"prefix === 'square'\"\n :style=\"{\n width: squareWidth + 'px',\n height: squareHeight + 'px',\n background: prefixColor,\n }\"\n />\n <div\n :style=\"{\n marginLeft: titleMarginLeft + 'px',\n color: color,\n fontWeight: bold ? 800 : 400,\n }\"\n >\n {{ title }}\n </div>\n </div>\n <div\n v-if=\"showRight\"\n class=\"title-right\"\n :style=\"{ color: rColor, fontSize: rSize + 'px' }\"\n >\n {{ rTitle }}\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DkViewTitle',\n props: {\n title: { default: '标题', type: String },\n size: { default: 14, type: Number },\n color: { default: '#333', type: String },\n bold: { default: false, type: Boolean },\n prefix: { default: '', type: String },\n icon: { default: 'volume', type: String },\n prefixColor: { default: '#409eff', type: String },\n prefixImage: { default: '', type: String },\n squareWidth: { default: 4, type: Number },\n squareHeight: { default: 12, type: Number },\n imageWidth: { default: 24, type: Number },\n imageHeight: { default: 24, type: Number },\n iconSize: { default: 18, type: Number },\n titleMarginLeft: { default: 4, type: Number },\n rTitle: { default: '更多', type: String },\n rColor: { default: '#999', type: String },\n rSize: { default: 12, type: Number },\n showRight: { default: false, type: Boolean },\n },\n data() {\n return {}\n },\n computed: {},\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_createBlock","_normalizeStyle"],"mappings":";;;AA6CA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,aAAa;AACnB,EAAA,KAAK,EAAE;AACL,IAAA,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ;IACtC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAK,EAAG;AACnC,IAAA,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;AACxC,IAAA,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;AACvC,IAAA,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ;AACrC,IAAA,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ;AACzC,IAAA,WAAW,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ;AACjD,IAAA,WAAW,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ;AAC1C,IAAA,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ;AACzC,IAAA,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ;AAC3C,IAAA,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ;AACzC,IAAA,WAAW,EAAE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A;AACjB,YAAA,GAAG,EAAC,EAAE;AACN,YAAA,KAAK,EAAC,cAAc;AACnB,YAAA,KAAK,EAAE,MAAU,CAAA,UAAA;AACjB,YAAA,MAAM,EAAE,MAAW,CAAA,WAAA;;;OAGd,MAAM,CAAA,MAAA,KAAA,QAAA;wBADdF,kBAOE,CAAA,KAAA,EAAA;;YALC,KAAK,EAAAG,cAAA,CAAA;iBAAqB,MAAW,CAAA,WAAA,GAAA,IAAA;kBAA2B,MAAY,CAAA,YAAA,GAAA,IAAA;sBAA+B,MAAW,CAAA,WAAA;;;;MAMzHF,kBAQM,CAAA,KAAA,EAAA;QAPH,KAAK,EAAAE,cAAA,CAAA;sBAA0B,MAAe,CAAA,eAAA,GAAA,IAAA;iBAA0B,MAAK,CAAA,KAAA;sBAAwB,MAAI,CAAA,IAAA,GAAA,GAAA,GAAA,GAAA;;yBAMvG,MAAK,CAAA,KAAA,CAAA,EAAA,CAAA,mBAAA;;KAIJ,MAAS,CAAA,SAAA;sBADjBH,kBAMM,CAAA,KAAA,EAAA;;AAJJ,UAAA,KAAK,EAAC,aAAa;UAClB,KAAK,EAAAG,cAAA,CAAA,EAAA,KAAA,EAAW,MAAM,CAAA,MAAA,EAAA,QAAA,EAAY,MAAK,CAAA,KAAA,GAAA,IAAA,EAAA,CAAA;2BAErC,MAAM,CAAA,MAAA,CAAA,EAAA,CAAA,mBAAA;;;;;;;;"}
1
+ {"version":3,"file":"DkViewTitle.vue.mjs","sources":["../../../../../src/page-diy/src/views/web/DkViewTitle.vue"],"sourcesContent":["<template>\n <div class=\"dk-view-title\">\n <div class=\"title-left\">\n <van-icon v-if=\"prefix === 'icon'\" :name=\"icon\" :style=\"{ color: prefixColor, fontSize: iconSize + 'px' }\" />\n <van-image\n v-if=\"prefix === 'image'\"\n :src=\"prefixImage\"\n alt=\"\"\n class=\"dk-title-img\"\n :width=\"imageWidth\"\n :height=\"imageHeight\"\n />\n <div\n v-if=\"prefix === 'square'\"\n :style=\"{\n width: squareWidth + 'px',\n height: squareHeight + 'px',\n background: prefixColor,\n }\"\n />\n <div\n :style=\"{\n marginLeft: titleMarginLeft + 'px',\n color: color,\n fontWeight: bold ? 800 : 400,\n }\"\n >\n {{ title }}\n </div>\n </div>\n <div v-if=\"showRight\" class=\"title-right\" :style=\"{ color: rColor, fontSize: rSize + 'px' }\">\n {{ rTitle }}\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'DkViewTitle',\n props: {\n title: { default: '标题', type: String },\n size: { default: 14, type: Number },\n color: { default: '#333', type: String },\n bold: { default: false, type: Boolean },\n prefix: { default: '', type: String },\n icon: { default: 'volume', type: String },\n prefixColor: { default: '#409eff', type: String },\n prefixImage: { default: '', type: String },\n squareWidth: { default: 4, type: Number },\n squareHeight: { default: 12, type: Number },\n imageWidth: { default: 24, type: Number },\n imageHeight: { default: 24, type: Number },\n iconSize: { default: 18, type: Number },\n titleMarginLeft: { default: 4, type: Number },\n rTitle: { default: '更多', type: String },\n rColor: { default: '#999', type: String },\n rSize: { default: 12, type: Number },\n showRight: { default: false, type: Boolean },\n },\n data() {\n return {}\n },\n computed: {},\n mounted() {},\n methods: {},\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_createBlock","_normalizeStyle"],"mappings":";;;AAqCA,MAAK,SAAU,GAAA;AACb,EAAA,IAAI,EAAE,aAAa;AACnB,EAAA,KAAK,EAAE;AACL,IAAA,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ;IACtC,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAK,EAAG;AACnC,IAAA,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;AACxC,IAAA,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;AACvC,IAAA,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ;AACrC,I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AK,CAAA,KAAA,GAAA,IAAA,EAAA,CAAA;2BAC7E,MAAM,CAAA,MAAA,CAAA,EAAA,CAAA,mBAAA;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"poster.vue2.mjs","sources":["../../../../src/poster-input/src/component/poster.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPoster',\n components: {\n DkPosterViewName,\n DkPosterViewImage,\n DkPosterViewText,\n DkPosterViewAvatar,\n DkPosterViewQrcode,\n },\n});\n</script>\n<template>\n <div class=\"dk-poster\">\n <div class=\"poster-draw\">\n <div class=\"poster-body\">\n <div\n class=\"poster-content\"\n :style=\"{\n width: posterData.width + 'px',\n height: posterData.height + 'px',\n borderRadius: posterData.borderRadius + 'px',\n backgroundImage: 'url(' + posterData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <el-empty\n v-if=\"!posterData.background\"\n description=\"请上传一张背景图\"\n style=\"\n position: absolute;\n width: 100%;\n height: 80%;\n user-select: none;\n \"\n />\n <DraggableContainer\n ref=\"draggableContainer\"\n :reference-line-visible=\"formTools.refLine\"\n :disabled=\"!formTools.snap\"\n :adsorb-cols=\"adsorb.cols\"\n :adsorb-rows=\"adsorb.rows\"\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in posterData.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 :is-conflict-check=\"formTools.isConflictCheck\"\n :snap=\"formTools.snap\"\n :snap-tolerance=\"formTools.snapTolerance\"\n :min-width=\"20\"\n :min-height=\"20\"\n :lock-aspect-ratio=\"item.lockAspectRatio\"\n @resizing=\"onResize\"\n @mousedown=\"index = key\"\n >\n <div style=\"position: relative\">\n <component\n :is=\"item.component\"\n :key=\"key\"\n :item=\"item\"\n :style=\"getBgStyle(item)\"\n :index=\"index\"\n />\n </div>\n </vue3-draggable-resizable>\n </DraggableContainer>\n </div>\n </div>\n <!--悬浮控件-->\n <div class=\"snap-tolerance\">\n <el-form\n :inline=\"true\"\n :model=\"formTools\"\n class=\"form-inline\"\n size=\"small\"\n >\n <el-form-item label=\"对齐检测\">\n <el-switch v-model=\"formTools.snap\" />\n </el-form-item>\n <el-form-item v-if=\"formTools.snap\" label=\"辅助线\">\n <el-switch v-model=\"formTools.refLine\" />\n </el-form-item>\n </el-form>\n </div>\n <!--悬浮控件-->\n </div>\n <!-- 海报组件-->\n <el-form ref=\"form\" label-width=\"50px\" label-position=\"left\">\n <h2 style=\"padding: 10px; margin: 10px; font-size: 20px\">海报配置</h2>\n <el-row :gutter=\"20\" style=\"width: 100%; height: 600px; padding: 0 20px\">\n <el-col :sm=\"24\">\n <el-form-item label=\"元素\">\n <div class=\"view-buttons\">\n <el-button\n type=\"primary\"\n size=\"small\"\n :disabled=\"viewCount['avatar'] >= 1\"\n @click=\"addView('avatar')\"\n >\n 用户头像\n </el-button>\n <el-button\n type=\"warning\"\n size=\"small\"\n :disabled=\"viewCount['qrcode'] >= 1\"\n @click=\"addView('qrcode')\"\n >\n 二维码\n </el-button>\n <el-button\n type=\"danger\"\n size=\"small\"\n :disabled=\"viewCount['name'] >= 1\"\n @click=\"addView('name')\"\n >\n 用户昵称\n </el-button>\n <el-button\n v-for=\"(item, key) in props.views\"\n :key=\"key\"\n type=\"primary\"\n :disabled=\"viewCount[item.name] >= item.count\"\n size=\"small\"\n @click=\"addView(item.name)\"\n >{{ item.text }}\n </el-button>\n </div>\n <div style=\"font-size: 12px; color: #999\">\n 点击元素添加到左侧拖拽框中,<b style=\"color: #000\">右键</b\n >即可编辑模块\n </div>\n </el-form-item>\n </el-col>\n <el-col :sm=\"24\">\n <el-form-item label=\"背景\">\n <dk-image-input\n v-model=\"posterData.background\"\n @input=\"resetSize()\"\n />\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"宽度\">\n <el-slider\n v-model=\"posterData.width\"\n :min=\"100\"\n :max=\"600\"\n show-input\n @change=\"checkParentSize()\"\n >\n <template #append>px</template>\n </el-slider>\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"高度\">\n <el-slider\n v-model=\"posterData.height\"\n :min=\"100\"\n :max=\"600\"\n show-input\n @change=\"checkParentSize()\"\n >\n <template #append>px</template>\n </el-slider>\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"弧度\">\n <el-slider\n v-model=\"posterData.borderRadius\"\n :min=\"0\"\n :max=\"20\"\n show-input\n />\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <div style=\"width: 100%; text-align: center\">\n <el-button style=\"width: 30%\" @click=\"resetSize()\">重置</el-button>\n <el-button type=\"primary\" style=\"width: 50%\" @click=\"submit\"\n >确定</el-button\n >\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { reactive, ref, computed, watch, provide, onMounted } from 'vue'\nimport { defaultViews } from './config'\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'\nimport DkPosterViewName from './views/DkPosterViewName.vue'\nimport DkPosterViewText from './views/DkPosterViewText.vue'\nimport DkPosterViewImage from './views/DkPosterViewImage.vue'\nimport DkPosterViewAvatar from './views/DkPosterViewAvatar.vue'\nimport DkPosterViewQrcode from './views/DkPosterViewQrcode.vue'\n\n\nconst props = defineProps({\n modelValue: {\n default: () => {\n return {}\n },\n type: Object,\n },\n views: {\n default: () => {\n return []\n },\n type: Array as any,\n },\n})\nconst posterRef = ref()\n// const posterData = ref(props.modelValue)\nconst posterData: any = reactive({\n background: '',\n width: 320,\n height: 500,\n borderRadius: 0,\n views: [],\n})\nconst formTools: any = reactive({\n refLine: true,\n snap: true,\n edit: true,\n border: 10,\n})\n\nconst viewCount = computed(() => {\n const count: any = {}\n const views: any = posterData.views\n if (views) {\n for (let i = 0; i < views.length; i++) {\n if (!count[views[i].name]) {\n count[views[i].name] = 1\n } else {\n count[views[i].name]++\n }\n }\n }\n return count\n})\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change', 'submit'])\n\nconst submit = () => {\n emit('input', posterData)\n emit('update:modelValue', posterData)\n emit('submit', posterData)\n emit('change', posterData)\n}\nconst resetSize = () => {\n if (posterData.background) {\n getImageSize(posterData.background)\n .then((image: any) => {\n let tempWidth\n let tempHeight\n const maxHeight = 600\n const maxWidth = 600\n if (image.width / image.height >= maxWidth / maxHeight) {\n if (image.width > maxWidth) {\n tempWidth = maxWidth\n // 按原图片的比例进行缩放\n tempHeight = (image.height * maxWidth) / image.width\n } else {\n tempWidth = image.width\n tempHeight = image.height\n }\n } else {\n if (image.height > maxHeight) {\n tempHeight = maxHeight\n // 按原图片的比例进行缩放\n tempWidth = (image.width * maxHeight) / image.height\n } else {\n tempWidth = image.width\n tempHeight = image.height\n }\n }\n posterData.width = parseInt(tempWidth)\n posterData.height = parseInt(tempHeight)\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// const checkParentSize = () => {\n// posterRef.value.checkParentSize()\n// }\n\nconst addView = (name: string) => {\n // if (name == 'text' || name == 'image') {\n // posterRef.value.add(name, viewNumber(name))\n // } else {\n // posterData.value.add(name)\n // }\n\n add(name)\n}\n\nconst viewNumber = (name: any) => {\n const views = posterData.views\n let count = 1\n for (let i = 0; i < views.length; i++) {\n if (views[i].name == name) {\n count++\n }\n }\n return count\n}\n\n// watch(\n// () => props.modelValue,\n// (n, o) => {\n// posterData = props.modelValue\n// }\n// )\n\n// content的\n\nconst draggables = ref()\nconst draggableContainer = ref()\n\nconst index = ref(0)\nprovide('posterData', posterData)\nconst test = () => {\n console.log(posterData.views)\n}\n\nconst onDrag = (p: any) => {\n const css = posterData.views[index.value].css\n console.log('onDrag', p)\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = posterData.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}\nconst getBgStyle = (item: any) => {\n if (item.type == 'image') {\n return {\n width: item.css.width + 'px',\n height: item.css.height + 'px',\n borderColor: item.css.borderColor || '#fff',\n borderStyle: 'solid',\n borderWidth: item.css.borderWidth + 'px',\n borderRadius: item.css.borderRadius + 'px',\n top: -parseInt(item.css.borderWidth) + 'px',\n left: -parseInt(item.css.borderWidth) + 'px',\n }\n } else {\n return {}\n }\n}\n\nconst add = (name = 'avatar') => {\n const allViews = defaultViews.concat(props.views as any)\n for (let i = 0; i < allViews.length; i++) {\n if (allViews[i].name == name) {\n // view\n const view = JSON.parse(JSON.stringify(allViews[i]))\n posterData.views.push(view)\n }\n }\n}\n\nconst checkParentSize = () => {\n // 刷新大小检测\n if (draggables.value) {\n console.log('draggables', draggables)\n for (let i = 0; i < draggables.value.length; i++) {\n const draggable = draggables.value[i]\n draggable.parentHeight = posterData.height\n draggable.parentWidth = posterData.width\n\n if (posterData.width < draggable.left + draggable.initW) {\n draggable.left = posterData.width\n }\n if (posterData.height < draggable.top + draggable.initH) {\n draggable.top = posterData.height\n }\n }\n }\n}\n\nconst adsorb = computed(() => {\n const border = formTools?.border\n const height = posterData.height\n const width = posterData.width\n return {\n cols: [border, width - border],\n rows: [border, height - border],\n }\n})\n\nwatch(\n () => props.modelValue,\n (n, o) => {\n console.log('1111')\n // initPosterDraggable()\n }\n)\n\nconst initPosterDraggable = () => {\n console.log('initPosterDraggable')\n posterData.background = props.modelValue.background\n posterData.width = props.modelValue.width\n posterData.height = props.modelValue.height\n posterData.borderRadius = props.modelValue.borderRadius\n posterData.views = []\n for (let i = 0; i < props.modelValue.views.length; i++) {\n posterData.views.push(props.modelValue.views[i])\n }\n}\n\nonMounted(() => {\n initPosterDraggable()\n})\n\ndefineExpose({\n checkParentSize,\n})\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAA;AAAA,IACA,kBAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAuND,IAAA,MAAM,YAAY,GAAI,EAAA,CAAA;AAEtB,IAAA,MAAM,aAAkB,QAAS,CAAA;AAAA,MAC/B,UAAY,EAAA,EAAA;AAAA,MACZ,KAAO,EAAA,GAAA;AAAA,MACP,MAAQ,EAAA,GAAA;AAAA,MACR,YAAc,EAAA,CAAA;AAAA,MACd,OAAO,EAAC;AAAA,KACT,CAAA,CAAA;AACD,IAAA,MAAM,YAAiB,QAAS,CAAA;AAAA,MAC9B,OAAS,EAAA,IAAA;AAAA,MACT,IAAM,EAAA,IAAA;AAAA,MACN,IAAM,EAAA,IAAA;AAAA,MACN,MAAQ,EAAA,EAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAA,MAAM,QAAa,EAAC,CAAA;AACpB,MAAA,MAAM,QAAa,UAAW,CAAA,KAAA,CAAA;AAC9B,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,KAAA,CAAM,QAAQ,CAAK,EAAA,EAAA;AACrC,UAAA,IAAI,CAAC,KAAM,CAAA,KAAA,CAAM,CAAC,CAAA,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"poster.vue2.mjs","sources":["../../../../src/poster-input/src/component/poster.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPoster',\n components: {\n DkPosterViewName,\n DkPosterViewImage,\n DkPosterViewText,\n DkPosterViewAvatar,\n DkPosterViewQrcode,\n },\n});\n</script>\n<template>\n <div class=\"dk-poster\">\n <div class=\"poster-draw\">\n <div class=\"poster-body\">\n <div\n class=\"poster-content\"\n :style=\"{\n width: posterData.width + 'px',\n height: posterData.height + 'px',\n borderRadius: posterData.borderRadius + 'px',\n backgroundImage: 'url(' + posterData.background + ')',\n }\"\n style=\"background-size: 100% 100%\"\n @contextmenu.prevent\n >\n <el-empty\n v-if=\"!posterData.background\"\n description=\"请上传一张背景图\"\n style=\"position: absolute; width: 100%; height: 80%; user-select: none\"\n />\n <DraggableContainer\n ref=\"draggableContainer\"\n :reference-line-visible=\"formTools.refLine\"\n :disabled=\"!formTools.snap\"\n :adsorb-cols=\"adsorb.cols\"\n :adsorb-rows=\"adsorb.rows\"\n >\n <vue3-draggable-resizable\n v-for=\"(item, key) in posterData.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 :is-conflict-check=\"formTools.isConflictCheck\"\n :snap=\"formTools.snap\"\n :snap-tolerance=\"formTools.snapTolerance\"\n :min-width=\"20\"\n :min-height=\"20\"\n :lock-aspect-ratio=\"item.lockAspectRatio\"\n @resizing=\"onResize\"\n @mousedown=\"index = key\"\n >\n <div style=\"position: relative\">\n <component :is=\"item.component\" :key=\"key\" :item=\"item\" :style=\"getBgStyle(item)\" :index=\"index\" />\n </div>\n </vue3-draggable-resizable>\n </DraggableContainer>\n </div>\n </div>\n <!--悬浮控件-->\n <div class=\"snap-tolerance\">\n <el-form :inline=\"true\" :model=\"formTools\" class=\"form-inline\" size=\"small\">\n <el-form-item label=\"对齐检测\">\n <el-switch v-model=\"formTools.snap\" />\n </el-form-item>\n <el-form-item v-if=\"formTools.snap\" label=\"辅助线\">\n <el-switch v-model=\"formTools.refLine\" />\n </el-form-item>\n </el-form>\n </div>\n <!--悬浮控件-->\n </div>\n <!-- 海报组件-->\n <el-form ref=\"form\" label-width=\"50px\" label-position=\"left\">\n <h2 style=\"padding: 10px; margin: 10px; font-size: 20px\">海报配置</h2>\n <el-row :gutter=\"20\" style=\"width: 100%; height: 600px; padding: 0 20px\">\n <el-col :sm=\"24\">\n <el-form-item label=\"元素\">\n <div class=\"view-buttons\">\n <el-button type=\"primary\" size=\"small\" :disabled=\"viewCount['avatar'] >= 1\" @click=\"addView('avatar')\">\n 用户头像\n </el-button>\n <el-button type=\"warning\" size=\"small\" :disabled=\"viewCount['qrcode'] >= 1\" @click=\"addView('qrcode')\">\n 二维码\n </el-button>\n <el-button type=\"danger\" size=\"small\" :disabled=\"viewCount['name'] >= 1\" @click=\"addView('name')\">\n 用户昵称\n </el-button>\n <el-button\n v-for=\"(item, key) in props.views\"\n :key=\"key\"\n type=\"primary\"\n :disabled=\"viewCount[item.name] >= item.count\"\n size=\"small\"\n @click=\"addView(item.name)\"\n >{{ item.text }}\n </el-button>\n </div>\n <div style=\"font-size: 12px; color: #999\">\n 点击元素添加到左侧拖拽框中,<b style=\"color: #000\">右键</b>即可编辑模块\n </div>\n </el-form-item>\n </el-col>\n <el-col :sm=\"24\">\n <el-form-item label=\"背景\">\n <dk-image-input v-model=\"posterData.background\" @input=\"resetSize()\" />\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"宽度\">\n <el-slider v-model=\"posterData.width\" :min=\"100\" :max=\"600\" show-input @change=\"checkParentSize()\">\n <template #append>px</template>\n </el-slider>\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"高度\">\n <el-slider v-model=\"posterData.height\" :min=\"100\" :max=\"600\" show-input @change=\"checkParentSize()\">\n <template #append>px</template>\n </el-slider>\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <el-form-item label=\"弧度\">\n <el-slider v-model=\"posterData.borderRadius\" :min=\"0\" :max=\"20\" show-input />\n </el-form-item>\n </el-col>\n <el-col :span=\"24\">\n <div style=\"width: 100%; text-align: center\">\n <el-button style=\"width: 30%\" @click=\"resetSize()\">重置</el-button>\n <el-button type=\"primary\" style=\"width: 50%\" @click=\"submit\">确定</el-button>\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { reactive, ref, computed, watch, provide, onMounted } from 'vue'\nimport { defaultViews } from './config'\n// import Vue3DraggableResizable, { DraggableContainer } from 'vue3-draggable-resizable'\nimport 'vue3-draggable-resizable/dist/Vue3DraggableResizable.css'\nimport DkPosterViewName from './views/DkPosterViewName.vue'\nimport DkPosterViewText from './views/DkPosterViewText.vue'\nimport DkPosterViewImage from './views/DkPosterViewImage.vue'\nimport DkPosterViewAvatar from './views/DkPosterViewAvatar.vue'\nimport DkPosterViewQrcode from './views/DkPosterViewQrcode.vue'\n\n\nconst props = defineProps({\n modelValue: {\n default: () => {\n return {}\n },\n type: Object,\n },\n views: {\n default: () => {\n return []\n },\n type: Array as any,\n },\n})\nconst posterRef = ref()\n// const posterData = ref(props.modelValue)\nconst posterData: any = reactive({\n background: '',\n width: 320,\n height: 500,\n borderRadius: 0,\n views: [],\n})\nconst formTools: any = reactive({\n refLine: true,\n snap: true,\n edit: true,\n border: 10,\n})\n\nconst viewCount = computed(() => {\n const count: any = {}\n const views: any = posterData.views\n if (views) {\n for (let i = 0; i < views.length; i++) {\n if (!count[views[i].name]) {\n count[views[i].name] = 1\n } else {\n count[views[i].name]++\n }\n }\n }\n return count\n})\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change', 'submit'])\n\nconst submit = () => {\n emit('input', posterData)\n emit('update:modelValue', posterData)\n emit('submit', posterData)\n emit('change', posterData)\n}\nconst resetSize = () => {\n if (posterData.background) {\n getImageSize(posterData.background)\n .then((image: any) => {\n let tempWidth\n let tempHeight\n const maxHeight = 600\n const maxWidth = 600\n if (image.width / image.height >= maxWidth / maxHeight) {\n if (image.width > maxWidth) {\n tempWidth = maxWidth\n // 按原图片的比例进行缩放\n tempHeight = (image.height * maxWidth) / image.width\n } else {\n tempWidth = image.width\n tempHeight = image.height\n }\n } else {\n if (image.height > maxHeight) {\n tempHeight = maxHeight\n // 按原图片的比例进行缩放\n tempWidth = (image.width * maxHeight) / image.height\n } else {\n tempWidth = image.width\n tempHeight = image.height\n }\n }\n posterData.width = parseInt(tempWidth)\n posterData.height = parseInt(tempHeight)\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// const checkParentSize = () => {\n// posterRef.value.checkParentSize()\n// }\n\nconst addView = (name: string) => {\n // if (name == 'text' || name == 'image') {\n // posterRef.value.add(name, viewNumber(name))\n // } else {\n // posterData.value.add(name)\n // }\n\n add(name)\n}\n\nconst viewNumber = (name: any) => {\n const views = posterData.views\n let count = 1\n for (let i = 0; i < views.length; i++) {\n if (views[i].name == name) {\n count++\n }\n }\n return count\n}\n\n// watch(\n// () => props.modelValue,\n// (n, o) => {\n// posterData = props.modelValue\n// }\n// )\n\n// content的\n\nconst draggables = ref()\nconst draggableContainer = ref()\n\nconst index = ref(0)\nprovide('posterData', posterData)\nconst test = () => {\n console.log(posterData.views)\n}\n\nconst onDrag = (p: any) => {\n const css = posterData.views[index.value].css\n console.log('onDrag', p)\n css.left = p.x\n css.top = p.y\n}\nconst onResize = (p: any) => {\n const css = posterData.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}\nconst getBgStyle = (item: any) => {\n if (item.type == 'image') {\n return {\n width: item.css.width + 'px',\n height: item.css.height + 'px',\n borderColor: item.css.borderColor || '#fff',\n borderStyle: 'solid',\n borderWidth: item.css.borderWidth + 'px',\n borderRadius: item.css.borderRadius + 'px',\n top: -parseInt(item.css.borderWidth) + 'px',\n left: -parseInt(item.css.borderWidth) + 'px',\n }\n } else {\n return {}\n }\n}\n\nconst add = (name = 'avatar') => {\n const allViews = defaultViews.concat(props.views as any)\n for (let i = 0; i < allViews.length; i++) {\n if (allViews[i].name == name) {\n // view\n const view = JSON.parse(JSON.stringify(allViews[i]))\n posterData.views.push(view)\n }\n }\n}\n\nconst checkParentSize = () => {\n // 刷新大小检测\n if (draggables.value) {\n console.log('draggables', draggables)\n for (let i = 0; i < draggables.value.length; i++) {\n const draggable = draggables.value[i]\n draggable.parentHeight = posterData.height\n draggable.parentWidth = posterData.width\n\n if (posterData.width < draggable.left + draggable.initW) {\n draggable.left = posterData.width\n }\n if (posterData.height < draggable.top + draggable.initH) {\n draggable.top = posterData.height\n }\n }\n }\n}\n\nconst adsorb = computed(() => {\n const border = formTools?.border\n const height = posterData.height\n const width = posterData.width\n return {\n cols: [border, width - border],\n rows: [border, height - border],\n }\n})\n\nwatch(\n () => props.modelValue,\n (n, o) => {\n console.log('1111')\n // initPosterDraggable()\n }\n)\n\nconst initPosterDraggable = () => {\n console.log('initPosterDraggable')\n posterData.background = props.modelValue.background\n posterData.width = props.modelValue.width\n posterData.height = props.modelValue.height\n posterData.borderRadius = props.modelValue.borderRadius\n posterData.views = []\n for (let i = 0; i < props.modelValue.views.length; i++) {\n posterData.views.push(props.modelValue.views[i])\n }\n}\n\nonMounted(() => {\n initPosterDraggable()\n})\n\ndefineExpose({\n checkParentSize,\n})\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAA;AAAA,IACA,kBAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;AAiKD,IAAA,MAAM,YAAY,GAAI,EAAA,CAAA;AAEtB,IAAA,MAAM,aAAkB,QAAS,CAAA;AAAA,MAC/B,UAAY,EAAA,EAAA;AAAA,MACZ,KAAO,EAAA,GAAA;AAAA,MACP,MAAQ,EAAA,GAAA;AAAA,MACR,YAAc,EAAA,CAAA;AAAA,MACd,OAAO,EAAC;AAAA,KACT,CAAA,CAAA;AACD,IAAA,MAAM,YAAiB,QAAS,CAAA;AAAA,MAC9B,OAAS,EAAA,IAAA;AAAA,MACT,IAAM,EAAA,IAAA;AAAA,MACN,IAAM,EAAA,IAAA;AAAA,MACN,MAAQ,EAAA,EAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAA,MAAM,QAAa,EAAC,CAAA;AACpB,MAAA,MAAM,QAAa,UAAW,CAAA,KAAA,CAAA;AAC9B,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,KAAA,CAAM,QAAQ,CAAK,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DkPosterViewAvatar.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewAvatar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewAvatar',\n});\n</script>\n<template>\n <div\n style=\"\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #bfffab;\n \"\n >\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form\n label-position=\"left\"\n label-width=\"100px\"\n style=\"padding: 20px 10px 0\"\n >\n <el-form-item label=\"圆角\">\n <el-slider\n v-model=\"item.css.borderRadius\"\n show-input\n :min=\"0\"\n :max=\"60\"\n />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider\n v-model=\"item.css.borderWidth\"\n show-input\n :min=\"0\"\n :max=\"20\"\n />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div style=\"position: relative\">\n <dk-icon\n icon=\"emojione:cat-face\"\n :size=\"item.css.width / 1.2\"\n ></dk-icon>\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\nconst item: any = reactive(props.item)\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AAoED,IAAM,MAAA,IAAA,GAAY,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkPosterViewAvatar.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewAvatar.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewAvatar',\n});\n</script>\n<template>\n <div style=\"position: relative; display: flex; align-items: center; justify-content: center; background: #bfffab\">\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form label-position=\"left\" label-width=\"100px\" style=\"padding: 20px 10px 0\">\n <el-form-item label=\"圆角\">\n <el-slider v-model=\"item.css.borderRadius\" show-input :min=\"0\" :max=\"60\" />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider v-model=\"item.css.borderWidth\" show-input :min=\"0\" :max=\"20\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div style=\"position: relative\">\n <dk-icon icon=\"emojione:cat-face\" :size=\"item.css.width / 1.2\"></dk-icon>\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\nconst item: any = reactive(props.item)\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AA2CD,IAAM,MAAA,IAAA,GAAY,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ const _hoisted_2 = {
9
9
  const _hoisted_3 = /* @__PURE__ */ createElementVNode(
10
10
  "div",
11
11
  { style: { "position": "absolute", "bottom": "5px", "width": "100%", "text-align": "center" } },
12
- " \u81EA\u5B9A\u4E49\u56FE ",
12
+ "\u81EA\u5B9A\u4E49\u56FE",
13
13
  -1
14
14
  /* HOISTED */
15
15
  );
@@ -1 +1 @@
1
- {"version":3,"file":"DkPosterViewImage.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewImage.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewImage',\n});\n</script>\n<template>\n <div\n style=\"\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #f6f6f6;\n \"\n >\n <el-popover\n trigger=\"contextmenu\"\n placement=\"right\"\n width=\"400\"\n title=\"编辑二维码\"\n >\n <el-form\n label-position=\"left\"\n label-width=\"100px\"\n style=\"padding: 20px 10px 0\"\n >\n <el-form-item label=\"圆角\">\n <el-slider\n v-model=\"item.css.borderRadius\"\n show-input\n :min=\"0\"\n :max=\"100\"\n />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider\n v-model=\"item.css.borderWidth\"\n show-input\n :min=\"0\"\n :max=\"20\"\n />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div v-if=\"!item.image\" style=\"position: relative\">\n <dk-icon\n icon=\"Picture\"\n color=\"#ccc\"\n hover-color=\"#ccc\"\n style=\"width: 100%\"\n :style=\"{ fontSize: item.css.height + 'px' }\"\n />\n <div\n style=\"\n position: absolute;\n bottom: 5px;\n width: 100%;\n text-align: center;\n \"\n >\n 自定义图\n </div>\n </div>\n <div style=\"position: relative\">\n <el-image\n :src=\"item.image\"\n :style=\"{\n width: item.css.width + 'px',\n height: item.css.height + 'px',\n }\"\n ></el-image>\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive, onMounted } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n backgroundColor: css.background,\n height: '100%',\n width: item.css.width + 'px',\n overflow: 'hidden',\n borderRadius: css.borderRadius + 'px',\n }\n})\nconst item: any = reactive(props.item)\n\nif (!item.css.textAlign) {\n item.css.textAlign = 'left'\n}\n\nonMounted(() => {\n const css = item.css\n item.type = 'image'\n if (!css.background) {\n css.background = '#f5f5f5'\n }\n if (!css.borderColor) {\n css.borderColor = '#fff'\n }\n if (!css.color) {\n css.color = '#333'\n }\n if (!css.borderWidth) {\n css.borderWidth = 5\n }\n})\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkPosterViewImage.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewImage.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewImage',\n});\n</script>\n<template>\n <div style=\"position: relative; display: flex; align-items: center; justify-content: center; background: #f6f6f6\">\n <el-popover trigger=\"contextmenu\" placement=\"right\" width=\"400\" title=\"编辑二维码\">\n <el-form label-position=\"left\" label-width=\"100px\" style=\"padding: 20px 10px 0\">\n <el-form-item label=\"圆角\">\n <el-slider v-model=\"item.css.borderRadius\" show-input :min=\"0\" :max=\"100\" />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider v-model=\"item.css.borderWidth\" show-input :min=\"0\" :max=\"20\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div v-if=\"!item.image\" style=\"position: relative\">\n <dk-icon\n icon=\"Picture\"\n color=\"#ccc\"\n hover-color=\"#ccc\"\n style=\"width: 100%\"\n :style=\"{ fontSize: item.css.height + 'px' }\"\n />\n <div style=\"position: absolute; bottom: 5px; width: 100%; text-align: center\">自定义图</div>\n </div>\n <div style=\"position: relative\">\n <el-image\n :src=\"item.image\"\n :style=\"{\n width: item.css.width + 'px',\n height: item.css.height + 'px',\n }\"\n ></el-image>\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive, onMounted } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n backgroundColor: css.background,\n height: '100%',\n width: item.css.width + 'px',\n overflow: 'hidden',\n borderRadius: css.borderRadius + 'px',\n }\n})\nconst item: any = reactive(props.item)\n\nif (!item.css.textAlign) {\n item.css.textAlign = 'left'\n}\n\nonMounted(() => {\n const css = item.css\n item.type = 'image'\n if (!css.background) {\n css.background = '#f5f5f5'\n }\n if (!css.borderColor) {\n css.borderColor = '#fff'\n }\n if (!css.color) {\n css.color = '#333'\n }\n if (!css.borderWidth) {\n css.borderWidth = 5\n }\n})\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,mBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AA6DD,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,iBAAiB,GAAI,CAAA,UAAA;AAAA,QACrB,MAAQ,EAAA,MAAA;AAAA,QACR,KAAA,EAAO,IAAK,CAAA,GAAA,CAAI,KAAQ,GAAA,IAAA;AAAA,QACxB,QAAU,EAAA,QAAA;AAAA,QACV,YAAA,EAAc,IAAI,YAAe,GAAA,IAAA;AAAA,OACnC,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAY,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAErC,IAAI,IAAA,CAAC,IAAK,CAAA,GAAA,CAAI,SAAW,EAAA;AACvB,MAAA,IAAA,CAAK,IAAI,SAAY,GAAA,MAAA,CAAA;AAAA,KACvB;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,MAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACjB,MAAA,IAAA,CAAK,IAAO,GAAA,OAAA,CAAA;AACZ,MAAI,IAAA,CAAC,IAAI,UAAY,EAAA;AACnB,QAAA,GAAA,CAAI,UAAa,GAAA,SAAA,CAAA;AAAA,OACnB;AACA,MAAI,IAAA,CAAC,IAAI,WAAa,EAAA;AACpB,QAAA,GAAA,CAAI,WAAc,GAAA,MAAA,CAAA;AAAA,OACpB;AACA,MAAI,IAAA,CAAC,IAAI,KAAO,EAAA;AACd,QAAA,GAAA,CAAI,KAAQ,GAAA,MAAA,CAAA;AAAA,OACd;AACA,MAAI,IAAA,CAAC,IAAI,WAAa,EAAA;AACpB,QAAA,GAAA,CAAI,WAAc,GAAA,CAAA,CAAA;AAAA,OACpB;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DkPosterViewName.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewName.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewName',\n});\n</script>\n<template>\n <div class=\"text\" :style=\"_style\">\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form\n label-position=\"left\"\n label-width=\"100px\"\n style=\"padding: 20px 10px 0\"\n >\n <el-form-item label=\"文字大小\">\n <el-slider\n v-model=\"item.css.fontSize\"\n show-input\n :min=\"12\"\n :max=\"50\"\n />\n </el-form-item>\n <el-form-item label=\"对齐方式\">\n <el-radio-group v-model=\"item.css.textAlign\">\n <el-radio label=\"left\" value=\"left\">左边</el-radio>\n <el-radio label=\"center\" value=\"center\">居中</el-radio>\n <el-radio label=\"right\" value=\"right\">居右</el-radio>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"文字颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div>用户昵称</div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n }\n})\nconst item = reactive(props.item)\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AAwDD,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,OACjB,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkPosterViewName.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewName.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewName',\n});\n</script>\n<template>\n <div class=\"text\" :style=\"_style\">\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form label-position=\"left\" label-width=\"100px\" style=\"padding: 20px 10px 0\">\n <el-form-item label=\"文字大小\">\n <el-slider v-model=\"item.css.fontSize\" show-input :min=\"12\" :max=\"50\" />\n </el-form-item>\n <el-form-item label=\"对齐方式\">\n <el-radio-group v-model=\"item.css.textAlign\">\n <el-radio label=\"left\" value=\"left\">左边</el-radio>\n <el-radio label=\"center\" value=\"center\">居中</el-radio>\n <el-radio label=\"right\" value=\"right\">居右</el-radio>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"文字颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div>用户昵称</div>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n }\n})\nconst item = reactive(props.item)\n</script>\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AA+CD,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,OACjB,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DkPosterViewQrcode.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewQrcode.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewQrcode',\n});\n</script>\n<template>\n <div\n :style=\"_style\"\n style=\"\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n \"\n >\n <el-popover\n trigger=\"contextmenu\"\n placement=\"right\"\n width=\"400\"\n title=\"编辑二维码\"\n >\n <el-form\n label-position=\"left\"\n label-width=\"100px\"\n style=\"padding: 20px 10px 0\"\n size=\"small\"\n >\n <el-form-item label=\"背景颜色\">\n <el-color-picker v-model=\"item.css.background\" />\n </el-form-item>\n <el-form-item label=\"二维码颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider\n v-model=\"item.css.borderWidth\"\n show-input\n :min=\"0\"\n :max=\"20\"\n />\n </el-form-item>\n <el-form-item label=\"圆弧大小\">\n <el-slider\n v-model=\"item.css.borderRadius\"\n show-input\n :min=\"0\"\n :max=\"20\"\n />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <dk-icon icon=\"wpf:qrcode\" :size=\"item.css.width\"></dk-icon>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive, ref } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst visible = ref(false)\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n backgroundColor: css.background,\n height: '100%',\n overflow: 'hidden',\n borderRadius: css.borderRadius + 'px',\n borderWidth: css.borderWidth + 'px',\n }\n})\nconst item = reactive(props.item)\n</script>\n\n<!--<script>-->\n<!--export default {-->\n<!-- name: 'DkPosterViewQrcode',-->\n<!-- props: {-->\n<!-- item: {-->\n<!-- default: () => {-->\n<!-- return {}-->\n<!-- },-->\n<!-- type: Object,-->\n<!-- },-->\n<!-- edit: {-->\n<!-- default: false,-->\n<!-- type: Boolean,-->\n<!-- },-->\n<!-- },-->\n<!-- data() {-->\n<!-- return {}-->\n<!-- },-->\n<!-- computed: {-->\n<!-- _style() {-->\n<!-- const css = this.item.css-->\n<!-- return {-->\n<!-- backgroundColor: css.background,-->\n<!-- // borderColor: css.borderColor,-->\n<!-- // borderStyle: 'solid'-->\n<!-- height: '100%',-->\n<!-- overflow: 'hidden',-->\n<!-- // borderWidth: css.borderWidth + 'px',-->\n<!-- borderRadius: css.borderRadius + 'px',-->\n<!-- }-->\n<!-- },-->\n<!-- },-->\n<!-- mounted() {-->\n<!-- const css = this.item.css-->\n<!-- this.$set(this.item, 'type', 'qrcode')-->\n<!-- if (!css.background) {-->\n<!-- this.$set(css, 'background', '#f5f5f5')-->\n<!-- }-->\n<!-- if (!css.borderColor) {-->\n<!-- this.$set(css, 'borderColor', '#fff')-->\n<!-- }-->\n<!-- if (!css.color) {-->\n<!-- this.$set(css, 'color', '#333')-->\n<!-- }-->\n<!-- if (!css.borderWidth) {-->\n<!-- this.$set(css, 'borderWidth', 5)-->\n<!-- }-->\n\n<!-- console.log(this.item)-->\n<!-- },-->\n<!-- methods: {},-->\n<!--}-->\n<!--</script>-->\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AA6ED,IAAM,MAAA,OAAA,GAAU,IAAI,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,QACf,iBAAiB,GAAI,CAAA,UAAA;AAAA,QACrB,MAAQ,EAAA,MAAA;AAAA,QACR,QAAU,EAAA,QAAA;AAAA,QACV,YAAA,EAAc,IAAI,YAAe,GAAA,IAAA;AAAA,QACjC,WAAA,EAAa,IAAI,WAAc,GAAA,IAAA;AAAA,OACjC,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkPosterViewQrcode.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewQrcode.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewQrcode',\n});\n</script>\n<template>\n <div :style=\"_style\" style=\"position: relative; display: flex; align-items: center; justify-content: center\">\n <el-popover trigger=\"contextmenu\" placement=\"right\" width=\"400\" title=\"编辑二维码\">\n <el-form label-position=\"left\" label-width=\"100px\" style=\"padding: 20px 10px 0\" size=\"small\">\n <el-form-item label=\"背景颜色\">\n <el-color-picker v-model=\"item.css.background\" />\n </el-form-item>\n <el-form-item label=\"二维码颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <el-form-item label=\"边框颜色\">\n <el-color-picker v-model=\"item.css.borderColor\" />\n </el-form-item>\n <el-form-item label=\"边框大小\">\n <el-slider v-model=\"item.css.borderWidth\" show-input :min=\"0\" :max=\"20\" />\n </el-form-item>\n <el-form-item label=\"圆弧大小\">\n <el-slider v-model=\"item.css.borderRadius\" show-input :min=\"0\" :max=\"20\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <dk-icon icon=\"wpf:qrcode\" :size=\"item.css.width\"></dk-icon>\n </template>\n </el-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive, ref } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst visible = ref(false)\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n backgroundColor: css.background,\n height: '100%',\n overflow: 'hidden',\n borderRadius: css.borderRadius + 'px',\n borderWidth: css.borderWidth + 'px',\n }\n})\nconst item = reactive(props.item)\n</script>\n\n<!--<script>-->\n<!--export default {-->\n<!-- name: 'DkPosterViewQrcode',-->\n<!-- props: {-->\n<!-- item: {-->\n<!-- default: () => {-->\n<!-- return {}-->\n<!-- },-->\n<!-- type: Object,-->\n<!-- },-->\n<!-- edit: {-->\n<!-- default: false,-->\n<!-- type: Boolean,-->\n<!-- },-->\n<!-- },-->\n<!-- data() {-->\n<!-- return {}-->\n<!-- },-->\n<!-- computed: {-->\n<!-- _style() {-->\n<!-- const css = this.item.css-->\n<!-- return {-->\n<!-- backgroundColor: css.background,-->\n<!-- // borderColor: css.borderColor,-->\n<!-- // borderStyle: 'solid'-->\n<!-- height: '100%',-->\n<!-- overflow: 'hidden',-->\n<!-- // borderWidth: css.borderWidth + 'px',-->\n<!-- borderRadius: css.borderRadius + 'px',-->\n<!-- }-->\n<!-- },-->\n<!-- },-->\n<!-- mounted() {-->\n<!-- const css = this.item.css-->\n<!-- this.$set(this.item, 'type', 'qrcode')-->\n<!-- if (!css.background) {-->\n<!-- this.$set(css, 'background', '#f5f5f5')-->\n<!-- }-->\n<!-- if (!css.borderColor) {-->\n<!-- this.$set(css, 'borderColor', '#fff')-->\n<!-- }-->\n<!-- if (!css.color) {-->\n<!-- this.$set(css, 'color', '#333')-->\n<!-- }-->\n<!-- if (!css.borderWidth) {-->\n<!-- this.$set(css, 'borderWidth', 5)-->\n<!-- }-->\n\n<!-- console.log(this.item)-->\n<!-- },-->\n<!-- methods: {},-->\n<!--}-->\n<!--</script>-->\n\n<style scoped lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AAiDD,IAAM,MAAA,OAAA,GAAU,IAAI,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,QACf,iBAAiB,GAAI,CAAA,UAAA;AAAA,QACrB,MAAQ,EAAA,MAAA;AAAA,QACR,QAAU,EAAA,QAAA;AAAA,QACV,YAAA,EAAc,IAAI,YAAe,GAAA,IAAA;AAAA,QACjC,WAAA,EAAa,IAAI,WAAc,GAAA,IAAA;AAAA,OACjC,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAO,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DkPosterViewText.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewText.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewText',\n});\n</script>\n<template>\n <div class=\"text\">\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form\n label-position=\"left\"\n label-width=\"100px\"\n style=\"padding: 20px 10px 0\"\n >\n <el-form-item label=\"文字大小\">\n <el-slider\n v-model=\"item.css.fontSize\"\n show-input\n :min=\"12\"\n :max=\"50\"\n />\n </el-form-item>\n <el-form-item label=\"对齐方式\">\n <el-radio-group v-model=\"item.css.textAlign\">\n <el-radio label=\"left\" value=\"left\">左边</el-radio>\n <el-radio label=\"center\" value=\"center\">居中</el-radio>\n <el-radio label=\"right\" value=\"right\">居右</el-radio>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"文字颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div :style=\"_style\">\n {{ item.content ? item.content : '自定义文本' }}\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n }\n})\nconst item: any = reactive(props.item)\n\nif (!item.css.textAlign) {\n item.css.textAlign = 'left'\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AAyDD,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,OACjB,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAY,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAErC,IAAI,IAAA,CAAC,IAAK,CAAA,GAAA,CAAI,SAAW,EAAA;AACvB,MAAA,IAAA,CAAK,IAAI,SAAY,GAAA,MAAA,CAAA;AAAA,KACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DkPosterViewText.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/DkPosterViewText.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterViewText',\n});\n</script>\n<template>\n <div class=\"text\">\n <el-popover placement=\"right\" width=\"400\" trigger=\"contextmenu\">\n <el-form label-position=\"left\" label-width=\"100px\" style=\"padding: 20px 10px 0\">\n <el-form-item label=\"文字大小\">\n <el-slider v-model=\"item.css.fontSize\" show-input :min=\"12\" :max=\"50\" />\n </el-form-item>\n <el-form-item label=\"对齐方式\">\n <el-radio-group v-model=\"item.css.textAlign\">\n <el-radio label=\"left\" value=\"left\">左边</el-radio>\n <el-radio label=\"center\" value=\"center\">居中</el-radio>\n <el-radio label=\"right\" value=\"right\">居右</el-radio>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"文字颜色\">\n <el-color-picker v-model=\"item.css.color\" />\n </el-form-item>\n <quick-action :index=\"index\"></quick-action>\n </el-form>\n <template #reference>\n <div :style=\"_style\">\n {{ item.content ? item.content : '自定义文本' }}\n </div>\n </template>\n </el-popover>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, reactive } from 'vue'\nimport QuickAction from './quick-action.vue'\n\n\n\nconst props = defineProps({\n item: {\n default: () => {\n return {}\n },\n type: Object,\n },\n index: {\n default: 0,\n type: Number,\n },\n})\n\nconst _style = computed(() => {\n const css = props.item.css\n return {\n fontSize: css.fontSize + 'px',\n color: css.color,\n textAlign: css.textAlign,\n }\n})\nconst item: any = reactive(props.item)\n\nif (!item.css.textAlign) {\n item.css.textAlign = 'left'\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;AAgDD,IAAM,MAAA,MAAA,GAAS,SAAS,MAAM;AAC5B,MAAM,MAAA,GAAA,GAAM,MAAM,IAAK,CAAA,GAAA,CAAA;AACvB,MAAO,OAAA;AAAA,QACL,QAAA,EAAU,IAAI,QAAW,GAAA,IAAA;AAAA,QACzB,OAAO,GAAI,CAAA,KAAA;AAAA,QACX,WAAW,GAAI,CAAA,SAAA;AAAA,OACjB,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAM,MAAA,IAAA,GAAY,QAAS,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAErC,IAAI,IAAA,CAAC,IAAK,CAAA,GAAA,CAAI,SAAW,EAAA;AACvB,MAAA,IAAA,CAAK,IAAI,SAAY,GAAA,MAAA,CAAA;AAAA,KACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"quick-action.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/quick-action.vue"],"sourcesContent":["<template>\n <el-form-item label=\"快捷操作\">\n <el-dropdown>\n <el-button size=\"small\" type=\"primary\">\n 居中\n <dk-icon icon=\"ArrowDown\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleAction('top-down-center')\"\n >上下</el-dropdown-item\n >\n <el-dropdown-item @click=\"handleAction('left-right-center')\"\n >左右</el-dropdown-item\n >\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-dropdown class=\"m-l-5px\">\n <el-button size=\"small\" type=\"primary\">\n 排序\n <dk-icon icon=\"ArrowDown\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleAction('move-one-top')\"\n >移动到上一层</el-dropdown-item\n >\n <el-dropdown-item @click=\"handleAction('move-one-down')\"\n >移动到下一层</el-dropdown-item\n >\n <el-dropdown-item @click=\"handleAction('move-top')\"\n >移动到最顶层</el-dropdown-item\n >\n <el-dropdown-item @click=\"handleAction('move-down')\"\n >移动到最底层</el-dropdown-item\n >\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-button\n class=\"m-l-5px\"\n type=\"danger\"\n size=\"small\"\n @click=\"handleAction('del')\"\n >删除</el-button\n >\n </el-form-item>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nconst props = defineProps({\n index: {\n default: 0,\n type: Number,\n },\n})\nconst posterData: any = inject('posterData')\nconst _index = ref(props.index)\n\nconst handleAction = (type = '') => {\n const index = props.index\n let views = posterData.views\n const maxIndex = views.length - 1\n switch (type) {\n case 'move-one-top':\n if (props.index >= maxIndex) {\n return false\n }\n views = swapItems(views, index, index + 1)\n _index.value = index + 1\n break\n case 'move-one-down':\n if (props.index <= 0) {\n return false\n }\n views = swapItems(views, index, index - 1)\n _index.value = index - 1\n break\n case 'move-top':\n if (index >= maxIndex) {\n return false\n }\n views = swapItems(views, index, maxIndex)\n _index.value = maxIndex\n break\n case 'move-down':\n if (index <= 0) {\n return false\n }\n views = swapItems(views, index, 0)\n _index.value = 0\n break\n case 'del':\n views.splice(index, 1)\n break\n case 'top-down-center':\n views[index].css.top = posterData.height / 2 - views[index].css.height / 2\n break\n case 'left-right-center':\n views[index].css.left = posterData.width / 2 - views[index].css.width / 2\n break\n }\n}\n\nconst swapItems = (arr: any, index1: any, index2: any) => {\n arr[index1] = arr.splice(index2, 1, arr[index1])[0]\n return arr\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAyDA,IAAM,MAAA,UAAA,GAAkB,OAAO,YAAY,CAAA,CAAA;AAC3C,IAAM,MAAA,MAAA,GAAS,GAAI,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAE9B,IAAM,MAAA,YAAA,GAAe,CAAC,IAAA,GAAO,EAAO,KAAA;AAClC,MAAA,MAAM,QAAQ,KAAM,CAAA,KAAA,CAAA;AACpB,MAAA,IAAI,QAAQ,UAAW,CAAA,KAAA,CAAA;AACvB,MAAM,MAAA,QAAA,GAAW,MAAM,MAAS,GAAA,CAAA,CAAA;AAChC,MAAA,QAAQ,IAAM;AAAA,QACZ,KAAK,cAAA;AACH,UAAI,IAAA,KAAA,CAAM,SAAS,QAAU,EAAA;AAC3B,YAAO,OAAA,KAAA,CAAA;AAAA,WACT;AACA,UAAA,KAAA,GAAQ,SAAU,CAAA,KAAA,EAAO,KAAO,EAAA,KAAA,GAAQ,CAAC,CAAA,C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O,GAAA,UAAA,CAAW,KAAQ,GAAA,CAAA,GAAI,KAAM,CAAA,KAAK,CAAE,CAAA,GAAA,CAAI,KAAQ,GAAA,CAAA,CAAA;AACxE,UAAA,MAAA;AAAA,OACJ;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,SAAY,GAAA,CAAC,GAAU,EAAA,MAAA,EAAa,MAAgB,KAAA;AACxD,MAAI,GAAA,CAAA,MAAM,CAAI,GAAA,GAAA,CAAI,MAAO,CAAA,MAAA,EAAQ,GAAG,GAAI,CAAA,MAAM,CAAC,CAAA,CAAE,CAAC,CAAA,CAAA;AAClD,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"quick-action.vue2.mjs","sources":["../../../../../src/poster-input/src/component/views/quick-action.vue"],"sourcesContent":["<template>\n <el-form-item label=\"快捷操作\">\n <el-dropdown>\n <el-button size=\"small\" type=\"primary\">\n 居中\n <dk-icon icon=\"ArrowDown\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleAction('top-down-center')\">上下</el-dropdown-item>\n <el-dropdown-item @click=\"handleAction('left-right-center')\">左右</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-dropdown class=\"m-l-5px\">\n <el-button size=\"small\" type=\"primary\">\n 排序\n <dk-icon icon=\"ArrowDown\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"handleAction('move-one-top')\">移动到上一层</el-dropdown-item>\n <el-dropdown-item @click=\"handleAction('move-one-down')\">移动到下一层</el-dropdown-item>\n <el-dropdown-item @click=\"handleAction('move-top')\">移动到最顶层</el-dropdown-item>\n <el-dropdown-item @click=\"handleAction('move-down')\">移动到最底层</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-button class=\"m-l-5px\" type=\"danger\" size=\"small\" @click=\"handleAction('del')\">删除</el-button>\n </el-form-item>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nconst props = defineProps({\n index: {\n default: 0,\n type: Number,\n },\n})\nconst posterData: any = inject('posterData')\nconst _index = ref(props.index)\n\nconst handleAction = (type = '') => {\n const index = props.index\n let views = posterData.views\n const maxIndex = views.length - 1\n switch (type) {\n case 'move-one-top':\n if (props.index >= maxIndex) {\n return false\n }\n views = swapItems(views, index, index + 1)\n _index.value = index + 1\n break\n case 'move-one-down':\n if (props.index <= 0) {\n return false\n }\n views = swapItems(views, index, index - 1)\n _index.value = index - 1\n break\n case 'move-top':\n if (index >= maxIndex) {\n return false\n }\n views = swapItems(views, index, maxIndex)\n _index.value = maxIndex\n break\n case 'move-down':\n if (index <= 0) {\n return false\n }\n views = swapItems(views, index, 0)\n _index.value = 0\n break\n case 'del':\n views.splice(index, 1)\n break\n case 'top-down-center':\n views[index].css.top = posterData.height / 2 - views[index].css.height / 2\n break\n case 'left-right-center':\n views[index].css.left = posterData.width / 2 - views[index].css.width / 2\n break\n }\n}\n\nconst swapItems = (arr: any, index1: any, index2: any) => {\n arr[index1] = arr.splice(index2, 1, arr[index1])[0]\n return arr\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAuCA,IAAM,MAAA,UAAA,GAAkB,OAAO,YAAY,CAAA,CAAA;AAC3C,IAAM,MAAA,MAAA,GAAS,GAAI,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAE9B,IAAM,MAAA,YAAA,GAAe,CAAC,IAAA,GAAO,EAAO,KAAA;AAClC,MAAA,MAAM,QAAQ,KAAM,CAAA,KAAA,CAAA;AACpB,MAAA,IAAI,QAAQ,UAAW,CAAA,KAAA,CAAA;AACvB,MAAM,MAAA,QAAA,GAAW,MAAM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,CAAA,KAAK,CAAE,CAAA,GAAA,CAAI,GAAM,GAAA,UAAA,CAAW,MAAS,GAAA,CAAA,GAAI,KAAM,CAAA,KAAK,CAAE,CAAA,GAAA,CAAI,MAAS,GAAA,CAAA,CAAA;AACzE,UAAA,MAAA;AAAA,QACF,KAAK,mBAAA;AACH,UAAM,KAAA,CAAA,KAAK,CAAE,CAAA,GAAA,CAAI,IAAO,GAAA,UAAA,CAAW,KAAQ,GAAA,CAAA,GAAI,KAAM,CAAA,KAAK,CAAE,CAAA,GAAA,CAAI,KAAQ,GAAA,CAAA,CAAA;AACxE,UAAA,MAAA;AAAA,OACJ;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,SAAY,GAAA,CAAC,GAAU,EAAA,MAAA,EAAa,MAAgB,KAAA;AACxD,MAAI,GAAA,CAAA,MAAM,CAAI,GAAA,GAAA,CAAI,MAAO,CAAA,MAAA,EAAQ,GAAG,GAAI,CAAA,MAAM,CAAC,CAAA,CAAE,CAAC,CAAA,CAAA;AAClD,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"poster-input.vue2.mjs","sources":["../../../src/poster-input/src/poster-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterInput',\n});\n</script>\n<template>\n <div class=\"dk-poster-input\">\n <el-button @click=\"showPoster()\">{{ input }}</el-button>\n <dk-dialog\n v-model=\"show\"\n width=\"1200px\"\n append-to-body\n title=\"自定义海报\"\n top=\"10vh\"\n >\n <dk-poster\n ref=\"posterRef\"\n v-model=\"posterData\"\n :views=\"props.views\"\n @submit=\"success\"\n />\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { posterInputProps } from './props'\nimport DkPoster from './component/poster.vue'\nimport { ref, computed } from 'vue'\n\nconst props = defineProps(posterInputProps)\nconst show = ref(false)\nconst posterData: any = ref({\n background: '',\n width: 320,\n height: 500,\n borderRadius: 0,\n views: [],\n})\n\nconst posterRef = ref()\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\n\nconst showPoster = () => {\n show.value = true\n posterRef.value?.checkParentSize()\n}\n\nconst initPosterData = () => {\n // posterData.value.width = props.modelValue.width || 320\n // posterData.value.height = props.modelValue.height || 500\n // posterData.value.borderRadius = props.modelValue.borderRadius || 0\n // posterData.value.views = props.modelValue.views || []\n // posterData.value.background = props.modelValue.background || ''\n posterData.value = props.modelValue\n emitData()\n}\n\nconst emitData = () => {\n emit('update:modelValue', posterData.value)\n emit('input', posterData.value)\n emit('change', posterData.value)\n}\n\nconst input = computed(() => {\n return (\n '宽高:' +\n posterData.value.width +\n 'X' +\n posterData.value.height +\n ',' +\n posterData.value.views.length +\n '个元素,' +\n (posterData.value.background ? '有' : '无') +\n '背景图'\n )\n})\n\nconst success = () => {\n show.value = false\n emitData()\n}\n\nconst onClick = () => {\n show.value = true\n}\n\ninitPosterData()\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4BD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AACtB,IAAA,MAAM,aAAkB,GAAI,CAAA;AAAA,MAC1B,UAAY,EAAA,EAAA;AAAA,MACZ,KAAO,EAAA,GAAA;AAAA,MACP,MAAQ,EAAA,GAAA;AAAA,MACR,YAAc,EAAA,CAAA;AAAA,MACd,OAAO,EAAC;AAAA,KACT,CAAA,CAAA;AAED,IAAA,MAAM,YAAY,GAAI,EAAA,CAAA;AAItB,IAAA,MAAM,aAAa,MAAM;AACvB,MAAA,IAAA,CAAK,KAAQ,GAAA,IAAA,CAAA;AACb,MAAA,SAAA,CAAU,OAAO,eAAgB,EAAA,CAAA;AAAA,KACnC,CAAA;AAEA,IAAA,MAAM,iBAAiB,MAAM;AAM3B,MAAA,UAAA,CAAW,QAAQ,KAAM,CAAA,UAAA,CAAA;AACzB,MAAS,QAAA,EAAA,CAAA;AAAA,KACX,CAAA;AAEA,IAAA,MAAM,WAAW,MAAM;AACrB,MAAK,IAAA,CAAA,mBAAA,EAAqB,WAAW,KAAK,CAAA,CAAA;AAC1C,MAAK,IAAA,CAAA,OAAA,EAAS,WAAW,KAAK,CAAA,CAAA;AAC9B,MAAK,IAAA,CAAA,QAAA,EAAU,WAAW,KAAK,CAAA,CAAA;AAAA,KACjC,CAAA;AAEA,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAA,OACE,uBACA,UAAW,CAAA,KAAA,CAAM,QACjB,GACA,GAAA,UAAA,CAAW,MAAM,MACjB,GAAA,QAAA,GACA,UAAW,CAAA,KAAA,CAAM,MAAM,MACvB,GAAA,0BAAA,IACC,WAAW,KAAM,CAAA,UAAA,GAAa,WAAM,QACrC,CAAA,GAAA,oBAAA,CAAA;AAAA,KAEH,CAAA,CAAA;AAED,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AACb,MAAS,QAAA,EAAA,CAAA;AAAA,KACX,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,IAAA,CAAK,KAAQ,GAAA,IAAA,CAAA;AAAA,KACf,CAAA;AAEA,IAAe,cAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"poster-input.vue2.mjs","sources":["../../../src/poster-input/src/poster-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkPosterInput',\n});\n</script>\n<template>\n <div class=\"dk-poster-input\">\n <el-button @click=\"showPoster()\">{{ input }}</el-button>\n <dk-dialog v-model=\"show\" width=\"1200px\" append-to-body title=\"自定义海报\" top=\"10vh\">\n <dk-poster ref=\"posterRef\" v-model=\"posterData\" :views=\"props.views\" @submit=\"success\" />\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { posterInputProps } from './props'\nimport DkPoster from './component/poster.vue'\nimport { ref, computed } from 'vue'\n\nconst props = defineProps(posterInputProps)\nconst show = ref(false)\nconst posterData: any = ref({\n background: '',\n width: 320,\n height: 500,\n borderRadius: 0,\n views: [],\n})\n\nconst posterRef = ref()\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\n\nconst showPoster = () => {\n show.value = true\n posterRef.value?.checkParentSize()\n}\n\nconst initPosterData = () => {\n // posterData.value.width = props.modelValue.width || 320\n // posterData.value.height = props.modelValue.height || 500\n // posterData.value.borderRadius = props.modelValue.borderRadius || 0\n // posterData.value.views = props.modelValue.views || []\n // posterData.value.background = props.modelValue.background || ''\n posterData.value = props.modelValue\n emitData()\n}\n\nconst emitData = () => {\n emit('update:modelValue', posterData.value)\n emit('input', posterData.value)\n emit('change', posterData.value)\n}\n\nconst input = computed(() => {\n return (\n '宽高:' +\n posterData.value.width +\n 'X' +\n posterData.value.height +\n ',' +\n posterData.value.views.length +\n '个元素,' +\n (posterData.value.background ? '有' : '无') +\n '背景图'\n )\n})\n\nconst success = () => {\n show.value = false\n emitData()\n}\n\nconst onClick = () => {\n show.value = true\n}\n\ninitPosterData()\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAiBD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AACt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Q,GAAA,IAAA,CAAA;AAAA,KACf,CAAA;AAEA,IAAe,cAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -32,10 +32,8 @@
32
32
 
33
33
  .poster-body {
34
34
  background:
35
- linear-gradient(-90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0% 0% /
36
- 10px 10px,
37
- linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0% 0% / 10px
38
- 10px;
35
+ linear-gradient(-90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0% 0% / 10px 10px,
36
+ linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px) 0% 0% / 10px 10px;
39
37
  padding: 20px;
40
38
  padding-bottom: 50px;
41
39
  width: 600px;
@@ -8,15 +8,7 @@ const __default__ = defineComponent({
8
8
  var _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  ...__default__,
10
10
  props: selectProps,
11
- emits: [
12
- "update:modelValue",
13
- "change",
14
- "visible-change",
15
- "remove-tag",
16
- "clear",
17
- "blur",
18
- "focus"
19
- ],
11
+ emits: ["update:modelValue", "change", "visible-change", "remove-tag", "clear", "blur", "focus"],
20
12
  setup(__props, { emit }) {
21
13
  const props = __props;
22
14
  const internalValue = ref(props.modelValue);
@@ -1 +1 @@
1
- {"version":3,"file":"select.vue2.mjs","sources":["../../../src/select/src/select.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkSelect',\n});\n</script>\n<template>\n <el-select-v2\n v-model=\"internalValue\"\n class=\"dk-select\"\n v-bind=\"{ ...props }\"\n :remote-method=\"remoteMethod\"\n remote\n placeholder=\"请选择\"\n :options=\"internalOptions\"\n style=\"width: 100%\"\n @change=\"handleChange\"\n @visible-change=\"handleVisibleChange\"\n @remove-tag=\"handleRemoveTag\"\n @clear=\"handleClear\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]=\"scope\">\n <slot :name=\"idx\" v-bind=\"scope\"></slot>\n </template>\n </el-select-v2>\n</template>\n\n<script lang=\"ts\" setup>\nimport { selectProps } from './props'\nimport { watch, ref } from 'vue'\nimport { request } from '@vipl520/utils'\n\nconst props = defineProps(selectProps)\nconst internalValue = ref(props.modelValue) // 使用 ref 以便响应式更新\nconst internalOptions = ref(props.options || {})\nconst emit = defineEmits([\n 'update:modelValue',\n 'change',\n 'visible-change',\n 'remove-tag',\n 'clear',\n 'blur',\n 'focus',\n])\n// 监听内部值的变化并向外部发出事件\nwatch(internalValue, (newValue) => {\n console.log('new', newValue)\n emit('update:modelValue', newValue)\n})\nconst remoteMethod = (query?: string) => {\n if (!props.remoteUrl) return\n request(\n {\n url: props.remoteUrl,\n method: 'post',\n data: { query, select: 1 },\n },\n {\n code_success_show: false,\n }\n ).then((res) => {\n internalOptions.value = res.data\n })\n}\n\n// 事件处理函数\nconst handleChange = (value: any) => emit('change', value)\nconst handleVisibleChange = (value: boolean) => emit('visible-change', value)\nconst handleRemoveTag = (value: any) => emit('remove-tag', value)\nconst handleClear = () => emit('clear')\nconst handleBlur = (event: FocusEvent) => emit('blur', event)\nconst handleFocus = (event: FocusEvent) => emit('focus', event)\n\nremoteMethod()\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;AA+BD,IAAM,MAAA,aAAA,GAAgB,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAC1C,IAAA,MAAM,eAAkB,GAAA,GAAA,CAAI,KAAM,CAAA,OAAA,IAAW,EAAE,CAAA,CAAA;AAW/C,IAAM,KAAA,CAAA,aAAA,EAAe,CAAC,QAAa,KAAA;AACjC,MAAQ,OAAA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"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkSelect',\n});\n</script>\n<template>\n <el-select-v2\n v-model=\"internalValue\"\n class=\"dk-select\"\n v-bind=\"{ ...props }\"\n :remote-method=\"remoteMethod\"\n remote\n placeholder=\"请选择\"\n :options=\"internalOptions\"\n style=\"width: 100%\"\n @change=\"handleChange\"\n @visible-change=\"handleVisibleChange\"\n @remove-tag=\"handleRemoveTag\"\n @clear=\"handleClear\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]=\"scope\">\n <slot :name=\"idx\" v-bind=\"scope\"></slot>\n </template>\n </el-select-v2>\n</template>\n\n<script lang=\"ts\" setup>\nimport { selectProps } from './props'\nimport { watch, ref } from 'vue'\nimport { request } from '@vipl520/utils'\n\nconst props = defineProps(selectProps)\nconst internalValue = ref(props.modelValue) // 使用 ref 以便响应式更新\nconst internalOptions = ref(props.options || {})\nconst emit = defineEmits(['update:modelValue', 'change', 'visible-change', 'remove-tag', 'clear', 'blur', 'focus'])\n// 监听内部值的变化并向外部发出事件\nwatch(internalValue, (newValue) => {\n console.log('new', newValue)\n emit('update:modelValue', newValue)\n})\nconst remoteMethod = (query?: string) => {\n if (!props.remoteUrl) return\n request(\n {\n url: props.remoteUrl,\n method: 'post',\n data: { query, select: 1 },\n },\n {\n code_success_show: false,\n }\n ).then((res) => {\n internalOptions.value = res.data\n })\n}\n\n// 事件处理函数\nconst handleChange = (value: any) => emit('change', value)\nconst handleVisibleChange = (value: boolean) => emit('visible-change', value)\nconst handleRemoveTag = (value: any) => emit('remove-tag', value)\nconst handleClear = () => emit('clear')\nconst handleBlur = (event: FocusEvent) => emit('blur', event)\nconst handleFocus = (event: FocusEvent) => emit('focus', event)\n\nremoteMethod()\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA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AAO,CAAA,CAAA;AACtC,IAAA,MAAM,UAAa,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,QAAQ,KAAK,CAAA,CAAA;AAC5D,IAAA,MAAM,WAAc,GAAA,CAAC,KAAsB,KAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAE9D,IAAa,YAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","sources":["../../../src/style-animation-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleAnimationInputProps = {\n /**\n * 类型定义\n */\n modelValue: {\n type: Object,\n default: () => ({\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n }),\n },\n}\n\nexport type StyleAnimationInputProps = ExtractPropTypes<\n typeof styleAnimationInputProps\n>\n"],"names":[],"mappings":"AAEO,MAAM,wBAA2B,GAAA;AAAA;AAAA;AAAA;AAAA,EAItC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO;AAAA,MACd,cAAgB,EAAA,IAAA;AAAA,MAChB,iBAAmB,EAAA,IAAA;AAAA,MACnB,uBAAyB,EAAA,UAAA;AAAA,KAC3B,CAAA;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"props.mjs","sources":["../../../src/style-animation-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const styleAnimationInputProps = {\n /**\n * 类型定义\n */\n modelValue: {\n type: Object,\n default: () => ({\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: 'infinite',\n }),\n },\n}\n\nexport type StyleAnimationInputProps = ExtractPropTypes<typeof styleAnimationInputProps>\n"],"names":[],"mappings":"AAEO,MAAM,wBAA2B,GAAA;AAAA;AAAA;AAAA;AAAA,EAItC,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,SAAS,OAAO;AAAA,MACd,cAAgB,EAAA,IAAA;AAAA,MAChB,iBAAmB,EAAA,IAAA;AAAA,MACnB,uBAAyB,EAAA,UAAA;AAAA,KAC3B,CAAA;AAAA,GACF;AACF;;;;"}
@@ -19,7 +19,7 @@ const _hoisted_3 = /* @__PURE__ */ createElementVNode(
19
19
  const _hoisted_4 = /* @__PURE__ */ createElementVNode(
20
20
  "p",
21
21
  { class: "form-help" },
22
- " \u5F53\u5FAA\u73AF\u6B21\u6570\u8BBE\u7F6E\u4E3A0\u7684\u65F6\u5019\uFF0C\u8868\u793A\u65E0\u9650\u5FAA\u73AF\uFF0C\u5165\u573A\u52A8\u753B\u5EFA\u8BAE\u4E3A1 ",
22
+ "\u5F53\u5FAA\u73AF\u6B21\u6570\u8BBE\u7F6E\u4E3A0\u7684\u65F6\u5019\uFF0C\u8868\u793A\u65E0\u9650\u5FAA\u73AF\uFF0C\u5165\u573A\u52A8\u753B\u5EFA\u8BAE\u4E3A1",
23
23
  -1
24
24
  /* HOISTED */
25
25
  );
@@ -1 +1 @@
1
- {"version":3,"file":"style-animation-input.vue2.mjs","sources":["../../../src/style-animation-input/src/style-animation-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleAnimationInput',\n});\n</script>\n<template>\n <div class=\"dk-style-animation-input\">\n <el-form-item label=\"延迟执行\">\n <el-input-number v-model=\"form.animationDelay\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置动画页面加载完毕多少秒后执行</p>\n </el-form-item>\n <el-form-item label=\"动画时长\">\n <el-input-number v-model=\"form.animationDuration\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置每次动画加载的动画时长</p>\n </el-form-item>\n <el-form-item label=\"循环次数\">\n <el-input-number v-model=\"form.animationIterationCount\" :min=\"0\" />\n <p class=\"form-help\">\n 当循环次数设置为0的时候,表示无限循环,入场动画建议为1\n </p>\n </el-form-item>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleAnimationInputProps } from './props'\nimport { onMounted, reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleAnimationInputProps)\n\nconst form: any = reactive({\n animationDelay: 0,\n animationDuration: 1,\n animationIterationCount: 0,\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(\n form,\n () => {\n const value: any = {}\n value.animationDelay = form.animationDelay + 's'\n value.animationDuration = form.animationDuration + 's'\n value.animationIterationCount =\n form.animationIterationCount == 0\n ? 'infinite'\n : form.animationIterationCount\n emit('update:modelValue', value)\n },\n { deep: true }\n)\nconst init = () => {\n const value = props.modelValue\n form.animationDelay = parseFloat(value.animationDelay || '0s')\n form.animationDuration = parseFloat(value.animationDuration || '1')\n form.animationIterationCount = parseInt(\n (value.animationIterationCount === 'infinite'\n ? 0\n : value.animationIterationCount) || 0\n )\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n // emit('update:modelValue', value)\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,uBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6BD,IAAA,MAAM,OAAY,QAAS,CAAA;AAAA,MACzB,cAAgB,EAAA,CAAA;AAAA,MAChB,iBAAmB,EAAA,CAAA;AAAA,MACnB,uBAAyB,EAAA,CAAA;AAAA,KAC1B,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,IAAA;AAAA,MACA,MAAM;AACJ,QAAA,MAAM,QAAa,EAAC,CAAA;AACpB,QAAM,KAAA,CAAA,cAAA,GAAiB,KAAK,cAAiB,GAAA,GAAA,CAAA;AAC7C,QAAM,KAAA,CAAA,iBAAA,GAAoB,KAAK,iBAAoB,GAAA,GAAA,CAAA;AACnD,QAAA,KAAA,CAAM,uBACJ,GAAA,IAAA,CAAK,uBAA2B,IAAA,CAAA,GAC5B,aACA,IAAK,CAAA,uBAAA,CAAA;AACX,QAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAAA,OACjC;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AACA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,MAAM,QAAQ,KAAM,CAAA,UAAA,CAAA;AACpB,MAAA,IAAA,CAAK,cAAiB,GAAA,UAAA,CAAW,KAAM,CAAA,cAAA,IAAkB,IAAI,CAAA,CAAA;AAC7D,MAAA,IAAA,CAAK,iBAAoB,GAAA,UAAA,CAAW,KAAM,CAAA,iBAAA,IAAqB,GAAG,CAAA,CAAA;AAClE,MAAA,IAAA,CAAK,uBAA0B,GAAA,QAAA;AAAA,QAAA,CAC5B,KAAM,CAAA,uBAAA,KAA4B,UAC/B,GAAA,CAAA,GACA,MAAM,uBAA4B,KAAA,CAAA;AAAA,OACxC,CAAA;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OAEP;AAAA,KACF,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-animation-input.vue2.mjs","sources":["../../../src/style-animation-input/src/style-animation-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleAnimationInput',\n});\n</script>\n<template>\n <div class=\"dk-style-animation-input\">\n <el-form-item label=\"延迟执行\">\n <el-input-number v-model=\"form.animationDelay\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置动画页面加载完毕多少秒后执行</p>\n </el-form-item>\n <el-form-item label=\"动画时长\">\n <el-input-number v-model=\"form.animationDuration\" :step=\"0.1\" :min=\"0\" />\n <p class=\"form-help\">设置每次动画加载的动画时长</p>\n </el-form-item>\n <el-form-item label=\"循环次数\">\n <el-input-number v-model=\"form.animationIterationCount\" :min=\"0\" />\n <p class=\"form-help\">当循环次数设置为0的时候,表示无限循环,入场动画建议为1</p>\n </el-form-item>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleAnimationInputProps } from './props'\nimport { onMounted, reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleAnimationInputProps)\n\nconst form: any = reactive({\n animationDelay: 0,\n animationDuration: 1,\n animationIterationCount: 0,\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(\n form,\n () => {\n const value: any = {}\n value.animationDelay = form.animationDelay + 's'\n value.animationDuration = form.animationDuration + 's'\n value.animationIterationCount = form.animationIterationCount == 0 ? 'infinite' : form.animationIterationCount\n emit('update:modelValue', value)\n },\n { deep: true }\n)\nconst init = () => {\n const value = props.modelValue\n form.animationDelay = parseFloat(value.animationDelay || '0s')\n form.animationDuration = parseFloat(value.animationDuration || '1')\n form.animationIterationCount = parseInt(\n (value.animationIterationCount === 'infinite' ? 0 : value.animationIterationCount) || 0\n )\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n // emit('update:modelValue', value)\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,uBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA2BD,IAAA,MAAM,OAAY,QAAS,CAAA;AAAA,MACzB,cAAgB,EAAA,CAAA;AAAA,MAChB,iBAAmB,EAAA,CAAA;AAAA,MACnB,uBAAyB,EAAA,CAAA;AAAA,KAC1B,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,IAA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4
  const _hoisted_1 = { class: "dk-style-font-input" };
5
- const _hoisted_2 = { style: { "display": "flex", "flex-flow": "row wrap" } };
5
+ const _hoisted_2 = { style: { "display": "flex", "flex-flow": "wrap", "align-items": "center" } };
6
6
  const _hoisted_3 = { class: "m-b-5px" };
7
7
  const _hoisted_4 = {
8
8
  style: { "width": "100px" },
@@ -1 +1 @@
1
- {"version":3,"file":"style-font-input.vue2.mjs","sources":["../../../src/style-font-input/src/style-font-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleFontInput',\n});\n</script>\n<template>\n <div class=\"dk-style-font-input\">\n <!-- 颜色、字号、粗细、风格、装饰-->\n <div style=\"display: flex; flex-flow: row wrap\">\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字颜色\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.color === ''\"\n @click=\"clear('color')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-color-picker v-model=\"styles.color\"></el-color-picker>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 字号\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontSize === ''\"\n @click=\"clear('fontSize')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-b-5px\">\n <el-select\n v-model=\"styles.fontSize\"\n :remote-show-suffix=\"false\"\n placeholder=\"字号\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in ['12px', '14px', '16px', '18px', '20px', '24px', '28px', '32px', '36px', '40px', '48px']\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-r-5px m-b-5px\">\n <el-select\n v-model=\"styles.fontWeight\"\n :remote-show-suffix=\"false\"\n placeholder=\"粗细\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in WeightValues\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\"\n ></el-option>\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontWeight\">\n <el-radio-button value=\"bold\">\n <dk-icon icon=\"radix-icons:font-bold\" title=\"文字加粗\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"lighter\">\n <dk-icon icon=\"clarity:font-size-line\" title=\"文字默认\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" class=\"m-r-5px\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字风格\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontStyle === ''\"\n @click=\"clear('fontStyle')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontStyle\">\n <el-radio-button value=\"italic\">\n <dk-icon icon=\"radix-icons:font-italic\" title=\"文字倾斜\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字装饰\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.textDecoration === ''\"\n @click=\"clear('textDecoration')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-radio-group v-model=\"styles.textDecoration\">\n <el-radio-button value=\"underline\">\n <dk-icon icon=\"radix-icons:underline\" title=\"下划线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"line-through\">\n <dk-icon icon=\"radix-icons:strikethrough\" title=\"删除线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"wavy underline\">\n <dk-icon icon=\"mdi:format-underline-wavy\" title=\"波浪线\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top\" trigger=\"hover\" content=\"全部重置\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #default>\n <el-button type=\"danger\" plain icon=\"Delete\" class=\"m-l-5px m-b-5px\" @click=\"clear('all')\"></el-button>\n </template>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleFontInputProps } from './props'\nimport { reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleFontInputProps)\n\nconst showAfter = 400\nconst hideAfter = 100\n\nconst styles: any = reactive({\n color: props.modelValue.color || '',\n fontSize: props.modelValue.fontSize || '',\n fontWeight: props.modelValue.fontWeight || '',\n fontStyle: props.modelValue.fontStyle || '',\n textDecoration: props.modelValue.textDecoration || '',\n})\n\nconst emit = defineEmits(['update:modelValue', 'change'])\nwatch(styles, (val) => {\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nwatch(\n () => props.modelValue,\n () => {\n // styles.color = props.modelValue.color || ''\n // styles.fontSize = props.modelValue.fontSize || ''\n // styles.fontWeight = props.modelValue.fontWeight || ''\n // styles.fontStyle = props.modelValue.fontStyle || ''\n // styles.textDecoration = props.modelValue.textDecoration || ''\n const propertiesToWatch = ['color', 'fontSize', 'fontWeight', 'fontStyle', 'textDecoration']\n propertiesToWatch.forEach((property) => {\n styles[property] = props.modelValue[property] || ''\n })\n },\n { deep: true }\n)\n\nconst WeightValues = [\n { label: '普通', value: 'normal' },\n { label: '加粗', value: 'bold' },\n { label: '更粗', value: 'bolder' },\n { label: '更细', value: 'lighter' },\n { label: '100', value: '100' },\n { label: '200', value: '200' },\n { label: '300', value: '300' },\n { label: '400', value: '400' },\n { label: '500', value: '500' },\n { label: '600', value: '600' },\n { label: '700', value: '700' },\n { label: '800', value: '800' },\n { label: '900', value: '900' },\n]\n\nconst clear = (type: string) => {\n if (type === 'all') {\n Object.keys(styles).forEach((key) => {\n styles[key] = ''\n })\n } else {\n styles[type] = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAwLD,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAClB,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAElB,IAAA,MAAM,SAAc,QAAS,CAAA;AAAA,MAC3B,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,QAAA,EAAU,KAAM,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-font-input.vue2.mjs","sources":["../../../src/style-font-input/src/style-font-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleFontInput',\n});\n</script>\n<template>\n <div class=\"dk-style-font-input\">\n <!-- 颜色、字号、粗细、风格、装饰-->\n <div style=\"display: flex; flex-flow: wrap; align-items: center\">\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字颜色\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.color === ''\"\n @click=\"clear('color')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-color-picker v-model=\"styles.color\"></el-color-picker>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 字号\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontSize === ''\"\n @click=\"clear('fontSize')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-b-5px\">\n <el-select\n v-model=\"styles.fontSize\"\n :remote-show-suffix=\"false\"\n placeholder=\"字号\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in ['12px', '14px', '16px', '18px', '20px', '24px', '28px', '32px', '36px', '40px', '48px']\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div style=\"width: 100px\" class=\"m-r-5px m-b-5px\">\n <el-select\n v-model=\"styles.fontWeight\"\n :remote-show-suffix=\"false\"\n placeholder=\"粗细\"\n allow-create\n :filterable=\"true\"\n >\n <el-option\n v-for=\"item in WeightValues\"\n :key=\"item.value\"\n :label=\"item.label\"\n :value=\"item.value\"\n ></el-option>\n </el-select>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字粗细\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontWeight === ''\"\n @click=\"clear('fontWeight')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontWeight\">\n <el-radio-button value=\"bold\">\n <dk-icon icon=\"radix-icons:font-bold\" title=\"文字加粗\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"lighter\">\n <dk-icon icon=\"clarity:font-size-line\" title=\"文字默认\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" class=\"m-r-5px\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字风格\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.fontStyle === ''\"\n @click=\"clear('fontStyle')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-r-5px m-b-5px\">\n <el-radio-group v-model=\"styles.fontStyle\">\n <el-radio-button value=\"italic\">\n <dk-icon icon=\"radix-icons:font-italic\" title=\"文字倾斜\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top-end\" trigger=\"hover\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #content>\n 文字装饰\n <el-button\n size=\"small\"\n icon=\"Refresh\"\n color=\"var(--el-text-color-primary)\"\n :disabled=\"styles.textDecoration === ''\"\n @click=\"clear('textDecoration')\"\n >重置</el-button\n >\n </template>\n <!-- -->\n <template #default>\n <div class=\"m-b-5px\">\n <el-radio-group v-model=\"styles.textDecoration\">\n <el-radio-button value=\"underline\">\n <dk-icon icon=\"radix-icons:underline\" title=\"下划线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"line-through\">\n <dk-icon icon=\"radix-icons:strikethrough\" title=\"删除线\"></dk-icon>\n </el-radio-button>\n <el-radio-button value=\"wavy underline\">\n <dk-icon icon=\"mdi:format-underline-wavy\" title=\"波浪线\"></dk-icon>\n </el-radio-button>\n </el-radio-group>\n </div>\n </template>\n </el-tooltip>\n <el-tooltip placement=\"top\" trigger=\"hover\" content=\"全部重置\" :show-after=\"showAfter\" :hide-after=\"hideAfter\">\n <template #default>\n <el-button type=\"danger\" plain icon=\"Delete\" class=\"m-l-5px m-b-5px\" @click=\"clear('all')\"></el-button>\n </template>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleFontInputProps } from './props'\nimport { reactive, watch } from 'vue'\n\n\n\nconst props = defineProps(styleFontInputProps)\n\nconst showAfter = 400\nconst hideAfter = 100\n\nconst styles: any = reactive({\n color: props.modelValue.color || '',\n fontSize: props.modelValue.fontSize || '',\n fontWeight: props.modelValue.fontWeight || '',\n fontStyle: props.modelValue.fontStyle || '',\n textDecoration: props.modelValue.textDecoration || '',\n})\n\nconst emit = defineEmits(['update:modelValue', 'change'])\nwatch(styles, (val) => {\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nwatch(\n () => props.modelValue,\n () => {\n // styles.color = props.modelValue.color || ''\n // styles.fontSize = props.modelValue.fontSize || ''\n // styles.fontWeight = props.modelValue.fontWeight || ''\n // styles.fontStyle = props.modelValue.fontStyle || ''\n // styles.textDecoration = props.modelValue.textDecoration || ''\n const propertiesToWatch = ['color', 'fontSize', 'fontWeight', 'fontStyle', 'textDecoration']\n propertiesToWatch.forEach((property) => {\n styles[property] = props.modelValue[property] || ''\n })\n },\n { deep: true }\n)\n\nconst WeightValues = [\n { label: '普通', value: 'normal' },\n { label: '加粗', value: 'bold' },\n { label: '更粗', value: 'bolder' },\n { label: '更细', value: 'lighter' },\n { label: '100', value: '100' },\n { label: '200', value: '200' },\n { label: '300', value: '300' },\n { label: '400', value: '400' },\n { label: '500', value: '500' },\n { label: '600', value: '600' },\n { label: '700', value: '700' },\n { label: '800', value: '800' },\n { label: '900', value: '900' },\n]\n\nconst clear = (type: string) => {\n if (type === 'all') {\n Object.keys(styles).forEach((key) => {\n styles[key] = ''\n })\n } else {\n styles[type] = ''\n }\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAwLD,IAAA,MAAM,SAAY,GAAA,GAAA,CAAA;AAClB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AA,EAAA,CAAA;AAAA,SACf,CAAA,CAAA;AAAA,OACI,MAAA;AACL,QAAA,MAAA,CAAO,IAAI,CAAI,GAAA,EAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"style-number-input.vue2.mjs","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input\n v-model=\"form.number\"\n type=\"text\"\n :controls=\"false\"\n @input=\"emit('input', $event)\"\n >\n <template #prefix>\n <span\n class=\"w-resize\"\n :class=\"[`${props.direction}-resize`]\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :disabled=\"!props.tooltipContent\"\n :content=\"props.tooltipContent\"\n placement=\"top\"\n :open-delay=\"500\"\n >\n <dk-icon :icon=\"props.icon || 'Rank'\"></dk-icon>\n </el-tooltip>\n </span>\n </template>\n <template v-if=\"showUnit\" #append>\n <el-select v-model=\"form.unit\" style=\"width: 40px\" suffix-icon=\"\">\n <el-option\n v-for=\"(item, index) in units\"\n :key=\"index\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </template>\n </el-input>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { styleNumberInputProps } from './props'\nimport { reactive, ref, watch } from 'vue'\nimport { splitUnit } from '@vipl520/utils'\n\n\nconst props = defineProps(styleNumberInputProps)\nconst values = splitUnit(props.modelValue, props.units)\nconst form: any = reactive({\n number: values.number,\n unit: values.unit || 'px',\n})\n\nconst isDragging = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst startY = ref(0) // 开始的Y坐标\nconst startX = ref(0) // 开始的X坐标\nconst handleMouseDown = (event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n startY.value = event.clientY\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n let increment\n if (props.direction === 'horizontal') {\n const dx = event.clientX - startX.value\n increment = Math.floor(dx / 10)\n startX.value += increment * 10\n } else if (props.direction === 'vertical') {\n const dy = event.clientY - startY.value\n increment = Math.floor(dy / 10)\n startY.value += increment * 10\n }\n form.number = parseInt(form.number + increment)\n }\n}\n\nconst handleMouseUp = () => {\n console.log('up')\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n}\nconst emit = defineEmits(['input', 'update:modelValue'])\n\nwatch(\n () => form,\n () => {\n if (form.number === '') {\n emit('update:modelValue', '')\n } else {\n emit('update:modelValue', form.number + form.unit)\n }\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n const values = splitUnit(props.modelValue, props.units)\n form.number = values.number\n form.unit = values.unit ||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A;AAAA,MACE,MAAM,IAAA;AAAA,MACN,MAAM;AACJ,QAAI,IAAA,IAAA,CAAK,WAAW,EAAI,EAAA;AACtB,UAAA,IAAA,CAAK,qBAAqB,EAAE,CAAA,CAAA;AAAA,SACvB,MAAA;AACL,UAAA,IAAA,CAAK,mBAAqB,EAAA,IAAA,CAAK,MAAS,GAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,SACnD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAMC,OAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,QAAA,IAAA,CAAK,SAASA,OAAO,CAAA,MAAA,CAAA;AACrB,QAAK,IAAA,CAAA,IAAA,GAAOA,QAAO,IAAQ,IAAA,IAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-number-input.vue2.mjs","sources":["../../../src/style-number-input/src/style-number-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleNumberInput',\n});\n</script>\n<template>\n <div :class=\"['dk-style-number-input', props.direction]\">\n <el-input v-model=\"form.number\" type=\"text\" :controls=\"false\" @input=\"emit('input', $event)\">\n <template #prefix>\n <span\n class=\"w-resize\"\n :class=\"[`${props.direction}-resize`]\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :disabled=\"!props.tooltipContent\"\n :content=\"props.tooltipContent\"\n placement=\"top\"\n :open-delay=\"500\"\n >\n <dk-icon :icon=\"props.icon || 'Rank'\"></dk-icon>\n </el-tooltip>\n </span>\n </template>\n <template v-if=\"showUnit\" #append>\n <el-select v-model=\"form.unit\" style=\"width: 40px\" suffix-icon=\"\">\n <el-option v-for=\"(item, index) in units\" :key=\"index\" :label=\"item\" :value=\"item\" />\n </el-select>\n </template>\n </el-input>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { styleNumberInputProps } from './props'\nimport { reactive, ref, watch } from 'vue'\nimport { splitUnit } from '@vipl520/utils'\n\n\nconst props = defineProps(styleNumberInputProps)\nconst values = splitUnit(props.modelValue, props.units)\nconst form: any = reactive({\n number: values.number,\n unit: values.unit || 'px',\n})\n\nconst isDragging = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst startY = ref(0) // 开始的Y坐标\nconst startX = ref(0) // 开始的X坐标\nconst handleMouseDown = (event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n startY.value = event.clientY\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n let increment\n if (props.direction === 'horizontal') {\n const dx = event.clientX - startX.value\n increment = Math.floor(dx / 10)\n startX.value += increment * 10\n } else if (props.direction === 'vertical') {\n const dy = event.clientY - startY.value\n increment = Math.floor(dy / 10)\n startY.value += increment * 10\n }\n form.number = parseInt(form.number + increment)\n }\n}\n\nconst handleMouseUp = () => {\n console.log('up')\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n}\nconst emit = defineEmits(['input', 'update:modelValue'])\n\nwatch(\n () => form,\n () => {\n if (form.number === '') {\n emit('update:modelValue', '')\n } else {\n emit('update:modelValue', form.number + form.unit)\n }\n },\n {\n deep: true,\n }\n)\n\nwatch(\n () => props.modelValue,\n () => {\n const values = splitUnit(props.modelValue, props.units)\n form.number = values.number\n form.unit = values.unit || 'px'\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","values"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAyCD,IAAA,MAAM,MAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,IAAA,MAAM,OAAY,QAAS,CAAA;AAAA,MACzB,QAAQ,MAAO,CAAA,MAAA;AAAA,MACf,IAAA,EAAM,OAAO,IAAQ,IAAA,IAAA;AAAA,KACtB,CAAA,CAAA;AAED,IAAM,MAAA,UAAA,GAAa,IAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,eAAA,GAAuB,IAAI,IAAI,CAAA,CAAA;AACrC,IAAM,MAAA,eAAA,GAAuB,IAAI,IAAI,CAAA,CAAA;AACrC,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,eAAA,GAAkB,CAAC,KAAe,KAAA;AACtC,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AACnB,MAAA,MAAA,CAAO,QAAQ,KAAM,CAAA,OAAA,CAAA;AACrB,MAAA,MAAA,CAAO,QAAQ,KAAM,CAAA,OAAA,CAAA;AACrB,MAAgB,eAAA,CAAA,KAAA,GAAQ,eAAgB,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAClD,MAAgB,eAAA,CAAA,KAAA,GAAQ,aAAc,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAChD,MAAS,QAAA,CAAA,gBAAA,CAA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CAAA,CAAA;AAC7D,MAAS,QAAA,CAAA,IAAA,CAAK,MAAM,MAAS,GAAA,SAAA,CAAA;AAC7B,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAGA,IAAA,KAAA;AAAA,MACE,MAAM,IAAA;AAAA,MACN,MAAM;AACJ,QAAI,IAAA,IAAA,CAAK,WAAW,EAAI,EAAA;AACtB,UAAA,IAAA,CAAK,qBAAqB,EAAE,CAAA,CAAA;AAAA,SACvB,MAAA;AACL,UAAA,IAAA,CAAK,mBAAqB,EAAA,IAAA,CAAK,MAAS,GAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,SACnD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAA,MAAMC,OAAS,GAAA,SAAA,CAAU,KAAM,CAAA,UAAA,EAAY,MAAM,KAAK,CAAA,CAAA;AACtD,QAAA,IAAA,CAAK,SAASA,OAAO,CAAA,MAAA,CAAA;AACrB,QAAK,IAAA,CAAA,IAAA,GAAOA,QAAO,IAAQ,IAAA,IAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -181,10 +181,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
181
181
  }, {
182
182
  default: withCtx(() => [
183
183
  createElementVNode("span", {
184
- style: normalizeStyle([
185
- { "cursor": "pointer" },
186
- form.value[item.value] ? "color:var(--el-color-primary)" : ""
187
- ]),
184
+ style: normalizeStyle([{ "cursor": "pointer" }, form.value[item.value] ? "color:var(--el-color-primary)" : ""]),
188
185
  onClick: ($event) => form.value[item.value] = ""
189
186
  }, toDisplayString(item.label) + "\uFF1A", 13, _hoisted_2)
190
187
  ]),