@vipl520/dk-ui 1.0.41 → 1.0.44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. package/dist/attributes.json +23 -3
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +3634 -12985
  4. package/dist/index.min.js +4 -13
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +4 -13
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +785 -10135
  9. package/dist/tags.json +7 -2
  10. package/dist/web-types.json +71 -12
  11. package/es/animate-select/src/animate-select.vue2.mjs +5 -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 +7 -1
  15. package/es/attachment/src/attachment.vue2.mjs.map +1 -1
  16. package/es/attachment-dialog/index.d.ts +9 -0
  17. package/es/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
  18. package/es/attachment-dialog/src/attachment-dialog.vue2.mjs +3 -2
  19. package/es/attachment-dialog/src/attachment-dialog.vue2.mjs.map +1 -1
  20. package/es/attachment-dialog/src/props.d.ts +4 -0
  21. package/es/attachment-dialog/src/props.mjs +4 -0
  22. package/es/attachment-dialog/src/props.mjs.map +1 -1
  23. package/es/audio-list-input/src/audio-list-input.vue2.mjs.map +1 -1
  24. package/es/box-size-input/src/box-size-input.vue2.mjs +60 -59
  25. package/es/box-size-input/src/box-size-input.vue2.mjs.map +1 -1
  26. package/es/box-size-input/style/index.css +1 -1
  27. package/es/box-size-input/style/index.scss +11 -4
  28. package/es/dialog/src/dialog.vue2.mjs +3 -1
  29. package/es/dialog/src/dialog.vue2.mjs.map +1 -1
  30. package/es/dialog/style/index.scss +1 -0
  31. package/es/file-input/src/file-input.vue2.mjs.map +1 -1
  32. package/es/file-list-input/src/file-list-input.vue2.mjs.map +1 -1
  33. package/es/file-list-input/style/index.css +1 -1
  34. package/es/file-list-input/style/index.scss +20 -16
  35. package/es/form/src/form.vue2.mjs.map +1 -1
  36. package/es/group/src/group.vue2.mjs +5 -13
  37. package/es/group/src/group.vue2.mjs.map +1 -1
  38. package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
  39. package/es/hot-area-input/src/hot-area-input.vue2.mjs.map +1 -1
  40. package/es/icon/src/icon.vue2.mjs.map +1 -1
  41. package/es/icon-input/src/icon-content.vue2.mjs +1 -1
  42. package/es/icon-input/src/icon-content.vue2.mjs.map +1 -1
  43. package/es/icon-input/src/icon-input.vue2.mjs.map +1 -1
  44. package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
  45. package/es/index.mjs +4 -9
  46. package/es/index.mjs.map +1 -1
  47. package/es/page-diy/index.mjs +0 -2
  48. package/es/page-diy/index.mjs.map +1 -1
  49. package/es/page-diy/src/components/DiyCloud.vue.mjs.map +1 -1
  50. package/es/page-diy/src/components/DragBox.vue.mjs +1 -1
  51. package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
  52. package/es/page-diy/src/components/DragTool.vue.mjs +5 -1
  53. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  54. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  55. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +11 -9
  56. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs.map +1 -1
  57. package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
  58. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs +9 -1
  59. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs.map +1 -1
  60. package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs +3 -1
  61. package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs.map +1 -1
  62. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +36 -6
  63. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
  64. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +6 -2
  65. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs.map +1 -1
  66. package/es/page-diy/src/config/rule/min/common/index.mjs +8 -1
  67. package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
  68. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs +3 -1
  69. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs.map +1 -1
  70. package/es/page-diy/src/config/rule/web/common/DkViewBulletChat.mjs.map +1 -1
  71. package/es/page-diy/src/config/rule/web/common/DkViewDialog.mjs +7 -1
  72. package/es/page-diy/src/config/rule/web/common/DkViewDialog.mjs.map +1 -1
  73. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +9 -3
  74. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
  75. package/es/page-diy/src/page-diy.vue.mjs +1 -2
  76. package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
  77. package/es/page-diy/src/utils/eventData.mjs.map +1 -1
  78. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +23 -6
  79. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
  80. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
  81. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
  82. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs.map +1 -1
  83. package/es/page-diy/src/views/web/DkViewCell.vue.mjs.map +1 -1
  84. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +3 -1
  85. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +1 -1
  86. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs.map +1 -1
  87. package/es/page-diy/src/views/web/DkViewImage.vue.mjs.map +1 -1
  88. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +1 -1
  89. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs.map +1 -1
  90. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs.map +1 -1
  91. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
  92. package/es/page-diy/style/dk-page-diy.css +1 -1
  93. package/es/page-diy/style/dk-page-diy.scss +1 -1
  94. package/es/page-diy/style/index.css +1 -1
  95. package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
  96. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +1 -1
  97. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs +5 -2
  98. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs.map +1 -1
  99. package/es/poster-input/src/component/views/DkPosterViewName.vue2.mjs.map +1 -1
  100. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
  101. package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
  102. package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +1 -1
  103. package/es/poster-input/src/poster-input.vue2.mjs.map +1 -1
  104. package/es/poster-input/style/index.scss +4 -2
  105. package/es/select/src/select.vue2.mjs +9 -1
  106. package/es/select/src/select.vue2.mjs.map +1 -1
  107. package/es/style-animation-input/src/props.mjs.map +1 -1
  108. package/es/style-animation-input/src/style-animation-input.vue2.mjs +1 -1
  109. package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -1
  110. package/es/style-background-input/index.d.ts +2 -1
  111. package/es/style-background-input/src/style-background-input.vue.d.ts +2 -1
  112. package/es/style-background-input/src/style-background-input.vue2.mjs +2 -1
  113. package/es/style-background-input/src/style-background-input.vue2.mjs.map +1 -1
  114. package/es/style-border-input/index.d.ts +2 -1
  115. package/es/style-border-input/src/style-border-input.vue.d.ts +2 -1
  116. package/es/style-border-input/src/style-border-input.vue2.mjs +56 -39
  117. package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
  118. package/es/style-border-input/style/index.css +1 -1
  119. package/es/style-box-input/index.d.ts +2 -1
  120. package/es/style-box-input/src/style-box-input.vue.d.ts +2 -1
  121. package/es/style-box-input/src/style-box-input.vue2.mjs +4 -7
  122. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  123. package/es/style-font-input/index.d.ts +2 -1
  124. package/es/style-font-input/src/style-font-input.vue.d.ts +2 -1
  125. package/es/style-font-input/src/style-font-input.vue2.mjs +10 -27
  126. package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
  127. package/es/style-input/src/style-input.vue2.mjs +10 -22
  128. package/es/style-input/src/style-input.vue2.mjs.map +1 -1
  129. package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
  130. package/es/style-position-input/src/style-position-input.vue2.mjs +4 -1
  131. package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
  132. package/es/style-shadow-input/index.d.ts +2 -1
  133. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs +138 -153
  134. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs.map +1 -1
  135. package/es/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -1
  136. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs +2 -1
  137. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
  138. package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
  139. package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
  140. package/es/table/src/components/RecycleDialog.vue2.mjs +3 -1
  141. package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
  142. package/es/table/src/components/header.vue2.mjs +17 -3
  143. package/es/table/src/components/header.vue2.mjs.map +1 -1
  144. package/es/table/src/props.mjs +11 -1
  145. package/es/table/src/props.mjs.map +1 -1
  146. package/es/table/src/table.vue2.mjs +13 -3
  147. package/es/table/src/table.vue2.mjs.map +1 -1
  148. package/es/table/utils/dkTable.mjs +32 -11
  149. package/es/table/utils/dkTable.mjs.map +1 -1
  150. package/es/table/utils/dkTableApi.mjs.map +1 -1
  151. package/es/tiny-editor/src/tiny-editor.vue2.mjs +4 -2
  152. package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
  153. package/es/tiny-editor/style/index.css +1 -1
  154. package/es/tiny-editor/style/index.scss +6 -0
  155. package/es/video-list-input/src/video-list-input.vue2.mjs.map +1 -1
  156. package/lib/animate-select/src/animate-select.vue2.js +5 -1
  157. package/lib/animate-select/src/animate-select.vue2.js.map +1 -1
  158. package/lib/api/attachment.js.map +1 -1
  159. package/lib/attachment/src/attachment.vue2.js +7 -1
  160. package/lib/attachment/src/attachment.vue2.js.map +1 -1
  161. package/lib/attachment-dialog/index.d.ts +9 -0
  162. package/lib/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
  163. package/lib/attachment-dialog/src/attachment-dialog.vue2.js +3 -2
  164. package/lib/attachment-dialog/src/attachment-dialog.vue2.js.map +1 -1
  165. package/lib/attachment-dialog/src/props.d.ts +4 -0
  166. package/lib/attachment-dialog/src/props.js +4 -0
  167. package/lib/attachment-dialog/src/props.js.map +1 -1
  168. package/lib/audio-list-input/src/audio-list-input.vue2.js.map +1 -1
  169. package/lib/box-size-input/src/box-size-input.vue2.js +59 -58
  170. package/lib/box-size-input/src/box-size-input.vue2.js.map +1 -1
  171. package/lib/box-size-input/style/index.css +1 -1
  172. package/lib/box-size-input/style/index.scss +11 -4
  173. package/lib/dialog/src/dialog.vue2.js +3 -1
  174. package/lib/dialog/src/dialog.vue2.js.map +1 -1
  175. package/lib/dialog/style/index.scss +1 -0
  176. package/lib/file-input/src/file-input.vue2.js.map +1 -1
  177. package/lib/file-list-input/src/file-list-input.vue2.js.map +1 -1
  178. package/lib/file-list-input/style/index.css +1 -1
  179. package/lib/file-list-input/style/index.scss +20 -16
  180. package/lib/form/src/form.vue2.js.map +1 -1
  181. package/lib/group/src/group.vue2.js +4 -12
  182. package/lib/group/src/group.vue2.js.map +1 -1
  183. package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
  184. package/lib/hot-area-input/src/hot-area-input.vue2.js.map +1 -1
  185. package/lib/icon/src/icon.vue2.js.map +1 -1
  186. package/lib/icon-input/src/icon-content.vue2.js +1 -1
  187. package/lib/icon-input/src/icon-content.vue2.js.map +1 -1
  188. package/lib/icon-input/src/icon-input.vue2.js.map +1 -1
  189. package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
  190. package/lib/index.js +4 -9
  191. package/lib/index.js.map +1 -1
  192. package/lib/page-diy/index.js +0 -2
  193. package/lib/page-diy/index.js.map +1 -1
  194. package/lib/page-diy/src/components/DiyCloud.vue.js.map +1 -1
  195. package/lib/page-diy/src/components/DragBox.vue.js +1 -1
  196. package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
  197. package/lib/page-diy/src/components/DragTool.vue.js +5 -1
  198. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  199. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  200. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +11 -9
  201. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js.map +1 -1
  202. package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
  203. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js +9 -1
  204. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js.map +1 -1
  205. package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js +3 -1
  206. package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js.map +1 -1
  207. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +36 -6
  208. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
  209. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +6 -2
  210. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js.map +1 -1
  211. package/lib/page-diy/src/config/rule/min/common/index.js +8 -1
  212. package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
  213. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js +3 -1
  214. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js.map +1 -1
  215. package/lib/page-diy/src/config/rule/web/common/DkViewBulletChat.js.map +1 -1
  216. package/lib/page-diy/src/config/rule/web/common/DkViewDialog.js +7 -1
  217. package/lib/page-diy/src/config/rule/web/common/DkViewDialog.js.map +1 -1
  218. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +9 -3
  219. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
  220. package/lib/page-diy/src/page-diy.vue.js +1 -2
  221. package/lib/page-diy/src/page-diy.vue.js.map +1 -1
  222. package/lib/page-diy/src/utils/eventData.js.map +1 -1
  223. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +23 -6
  224. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
  225. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
  226. package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
  227. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js.map +1 -1
  228. package/lib/page-diy/src/views/web/DkViewCell.vue.js.map +1 -1
  229. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +3 -1
  230. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +1 -1
  231. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js.map +1 -1
  232. package/lib/page-diy/src/views/web/DkViewImage.vue.js.map +1 -1
  233. package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +1 -1
  234. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js.map +1 -1
  235. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js.map +1 -1
  236. package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
  237. package/lib/page-diy/style/dk-page-diy.css +1 -1
  238. package/lib/page-diy/style/dk-page-diy.scss +1 -1
  239. package/lib/page-diy/style/index.css +1 -1
  240. package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
  241. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +1 -1
  242. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js +5 -2
  243. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js.map +1 -1
  244. package/lib/poster-input/src/component/views/DkPosterViewName.vue2.js.map +1 -1
  245. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
  246. package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
  247. package/lib/poster-input/src/component/views/quick-action.vue2.js.map +1 -1
  248. package/lib/poster-input/src/poster-input.vue2.js.map +1 -1
  249. package/lib/poster-input/style/index.scss +4 -2
  250. package/lib/select/src/select.vue2.js +9 -1
  251. package/lib/select/src/select.vue2.js.map +1 -1
  252. package/lib/style-animation-input/src/props.js.map +1 -1
  253. package/lib/style-animation-input/src/style-animation-input.vue2.js +1 -1
  254. package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -1
  255. package/lib/style-background-input/index.d.ts +2 -1
  256. package/lib/style-background-input/src/style-background-input.vue.d.ts +2 -1
  257. package/lib/style-background-input/src/style-background-input.vue2.js +2 -1
  258. package/lib/style-background-input/src/style-background-input.vue2.js.map +1 -1
  259. package/lib/style-border-input/index.d.ts +2 -1
  260. package/lib/style-border-input/src/style-border-input.vue.d.ts +2 -1
  261. package/lib/style-border-input/src/style-border-input.vue2.js +56 -39
  262. package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
  263. package/lib/style-border-input/style/index.css +1 -1
  264. package/lib/style-box-input/index.d.ts +2 -1
  265. package/lib/style-box-input/src/style-box-input.vue.d.ts +2 -1
  266. package/lib/style-box-input/src/style-box-input.vue2.js +4 -7
  267. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  268. package/lib/style-font-input/index.d.ts +2 -1
  269. package/lib/style-font-input/src/style-font-input.vue.d.ts +2 -1
  270. package/lib/style-font-input/src/style-font-input.vue2.js +10 -27
  271. package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
  272. package/lib/style-input/src/style-input.vue2.js +9 -21
  273. package/lib/style-input/src/style-input.vue2.js.map +1 -1
  274. package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
  275. package/lib/style-position-input/src/style-position-input.vue2.js +4 -1
  276. package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
  277. package/lib/style-shadow-input/index.d.ts +2 -1
  278. package/lib/style-shadow-input/src/style-shadow-content.vue2.js +138 -153
  279. package/lib/style-shadow-input/src/style-shadow-content.vue2.js.map +1 -1
  280. package/lib/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -1
  281. package/lib/style-shadow-input/src/style-shadow-input.vue2.js +2 -1
  282. package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
  283. package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
  284. package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
  285. package/lib/table/src/components/RecycleDialog.vue2.js +3 -1
  286. package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
  287. package/lib/table/src/components/header.vue2.js +17 -3
  288. package/lib/table/src/components/header.vue2.js.map +1 -1
  289. package/lib/table/src/props.js +11 -1
  290. package/lib/table/src/props.js.map +1 -1
  291. package/lib/table/src/table.vue2.js +13 -3
  292. package/lib/table/src/table.vue2.js.map +1 -1
  293. package/lib/table/utils/dkTable.js +32 -11
  294. package/lib/table/utils/dkTable.js.map +1 -1
  295. package/lib/table/utils/dkTableApi.js.map +1 -1
  296. package/lib/tiny-editor/src/tiny-editor.vue2.js +4 -2
  297. package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
  298. package/lib/tiny-editor/style/index.css +1 -1
  299. package/lib/tiny-editor/style/index.scss +6 -0
  300. package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
  301. package/package.json +3 -2
@@ -52,7 +52,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
52
52
  class: vue.normalizeClass(vue.unref(bem)()),
53
53
  title: title.value,
54
54
  width: "1040px",
55
- fullscreen: false
55
+ fullscreen: false,
56
+ "z-index": _ctx.zIndex
56
57
  }, {
57
58
  default: vue.withCtx(() => [
58
59
  vue.createVNode(_component_dk_attachment, {
@@ -84,7 +85,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
84
85
  ]),
85
86
  _: 1
86
87
  /* STABLE */
87
- }, 8, ["modelValue", "class", "title"]);
88
+ }, 8, ["modelValue", "class", "title", "z-index"]);
88
89
  };
89
90
  }
90
91
  });
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-dialog.vue2.js","sources":["../../../src/attachment-dialog/src/attachment-dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAttachmentDialog',\n});\n</script>\n<template>\n <DkDialog\n v-model=\"dialogVisible\"\n :class=\"bem()\"\n :title=\"title\"\n width=\"1040px\"\n :fullscreen=\"false\"\n >\n <dk-attachment ref=\"attachment\" :type=\"_type\" />\n <div class=\"text-center m2\">\n <el-button type=\"primary\" @click=\"confirm()\">确定</el-button>\n <el-button @click=\"cancel()\">关闭</el-button>\n </div>\n </DkDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n createNamespace,\n getAttachmentTitle,\n getAttachmentType,\n} from '@vipl520/utils'\nimport { attachmentDialogProps } from './props'\nimport { ref } from 'vue'\nimport { ElMessage } from 'element-plus'\nconst [_, bem] = createNamespace('attachment-dialog')\n\n\n\nconst props = defineProps(attachmentDialogProps)\nconst attachment = ref()\nconst dialogVisible = ref(false)\nconst title = ref(props.title || getAttachmentTitle(props.type))\n\nconst _type = ref(getAttachmentType(props.type))\n\nconst emit = defineEmits(['confirm'])\n\nconst confirm = () => {\n if (attachment.value.chooseFileList.length > 0) {\n emit('confirm', attachment.value.chooseFileList || [])\n dialogVisible.value = false\n } else {\n ElMessage.warning({ message: '请先选择文件' })\n }\n}\n\n// 关闭\nconst cancel = () => {\n dialogVisible.value = false\n}\n\nconst open = () => {\n dialogVisible.value = true\n}\n\ndefineExpose({\n dialogVisible,\n attachment,\n cancel,\n open,\n})\n</script>\n"],"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AAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"attachment-dialog.vue2.js","sources":["../../../src/attachment-dialog/src/attachment-dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkAttachmentDialog',\n});\n</script>\n<template>\n <DkDialog v-model=\"dialogVisible\" :class=\"bem()\" :title=\"title\" width=\"1040px\" :fullscreen=\"false\" :z-index=\"zIndex\">\n <dk-attachment ref=\"attachment\" :type=\"_type\" />\n <div class=\"text-center m2\">\n <el-button type=\"primary\" @click=\"confirm()\">确定</el-button>\n <el-button @click=\"cancel()\">关闭</el-button>\n </div>\n </DkDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, getAttachmentTitle, getAttachmentType } from '@vipl520/utils'\nimport { attachmentDialogProps } from './props'\nimport { ref } from 'vue'\nimport { ElMessage } from 'element-plus'\nconst [_, bem] = createNamespace('attachment-dialog')\n\n\n\nconst props = defineProps(attachmentDialogProps)\nconst attachment = ref()\nconst dialogVisible = ref(false)\nconst title = ref(props.title || getAttachmentTitle(props.type))\n\nconst _type = ref(getAttachmentType(props.type))\n\nconst emit = defineEmits(['confirm'])\n\nconst confirm = () => {\n if (attachment.value.chooseFileList.length > 0) {\n emit('confirm', attachment.value.chooseFileList || [])\n dialogVisible.value = false\n } else {\n ElMessage.warning({ message: '请先选择文件' })\n }\n}\n\n// 关闭\nconst cancel = () => {\n dialogVisible.value = false\n}\n\nconst open = () => {\n dialogVisible.value = true\n}\n\ndefineExpose({\n dialogVisible,\n attachment,\n cancel,\n open,\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","ref","getAttachmentTitle","getAttachmentType","ElMessage"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBA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;
5
5
  default: string;
6
6
  };
7
+ zIndex: {
8
+ type: NumberConstructor;
9
+ default: number;
10
+ };
7
11
  type: {
8
12
  type: (StringConstructor | NumberConstructor)[];
9
13
  default: number;
@@ -8,6 +8,10 @@ const attachmentDialogProps = {
8
8
  title: {
9
9
  type: String,
10
10
  default: ""
11
+ },
12
+ zIndex: {
13
+ type: Number,
14
+ default: 1299
11
15
  }
12
16
  };
13
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../src/attachment-dialog/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { attachmentProps } from '../../attachment'\n\nexport const attachmentDialogProps = {\n ...attachmentProps,\n title: {\n type: String,\n default: '',\n },\n}\n\nexport type AttachmentDialogProps = ExtractPropTypes<\n typeof attachmentDialogProps\n>\n"],"names":["attachmentProps"],"mappings":";;;;;AAGO,MAAM,qBAAwB,GAAA;AAAA,EACnC,GAAGA,qBAAA;AAAA,EACH,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AACF;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../src/attachment-dialog/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { attachmentProps } from '../../attachment'\n\nexport const attachmentDialogProps = {\n ...attachmentProps,\n title: {\n type: String,\n default: '',\n },\n zIndex: {\n type: Number,\n default: 1299,\n },\n}\n\nexport type AttachmentDialogProps = ExtractPropTypes<typeof attachmentDialogProps>\n"],"names":["attachmentProps"],"mappings":";;;;;AAGO,MAAM,qBAAwB,GAAA;AAAA,EACnC,GAAGA,qBAAA;AAAA,EACH,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AACF;;;;"}
@@ -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 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;;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;;;"}
@@ -7,6 +7,7 @@ var props = require('./props.js');
7
7
  var core = require('@vueuse/core');
8
8
 
9
9
  const _hoisted_1 = ["onMousedown"];
10
+ const _hoisted_2 = { style: { "display": "flex" } };
10
11
  const __default__ = vue.defineComponent({
11
12
  name: "DkBoxSizeInput"
12
13
  });
@@ -184,8 +185,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
184
185
  return (_ctx, _cache) => {
185
186
  const _component_dk_icon = vue.resolveComponent("dk-icon");
186
187
  const _component_el_tooltip = vue.resolveComponent("el-tooltip");
187
- const _component_el_select_v2 = vue.resolveComponent("el-select-v2");
188
188
  const _component_el_input = vue.resolveComponent("el-input");
189
+ const _component_el_select_v2 = vue.resolveComponent("el-select-v2");
189
190
  const _component_el_button = vue.resolveComponent("el-button");
190
191
  return vue.openBlock(), vue.createElementBlock(
191
192
  "div",
@@ -198,61 +199,63 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
198
199
  vue.withDirectives(vue.createElementVNode(
199
200
  "div",
200
201
  {
201
- class: vue.normalizeClass(vue.unref(width).value < 500 ? "" : "flex")
202
+ class: vue.normalizeClass(vue.unref(width) > 500 ? "" : "")
202
203
  },
203
204
  [
204
205
  (vue.openBlock(true), vue.createElementBlock(
205
206
  vue.Fragment,
206
207
  null,
207
208
  vue.renderList(inputList.value, (item, key) => {
208
- return vue.openBlock(), vue.createBlock(_component_el_input, {
209
+ return vue.openBlock(), vue.createElementBlock("div", {
209
210
  key,
210
- modelValue: positions[item.position],
211
- "onUpdate:modelValue": ($event) => positions[item.position] = $event,
212
- type: "number",
213
- controls: false,
214
- disabled: unit[item.position] == "auto"
215
- }, vue.createSlots({
216
- append: vue.withCtx(() => [
217
- vue.createVNode(_component_el_select_v2, {
218
- modelValue: unit[item.position],
219
- "onUpdate:modelValue": ($event) => unit[item.position] = $event,
220
- options: options.value
221
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])
222
- ]),
223
- _: 2
224
- /* DYNAMIC */
211
+ style: { "display": "flex" }
225
212
  }, [
226
- vue.unref(width).value > 600 || vue.unref(width).value < 500 ? {
227
- name: "prefix",
228
- fn: vue.withCtx(() => [
229
- vue.createElementVNode("span", {
230
- class: "w-resize",
231
- onMousemove: handleMouseMove,
232
- onMousedown: ($event) => handleMouseDown(item.position, $event),
233
- onMouseup: handleMouseUp
234
- }, [
235
- vue.createVNode(_component_el_tooltip, {
236
- "hide-after": 0,
237
- class: "item",
238
- effect: "dark",
239
- content: item.name,
240
- placement: "top-start",
241
- disabled: disabledTooltip.value
242
- }, {
243
- default: vue.withCtx(() => [
244
- vue.createVNode(_component_dk_icon, {
245
- icon: item.icon
246
- }, null, 8, ["icon"])
247
- ]),
248
- _: 2
249
- /* DYNAMIC */
250
- }, 1032, ["content", "disabled"])
251
- ], 40, _hoisted_1)
252
- ]),
253
- key: "0"
254
- } : void 0
255
- ]), 1032, ["modelValue", "onUpdate:modelValue", "disabled"]);
213
+ vue.createVNode(_component_el_input, {
214
+ modelValue: positions[item.position],
215
+ "onUpdate:modelValue": ($event) => positions[item.position] = $event,
216
+ type: "number",
217
+ controls: false,
218
+ disabled: unit[item.position] == "auto"
219
+ }, vue.createSlots({
220
+ _: 2
221
+ /* DYNAMIC */
222
+ }, [
223
+ vue.unref(width) > 600 || vue.unref(width) < 500 ? {
224
+ name: "prefix",
225
+ fn: vue.withCtx(() => [
226
+ vue.createElementVNode("span", {
227
+ class: "w-resize",
228
+ onMousemove: handleMouseMove,
229
+ onMousedown: ($event) => handleMouseDown(item.position, $event),
230
+ onMouseup: handleMouseUp
231
+ }, [
232
+ vue.createVNode(_component_el_tooltip, {
233
+ "hide-after": 0,
234
+ class: "item",
235
+ effect: "dark",
236
+ content: item.name,
237
+ placement: "top-start",
238
+ disabled: disabledTooltip.value
239
+ }, {
240
+ default: vue.withCtx(() => [
241
+ vue.createVNode(_component_dk_icon, {
242
+ icon: item.icon
243
+ }, null, 8, ["icon"])
244
+ ]),
245
+ _: 2
246
+ /* DYNAMIC */
247
+ }, 1032, ["content", "disabled"])
248
+ ], 40, _hoisted_1)
249
+ ]),
250
+ key: "0"
251
+ } : void 0
252
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "disabled"]),
253
+ vue.createVNode(_component_el_select_v2, {
254
+ modelValue: unit[item.position],
255
+ "onUpdate:modelValue": ($event) => unit[item.position] = $event,
256
+ options: options.value
257
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])
258
+ ]);
256
259
  }),
257
260
  128
258
261
  /* KEYED_FRAGMENT */
@@ -265,11 +268,11 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
265
268
  ]),
266
269
  vue.withDirectives(vue.createElementVNode(
267
270
  "div",
268
- null,
271
+ _hoisted_2,
269
272
  [
270
273
  vue.createVNode(_component_el_input, {
271
274
  modelValue: positions.all,
272
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => positions.all = $event),
275
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => positions.all = $event),
273
276
  type: "number",
274
277
  controls: false,
275
278
  disabled: unit.all === "auto",
@@ -291,16 +294,14 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
291
294
  /* HYDRATE_EVENTS */
292
295
  )
293
296
  ]),
294
- append: vue.withCtx(() => [
295
- vue.createVNode(_component_el_select_v2, {
296
- modelValue: unit.all,
297
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unit.all = $event),
298
- options: options.value
299
- }, null, 8, ["modelValue", "options"])
300
- ]),
301
297
  _: 1
302
298
  /* STABLE */
303
- }, 8, ["modelValue", "disabled", "clearable"])
299
+ }, 8, ["modelValue", "disabled", "clearable"]),
300
+ vue.createVNode(_component_el_select_v2, {
301
+ modelValue: unit.all,
302
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unit.all = $event),
303
+ options: options.value
304
+ }, null, 8, ["modelValue", "options"])
304
305
  ],
305
306
  512
306
307
  /* NEED_PATCH */
@@ -1 +1 @@
1
- {"version":3,"file":"box-size-input.vue2.js","sources":["../../../src/box-size-input/src/box-size-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkBoxSizeInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-box-size-input\">\n <div v-show=\"!isMerge\" :class=\"width.value < 500 ? '' : 'flex'\">\n <el-input\n v-for=\"(item, key) in inputList\"\n :key=\"key\"\n v-model=\"positions[item.position]\"\n type=\"number\"\n :controls=\"false\"\n :disabled=\"unit[item.position] == 'auto'\"\n >\n <template v-if=\"width.value > 600 || width.value < 500\" #prefix>\n <span\n class=\"w-resize\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown(item.position, $event)\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n :hide-after=\"0\"\n class=\"item\"\n effect=\"dark\"\n :content=\"item.name\"\n placement=\"top-start\"\n :disabled=\"disabledTooltip\"\n >\n <dk-icon :icon=\"item.icon\" />\n </el-tooltip>\n </span>\n </template>\n <template #append>\n <el-select-v2 v-model=\"unit[item.position]\" :options=\"options\"> </el-select-v2>\n </template>\n </el-input>\n </div>\n <div v-show=\"isMerge\">\n <el-input\n v-model=\"positions.all\"\n type=\"number\"\n :controls=\"false\"\n :disabled=\"unit.all === 'auto'\"\n :clearable=\"props.clearable\"\n >\n <template #prefix>\n <span\n class=\"w-resize\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('all', $event)\"\n @mouseup=\"handleMouseUp\"\n >\n <dk-icon icon=\"Rank\"></dk-icon>\n </span>\n </template>\n <template #append>\n <el-select-v2 v-model=\"unit.all\" :options=\"options\"> </el-select-v2>\n </template>\n </el-input>\n </div>\n <div v-if=\"props.showMerge\" class=\"dk-full\" @click=\"isMerge = !isMerge\">\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :content=\"isMerge ? '独立配置' : '批量配置'\"\n placement=\"top\"\n :hide-after=\"0\"\n >\n <el-button v-if=\"isMerge\">\n <dk-icon icon=\"streamline:interface-layout-border-horizontal-border-cell-center-format-formatting\"></dk-icon>\n </el-button>\n <el-button v-else>\n <dk-icon icon=\"streamline:interface-layout-border-full-grid-layout-layouts-module\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { boxSizeInputProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\n\nconst props = defineProps(boxSizeInputProps)\nconst el: any = ref()\nconst { width } = useElementSize(el) // 当前组件宽度\n// First, second, third, fourth\nconst positions: any = reactive({\n all: '',\n // 一般用于padding、margin、border\n first: '',\n second: '',\n third: '',\n fourth: '',\n // 一般用于radius\n})\n\nconst unit: any = reactive({\n all: 'px',\n first: 'rem',\n second: 'px',\n third: 'px',\n fourth: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'rm', 'vh', 'auto']\nconst position = ref('')\nconst isMerge = ref(props.defaultIsMerge)\nconst isDragging = ref(false)\nconst startX = ref(0)\nconst disabledTooltip = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\n\nconst options = computed(() => {\n return units.map((item) => {\n return {\n label: item,\n value: item,\n }\n })\n})\n\nconst inputList = computed(() => {\n let list: any[]\n if (props.type === 'radius') {\n list = [\n {\n position: 'first',\n name: '左上',\n icon: 'ant-design:radius-upleft-outlined',\n },\n {\n position: 'second',\n name: '右上',\n icon: 'ant-design:radius-upright-outlined',\n },\n {\n position: 'fourth',\n name: '左下',\n icon: 'ant-design:radius-bottomleft-outlined',\n },\n {\n position: 'third',\n name: '左下',\n icon: 'ant-design:radius-bottomright-outlined',\n },\n ]\n } else {\n list = [\n { position: 'first', name: '上', icon: 'ArrowUp' },\n { position: 'second', name: '右', icon: 'ArrowRight' },\n { position: 'third', name: '下', icon: 'ArrowDown' },\n { position: 'fourth', name: '左', icon: 'ArrowLeft' },\n ]\n }\n return list\n})\nconst emit = defineEmits(['update:modelValue'])\n\nconst handleMouseDown = (_position: any, event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n position.value = _position\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n positions[position.value] = event.clientX - startX.value\n }\n}\n\nconst handleMouseUp = () => {\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n position.value = ''\n}\n\nconst initValue = () => {\n const getUnit = (value: string) => {\n let unit = 'px'\n units.forEach((item) => {\n if (value.includes(item)) {\n unit = item\n }\n })\n return unit\n }\n\n const arr = props.modelValue.split(' ') || ['0px']\n let [first, second = first, third = first, fourth = second] = arr\n\n if (arr.length === 4) {\n isMerge.value = false\n } else if (arr.length === 3) {\n isMerge.value = false\n fourth = ''\n } else if (arr.length === 2) {\n isMerge.value = false\n third = first\n fourth = second\n } else {\n isMerge.value = true\n second = third = fourth = first\n }\n\n const positionValues: any = { first, second, third, fourth }\n for (const pos in positionValues) {\n positions[pos] = parseInt(positionValues[pos]) || 0\n unit[pos] = getUnit(positionValues[pos])\n }\n\n if (isMerge.value) {\n positions.all = positions.first\n unit.all = unit.first\n }\n}\n\n// 值的初始化\nwatch(\n () => props.modelValue,\n () => {\n initValue()\n }\n)\n\n// const sizeValue = computed(() => {\n// if (isMerge.value) {\n// if (unit.all === 'auto') {\n// return 'auto'\n// // emit('update:modelValue', 'auto')\n// } else {\n// // emit('update:modelValue', `${positions.all}${unit.all}`)\n// return `${positions.all}${unit.all}`\n// }\n// } else {\n// // 如果有一个值为auto,则为auto\n// let value = ''\n// for (const pos in unit) {\n// if (pos === 'all') continue\n// if (unit[pos] === 'auto') {\n// value += 'auto '\n// } else {\n// value += `${positions[pos]}${unit[pos]} `\n// }\n// }\n// // emit('update:modelValue', value.trim())\n// return value.trim()\n// }\n// })\n\nconst emitValue = () => {\n if (isMerge.value) {\n if (unit.all === 'auto') {\n emit('update:modelValue', 'auto')\n } else {\n emit('update:modelValue', `${positions.all}${unit.all}`)\n }\n } else {\n // 如果有一个值为auto,则为auto\n let value = ''\n for (const pos in unit) {\n if (pos === 'all') continue\n if (unit[pos] === 'auto') {\n value += 'auto '\n } else {\n value += `${positions[pos]}${unit[pos]} `\n }\n }\n emit('update:modelValue', value.trim())\n }\n}\n\nwatch(positions, () => {\n emitValue()\n})\nwatch(isMerge, () => {\n emitValue()\n})\nwatch(unit, () => {\n emitValue()\n})\n\n// watch(sizeValue, () => {\n// console.log('sizeValue', sizeValue)\n// emit('update:modelValue', sizeValue)\n// })\n\nonMounted(() => {\n initValue()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","unit","watch","onMounted"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA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,IAAA,CAAA,mBAAA,EAAqB,KAAM,CAAA,IAAA,EAAM,CAAA,CAAA;AAAA,OACxC;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA,CAAM,WAAW,MAAM;AACrB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAAA,SAAA,CAAM,SAAS,MAAM;AACnB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAAA,SAAA,CAAM,MAAM,MAAM;AAChB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAOD,IAAAC,aAAA,CAAU,MAAM;AACd,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"box-size-input.vue2.js","sources":["../../../src/box-size-input/src/box-size-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkBoxSizeInput',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-box-size-input\">\n <div v-show=\"!isMerge\" :class=\"width > 500 ? '' : ''\">\n <div v-for=\"(item, key) in inputList\" :key=\"key\" style=\"display: flex\">\n <el-input\n v-model=\"positions[item.position]\"\n type=\"number\"\n :controls=\"false\"\n :disabled=\"unit[item.position] == 'auto'\"\n >\n <template v-if=\"width > 600 || width < 500\" #prefix>\n <span\n class=\"w-resize\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown(item.position, $event)\"\n @mouseup=\"handleMouseUp\"\n >\n <el-tooltip\n :hide-after=\"0\"\n class=\"item\"\n effect=\"dark\"\n :content=\"item.name\"\n placement=\"top-start\"\n :disabled=\"disabledTooltip\"\n >\n <dk-icon :icon=\"item.icon\" />\n </el-tooltip>\n </span>\n </template>\n <!-- <template #append>-->\n <!-- <el-select-v2 v-model=\"unit[item.position]\" :options=\"options\">-->\n <!-- </el-select-v2>-->\n <!-- </template>-->\n </el-input>\n <el-select-v2 v-model=\"unit[item.position]\" :options=\"options\"> </el-select-v2>\n </div>\n </div>\n <div v-show=\"isMerge\" style=\"display: flex\">\n <el-input\n v-model=\"positions.all\"\n type=\"number\"\n :controls=\"false\"\n :disabled=\"unit.all === 'auto'\"\n :clearable=\"props.clearable\"\n >\n <template #prefix>\n <span\n class=\"w-resize\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('all', $event)\"\n @mouseup=\"handleMouseUp\"\n >\n <dk-icon icon=\"Rank\"></dk-icon>\n </span>\n </template>\n </el-input>\n <el-select-v2 v-model=\"unit.all\" :options=\"options\"> </el-select-v2>\n </div>\n <div v-if=\"props.showMerge\" class=\"dk-full\" @click=\"isMerge = !isMerge\">\n <el-tooltip\n class=\"item\"\n effect=\"dark\"\n :content=\"isMerge ? '独立配置' : '批量配置'\"\n placement=\"top\"\n :hide-after=\"0\"\n >\n <el-button v-if=\"isMerge\">\n <dk-icon icon=\"streamline:interface-layout-border-horizontal-border-cell-center-format-formatting\"></dk-icon>\n </el-button>\n <el-button v-else>\n <dk-icon icon=\"streamline:interface-layout-border-full-grid-layout-layouts-module\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { boxSizeInputProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\n\n\nconst props = defineProps(boxSizeInputProps)\nconst el: any = ref()\nconst { width } = useElementSize(el) // 当前组件宽度\n// First, second, third, fourth\nconst positions: any = reactive({\n all: '',\n // 一般用于padding、margin、border\n first: '',\n second: '',\n third: '',\n fourth: '',\n // 一般用于radius\n})\n\nconst unit: any = reactive({\n all: 'px',\n first: 'rem',\n second: 'px',\n third: 'px',\n fourth: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'rm', 'vh', 'auto']\nconst position = ref('')\nconst isMerge = ref(props.defaultIsMerge)\nconst isDragging = ref(false)\nconst startX = ref(0)\nconst disabledTooltip = ref(false)\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\n\nconst options = computed(() => {\n return units.map((item) => {\n return {\n label: item,\n value: item,\n }\n })\n})\n\nconst inputList = computed(() => {\n let list: any[]\n if (props.type === 'radius') {\n list = [\n {\n position: 'first',\n name: '左上',\n icon: 'ant-design:radius-upleft-outlined',\n },\n {\n position: 'second',\n name: '右上',\n icon: 'ant-design:radius-upright-outlined',\n },\n {\n position: 'fourth',\n name: '左下',\n icon: 'ant-design:radius-bottomleft-outlined',\n },\n {\n position: 'third',\n name: '左下',\n icon: 'ant-design:radius-bottomright-outlined',\n },\n ]\n } else {\n list = [\n { position: 'first', name: '上', icon: 'ArrowUp' },\n { position: 'second', name: '右', icon: 'ArrowRight' },\n { position: 'third', name: '下', icon: 'ArrowDown' },\n { position: 'fourth', name: '左', icon: 'ArrowLeft' },\n ]\n }\n return list\n})\nconst emit = defineEmits(['update:modelValue'])\n\nconst handleMouseDown = (_position: any, event: any) => {\n isDragging.value = true\n startX.value = event.clientX\n position.value = _position\n trackMouseBound.value = handleMouseMove.bind(event)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n document.addEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'ew-resize'\n}\n\nconst handleMouseMove = (event: any) => {\n if (isDragging.value) {\n positions[position.value] = event.clientX - startX.value\n }\n}\n\nconst handleMouseUp = () => {\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n document.body.style.cursor = 'default'\n isDragging.value = false\n position.value = ''\n}\n\nconst initValue = () => {\n const getUnit = (value: string) => {\n let unit = 'px'\n units.forEach((item) => {\n if (value.includes(item)) {\n unit = item\n }\n })\n return unit\n }\n\n const arr = props.modelValue.split(' ') || ['0px']\n let [first, second = first, third = first, fourth = second] = arr\n\n if (arr.length === 4) {\n isMerge.value = false\n } else if (arr.length === 3) {\n isMerge.value = false\n fourth = ''\n } else if (arr.length === 2) {\n isMerge.value = false\n third = first\n fourth = second\n } else {\n isMerge.value = true\n second = third = fourth = first\n }\n\n const positionValues: any = { first, second, third, fourth }\n for (const pos in positionValues) {\n positions[pos] = parseInt(positionValues[pos]) || 0\n unit[pos] = getUnit(positionValues[pos])\n }\n\n if (isMerge.value) {\n positions.all = positions.first\n unit.all = unit.first\n }\n}\n\n// 值的初始化\nwatch(\n () => props.modelValue,\n () => {\n initValue()\n }\n)\n\n// const sizeValue = computed(() => {\n// if (isMerge.value) {\n// if (unit.all === 'auto') {\n// return 'auto'\n// // emit('update:modelValue', 'auto')\n// } else {\n// // emit('update:modelValue', `${positions.all}${unit.all}`)\n// return `${positions.all}${unit.all}`\n// }\n// } else {\n// // 如果有一个值为auto,则为auto\n// let value = ''\n// for (const pos in unit) {\n// if (pos === 'all') continue\n// if (unit[pos] === 'auto') {\n// value += 'auto '\n// } else {\n// value += `${positions[pos]}${unit[pos]} `\n// }\n// }\n// // emit('update:modelValue', value.trim())\n// return value.trim()\n// }\n// })\n\nconst emitValue = () => {\n if (isMerge.value) {\n if (unit.all === 'auto') {\n emit('update:modelValue', 'auto')\n } else {\n emit('update:modelValue', `${positions.all}${unit.all}`)\n }\n } else {\n // 如果有一个值为auto,则为auto\n let value = ''\n for (const pos in unit) {\n if (pos === 'all') continue\n if (unit[pos] === 'auto') {\n value += 'auto '\n } else {\n value += `${positions[pos]}${unit[pos]} `\n }\n }\n emit('update:modelValue', value.trim())\n }\n}\n\nwatch(positions, () => {\n emitValue()\n})\nwatch(isMerge, () => {\n emitValue()\n})\nwatch(unit, () => {\n emitValue()\n})\n\n// watch(sizeValue, () => {\n// console.log('sizeValue', sizeValue)\n// emit('update:modelValue', sizeValue)\n// })\n\nonMounted(() => {\n initValue()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","useElementSize","reactive","computed","unit","watch","onMounted"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAsFD,IAAA,MAAM,KAAUC,OAAI,EAAA,CAAA;AACpB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAAC,mBAAA,CAAe,EAAE,CAAA,CAAA;AAEnC,IAAA,MAAM,YAAiBC,YAAS,CAAA;AAAA,MAC9B,GAAK,EAAA,EAAA;AAAA;AAAA,MAEL,KAAO,EAAA,EAAA;AAAA,MACP,MAAQ,EAAA,EAAA;AAAA,MACR,KAAO,EAAA,EAAA;AAAA,MACP,MAAQ,EAAA,EAAA;AAAA;AAAA,KAET,CAAA,CAAA;AAED,IAAA,MAAM,OAAYA,YAAS,CAAA;AAAA,MACzB,GAAK,EAAA,IAAA;AAAA,MACL,KAAO,EAAA,KAAA;AAAA,MACP,MAAQ,EAAA,IAAA;AAAA,MACR,KAAO,EAAA,IAAA;AAAA,MACP,MAAQ,EAAA,IAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,MAAM,QAAQ,CAAC,IAAA,EAAM,KAAK,KAAO,EAAA,IAAA,EAAM,MAAM,MAAM,CAAA,CAAA;AACnD,IAAM,MAAA,QAAA,GAAWF,QAAI,EAAE,CAAA,CAAA;AACvB,IAAM,MAAA,OAAA,GAAUA,OAAI,CAAA,KAAA,CAAM,cAAc,CAAA,CAAA;AACxC,IAAM,MAAA,UAAA,GAAaA,QAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,eAAA,GAAkBA,QAAI,KAAK,CAAA,CAAA;AACjC,IAAM,MAAA,eAAA,GAAuBA,QAAI,IAA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A,IAAA,OAAA,CAAA;AAAA,WACJ,MAAA;AACL,YAAA,KAAA,IAAS,GAAG,SAAU,CAAA,GAAG,CAAC,CAAG,EAAA,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA,CAAA,CAAA;AAAA,WACxC;AAAA,SACF;AACA,QAAK,IAAA,CAAA,mBAAA,EAAqB,KAAM,CAAA,IAAA,EAAM,CAAA,CAAA;AAAA,OACxC;AAAA,KACF,CAAA;AAEA,IAAAA,SAAA,CAAM,WAAW,MAAM;AACrB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAAA,SAAA,CAAM,SAAS,MAAM;AACnB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AACD,IAAAA,SAAA,CAAM,MAAM,MAAM;AAChB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAOD,IAAAC,aAAA,CAAU,MAAM;AACd,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- .dk-box-size-input{display:flex;justify-content:flex-start;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-box-size-input .alone{display:flex}.dk-box-size-input .w-resize{cursor:w-resize;display:flex;align-items:center}.dk-box-size-input .el-input-group__append{padding:0}.dk-box-size-input .el-select-v2__suffix{display:none}.dk-box-size-input .el-select-v2__placeholder{width:100%}.dk-box-size-input .el-virtual-scrollbar{width:2px!important;right:0!important}
1
+ .dk-box-size-input{display:flex;align-items:flex-start;justify-content:space-between;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.dk-box-size-input .alone{display:flex}.dk-box-size-input .w-resize{display:flex;align-items:center;cursor:w-resize}.dk-box-size-input .el-input-group__append{padding:0}.dk-box-size-input .el-select-v2__suffix{display:none}.dk-box-size-input .el-select-v2__placeholder{width:100%}.dk-box-size-input .el-virtual-scrollbar{right:0!important;width:2px!important}
@@ -1,27 +1,34 @@
1
1
  .dk-box-size-input {
2
2
  display: flex;
3
- justify-content: flex-start;
4
- align-items: center;
3
+ align-items: flex-start;
4
+ justify-content: space-between;
5
+ width: 100%;
5
6
  user-select: none;
7
+
6
8
  .alone {
7
9
  display: flex;
8
10
  }
11
+
9
12
  .w-resize {
10
- cursor: w-resize;
11
13
  display: flex;
12
14
  align-items: center;
15
+ cursor: w-resize;
13
16
  }
17
+
14
18
  .el-input-group__append {
15
19
  padding: 0;
16
20
  }
21
+
17
22
  .el-select-v2__suffix {
18
23
  display: none;
19
24
  }
25
+
20
26
  .el-select-v2__placeholder {
21
27
  width: 100%;
22
28
  }
29
+
23
30
  .el-virtual-scrollbar {
24
- width: 2px !important;
25
31
  right: 0 !important;
32
+ width: 2px !important;
26
33
  }
27
34
  }
@@ -39,7 +39,9 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
39
39
  const toggleFull = () => {
40
40
  isFullscreen.value = !vue.unref(isFullscreen);
41
41
  };
42
- const dialogHeight = vue.ref(utils.isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight);
42
+ const dialogHeight = vue.ref(
43
+ utils.isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight
44
+ );
43
45
  vue.watch(
44
46
  () => isFullscreen.value,
45
47
  async (val) => {
@@ -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 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,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;AACvB,MAAA,MAAM,GAA8B,GAAA,EAAE,GAAG,KAAA,EAAO,GAAG,KAAM,EAAA,CAAA;AACzD,MAAA,KAAA,MAAW,OAAO,GAAK,EAAA;AACrB,QAAA,IAAI,MAAO,CAAA,OAAA,CAAQ,GAAG,CAAA,KAAM,CAAI,CAAA,EAAA;AAC9B,UAAA,OAAO,IAAI,GAAG,CAAA,CAAA;AAAA,SAChB;AAAA,OACF;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,YAAA,GAAeC,OAAI,CAAA,KAAA,CAAM,iBAAiB,CAAA,CAAA;AAEhD,IAAAC,SAAA;AAAA,MACE,MAAM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;;;;;;;;;;;;;;;;;;;;;;"}
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;AACvB,MAAA,MAAM,GAA8B,GAAA,EAAE,GAAG,KAAA,EAAO,GAAG,KAAM,EAAA,CAAA;AACzD,MAAA,KAAA,MAAW,OAAO,GAAK,EAAA;AACrB,QAAA,IA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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,6 +2,7 @@
2
2
  .el-dialog__header {
3
3
  margin-right: 0;
4
4
  }
5
+
5
6
  .el-dialog__body {
6
7
  padding: 10px 20px;
7
8
  }
@@ -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 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;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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 +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 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","create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AA,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":"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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GAAG,CAAA,CAAA;AAAA,KACpB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- .dk-file-list-input{width:100%}.dk-file-list-input .button{text-align:center;border-top:1px solid #f5f5f5;padding-top:10px}.dk-file-list-input .dk-image-list ul:after{content:"";display:block;clear:both}.dk-file-list-input .dk-image-list ul li{float:left;margin-right:10px;margin-bottom:10px;border:1px solid var(--el-border-color);border-radius:4px}.dk-file-list-input .dk-image-list ul li .file{position:relative;width:100px;height:100px;text-align:center}.dk-file-list-input .dk-image-list ul li .file div{position:relative}.dk-file-list-input .dk-image-list ul li .file div .other-file{font-size:80px;color:#aaa;line-height:100px}.dk-file-list-input .dk-image-list ul li .file div .el-icon-video-play{display:none;position:absolute;bottom:2px;right:2px;font-size:20px;cursor:pointer}.dk-file-list-input .dk-image-list ul li .file div:hover .el-icon-video-play{color:#409eff;display:block}.dk-file-list-input .dk-image-list ul li .file .close{display:none;cursor:pointer;position:absolute;top:0;line-height:20px;right:0;width:20px;height:20px;text-align:center;background:rgba(0,0,0,.4);border-radius:100%;color:#fff;align-items:center;justify-content:center}.dk-file-list-input .dk-image-list ul li .file:hover .close{display:flex}.dk-file-list-input .dk-image-list ul li .chooseImage{width:100px;height:100px;line-height:100px;text-align:center;font-size:40px;color:#999;cursor:pointer}.dk-file-list-input .dk-image-list ul li .chooseImage:hover{color:#409eff}
1
+ .dk-file-list-input{width:100%}.dk-file-list-input .button{padding-top:10px;text-align:center;border-top:1px solid #f5f5f5}.dk-file-list-input .dk-image-list ul::after{display:block;clear:both;content:""}.dk-file-list-input .dk-image-list ul li{float:left;margin-right:10px;margin-bottom:10px;border:1px solid var(--el-border-color);border-radius:4px}.dk-file-list-input .dk-image-list ul li .file{position:relative;width:100px;height:100px;text-align:center}.dk-file-list-input .dk-image-list ul li .file div{position:relative}.dk-file-list-input .dk-image-list ul li .file div .other-file{font-size:80px;line-height:100px;color:#aaa}.dk-file-list-input .dk-image-list ul li .file div .el-icon-video-play{position:absolute;right:2px;bottom:2px;display:none;font-size:20px;cursor:pointer}.dk-file-list-input .dk-image-list ul li .file div:hover .el-icon-video-play{display:block;color:#409eff}.dk-file-list-input .dk-image-list ul li .file .close{position:absolute;top:0;right:0;display:none;align-items:center;justify-content:center;width:20px;height:20px;line-height:20px;color:#fff;text-align:center;cursor:pointer;background:rgba(0,0,0,.4);border-radius:100%}.dk-file-list-input .dk-image-list ul li .file:hover .close{display:flex}.dk-file-list-input .dk-image-list ul li .chooseImage{width:100px;height:100px;font-size:40px;line-height:100px;color:#999;text-align:center;cursor:pointer}.dk-file-list-input .dk-image-list ul li .chooseImage:hover{color:#409eff}
@@ -1,19 +1,21 @@
1
1
  .dk-file-list-input {
2
2
  width: 100%;
3
+
3
4
  .button {
5
+ padding-top: 10px;
4
6
  text-align: center;
5
7
  border-top: 1px solid #f5f5f5;
6
- padding-top: 10px;
7
8
  }
8
9
 
9
10
  .dk-image-list {
10
11
  ul {
11
12
  // 清除浮动
12
- &:after {
13
- content: '';
13
+ &::after {
14
14
  display: block;
15
15
  clear: both;
16
+ content: '';
16
17
  }
18
+
17
19
  li {
18
20
  float: left;
19
21
  margin-right: 10px;
@@ -32,38 +34,40 @@
32
34
 
33
35
  .other-file {
34
36
  font-size: 80px;
35
- color: #aaa;
36
37
  line-height: 100px;
38
+ color: #aaa;
37
39
  }
40
+
38
41
  .el-icon-video-play {
39
- display: none;
40
42
  position: absolute;
41
- bottom: 2px;
42
43
  right: 2px;
44
+ bottom: 2px;
45
+ display: none;
43
46
  font-size: 20px;
44
47
  cursor: pointer;
45
48
  }
49
+
46
50
  &:hover .el-icon-video-play {
47
- color: #409eff;
48
51
  display: block;
52
+ color: #409eff;
49
53
  }
50
54
  }
51
55
 
52
56
  .close {
53
- display: none;
54
- cursor: pointer;
55
57
  position: absolute;
56
58
  top: 0;
57
- line-height: 20px;
58
59
  right: 0;
60
+ display: none;
61
+ align-items: center;
62
+ justify-content: center;
59
63
  width: 20px;
60
64
  height: 20px;
65
+ line-height: 20px;
66
+ color: #fff;
61
67
  text-align: center;
62
- background: rgba(0, 0, 0, 0.4);
68
+ cursor: pointer;
69
+ background: rgb(0 0 0 / 40%);
63
70
  border-radius: 100%;
64
- color: #fff;
65
- align-items: center;
66
- justify-content: center;
67
71
  }
68
72
 
69
73
  &:hover .close {
@@ -74,10 +78,10 @@
74
78
  .chooseImage {
75
79
  width: 100px;
76
80
  height: 100px;
77
- line-height: 100px;
78
- text-align: center;
79
81
  font-size: 40px;
82
+ line-height: 100px;
80
83
  color: #999;
84
+ text-align: center;
81
85
  cursor: pointer;
82
86
 
83
87
  &:hover {