@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
@@ -0,0 +1,8 @@
1
+ import { withInstall } from '@vipl520/utils';
2
+ import _UniIconInput from './src/uni-icon-input.vue.mjs';
3
+ export { uniIconInputProps } from './src/props.mjs';
4
+
5
+ const UniIconInput = withInstall(_UniIconInput);
6
+
7
+ export { UniIconInput, UniIconInput as default };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/uni-icon-input/index.ts"],"sourcesContent":["import { withInstall } from '@vipl520/utils'\nimport _UniIconInput from './src/uni-icon-input.vue'\n\nexport const UniIconInput = withInstall(_UniIconInput)\nexport default UniIconInput\n\nexport * from './src/props'\n"],"names":[],"mappings":";;;;AAGa,MAAA,YAAA,GAAe,YAAY,aAAa;;;;"}
@@ -0,0 +1,11 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ export declare const uniIconInputProps: {
3
+ /**
4
+ * 类型定义
5
+ */
6
+ type: {
7
+ type: import("vue").PropType<string>;
8
+ default: string;
9
+ };
10
+ };
11
+ export type UniIconInputProps = ExtractPropTypes<typeof uniIconInputProps>;
@@ -0,0 +1,11 @@
1
+ import { makeStringProp } from 'vant/es/utils';
2
+
3
+ const uniIconInputProps = {
4
+ /**
5
+ * 类型定义
6
+ */
7
+ type: makeStringProp("")
8
+ };
9
+
10
+ export { uniIconInputProps };
11
+ //# sourceMappingURL=props.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.mjs","sources":["../../../src/uni-icon-input/src/props.ts"],"sourcesContent":["import { makeStringProp } from 'vant/es/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const uniIconInputProps = {\n /**\n * 类型定义\n */\n type: makeStringProp(''),\n}\n\nexport type UniIconInputProps = ExtractPropTypes<typeof uniIconInputProps>\n"],"names":[],"mappings":";;AAGO,MAAM,iBAAoB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI/B,IAAA,EAAM,eAAe,EAAE,CAAA;AACzB;;;;"}
@@ -0,0 +1,16 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ default: string;
4
+ type: StringConstructor;
5
+ };
6
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
+ modelValue: {
8
+ default: string;
9
+ type: StringConstructor;
10
+ };
11
+ }>> & {
12
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
13
+ }, {
14
+ modelValue: string;
15
+ }, {}>;
16
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import _sfc_main from './uni-icon-input.vue2.mjs';
2
+ import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
3
+
4
+ var _UniIconInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\uni-icon-input\\src\\uni-icon-input.vue"]]);
5
+
6
+ export { _UniIconInput as default };
7
+ //# sourceMappingURL=uni-icon-input.vue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uni-icon-input.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,112 @@
1
+ import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, createCommentVNode, Fragment, renderList, unref, createBlock, createElementVNode } from 'vue';
2
+ import { fontData } from '../../uni-icon/style/uniicons_file_vue.mjs';
3
+
4
+ const _hoisted_1 = { class: "dk-uni-icon-input" };
5
+ const _hoisted_2 = {
6
+ key: 0,
7
+ class: "uni-icon-content"
8
+ };
9
+ const _hoisted_3 = { class: "hover:border-blue border-1px border-solid border-white cursor-pointer hover:color-blue" };
10
+ const __default__ = defineComponent({
11
+ name: "DkUniIconInput"
12
+ });
13
+ var _sfc_main = /* @__PURE__ */ defineComponent({
14
+ ...__default__,
15
+ props: {
16
+ modelValue: {
17
+ default: "",
18
+ type: String
19
+ }
20
+ },
21
+ emits: ["update:modelValue"],
22
+ setup(__props, { emit }) {
23
+ const props = __props;
24
+ const show = ref(false);
25
+ const icon = ref(props.modelValue);
26
+ const updateIcon = (value) => {
27
+ icon.value = value;
28
+ emit("update:modelValue", value);
29
+ show.value = false;
30
+ };
31
+ return (_ctx, _cache) => {
32
+ const _component_el_button = resolveComponent("el-button");
33
+ const _component_el_input = resolveComponent("el-input");
34
+ const _component_DkUniIcon = resolveComponent("DkUniIcon");
35
+ const _component_el_col = resolveComponent("el-col");
36
+ const _component_el_row = resolveComponent("el-row");
37
+ const _component_el_dialog = resolveComponent("el-dialog");
38
+ return openBlock(), createElementBlock("div", _hoisted_1, [
39
+ createVNode(_component_el_input, {
40
+ modelValue: icon.value,
41
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => icon.value = $event)
42
+ }, {
43
+ append: withCtx(() => [
44
+ createVNode(_component_el_button, {
45
+ onClick: _cache[0] || (_cache[0] = ($event) => show.value = true)
46
+ }, {
47
+ default: withCtx(() => [
48
+ createTextVNode("\u9009\u62E9")
49
+ ]),
50
+ _: 1
51
+ /* STABLE */
52
+ })
53
+ ]),
54
+ _: 1
55
+ /* STABLE */
56
+ }, 8, ["modelValue"]),
57
+ icon.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
58
+ createVNode(_component_DkUniIcon, {
59
+ type: icon.value,
60
+ size: 48
61
+ }, null, 8, ["type"])
62
+ ])) : createCommentVNode("v-if", true),
63
+ createVNode(_component_el_dialog, {
64
+ modelValue: show.value,
65
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => show.value = $event),
66
+ title: "\u9009\u62E9\u56FE\u6807",
67
+ width: "1000px"
68
+ }, {
69
+ default: withCtx(() => [
70
+ createVNode(_component_el_row, { gutter: 20 }, {
71
+ default: withCtx(() => [
72
+ (openBlock(true), createElementBlock(
73
+ Fragment,
74
+ null,
75
+ renderList(unref(fontData).length, (key) => {
76
+ return openBlock(), createBlock(_component_el_col, {
77
+ key,
78
+ span: 2,
79
+ onClick: ($event) => updateIcon(unref(fontData)[key]?.font_class)
80
+ }, {
81
+ default: withCtx(() => [
82
+ createElementVNode("div", _hoisted_3, [
83
+ createVNode(_component_DkUniIcon, {
84
+ type: unref(fontData)[key]?.font_class,
85
+ size: 36,
86
+ color: "#666",
87
+ class: "p2"
88
+ }, null, 8, ["type"])
89
+ ])
90
+ ]),
91
+ _: 2
92
+ /* DYNAMIC */
93
+ }, 1032, ["onClick"]);
94
+ }),
95
+ 128
96
+ /* KEYED_FRAGMENT */
97
+ ))
98
+ ]),
99
+ _: 1
100
+ /* STABLE */
101
+ })
102
+ ]),
103
+ _: 1
104
+ /* STABLE */
105
+ }, 8, ["modelValue"])
106
+ ]);
107
+ };
108
+ }
109
+ });
110
+
111
+ export { _sfc_main as default };
112
+ //# sourceMappingURL=uni-icon-input.vue2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uni-icon-input.vue2.mjs","sources":["../../../src/uni-icon-input/src/uni-icon-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUniIconInput',\n});\n</script>\n<template>\n <div class=\"dk-uni-icon-input\">\n <el-input v-model=\"icon\">\n <template #append>\n <el-button @click=\"show = true\">选择</el-button>\n </template>\n </el-input>\n <div v-if=\"icon\" class=\"uni-icon-content\">\n <DkUniIcon :type=\"icon\" :size=\"48\"></DkUniIcon>\n </div>\n <el-dialog v-model=\"show\" title=\"选择图标\" width=\"1000px\">\n <el-row :gutter=\"20\">\n <el-col v-for=\"key in fontData.length\" :key=\"key\" :span=\"2\" @click=\"updateIcon(fontData[key]?.font_class)\">\n <div class=\"hover:border-blue border-1px border-solid border-white cursor-pointer hover:color-blue\">\n <DkUniIcon :type=\"fontData[key]?.font_class\" :size=\"36\" color=\"#666\" class=\"p2\"></DkUniIcon>\n </div>\n </el-col>\n </el-row>\n </el-dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { fontData } from '../../uni-icon/style/uniicons_file_vue.js'\n\n\nconst show = ref(false)\nconst props = defineProps({\n modelValue: {\n default: '',\n type: String,\n },\n})\n\nconst emit = defineEmits(['update:modelValue'])\nconst icon = ref(props.modelValue)\n\nconst updateIcon = (value: string) => {\n icon.value = value\n emit('update:modelValue', value)\n show.value = false\n}\n</script>\n\n<style></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;AA6BD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AAStB,IAAM,MAAA,IAAA,GAAO,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEjC,IAAM,MAAA,UAAA,GAAa,CAAC,KAAkB,KAAA;AACpC,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AACb,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ .dk-uni-icon-input .uni-icon-content{margin-top:5px;border:1px solid #ccc;width:80px;height:80px;display:flex;align-items:center;justify-content:center}
@@ -0,0 +1,13 @@
1
+ /* stylelint-disable */
2
+ .dk-uni-icon-input {
3
+ .uni-icon-content {
4
+ margin-top: 5px;
5
+ border: 1px solid #ccc;
6
+ width: 80px;
7
+ height: 80px;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+ }
13
+ /* stylelint-enable */
@@ -1 +1 @@
1
- {"version":3,"file":"video-list-input.vue2.mjs","sources":["../../../src/video-list-input/src/video-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkVideoListInput',\n});\n</script>\n<template>\n <dk-file-list-input\n v-bind=\"$props\"\n v-model=\"input\"\n :class=\"bem()\"\n :type=\"3\"\n @change=\"handleInput(input)\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { videoListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('video-list-input')\n\n\n\nconst props = defineProps(videoListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQ,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"video-list-input.vue2.mjs","sources":["../../../src/video-list-input/src/video-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkVideoListInput',\n});\n</script>\n<template>\n <dk-file-list-input v-bind=\"$props\" v-model=\"input\" :class=\"bem()\" :type=\"3\" @change=\"handleInput(input)\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { videoListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('video-list-input')\n\n\n\nconst props = defineProps(videoListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAUD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQ,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"animate-select.vue2.js","sources":["../../../src/animate-select/src/animate-select.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAnimateSelect',\n});\n</script>\n<template>\n <div class=\"dk-animate-select\">\n <el-button-group>\n <el-button\n :type=\"!value ? 'primary' : 'danger'\"\n plain\n @click=\"show = true\"\n >{{ !value ? '请选择动画' : '已选择动画' }}</el-button\n >\n <el-button\n icon=\"Delete\"\n :disabled=\"!value\"\n :type=\"!value ? 'primary' : 'danger'\"\n plain\n @click=\"value = ''\"\n ></el-button>\n </el-button-group>\n\n <dk-dialog v-model=\"show\" title=\"选择动画\" width=\"800px\">\n <div class=\"dk-animate-content\">\n <!--预览区-->\n <div class=\"animate-preview\">\n <el-card\n :class=\"['animate__' + value]\"\n :style=\"{\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: '1',\n }\"\n >\n 预览区\n </el-card>\n </div>\n <!--选择区-->\n <div class=\"animate-list\">\n <el-tabs v-model=\"tabType\" class=\"demo-tabs\">\n <el-tab-pane\n v-for=\"(item, key) in Animates\"\n :key=\"key\"\n :label=\"item.label\"\n :name=\"item.name\"\n >\n <ul class=\"cl\">\n <li\n v-for=\"(a, k) in item.animate\"\n :key=\"k\"\n :class=\"value == a.value ? 'choose' : ''\"\n @click=\"chooseAnimate(a.value)\"\n >\n {{ a.label }}\n </li>\n </ul>\n </el-tab-pane>\n </el-tabs>\n </div>\n </div>\n <div class=\"text-center p10px\">\n <el-button type=\"primary\" style=\"width: 220px\" @click=\"show = false\"\n >确定</el-button\n >\n </div>\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { animateSelectProps } from './props'\nimport Animates from './animates'\nimport { ref, watch } from 'vue'\n\n\nconst props = defineProps(animateSelectProps)\nconst tabType = ref('loop')\nconst show = ref(false)\nconst value = ref(props.modelValue)\nconst chooseAnimate = (val: any) => {\n value.value = val\n}\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n value.value = val\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('change', val)\n emit('update:modelValue', val)\n emit('input', val)\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","ref","watch"],"mappings":";;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0ED,IAAM,MAAA,OAAA,GAAUC,QAAI,MAAM,CAAA,CAAA;AAC1B,IAAM,MAAA,IAAA,GAAOA,QAAI,KAAK,CAAA,CAAA;AACtB,IAAM,MAAA,KAAA,GAAQA,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,aAAA,GAAgB,CAAC,GAAa,KAAA;AAClC,MAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,KAChB,CAAA;AAGA,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AACA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAClB,QAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,QAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,OACnB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"animate-select.vue2.js","sources":["../../../src/animate-select/src/animate-select.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAnimateSelect',\n});\n</script>\n<template>\n <div class=\"dk-animate-select\">\n <el-button-group>\n <el-button :type=\"!value ? 'primary' : 'danger'\" plain @click=\"show = true\">{{\n !value ? '请选择动画' : '已选择动画'\n }}</el-button>\n <el-button\n icon=\"Delete\"\n :disabled=\"!value\"\n :type=\"!value ? 'primary' : 'danger'\"\n plain\n @click=\"value = ''\"\n ></el-button>\n </el-button-group>\n\n <dk-dialog v-model=\"show\" title=\"选择动画\" width=\"800px\">\n <div class=\"dk-animate-content\">\n <!--预览区-->\n <div class=\"animate-preview\">\n <el-card\n :class=\"['animate__' + value]\"\n :style=\"{\n animationDelay: '0s',\n animationDuration: '1s',\n animationIterationCount: '1',\n }\"\n >\n 预览区\n </el-card>\n </div>\n <!--选择区-->\n <div class=\"animate-list\">\n <el-tabs v-model=\"tabType\" class=\"demo-tabs\">\n <el-tab-pane v-for=\"(item, key) in Animates\" :key=\"key\" :label=\"item.label\" :name=\"item.name\">\n <ul class=\"cl\">\n <li\n v-for=\"(a, k) in item.animate\"\n :key=\"k\"\n :class=\"value == a.value ? 'choose' : ''\"\n @click=\"chooseAnimate(a.value)\"\n >\n {{ a.label }}\n </li>\n </ul>\n </el-tab-pane>\n </el-tabs>\n </div>\n </div>\n <div class=\"text-center p10px\">\n <el-button type=\"primary\" style=\"width: 220px\" @click=\"show = false\">确定</el-button>\n </div>\n </dk-dialog>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { animateSelectProps } from './props'\nimport Animates from './animates'\nimport { ref, watch } from 'vue'\n\n\nconst props = defineProps(animateSelectProps)\nconst tabType = ref('loop')\nconst show = ref(false)\nconst value = ref(props.modelValue)\nconst chooseAnimate = (val: any) => {\n value.value = val\n}\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n value.value = val\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('change', val)\n emit('update:modelValue', val)\n emit('input', val)\n }\n)\n</script>\n"],"names":["__MACROS_defineComponent","ref","watch"],"mappings":";;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgED,IAAM,MAAA,OAAA,GAAUC,QAAI,MAAM,CAAA,CAAA;AAC1B,IAAM,MAAA,IAAA,GAAOA,QAAI,KAAK,CAAA,CAAA;AACtB,IAAM,MAAA,KAAA,GAAQA,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,aAAA,GAAgB,CAAC,GAAa,KAAA;AAClC,MAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,KAChB,CAAA;AAGA,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AACA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAClB,QAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,QAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AAAA,OACnB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.js","sources":["../../src/api/attachment.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\n/** ************************************************************** 附件 ***************************************************************/\n\n// 获取附件列表\nexport function getAttachmentList(\n page: number,\n size: number,\n type: number = 1,\n groupId: number,\n search: any\n) {\n search.group_id = groupId\n search.type = type\n return request({\n method: 'post',\n url: '/adminapi/attachment/list',\n data: { page, size, search },\n })\n}\n\n// 上传附件\n// export function UploadAttachment(page, size, type = 1, groupId, search) {\n// return request({\n// method: 'post',\n// url: '/adminapi/attachment/upload',\n// data: { page, size, type, groupId, search }\n// })\n// }\n\n// 上传附件\nexport function UploadAttachment(file: any, type = 1, groupId = 0) {\n const formData = new FormData()\n formData.append('file', file)\n formData.append('type', type.toString())\n formData.append('file', 'file')\n formData.append('group_id', groupId.toString())\n return request({\n method: 'post',\n url: '/adminapi/attachment/upload',\n data: formData,\n })\n}\n\n// 获取编辑表单\nexport function getAttachmentEdit(id: number) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/index/' + id + '/edit',\n })\n}\n\nexport function deleteAttachment(ids: number[]) {\n return request(\n {\n method: 'post',\n url: '/adminapi/attachment/delete',\n data: { ids },\n },\n {\n code_success_show: true,\n }\n )\n}\n\nexport function moveAttachment(ids: number[], groupId: number) {\n return request({\n method: 'post',\n url: '/adminapi/attachment/move',\n data: { ids, group_id: groupId },\n })\n}\n\n/** ************************************************************** 附件分组 ***************************************************************/\n\n// 获取附件分组\nexport function getAttachmentGroupList(type: number) {\n return request(\n {\n method: 'get',\n url: '/adminapi/attachment/group',\n params: { type },\n },\n {\n code_error_show: true,\n }\n )\n}\n\n// 获取表单\nexport function getAttachmentGroupForm(id: number) {\n if (id) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/' + id + '/edit',\n })\n } else {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/create',\n })\n }\n}\n\n// 删除分组\nexport function delAttachmentGroup(id: number) {\n return request(\n {\n method: 'delete',\n url: '/adminapi/attachment/group/' + id,\n },\n {\n code_error_show: true,\n }\n )\n}\n"],"names":["request"],"mappings":";;;;AAKO,SAAS,kBACd,IACA,EAAA,IAAA,EACA,IAAe,GAAA,CAAA,EACf,SACA,MACA,EAAA;AACA,EAAA,MAAA,CAAO,QAAW,GAAA,OAAA,CAAA;AAClB,EAAA,MAAA,CAAO,IAAO,GAAA,IAAA,CAAA;AACd,EAAA,OAAOA,aAAQ,CAAA;AAAA,IACb,MAAQ,EAAA,MAAA;AAAA,IACR,GAAK,EAAA,2BAAA;AAAA,IACL,IAAM,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,MAAO,EAAA;AAAA,GAC5B,CAAA,CAAA;AACH,CAAA;AAYO,SAAS,gBAAiB,CAAA,IAAA,EAAW,IAAO,GAAA,CAAA,EAAG,UAAU,CAAG,EAAA;AACjE,EAAM,MAAA,QAAA,GAAW,IAAI,QAAS,EAAA,CAAA;AAC9B,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA,CAAA;AAC5B,EAAA,QAAA,CAAS,MAAO,CAAA,MAAA,EAAQ,IAAK,CAAA,QAAA,EAAU,CAAA,CAAA;AACvC,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,MAAM,CAAA,CAAA;AAC9B,EAAA,QAAA,CAAS,MAAO,CAAA,UAAA,EAAY,OAAQ,CAAA,QAAA,EAAU,CAAA,CAAA;AAC9C,EAAA,OAAOA,aAAQ,CAAA;AAAA,IACb,MAAQ,EAAA,MAAA;AAAA,IACR,GAAK,EAAA,6BAAA;AAAA,IACL,IAAM,EAAA,QAAA;AAAA,GACP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AQ,EAAA,KAAA;AAAA,MACR,GAAK,EAAA,mCAAA;AAAA,KACN,CAAA,CAAA;AAAA,GACH;AACF,CAAA;AAGO,SAAS,mBAAmB,EAAY,EAAA;AAC7C,EAAO,OAAAA,aAAA;AAAA,IACL;AAAA,MACE,MAAQ,EAAA,QAAA;AAAA,MACR,KAAK,6BAAgC,GAAA,EAAA;AAAA,KACvC;AAAA,IACA;AAAA,MACE,eAAiB,EAAA,IAAA;AAAA,KACnB;AAAA,GACF,CAAA;AACF;;;;;;;;;;;"}
1
+ {"version":3,"file":"attachment.js","sources":["../../src/api/attachment.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\n/** ************************************************************** 附件 ***************************************************************/\n\n// 获取附件列表\nexport function getAttachmentList(page: number, size: number, type: number = 1, groupId: number, search: any) {\n search.group_id = groupId\n search.type = type\n return request({\n method: 'post',\n url: '/adminapi/attachment/list',\n data: { page, size, search },\n })\n}\n\n// 上传附件\n// export function UploadAttachment(page, size, type = 1, groupId, search) {\n// return request({\n// method: 'post',\n// url: '/adminapi/attachment/upload',\n// data: { page, size, type, groupId, search }\n// })\n// }\n\n// 上传附件\nexport function UploadAttachment(file: any, type = 1, groupId = 0) {\n const formData = new FormData()\n formData.append('file', file)\n formData.append('type', type.toString())\n formData.append('file', 'file')\n formData.append('group_id', groupId.toString())\n return request({\n method: 'post',\n url: '/adminapi/attachment/upload',\n data: formData,\n })\n}\n\n// 获取编辑表单\nexport function getAttachmentEdit(id: number) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/index/' + id + '/edit',\n })\n}\n\nexport function deleteAttachment(ids: number[]) {\n return request(\n {\n method: 'post',\n url: '/adminapi/attachment/delete',\n data: { ids },\n },\n {\n code_success_show: true,\n }\n )\n}\n\nexport function moveAttachment(ids: number[], groupId: number) {\n return request({\n method: 'post',\n url: '/adminapi/attachment/move',\n data: { ids, group_id: groupId },\n })\n}\n\n/** ************************************************************** 附件分组 ***************************************************************/\n\n// 获取附件分组\nexport function getAttachmentGroupList(type: number) {\n return request(\n {\n method: 'get',\n url: '/adminapi/attachment/group',\n params: { type },\n },\n {\n code_error_show: true,\n }\n )\n}\n\n// 获取表单\nexport function getAttachmentGroupForm(id: number) {\n if (id) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/' + id + '/edit',\n })\n } else {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/create',\n })\n }\n}\n\n// 删除分组\nexport function delAttachmentGroup(id: number) {\n return request(\n {\n method: 'delete',\n url: '/adminapi/attachment/group/' + id,\n },\n {\n code_error_show: true,\n }\n )\n}\n"],"names":["request"],"mappings":";;;;AAKO,SAAS,kBAAkB,IAAc,EAAA,IAAA,EAAc,IAAe,GAAA,CAAA,EAAG,SAAiB,MAAa,EAAA;AAC5G,EAAA,MAAA,CAAO,QAAW,GAAA,OAAA,CAAA;AAClB,EAAA,MAAA,CAAO,IAAO,GAAA,IAAA,CAAA;AACd,EAAA,OAAOA,aAAQ,CAAA;AAAA,IACb,MAAQ,EAAA,MAAA;AAAA,IACR,GAAK,EAAA,2BAAA;AAAA,IACL,IAAM,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,MAAO,EAAA;AAAA,GAC5B,CAAA,CAAA;AACH,CAAA;AAYO,SAAS,gBAAiB,CAAA,IAAA,EAAW,IAAO,GAAA,CAAA,EAAG,UAAU,CAAG,EAAA;AACjE,EAAM,MAAA,QAAA,GAAW,IAAI,QAAS,EAAA,CAAA;AAC9B,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA,CAAA;AAC5B,EAAA,QAAA,CAAS,MAAO,CAAA,MAAA,EAAQ,IAAK,CAAA,QAAA,EAAU,CAAA,CAAA;AACvC,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,MAAM,CAAA,CAAA;AAC9B,EAAA,QAAA,CAAS,MAAO,CAAA,UAAA,EAAY,OAAQ,CAAA,QAAA,EAAU,CAAA,CAAA;AAC9C,EAAA,OAAOA,aAAQ,CAAA;AAAA,IAC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AA;AAAA,KAC3C,CAAA,CAAA;AAAA,GACI,MAAA;AACL,IAAA,OAAOA,aAAQ,CAAA;AAAA,MACb,MAAQ,EAAA,KAAA;AAAA,MACR,GAAK,EAAA,mCAAA;AAAA,KACN,CAAA,CAAA;AAAA,GACH;AACF,CAAA;AAGO,SAAS,mBAAmB,EAAY,EAAA;AAC7C,EAAO,OAAAA,aAAA;AAAA,IACL;AAAA,MACE,MAAQ,EAAA,QAAA;AAAA,MACR,KAAK,6BAAgC,GAAA,EAAA;AAAA,KACvC;AAAA,IACA;AAAA,MACE,eAAiB,EAAA,IAAA;AAAA,KACnB;AAAA,GACF,CAAA;AACF;;;;;;;;;;;"}
@@ -214,13 +214,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
214
214
  const onGetAttachmentList = async (search = {}) => {
215
215
  clearChoose();
216
216
  try {
217
- const res = await attachment.getAttachmentList(
218
- page.value,
219
- size.value,
220
- _type.value,
221
- groupId.value,
222
- search
223
- );
217
+ const res = await attachment.getAttachmentList(page.value, size.value, _type.value, groupId.value, search);
224
218
  list.value = res.data;
225
219
  count.value = res.msg;
226
220
  loading.value = false;
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.vue2.js","sources":["../../../src/attachment/src/attachment.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAttachment',\n});\n</script>\n<template>\n <div class=\"dk-attachment attachment\">\n <!-- 顶部-->\n <div class=\"attachment-header flex justify-between pt-5px pb-5px\">\n <div class=\"header-form z\">\n <el-input\n v-model=\"searchFileName\"\n placeholder=\"请输入附件名称\"\n class=\"input-with-select\"\n >\n <template #append>\n <el-button :icon=\"Search\" />\n </template>\n </el-input>\n </div>\n <div class=\"header-button y\">\n <el-dropdown class=\"mr\" trigger=\"click\" @command=\"handleMoveAttachment\">\n <el-button type=\"info\" :disabled=\"chooseFileKey.length <= 0\">\n 移动\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item\n v-for=\"(item, key) in groupList\"\n :key=\"key\"\n :command=\"item.id\"\n >\n {{ item.name }}\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-button\n type=\"danger\"\n :disabled=\"chooseFileKey.length <= 0\"\n @click=\"onDelete\"\n >删除<i class=\"el-icon-delete el-icon--right\"></i\n ></el-button>\n <el-upload\n ref=\"upload\"\n class=\"dk-upload-button\"\n :action=\"uploadUrl\"\n multiple\n :data=\"data\"\n :show-file-list=\"false\"\n :headers=\"headers\"\n :on-success=\"handleUploadSuccess\"\n :accept=\"_accept\"\n list-type=\"text\"\n >\n <el-button type=\"primary\"\n >上传<i class=\"el-icon-upload el-icon--right\"></i\n ></el-button>\n </el-upload>\n </div>\n </div>\n <!--内部-->\n <div class=\"attachment-content flex\">\n <!-- 分组-->\n <div class=\"attachment-group\">\n <h5\n class=\"cursor-pointer flex items-center content-center\"\n @click=\"addGroup()\"\n >\n 附件分组\n <el-icon class=\"m-l-5px\"><CirclePlusFilled /></el-icon>\n </h5>\n <ul class=\"group_list\">\n <li\n v-for=\"(item, key) in groupList\"\n :key=\"key\"\n :class=\"{ active: groupId === item.id }\"\n @click=\"selectGroup(item.id)\"\n >\n <dk-icon\n v-if=\"item.id === groupId\"\n icon=\"flat-color-icons:opened-folder\"\n />\n <dk-icon v-else icon=\"flat-color-icons:folder\" />\n\n <span class=\"ml-10px\">{{ item.name }}</span>\n\n <el-popover placement=\"right\" trigger=\"click\">\n <template #reference>\n <div class=\"op\">\n <el-icon v-if=\"item.id > 0\">\n <Tools />\n </el-icon>\n </div>\n </template>\n <template #default>\n <el-button size=\"small\" type=\"primary\" @click.stop=\"editGroup()\"\n >编辑\n </el-button>\n <el-button size=\"small\" type=\"danger\" @click=\"delGroup(item.id)\"\n >删除</el-button\n >\n </template>\n </el-popover>\n </li>\n </ul>\n </div>\n <!-- 列表-->\n <div class=\"attachment-container\">\n <div v-if=\"loading || list.length > 0\" v-loading=\"loading\" class=\"p2\">\n <ul\n class=\"attachment-list cl\"\n :style=\"{ overflow: list.length > 10 ? 'auto' : '' }\"\n >\n <li\n v-for=\"(item, key) in list\"\n :key=\"key\"\n :class=\"{ choose: chooseFileKey.indexOf(key) > -1 }\"\n @click=\"chooseAttachment(item, key)\"\n @contextmenu.prevent=\"contextMenuId = item.id\"\n >\n <div class=\"file\">\n <el-image\n v-if=\"item.type === 1\"\n class=\"file\"\n :src=\"item.url\"\n fit=\"contain\"\n >\n <template #placeholder>\n <div class=\"u-m-t-30\">\n <i class=\"el-icon-loading\"></i>\n <span>加载中</span>\n </div>\n </template>\n </el-image>\n <div v-if=\"item.type === 2\">\n <dk-file-icon :file-name=\"item.filename\" :type=\"item.type\" />\n </div>\n <div v-if=\"item.type === 3\">\n <dk-file-icon :file-name=\"item.filename\" :type=\"item.type\" />\n </div>\n <div v-if=\"item.type === 0\">\n <dk-file-icon :file-name=\"item.filename\" />\n </div>\n </div>\n <div class=\"file-name over\">{{ item.name }}</div>\n <div class=\"right\">\n <el-icon>\n <Check />\n </el-icon>\n </div>\n </li>\n </ul>\n <div class=\"block p-10px\">\n <el-pagination\n :current-page=\"page\"\n layout=\"total, prev, pager, next, jumper,sizes\"\n :total=\"count\"\n :page-size=\"size\"\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n />\n </div>\n </div>\n <div\n v-else\n style=\"\n display: flex;\n align-items: center;\n justify-content: center;\n height: 340px;\n \"\n >\n <el-empty description=\"暂无数据\" />\n </div>\n <dk-form\n ref=\"groupForm\"\n :key=\"groupId\"\n :form-url=\"groupFormUrl\"\n :is-dialog=\"true\"\n @submit=\"onsubmit()\"\n />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, reactive, onMounted, computed } from 'vue'\nimport {\n deleteAttachment,\n getAttachmentGroupList,\n getAttachmentList,\n moveAttachment,\n delAttachmentGroup,\n} from '../../api'\n\nimport { ElMessage, ElMessageBox } from 'element-plus'\nimport DkFileIcon from './file-icon.vue'\n\nimport { Search } from '@element-plus/icons-vue'\n\nimport { getAttachmentType, getGlobalConfig } from '@vipl520/utils'\nimport { attachmentProps } from './props'\n\n\n\nconst props = defineProps(attachmentProps)\n\nconst _type = computed(() => {\n return getAttachmentType(props.type)\n})\n\n/** ****************顶部data****************/\n// 搜索的文件名\nconst searchFileName = ref('')\n// 选择文件Key\nconst chooseFileKey = ref<number[]>([])\n// 选中文件列表\nconst chooseFileList = ref<any[]>([])\n// 选中文件ID\nconst chooseFileId = ref<number[]>([])\nconst globalConfig = getGlobalConfig()\n// 上传的地址\nconst uploadUrl = globalConfig.ApiUrl + '/adminapi/attachment/upload'\nconst headers = {\n 'Access-Token': globalConfig.AccessToken,\n}\n// 上传的ref\nconst upload = ref()\n// 上传的数据\nconst data = reactive({\n type: _type.value,\n file: 'file',\n group_id: 0,\n})\n\n/** *****顶部的函数****************/\n\nconst handleMoveAttachment = (groupId: number) => {\n moveAttachment(chooseFileId.value, groupId).then((res) => {\n ElMessage.success(res.msg)\n onGetAttachmentList()\n })\n}\n\nconst handleUploadSuccess = (res: any) => {\n console.log('res', res)\n if (res.code === 0) {\n ElMessage.success(res.msg)\n // upload.value.clearFiles()\n onGetAttachmentList()\n } else {\n ElMessage.error(res.msg)\n }\n}\n\nconst _accept = computed(() => {\n let _accept = ''\n if (props.accept) {\n return props.accept\n } else {\n switch (_type.value) {\n case 0:\n break\n case 1:\n _accept = 'image/*'\n break\n case 2:\n _accept = 'audio/*'\n break\n case 3:\n _accept = 'video/*'\n break\n }\n return _accept\n }\n})\n\nconst onDelete = () => {\n // 改成element-plus\n ElMessageBox.confirm('此操作将永久删除文件, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n }).then(() => {\n try {\n deleteAttachment(chooseFileId.value)\n .then((res) => {\n console.log(res)\n onGetAttachmentList()\n })\n .catch((res) => {\n console.log('deleteAttachment error', res)\n })\n } catch (e) {\n console.log(e)\n }\n })\n}\n/** ****************分组data****************/\n// 分组列表\nconst groupList = ref<any>([])\n// 选中分组\n/** **********分组的函数****************/\n\nconst groupFormUrl = computed(() => {\n if (groupId.value === 0) {\n return {\n url: globalConfig.ApiUrl + '/adminapi/attachment/group/create',\n method: 'get',\n }\n } else {\n return {\n url:\n globalConfig.ApiUrl +\n '/adminapi/attachment/group/' +\n groupId.value +\n '/edit',\n method: 'get',\n }\n }\n})\n\nconst groupForm = ref()\n\nconst addGroup = () => {\n // TODO 添加文件分组\n groupId.value = 0\n groupForm.value.show()\n}\n\nconst delGroup = (id: number) => {\n // 改为Vue3\n ElMessageBox.confirm('此操作将永久删除该分组, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n }).then(() => {\n try {\n delAttachmentGroup(id)\n .then((res) => {\n ElMessage.success(res.msg)\n onsubmit()\n })\n .catch(() => {})\n } catch (e) {\n console.log(e)\n }\n })\n}\n\nconst editGroup = () => {\n groupForm.value.show()\n}\n\nconst onsubmit = () => {\n getGroupList()\n onGetAttachmentList()\n}\n\nconst selectGroup = (id: number) => {\n groupId.value = id\n page.value = 1\n onGetAttachmentList()\n}\n\nconst getGroupList = async () => {\n try {\n const res = await getAttachmentGroupList(_type.value)\n groupList.value = res.data\n } catch (e) {}\n}\n\n/** ****************附件列表*********************/\nconst loading = ref(true)\nconst list = ref<any>([])\nconst page = ref(1)\nconst count = ref(0)\nconst size = ref(10)\nconst contextMenuId = ref(0)\nconst groupId = ref(0)\n\n/** ***************列表函数*******************/\n\n// const editAttachment = () => {\n// // TODO 编辑附件\n// }\n\nconst handleSizeChange = (val: number) => {\n size.value = val\n onGetAttachmentList()\n}\n\n// 改变页码\nconst handleCurrentChange = (val: number) => {\n page.value = val\n onGetAttachmentList()\n}\nconst onGetAttachmentList = async (search = {}) => {\n clearChoose()\n try {\n const res = await getAttachmentList(\n page.value,\n size.value,\n _type.value,\n groupId.value,\n search\n )\n list.value = res.data\n count.value = res.msg\n loading.value = false\n } catch (e) {}\n}\n\nconst clearChoose = () => {\n chooseFileKey.value = []\n chooseFileId.value = []\n chooseFileList.value = []\n}\n\nconst chooseAttachment = (item: any, key: number) => {\n const index = chooseFileKey.value.indexOf(key)\n if (index > -1) {\n chooseFileKey.value.splice(index, 1)\n chooseFileId.value.splice(index, 1)\n chooseFileList.value.splice(index, 1)\n } else {\n chooseFileKey.value.push(key)\n chooseFileId.value.push(item.id)\n chooseFileList.value.push(item)\n }\n}\n\nonMounted(() => {\n getGroupList()\n onGetAttachmentList()\n})\n\ndefineExpose({\n chooseFileId,\n chooseFileKey,\n chooseFileList,\n clearChoose,\n})\n</script>\n"],"names":["__MACROS_defineComponent","computed","getAttachmentType","ref","getGlobalConfig","reactive","groupId","moveAttachment","ElMessage","_accept","ElMessageBox","deleteAttachment","delAttachmentGroup","getAttachmentGroupList","getAttachmentList","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA8MD,IAAM,MAAA,KAAA,GAAQC,aAAS,MAAM;AAC3B,MAAO,OAAAC,uBAAA,CAAkB,MAAM,IAAI,CAAA,CAAA;AAAA,KACpC,CAAA,CAAA;AAID,IAAM,MAAA,cAAA,GAAiBC,QAAI,EAAE,CAAA,CAAA;AAE7B,IAAM,MAAA,aAAA,GAAgBA,OAAc,CAAA,EAAE,CAAA,CAAA;AAEtC,IAAM,MAAA,cAAA,GAAiBA,OAAW,CAAA,EAAE,CAAA,CAAA;AAEpC,IAAM,MAAA,YAAA,GAAeA,OAAc,CAAA,EAAE,CAAA,CAAA;AACrC,IAAA,MAAM,eAAeC,qBAAgB,EAAA,CAAA;AAErC,IAAM,MAAA,SAAA,GAAY,aAAa,MAAS,GAAA,6BAAA,CAAA;AACxC,IAAA,MA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AA,CAAA;AACb,MAAoB,mBAAA,EAAA,CAAA;AAAA,KACrB,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,YAAA;AAAA,MACA,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"attachment.vue2.js","sources":["../../../src/attachment/src/attachment.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAttachment',\n});\n</script>\n<template>\n <div class=\"dk-attachment attachment\">\n <!-- 顶部-->\n <div class=\"attachment-header flex justify-between pt-5px pb-5px\">\n <div class=\"header-form z\">\n <el-input v-model=\"searchFileName\" placeholder=\"请输入附件名称\" class=\"input-with-select\">\n <template #append>\n <el-button :icon=\"Search\" />\n </template>\n </el-input>\n </div>\n <div class=\"header-button y\">\n <el-dropdown class=\"mr\" trigger=\"click\" @command=\"handleMoveAttachment\">\n <el-button type=\"info\" :disabled=\"chooseFileKey.length <= 0\"> 移动 </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item v-for=\"(item, key) in groupList\" :key=\"key\" :command=\"item.id\">\n {{ item.name }}\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <el-button type=\"danger\" :disabled=\"chooseFileKey.length <= 0\" @click=\"onDelete\"\n >删除<i class=\"el-icon-delete el-icon--right\"></i\n ></el-button>\n <el-upload\n ref=\"upload\"\n class=\"dk-upload-button\"\n :action=\"uploadUrl\"\n multiple\n :data=\"data\"\n :show-file-list=\"false\"\n :headers=\"headers\"\n :on-success=\"handleUploadSuccess\"\n :accept=\"_accept\"\n list-type=\"text\"\n >\n <el-button type=\"primary\">上传<i class=\"el-icon-upload el-icon--right\"></i></el-button>\n </el-upload>\n </div>\n </div>\n <!--内部-->\n <div class=\"attachment-content flex\">\n <!-- 分组-->\n <div class=\"attachment-group\">\n <h5 class=\"cursor-pointer flex items-center content-center\" @click=\"addGroup()\">\n 附件分组\n <el-icon class=\"m-l-5px\"><CirclePlusFilled /></el-icon>\n </h5>\n <ul class=\"group_list\">\n <li\n v-for=\"(item, key) in groupList\"\n :key=\"key\"\n :class=\"{ active: groupId === item.id }\"\n @click=\"selectGroup(item.id)\"\n >\n <dk-icon v-if=\"item.id === groupId\" icon=\"flat-color-icons:opened-folder\" />\n <dk-icon v-else icon=\"flat-color-icons:folder\" />\n\n <span class=\"ml-10px\">{{ item.name }}</span>\n\n <el-popover placement=\"right\" trigger=\"click\">\n <template #reference>\n <div class=\"op\">\n <el-icon v-if=\"item.id > 0\">\n <Tools />\n </el-icon>\n </div>\n </template>\n <template #default>\n <el-button size=\"small\" type=\"primary\" @click.stop=\"editGroup()\">编辑 </el-button>\n <el-button size=\"small\" type=\"danger\" @click=\"delGroup(item.id)\">删除</el-button>\n </template>\n </el-popover>\n </li>\n </ul>\n </div>\n <!-- 列表-->\n <div class=\"attachment-container\">\n <div v-if=\"loading || list.length > 0\" v-loading=\"loading\" class=\"p2\">\n <ul class=\"attachment-list cl\" :style=\"{ overflow: list.length > 10 ? 'auto' : '' }\">\n <li\n v-for=\"(item, key) in list\"\n :key=\"key\"\n :class=\"{ choose: chooseFileKey.indexOf(key) > -1 }\"\n @click=\"chooseAttachment(item, key)\"\n @contextmenu.prevent=\"contextMenuId = item.id\"\n >\n <div class=\"file\">\n <el-image v-if=\"item.type === 1\" class=\"file\" :src=\"item.url\" fit=\"contain\">\n <template #placeholder>\n <div class=\"u-m-t-30\">\n <i class=\"el-icon-loading\"></i>\n <span>加载中</span>\n </div>\n </template>\n </el-image>\n <div v-if=\"item.type === 2\">\n <dk-file-icon :file-name=\"item.filename\" :type=\"item.type\" />\n </div>\n <div v-if=\"item.type === 3\">\n <dk-file-icon :file-name=\"item.filename\" :type=\"item.type\" />\n </div>\n <div v-if=\"item.type === 0\">\n <dk-file-icon :file-name=\"item.filename\" />\n </div>\n </div>\n <div class=\"file-name over\">{{ item.name }}</div>\n <div class=\"right\">\n <el-icon>\n <Check />\n </el-icon>\n </div>\n </li>\n </ul>\n <div class=\"block p-10px\">\n <el-pagination\n :current-page=\"page\"\n layout=\"total, prev, pager, next, jumper,sizes\"\n :total=\"count\"\n :page-size=\"size\"\n @size-change=\"handleSizeChange\"\n @current-change=\"handleCurrentChange\"\n />\n </div>\n </div>\n <div v-else style=\"display: flex; align-items: center; justify-content: center; height: 340px\">\n <el-empty description=\"暂无数据\" />\n </div>\n <dk-form ref=\"groupForm\" :key=\"groupId\" :form-url=\"groupFormUrl\" :is-dialog=\"true\" @submit=\"onsubmit()\" />\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, reactive, onMounted, computed } from 'vue'\nimport {\n deleteAttachment,\n getAttachmentGroupList,\n getAttachmentList,\n moveAttachment,\n delAttachmentGroup,\n} from '../../api'\n\nimport { ElMessage, ElMessageBox } from 'element-plus'\nimport DkFileIcon from './file-icon.vue'\n\nimport { Search } from '@element-plus/icons-vue'\n\nimport { getAttachmentType, getGlobalConfig } from '@vipl520/utils'\nimport { attachmentProps } from './props'\n\n\n\nconst props = defineProps(attachmentProps)\n\nconst _type = computed(() => {\n return getAttachmentType(props.type)\n})\n\n/** ****************顶部data****************/\n// 搜索的文件名\nconst searchFileName = ref('')\n// 选择文件Key\nconst chooseFileKey = ref<number[]>([])\n// 选中文件列表\nconst chooseFileList = ref<any[]>([])\n// 选中文件ID\nconst chooseFileId = ref<number[]>([])\nconst globalConfig = getGlobalConfig()\n// 上传的地址\nconst uploadUrl = globalConfig.ApiUrl + '/adminapi/attachment/upload'\nconst headers = {\n 'Access-Token': globalConfig.AccessToken,\n}\n// 上传的ref\nconst upload = ref()\n// 上传的数据\nconst data = reactive({\n type: _type.value,\n file: 'file',\n group_id: 0,\n})\n\n/** *****顶部的函数****************/\n\nconst handleMoveAttachment = (groupId: number) => {\n moveAttachment(chooseFileId.value, groupId).then((res) => {\n ElMessage.success(res.msg)\n onGetAttachmentList()\n })\n}\n\nconst handleUploadSuccess = (res: any) => {\n console.log('res', res)\n if (res.code === 0) {\n ElMessage.success(res.msg)\n // upload.value.clearFiles()\n onGetAttachmentList()\n } else {\n ElMessage.error(res.msg)\n }\n}\n\nconst _accept = computed(() => {\n let _accept = ''\n if (props.accept) {\n return props.accept\n } else {\n switch (_type.value) {\n case 0:\n break\n case 1:\n _accept = 'image/*'\n break\n case 2:\n _accept = 'audio/*'\n break\n case 3:\n _accept = 'video/*'\n break\n }\n return _accept\n }\n})\n\nconst onDelete = () => {\n // 改成element-plus\n ElMessageBox.confirm('此操作将永久删除文件, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n }).then(() => {\n try {\n deleteAttachment(chooseFileId.value)\n .then((res) => {\n console.log(res)\n onGetAttachmentList()\n })\n .catch((res) => {\n console.log('deleteAttachment error', res)\n })\n } catch (e) {\n console.log(e)\n }\n })\n}\n/** ****************分组data****************/\n// 分组列表\nconst groupList = ref<any>([])\n// 选中分组\n/** **********分组的函数****************/\n\nconst groupFormUrl = computed(() => {\n if (groupId.value === 0) {\n return {\n url: globalConfig.ApiUrl + '/adminapi/attachment/group/create',\n method: 'get',\n }\n } else {\n return {\n url: globalConfig.ApiUrl + '/adminapi/attachment/group/' + groupId.value + '/edit',\n method: 'get',\n }\n }\n})\n\nconst groupForm = ref()\n\nconst addGroup = () => {\n // TODO 添加文件分组\n groupId.value = 0\n groupForm.value.show()\n}\n\nconst delGroup = (id: number) => {\n // 改为Vue3\n ElMessageBox.confirm('此操作将永久删除该分组, 是否继续?', '提示', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n }).then(() => {\n try {\n delAttachmentGroup(id)\n .then((res) => {\n ElMessage.success(res.msg)\n onsubmit()\n })\n .catch(() => {})\n } catch (e) {\n console.log(e)\n }\n })\n}\n\nconst editGroup = () => {\n groupForm.value.show()\n}\n\nconst onsubmit = () => {\n getGroupList()\n onGetAttachmentList()\n}\n\nconst selectGroup = (id: number) => {\n groupId.value = id\n page.value = 1\n onGetAttachmentList()\n}\n\nconst getGroupList = async () => {\n try {\n const res = await getAttachmentGroupList(_type.value)\n groupList.value = res.data\n } catch (e) {}\n}\n\n/** ****************附件列表*********************/\nconst loading = ref(true)\nconst list = ref<any>([])\nconst page = ref(1)\nconst count = ref(0)\nconst size = ref(10)\nconst contextMenuId = ref(0)\nconst groupId = ref(0)\n\n/** ***************列表函数*******************/\n\n// const editAttachment = () => {\n// // TODO 编辑附件\n// }\n\nconst handleSizeChange = (val: number) => {\n size.value = val\n onGetAttachmentList()\n}\n\n// 改变页码\nconst handleCurrentChange = (val: number) => {\n page.value = val\n onGetAttachmentList()\n}\nconst onGetAttachmentList = async (search = {}) => {\n clearChoose()\n try {\n const res = await getAttachmentList(page.value, size.value, _type.value, groupId.value, search)\n list.value = res.data\n count.value = res.msg\n loading.value = false\n } catch (e) {}\n}\n\nconst clearChoose = () => {\n chooseFileKey.value = []\n chooseFileId.value = []\n chooseFileList.value = []\n}\n\nconst chooseAttachment = (item: any, key: number) => {\n const index = chooseFileKey.value.indexOf(key)\n if (index > -1) {\n chooseFileKey.value.splice(index, 1)\n chooseFileId.value.splice(index, 1)\n chooseFileList.value.splice(index, 1)\n } else {\n chooseFileKey.value.push(key)\n chooseFileId.value.push(item.id)\n chooseFileList.value.push(item)\n }\n}\n\nonMounted(() => {\n getGroupList()\n onGetAttachmentList()\n})\n\ndefineExpose({\n chooseFileId,\n chooseFileKey,\n chooseFileList,\n clearChoose,\n})\n</script>\n"],"names":["__MACROS_defineComponent","computed","getAttachmentType","ref","getGlobalConfig","reactive","groupId","moveAttachment","ElMessage","_accept","ElMessageBox","deleteAttachment","delAttachmentGroup","getAttachmentGroupList","getAttachmentList","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA+JD,IAAM,MAAA,KAAA,GAAQC,aAAS,MAAM;AAC3B,MAAO,OAAAC,uBAAA,CAAkB,MAAM,IAAI,CAAA,CAAA;AAAA,KACpC,CAAA,CAAA;AAID,IAAM,MAAA,cAAA,GAAiBC,QAAI,EAAE,CAAA,CAAA;AAE7B,IAAM,MAAA,aAAA,GAAgBA,OAAc,CAAA,EAAE,CAAA,CAAA;AAEtC,IAAM,MAAA,cAAA,GAAiBA,OAAW,CAAA,EAAE,CAAA,CAAA;AAEpC,IAAM,MAAA,YAAA,GAAeA,OAAc,CAAA,EAAE,CAAA,CAAA;AACrC,IAAA,MAAM,eAAeC,qBAAgB,EAAA,CAAA;AAErC,IAAM,MAAA,SAAA,GAAY,aAAa,MAAS,GAAA,6BAAA,CAAA;AACxC,IAAA,MAAM,OAAU,GAAA;AAAA,MACd,gBAAgB,YAAa,CAAA,WAAA;AAAA,KAC/B,CAAA;AAEA,IAAA,MAAM,SAASD,OAAI,EAAA,CAAA;AAEnB,IAAA,MAAM,OAAOE,YAAS,CAAA;AAAA,MACpB,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,IAAM,EAAA,MAAA;AAAA,MACN,QAAU,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAID,IAAM,MAAA,oB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"audio-list-input.vue2.js","sources":["../../../src/audio-list-input/src/audio-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAudioListInput',\n});\n</script>\n<template>\n <dk-file-list-input\n v-bind=\"$props\"\n v-model=\"input\"\n :class=\"bem()\"\n :type=\"2\"\n @change=\"handleInput(input)\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { audioListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('audio-list-input')\n\n\n\nconst props = defineProps(audioListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","watch"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgBD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"audio-list-input.vue2.js","sources":["../../../src/audio-list-input/src/audio-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAudioListInput',\n});\n</script>\n<template>\n <dk-file-list-input v-bind=\"$props\" v-model=\"input\" :class=\"bem()\" :type=\"2\" @change=\"handleInput(input)\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { audioListInputProps } from './props'\nimport { ref, watch } from 'vue'\nconst [_, bem] = createNamespace('audio-list-input')\n\n\n\nconst props = defineProps(audioListInputProps)\nconst input = ref(props.modelValue)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","watch"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,kBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAUD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,kBAAkB,CAAA,CAAA;AAKnD,IAAM,MAAA,KAAA,GAAQC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAGlC,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;"}
@@ -39,9 +39,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
39
39
  const toggleFull = () => {
40
40
  isFullscreen.value = !vue.unref(isFullscreen);
41
41
  };
42
- const dialogHeight = vue.ref(
43
- utils.isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight
44
- );
42
+ const dialogHeight = vue.ref(utils.isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight);
45
43
  vue.watch(
46
44
  () => isFullscreen.value,
47
45
  async (val) => {
@@ -71,7 +69,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
71
69
  "destroy-on-close": "",
72
70
  "append-to-body": "",
73
71
  "lock-scroll": "",
74
- draggable: _ctx.draggable,
72
+ draggable: props.draggable,
75
73
  "close-on-click-modal": false,
76
74
  "show-close": false,
77
75
  class: "dk-dialog",
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div\n class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\"\n >\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"\n isFullscreen\n ? 'radix-icons:exit-full-screen'\n : 'radix-icons:enter-full-screen'\n \"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(\n isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n)\n\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${\n windowHeight - 55 - 60 - (slots.footer ? 63 : 0)\n }px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight)\n ? `${props.maxHeight}px`\n : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","useSlots","computed","useAttrs","ref","watch","unref","isNumber","nextTick"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA6DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,QAAQ,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,MAAmB,GAAA,CAAC,YAAc,EAAA,OAAA,EAAS,WAAW,CAAA,CAAA;AAC5D,MAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AACv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,eAAS,KAAM,CAAA,SAAS,IACzC,CAAG,EAAA,KAAA,CAAM,SAAS,CAAA,EAAA,CAAA,GAClB,KAAM,CAAA,SAAA,CAAA;AAAA,SACZ;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAcL,aAAS,MAAM;AACjC,MAAO,OAAA;AAAA,QACL,SAAA,EAAWI,UAAM,YAAY,CAAA;AAAA,OAC/B,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"props.draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\">\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'\"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)\n\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${windowHeight - 55 - 60 - (slots.footer ? 63 : 0)}px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","useSlots","computed","useAttrs","ref","watch","unref","isNumber","nextTick"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAuDD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI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GAAK,EAAA;AACP,UAAM,MAAA,YAAA,GAAe,SAAS,eAAgB,CAAA,YAAA,CAAA;AAC9C,UAAa,YAAA,CAAA,KAAA,GAAQ,GAAG,YAAe,GAAA,EAAA,GAAK,MAAM,KAAM,CAAA,MAAA,GAAS,KAAK,CAAE,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,SACnE,MAAA;AACL,UAAa,YAAA,CAAA,KAAA,GAAQD,eAAS,KAAM,CAAA,SAAS,IAAI,CAAG,EAAA,KAAA,CAAM,SAAS,CAAA,EAAA,CAAA,GAAO,KAAM,CAAA,SAAA,CAAA;AAAA,SAClF;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAcL,aAAS,MAAM;AACjC,MAAO,OAAA;AAAA,QACL,SAAA,EAAWI,UAAM,YAAY,CAAA;AAAA,OAC/B,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- .dk-dialog .el-dialog__header{margin-right:0}.dk-dialog .el-dialog__body{padding:10px 20px}
1
+ .dk-dialog .el-dialog__header{margin-right:0}.dk-dialog .el-dialog__body{padding:10px 0}
@@ -4,6 +4,6 @@
4
4
  }
5
5
 
6
6
  .el-dialog__body {
7
- padding: 10px 20px;
7
+ padding: 10px 0;
8
8
  }
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"file-input.vue2.js","sources":["../../../src/file-input/src/file-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <!--↓↓↓↓显示input框↓↓↓↓-->\n <template v-if=\"showInput\">\n <el-input v-model=\"input\" :placeholder=\"placeholder\" clearable>\n <template #append>\n <el-button @click=\"onClick\">选择</el-button>\n </template>\n </el-input>\n <!--选择的是图片-->\n <div class=\"show m-t-5px\">\n <el-image\n v-if=\"type === 1\"\n :src=\"input\"\n alt=\"\"\n fit=\"contain\"\n class=\"file rd-4px\"\n :preview-src-list=\"[input]\"\n >\n <template #error>\n <div class=\"image-error\">\n <dk-icon icon=\"Picture\"></dk-icon>\n </div>\n </template>\n </el-image>\n <dk-file-icon\n v-else\n :file-url=\"input\"\n class=\"file rd-4px\"\n :type=\"type\"\n />\n <em @click=\"input = ''\">\n <dk-icon icon=\"Close\"></dk-icon>\n </em>\n </div>\n </template>\n <!--↓↓↓↓不显示input框↓↓↓↓-->\n <template v-else>\n <div\n class=\"only-img flex justify-center items-center\"\n style=\"position: relative\"\n :style=\"{ width: imgSize + 'px', height: imgSize + 'px' }\"\n @click=\"onClick\"\n >\n <template v-if=\"input\">\n <!--图片附件-->\n <el-image\n v-if=\"type === 1\"\n :src=\"input\"\n alt=\"\"\n fit=\"contain\"\n style=\"width: 100%; height: 100%\"\n >\n <template #error>\n <div class=\"image-slot\">\n <div class=\"no-image\">\n <el-icon><Picture /></el-icon>\n </div>\n </div>\n </template>\n </el-image>\n <!--其他附件-->\n <template v-if=\"type !== 1 && input\">\n <dk-file-icon :file-url=\"input\" class=\"file rd-4px\" :type=\"type\" />\n </template>\n <div class=\"close\" @click.stop=\"onClear()\">\n <el-icon><Close /></el-icon>\n </div>\n </template>\n <!--没有上传的时候-->\n <template v-else>\n <div\n class=\"media\"\n :style=\"{\n lineHeight: imgSize + 'px',\n fontSize: imgSize / 2 + 'px',\n }\"\n >\n <el-icon><Plus /></el-icon>\n </div>\n </template>\n </div>\n </template>\n <dk-attachment-dialog\n ref=\"attachmentDialog\"\n :type=\"type\"\n @confirm=\"onConfirm\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileInputProps } from './props'\nimport { ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-input')\n\n\n\nconst props = defineProps(fileInputProps)\nconst input = ref(props.modelValue)\nconst attachmentDialog = ref()\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n\nconst onClear = () => {\n input.value = ''\n}\n\nconst onClick = () => {\n attachmentDialog.value.open()\n}\n// 确认选中附件\nconst onConfirm = (chooseFileList: any) => {\n input.value = chooseFileList[0].url\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","watch"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,aAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAmGD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,YAAY,CAAA,CAAA;AAK7C,IAAM,MAAA,KAAA,GAAQC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,mBAAmBA,OAAI,EAAA,CAAA;AAG7B,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,KAAA,CAAM,KAAQ,GAAA,EAAA,CAAA;AAAA,KAChB,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,gBAAA,CAAiB,MAAM,IAAK,EAAA,CAAA;AAAA,KAC9B,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,CAAC,cAAwB,KAAA;AACzC,MAAM,KAAA,CAAA,KAAA,GAAQ,cAAe,CAAA,CAAC,CAAE,CAAA,GAAA,CAAA;AAAA,KAClC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"file-input.vue2.js","sources":["../../../src/file-input/src/file-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <!--↓↓↓↓显示input框↓↓↓↓-->\n <template v-if=\"showInput\">\n <el-input v-model=\"input\" :placeholder=\"placeholder\" clearable>\n <template #append>\n <el-button @click=\"onClick\">选择</el-button>\n </template>\n </el-input>\n <!--选择的是图片-->\n <div class=\"show m-t-5px\">\n <el-image v-if=\"type === 1\" :src=\"input\" alt=\"\" fit=\"contain\" class=\"file rd-4px\" :preview-src-list=\"[input]\">\n <template #error>\n <div class=\"image-error\">\n <dk-icon icon=\"Picture\"></dk-icon>\n </div>\n </template>\n </el-image>\n <dk-file-icon v-else :file-url=\"input\" class=\"file rd-4px\" :type=\"type\" />\n <em @click=\"input = ''\">\n <dk-icon icon=\"Close\"></dk-icon>\n </em>\n </div>\n </template>\n <!--↓↓↓↓不显示input框↓↓↓↓-->\n <template v-else>\n <div\n class=\"only-img flex justify-center items-center\"\n style=\"position: relative\"\n :style=\"{ width: imgSize + 'px', height: imgSize + 'px' }\"\n @click=\"onClick\"\n >\n <template v-if=\"input\">\n <!--图片附件-->\n <el-image v-if=\"type === 1\" :src=\"input\" alt=\"\" fit=\"contain\" style=\"width: 100%; height: 100%\">\n <template #error>\n <div class=\"image-slot\">\n <div class=\"no-image\">\n <el-icon><Picture /></el-icon>\n </div>\n </div>\n </template>\n </el-image>\n <!--其他附件-->\n <template v-if=\"type !== 1 && input\">\n <dk-file-icon :file-url=\"input\" class=\"file rd-4px\" :type=\"type\" />\n </template>\n <div class=\"close\" @click.stop=\"onClear()\">\n <el-icon><Close /></el-icon>\n </div>\n </template>\n <!--没有上传的时候-->\n <template v-else>\n <div\n class=\"media\"\n :style=\"{\n lineHeight: imgSize + 'px',\n fontSize: imgSize / 2 + 'px',\n }\"\n >\n <el-icon><Plus /></el-icon>\n </div>\n </template>\n </div>\n </template>\n <dk-attachment-dialog ref=\"attachmentDialog\" :type=\"type\" @confirm=\"onConfirm\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileInputProps } from './props'\nimport { ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-input')\n\n\n\nconst props = defineProps(fileInputProps)\nconst input = ref(props.modelValue)\nconst attachmentDialog = ref()\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n\nconst onClear = () => {\n input.value = ''\n}\n\nconst onClick = () => {\n attachmentDialog.value.open()\n}\n// 确认选中附件\nconst onConfirm = (chooseFileList: any) => {\n input.value = chooseFileList[0].url\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","watch"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,aAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6ED,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,YAAY,CAAA,CAAA;AAK7C,IAAM,MAAA,KAAA,GAAQC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,mBAAmBA,OAAI,EAAA,CAAA;AAG7B,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,KAAA,CAAM,KAAQ,GAAA,EAAA,CAAA;AAAA,KAChB,CAAA;AAEA,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,gBAAA,CAAiB,MAAM,IAAK,EAAA,CAAA;AAAA,KAC9B,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,CAAC,cAAwB,KAAA;AACzC,MAAM,KAAA,CAAA,KAAA,GAAQ,cAAe,CAAA,CAAC,CAAE,CAAA,GAAA,CAAA;AAAA,KAClC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-list-input.vue2.js","sources":["../../../src/file-list-input/src/file-list-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileListInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <div class=\"dk-image-list\">\n <ul>\n <li v-for=\"(item, key) in input\" :key=\"key\">\n <div class=\"file\" :style=\"_style\">\n <el-image\n v-if=\"type === 1\"\n :src=\"item\"\n fit=\"contain\"\n :style=\"_style\"\n />\n <dk-file-icon\n v-else\n :file-url=\"item\"\n class=\"file rd-4px\"\n :type=\"type\"\n />\n <div v-if=\"!disabled\" class=\"close\" @click=\"deleteFile(key)\">\n <el-icon><Close /></el-icon>\n </div>\n </div>\n </li>\n <li v-if=\"limit > input.length && !disabled\">\n <div class=\"chooseImage\" :style=\"_style\" @click=\"onClick()\">\n <el-icon><Plus /></el-icon>\n </div>\n </li>\n </ul>\n </div>\n <dk-attachment-dialog ref=\"attachment\" :type=\"type\" @confirm=\"onConfirm\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileListInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-list-input')\n\n\n\nconst props = defineProps(fileListInputProps)\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nconst input: any = ref(props.modelValue)\nconst _style = computed(() => {\n return {\n width: props.imgSize + 'px',\n height: props.imgSize + 'px',\n lineHeight: props.imgSize + 'px',\n }\n})\n\nconst attachment = ref()\n\nconst onClick = () => {\n attachment.value.open()\n}\nconst onConfirm = (chooseFileList: any) => {\n chooseFileList.forEach((item: any) => {\n if (input.value.length < props.limit) {\n input.value.push(item.url)\n handleInput(input.value)\n }\n })\n}\nconst deleteFile = (index: number) => {\n input.value.splice(index, 1)\n}\n\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","computed","watch"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0CD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,iBAAiB,CAAA,CAAA;AAMlD,IAAM,MAAA,KAAA,GAAaC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACvC,IAAM,MAAA,MAAA,GAASC,aAAS,MAAM;AAC5B,MAAO,OAAA;AAAA,QACL,KAAA,EAAO,MAAM,OAAU,GAAA,IAAA;AAAA,QACvB,MAAA,EAAQ,MAAM,OAAU,GAAA,IAAA;AAAA,QACxB,UAAA,EAAY,MAAM,OAAU,GAAA,IAAA;AAAA,OAC9B,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,MAAM,aAAaD,OAAI,EAAA,CAAA;AAEvB,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,UAAA,CAAW,MAAM,IAAK,EAAA,CAAA;AAAA,KACxB,CAA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ent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFileListInput',\n});\n</script>\n<template>\n <div :class=\"bem()\">\n <div class=\"dk-image-list\">\n <ul>\n <li v-for=\"(item, key) in input\" :key=\"key\">\n <div class=\"file\" :style=\"_style\">\n <el-image v-if=\"type === 1\" :src=\"item\" fit=\"contain\" :style=\"_style\" />\n <dk-file-icon v-else :file-url=\"item\" class=\"file rd-4px\" :type=\"type\" />\n <div v-if=\"!disabled\" class=\"close\" @click=\"deleteFile(key)\">\n <el-icon><Close /></el-icon>\n </div>\n </div>\n </li>\n <li v-if=\"limit > input.length && !disabled\">\n <div class=\"chooseImage\" :style=\"_style\" @click=\"onClick()\">\n <el-icon><Plus /></el-icon>\n </div>\n </li>\n </ul>\n </div>\n <dk-attachment-dialog ref=\"attachment\" :type=\"type\" @confirm=\"onConfirm\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@vipl520/utils'\nimport { fileListInputProps } from './props'\nimport { computed, ref, watch } from 'vue'\nimport DkFileIcon from '../../attachment/src/file-icon.vue'\n\nconst [_, bem] = createNamespace('file-list-input')\n\n\n\nconst props = defineProps(fileListInputProps)\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nconst input: any = ref(props.modelValue)\nconst _style = computed(() => {\n return {\n width: props.imgSize + 'px',\n height: props.imgSize + 'px',\n lineHeight: props.imgSize + 'px',\n }\n})\n\nconst attachment = ref()\n\nconst onClick = () => {\n attachment.value.open()\n}\nconst onConfirm = (chooseFileList: any) => {\n chooseFileList.forEach((item: any) => {\n if (input.value.length < props.limit) {\n input.value.push(item.url)\n handleInput(input.value)\n }\n })\n}\nconst deleteFile = (index: number) => {\n input.value.splice(index, 1)\n}\n\nwatch(\n () => props.modelValue,\n (val) => {\n input.value = val\n }\n)\n\nwatch(\n () => input.value,\n (val) => {\n handleInput(val)\n }\n)\n\nconst handleInput = (val: any) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n}\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","computed","watch"],"mappings":";;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgCD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,iBAAiB,CAAA,CAAA;AAMlD,IAAM,MAAA,KAAA,GAAaC,OAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AACvC,IAAM,MAAA,MAAA,GAASC,aAAS,MAAM;AAC5B,MAAO,OAAA;AAAA,QACL,KAAA,EAAO,MAAM,OAAU,GAAA,IAAA;AAAA,QACvB,MAAA,EAAQ,MAAM,OAAU,GAAA,IAAA;AAAA,QACxB,UAAA,EAAY,MAAM,OAAU,GAAA,IAAA;AAAA,OAC9B,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,MAAM,aAAaD,OAAI,EAAA,CAAA;AAEvB,IAAA,MAAM,UAAU,MAAM;AACpB,MAAA,UAAA,CAAW,MAAM,IAAK,EAAA,CAAA;AAAA,KACxB,CAAA;AACA,IAAM,MAAA,SAAA,GAAY,CAAC,cAAwB,KAAA;AACzC,MAAe,cAAA,CAAA,OAAA,CAAQ,CAAC,IAAc,KAAA;AACpC,QAAA,IAAI,KAAM,CAAA,KAAA,CAAM,MAAS,GAAA,KAAA,CAAM,KAAO,EAAA;AACpC,UAAM,KAAA,CAAA,KAAA,CAAM,IAAK,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AACzB,UAAA,WAAA,CAAY,MAAM,KAAK,CAAA,CAAA;AAAA,SACzB;AAAA,OACD,CAAA,CAAA;AAAA,KACH,CAAA;AACA,IAAM,MAAA,UAAA,GAAa,CAAC,KAAkB,KAAA;AACpC,MAAM,KAAA,CAAA,KAAA,CAAM,MAAO,CAAA,KAAA,EAAO,CAAC,CAAA,CAAA;AAAA,KAC7B,CAAA;AAEA,IAAAE,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,KAAA,CAAM,KAAQ,GAAA,GAAA,CAAA;AAAA,OAChB;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAC,GAAQ,KAAA;AACP,QAAA,WAAA,CAAY,GAAG,CAAA,CAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,GAAa,KAAA;AAChC,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,MAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,MAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -112,11 +112,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
112
112
  type: BooleanConstructor;
113
113
  };
114
114
  dialog: {
115
- default: () => {
116
- width: string;
117
- fullscreen: boolean;
118
- draggable: boolean;
119
- };
115
+ default: () => {};
120
116
  type: ObjectConstructor;
121
117
  };
122
118
  }>> & {
@@ -202,11 +198,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
202
198
  type: BooleanConstructor;
203
199
  };
204
200
  dialog: {
205
- default: () => {
206
- width: string;
207
- fullscreen: boolean;
208
- draggable: boolean;
209
- };
201
+ default: () => {};
210
202
  type: ObjectConstructor;
211
203
  };
212
204
  }>> & {
@@ -265,11 +257,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
265
257
  type: BooleanConstructor;
266
258
  };
267
259
  dialog: {
268
- default: () => {
269
- width: string;
270
- fullscreen: boolean;
271
- draggable: boolean;
272
- };
260
+ default: () => {};
273
261
  type: ObjectConstructor;
274
262
  };
275
263
  }>> & {
@@ -36,11 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
36
36
  type: BooleanConstructor;
37
37
  };
38
38
  dialog: {
39
- default: () => {
40
- width: string;
41
- fullscreen: boolean;
42
- draggable: boolean;
43
- };
39
+ default: () => {};
44
40
  type: ObjectConstructor;
45
41
  };
46
42
  }, {
@@ -91,11 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
91
87
  type: BooleanConstructor;
92
88
  };
93
89
  dialog: {
94
- default: () => {
95
- width: string;
96
- fullscreen: boolean;
97
- draggable: boolean;
98
- };
90
+ default: () => {};
99
91
  type: ObjectConstructor;
100
92
  };
101
93
  }>> & {
@@ -62,6 +62,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
62
62
  const dialogWidth = vue.computed(() => {
63
63
  let defaultWidth = "800px";
64
64
  const config2 = _formData.value?.config || {};
65
+ console.log(config2);
65
66
  if (config2?.width) {
66
67
  return config2?.width;
67
68
  }