@vipl520/dk-ui 1.0.42 → 1.0.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (375) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +26101 -0
  3. package/dist/index.min.js +4 -4
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +4 -4
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +26012 -0
  8. package/dist/web-types.json +1 -1
  9. package/es/animate-select/src/animate-select.vue.mjs +1 -1
  10. package/es/animate-select/src/animate-select.vue2.mjs.map +1 -1
  11. package/es/api/attachment.mjs.map +1 -1
  12. package/es/attachment/src/attachment.vue.mjs +1 -1
  13. package/es/attachment/src/attachment.vue2.mjs +1 -7
  14. package/es/attachment/src/attachment.vue2.mjs.map +1 -1
  15. package/es/attachment/src/file-icon.vue.mjs +1 -1
  16. package/es/attachment-dialog/src/attachment-dialog.vue.mjs +1 -1
  17. package/es/attachment-dialog/src/attachment-dialog.vue2.mjs.map +1 -1
  18. package/es/attachment-dialog/src/props.mjs.map +1 -1
  19. package/es/audio-input/src/audio-input.vue.mjs +1 -1
  20. package/es/audio-list-input/src/audio-list-input.vue.mjs +1 -1
  21. package/es/audio-list-input/src/audio-list-input.vue2.mjs.map +1 -1
  22. package/es/box-size-input/src/box-size-input.vue.mjs +1 -1
  23. package/es/box-size-input/src/box-size-input.vue2.mjs +2 -2
  24. package/es/box-size-input/src/box-size-input.vue2.mjs.map +1 -1
  25. package/es/box-size-input/style/index.css +1 -1
  26. package/es/box-size-input/style/index.scss +1 -1
  27. package/es/color-input/src/color-input.vue.mjs +1 -1
  28. package/es/dialog/src/dialog.vue.mjs +1 -1
  29. package/es/dialog/src/dialog.vue2.mjs +1 -3
  30. package/es/dialog/src/dialog.vue2.mjs.map +1 -1
  31. package/es/dialog/style/index.css +1 -1
  32. package/es/dialog/style/index.scss +1 -1
  33. package/es/file-input/src/file-input.vue.mjs +1 -1
  34. package/es/file-input/src/file-input.vue2.mjs.map +1 -1
  35. package/es/file-list-input/src/file-list-input.vue.mjs +1 -1
  36. package/es/file-list-input/src/file-list-input.vue2.mjs.map +1 -1
  37. package/es/form/src/form.vue.mjs +1 -1
  38. package/es/form/src/form.vue2.mjs.map +1 -1
  39. package/es/group/src/group.vue.mjs +1 -1
  40. package/es/group/src/group.vue2.mjs +2 -10
  41. package/es/group/src/group.vue2.mjs.map +1 -1
  42. package/es/hot-area-input/src/component/hot-area-content.vue.mjs +1 -1
  43. package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
  44. package/es/hot-area-input/src/hot-area-input.vue.mjs +1 -1
  45. package/es/hot-area-input/src/hot-area-input.vue2.mjs.map +1 -1
  46. package/es/icon/src/icon.vue.mjs +1 -1
  47. package/es/icon/src/icon.vue2.mjs.map +1 -1
  48. package/es/icon-input/src/icon-content.vue.mjs +1 -1
  49. package/es/icon-input/src/icon-content.vue2.mjs +1 -1
  50. package/es/icon-input/src/icon-content.vue2.mjs.map +1 -1
  51. package/es/icon-input/src/icon-dialog.vue.mjs +1 -1
  52. package/es/icon-input/src/icon-input.vue.mjs +1 -1
  53. package/es/image-input/src/image-input.vue.mjs +1 -1
  54. package/es/image-list-input/src/image-list-input.vue.mjs +1 -1
  55. package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
  56. package/es/index.mjs +7 -2
  57. package/es/index.mjs.map +1 -1
  58. package/es/page-diy/src/components/DiyCloud.vue.mjs +1 -1
  59. package/es/page-diy/src/components/DiyCloud.vue.mjs.map +1 -1
  60. package/es/page-diy/src/components/DragBox.vue.mjs +2 -6
  61. package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
  62. package/es/page-diy/src/components/DragTool.vue.mjs +2 -6
  63. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  64. package/es/page-diy/src/components/PreviewPhone.vue.mjs +1 -1
  65. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  66. package/es/page-diy/src/components/forms/DkEventCreateInput.vue.mjs +1 -1
  67. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +10 -12
  68. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs.map +1 -1
  69. package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
  70. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +1 -3
  71. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs.map +1 -1
  72. package/es/page-diy/src/config/rule/min/common/index.mjs +1 -8
  73. package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
  74. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs +1 -3
  75. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs.map +1 -1
  76. package/es/page-diy/src/config/rule/web/common/DkViewBulletChat.mjs.map +1 -1
  77. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +3 -9
  78. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
  79. package/es/page-diy/src/page-diy.vue.mjs +32 -100
  80. package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
  81. package/es/page-diy/src/utils/eventData.mjs.map +1 -1
  82. package/es/page-diy/src/views/min/DkMinBlank.vue.mjs +1 -1
  83. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +6 -19
  84. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
  85. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs +1 -1
  86. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
  87. package/es/page-diy/src/views/min/DkMinTextarea.vue.mjs +1 -1
  88. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs +1 -1
  89. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
  90. package/es/page-diy/src/views/min/DkMinVideo.vue.mjs +1 -1
  91. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs +1 -1
  92. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs.map +1 -1
  93. package/es/page-diy/src/views/web/DkViewCell.vue.mjs +1 -1
  94. package/es/page-diy/src/views/web/DkViewCell.vue.mjs.map +1 -1
  95. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +2 -4
  96. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +1 -1
  97. package/es/page-diy/src/views/web/DkViewDialog.vue.mjs +1 -1
  98. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs +1 -1
  99. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs.map +1 -1
  100. package/es/page-diy/src/views/web/DkViewImage.vue.mjs +1 -1
  101. package/es/page-diy/src/views/web/DkViewImage.vue.mjs.map +1 -1
  102. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs +1 -1
  103. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +1 -1
  104. package/es/page-diy/src/views/web/DkViewNavBar.vue.mjs +1 -1
  105. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs +1 -1
  106. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs.map +1 -1
  107. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs +1 -1
  108. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs.map +1 -1
  109. package/es/page-diy/src/views/web/DkViewTabbar.vue.mjs +1 -1
  110. package/es/page-diy/src/views/web/DkViewTextarea.vue.mjs +1 -1
  111. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs +1 -1
  112. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
  113. package/es/page-diy/src/views/web/DkViewVideo.vue.mjs +1 -1
  114. package/es/page-diy/style/dk-page-diy.css +1 -1
  115. package/es/page-diy/style/index.css +1 -1
  116. package/es/poster-input/src/component/poster.vue.mjs +1 -1
  117. package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
  118. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue.mjs +1 -1
  119. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +1 -1
  120. package/es/poster-input/src/component/views/DkPosterViewImage.vue.mjs +1 -1
  121. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs +1 -1
  122. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs.map +1 -1
  123. package/es/poster-input/src/component/views/DkPosterViewName.vue.mjs +1 -1
  124. package/es/poster-input/src/component/views/DkPosterViewName.vue2.mjs.map +1 -1
  125. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue.mjs +1 -1
  126. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
  127. package/es/poster-input/src/component/views/DkPosterViewText.vue.mjs +1 -1
  128. package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
  129. package/es/poster-input/src/component/views/quick-action.vue.mjs +1 -1
  130. package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +1 -1
  131. package/es/poster-input/src/poster-input.vue.mjs +1 -1
  132. package/es/poster-input/src/poster-input.vue2.mjs.map +1 -1
  133. package/es/poster-input/style/index.scss +2 -4
  134. package/es/select/src/select.vue.mjs +1 -1
  135. package/es/select/src/select.vue2.mjs +1 -9
  136. package/es/select/src/select.vue2.mjs.map +1 -1
  137. package/es/style-animation-input/src/props.mjs.map +1 -1
  138. package/es/style-animation-input/src/style-animation-input.vue.mjs +1 -1
  139. package/es/style-animation-input/src/style-animation-input.vue2.mjs +1 -1
  140. package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -1
  141. package/es/style-background-input/src/style-background-input.vue.mjs +1 -1
  142. package/es/style-border-input/src/style-border-input.vue.mjs +1 -1
  143. package/es/style-border-input/src/style-border-input.vue2.mjs +1 -1
  144. package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
  145. package/es/style-border-input/style/index.css +1 -1
  146. package/es/style-box-input/src/style-box-input.vue.mjs +1 -1
  147. package/es/style-box-input/src/style-box-input.vue2.mjs +2 -6
  148. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  149. package/es/style-font-input/src/style-font-input.vue.mjs +1 -1
  150. package/es/style-font-input/src/style-font-input.vue2.mjs +3 -21
  151. package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
  152. package/es/style-input/src/style-input.vue.mjs +1 -1
  153. package/es/style-input/src/style-input.vue2.mjs +1 -6
  154. package/es/style-input/src/style-input.vue2.mjs.map +1 -1
  155. package/es/style-number-input/src/style-number-input.vue.mjs +1 -1
  156. package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
  157. package/es/style-position-input/src/style-position-input.vue.mjs +1 -1
  158. package/es/style-position-input/src/style-position-input.vue2.mjs +1 -4
  159. package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
  160. package/es/style-shadow-input/src/style-shadow-content.vue.mjs +1 -1
  161. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs +2 -6
  162. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs.map +1 -1
  163. package/es/style-shadow-input/src/style-shadow-input.vue.mjs +1 -1
  164. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
  165. package/es/table/src/components/ComSearch.vue.mjs +1 -1
  166. package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
  167. package/es/table/src/components/FieldRender.vue.mjs +1 -1
  168. package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
  169. package/es/table/src/components/RecycleDialog.vue.mjs +1 -1
  170. package/es/table/src/components/RecycleDialog.vue2.mjs +1 -3
  171. package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
  172. package/es/table/src/components/header.vue.mjs +1 -1
  173. package/es/table/src/components/header.vue2.mjs +3 -17
  174. package/es/table/src/components/header.vue2.mjs.map +1 -1
  175. package/es/table/src/props.mjs +1 -11
  176. package/es/table/src/props.mjs.map +1 -1
  177. package/es/table/src/table.vue.mjs +1 -1
  178. package/es/table/src/table.vue2.mjs +3 -13
  179. package/es/table/src/table.vue2.mjs.map +1 -1
  180. package/es/table/utils/dkTable.mjs +8 -31
  181. package/es/table/utils/dkTable.mjs.map +1 -1
  182. package/es/table/utils/dkTableApi.mjs.map +1 -1
  183. package/es/test/src/test.vue.mjs +1 -1
  184. package/es/tiny-editor/src/tiny-editor.vue.mjs +1 -1
  185. package/es/tiny-editor/src/tiny-editor.vue2.mjs +2 -4
  186. package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
  187. package/es/tiny-editor/style/index.css +1 -1
  188. package/es/tiny-editor/style/index.scss +3 -2
  189. package/es/video-input/src/video-input.vue.mjs +1 -1
  190. package/es/video-list-input/src/video-list-input.vue.mjs +1 -1
  191. package/es/video-list-input/src/video-list-input.vue2.mjs.map +1 -1
  192. package/lib/animate-select/src/animate-select.vue.js +1 -1
  193. package/lib/animate-select/src/animate-select.vue2.js.map +1 -1
  194. package/lib/api/attachment.js.map +1 -1
  195. package/lib/attachment/src/attachment.vue.js +1 -1
  196. package/lib/attachment/src/attachment.vue2.js +1 -7
  197. package/lib/attachment/src/attachment.vue2.js.map +1 -1
  198. package/lib/attachment/src/file-icon.vue.js +1 -1
  199. package/lib/attachment-dialog/src/attachment-dialog.vue.js +1 -1
  200. package/lib/attachment-dialog/src/attachment-dialog.vue2.js.map +1 -1
  201. package/lib/attachment-dialog/src/props.js.map +1 -1
  202. package/lib/audio-input/src/audio-input.vue.js +1 -1
  203. package/lib/audio-list-input/src/audio-list-input.vue.js +1 -1
  204. package/lib/audio-list-input/src/audio-list-input.vue2.js.map +1 -1
  205. package/lib/box-size-input/src/box-size-input.vue.js +1 -1
  206. package/lib/box-size-input/src/box-size-input.vue2.js +2 -2
  207. package/lib/box-size-input/src/box-size-input.vue2.js.map +1 -1
  208. package/lib/box-size-input/style/index.css +1 -1
  209. package/lib/box-size-input/style/index.scss +1 -1
  210. package/lib/color-input/src/color-input.vue.js +1 -1
  211. package/lib/dialog/src/dialog.vue.js +1 -1
  212. package/lib/dialog/src/dialog.vue2.js +1 -3
  213. package/lib/dialog/src/dialog.vue2.js.map +1 -1
  214. package/lib/dialog/style/index.css +1 -1
  215. package/lib/dialog/style/index.scss +1 -1
  216. package/lib/file-input/src/file-input.vue.js +1 -1
  217. package/lib/file-input/src/file-input.vue2.js.map +1 -1
  218. package/lib/file-list-input/src/file-list-input.vue.js +1 -1
  219. package/lib/file-list-input/src/file-list-input.vue2.js.map +1 -1
  220. package/lib/form/src/form.vue.js +1 -1
  221. package/lib/form/src/form.vue2.js.map +1 -1
  222. package/lib/group/src/group.vue.js +1 -1
  223. package/lib/group/src/group.vue2.js +2 -10
  224. package/lib/group/src/group.vue2.js.map +1 -1
  225. package/lib/hot-area-input/src/component/hot-area-content.vue.js +1 -1
  226. package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
  227. package/lib/hot-area-input/src/hot-area-input.vue.js +1 -1
  228. package/lib/hot-area-input/src/hot-area-input.vue2.js.map +1 -1
  229. package/lib/icon/src/icon.vue.js +1 -1
  230. package/lib/icon/src/icon.vue2.js.map +1 -1
  231. package/lib/icon-input/src/icon-content.vue.js +1 -1
  232. package/lib/icon-input/src/icon-content.vue2.js +1 -1
  233. package/lib/icon-input/src/icon-content.vue2.js.map +1 -1
  234. package/lib/icon-input/src/icon-dialog.vue.js +1 -1
  235. package/lib/icon-input/src/icon-input.vue.js +1 -1
  236. package/lib/image-input/src/image-input.vue.js +1 -1
  237. package/lib/image-list-input/src/image-list-input.vue.js +1 -1
  238. package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
  239. package/lib/index.js +7 -2
  240. package/lib/index.js.map +1 -1
  241. package/lib/page-diy/src/components/DiyCloud.vue.js +1 -1
  242. package/lib/page-diy/src/components/DiyCloud.vue.js.map +1 -1
  243. package/lib/page-diy/src/components/DragBox.vue.js +2 -6
  244. package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
  245. package/lib/page-diy/src/components/DragTool.vue.js +2 -6
  246. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  247. package/lib/page-diy/src/components/PreviewPhone.vue.js +1 -1
  248. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  249. package/lib/page-diy/src/components/forms/DkEventCreateInput.vue.js +1 -1
  250. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +10 -12
  251. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js.map +1 -1
  252. package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
  253. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +1 -3
  254. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js.map +1 -1
  255. package/lib/page-diy/src/config/rule/min/common/index.js +1 -8
  256. package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
  257. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js +1 -3
  258. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js.map +1 -1
  259. package/lib/page-diy/src/config/rule/web/common/DkViewBulletChat.js.map +1 -1
  260. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +3 -9
  261. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
  262. package/lib/page-diy/src/page-diy.vue.js +32 -100
  263. package/lib/page-diy/src/page-diy.vue.js.map +1 -1
  264. package/lib/page-diy/src/utils/eventData.js.map +1 -1
  265. package/lib/page-diy/src/views/min/DkMinBlank.vue.js +1 -1
  266. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +6 -19
  267. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
  268. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js +1 -1
  269. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
  270. package/lib/page-diy/src/views/min/DkMinTextarea.vue.js +1 -1
  271. package/lib/page-diy/src/views/min/DkMinTitle.vue.js +1 -1
  272. package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
  273. package/lib/page-diy/src/views/min/DkMinVideo.vue.js +1 -1
  274. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js +1 -1
  275. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js.map +1 -1
  276. package/lib/page-diy/src/views/web/DkViewCell.vue.js +1 -1
  277. package/lib/page-diy/src/views/web/DkViewCell.vue.js.map +1 -1
  278. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +2 -4
  279. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +1 -1
  280. package/lib/page-diy/src/views/web/DkViewDialog.vue.js +1 -1
  281. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js +1 -1
  282. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js.map +1 -1
  283. package/lib/page-diy/src/views/web/DkViewImage.vue.js +1 -1
  284. package/lib/page-diy/src/views/web/DkViewImage.vue.js.map +1 -1
  285. package/lib/page-diy/src/views/web/DkViewMusic.vue.js +1 -1
  286. package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +1 -1
  287. package/lib/page-diy/src/views/web/DkViewNavBar.vue.js +1 -1
  288. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js +1 -1
  289. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js.map +1 -1
  290. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js +1 -1
  291. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js.map +1 -1
  292. package/lib/page-diy/src/views/web/DkViewTabbar.vue.js +1 -1
  293. package/lib/page-diy/src/views/web/DkViewTextarea.vue.js +1 -1
  294. package/lib/page-diy/src/views/web/DkViewTitle.vue.js +1 -1
  295. package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
  296. package/lib/page-diy/src/views/web/DkViewVideo.vue.js +1 -1
  297. package/lib/page-diy/style/dk-page-diy.css +1 -1
  298. package/lib/page-diy/style/index.css +1 -1
  299. package/lib/poster-input/src/component/poster.vue.js +1 -1
  300. package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
  301. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue.js +1 -1
  302. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +1 -1
  303. package/lib/poster-input/src/component/views/DkPosterViewImage.vue.js +1 -1
  304. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js +1 -1
  305. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js.map +1 -1
  306. package/lib/poster-input/src/component/views/DkPosterViewName.vue.js +1 -1
  307. package/lib/poster-input/src/component/views/DkPosterViewName.vue2.js.map +1 -1
  308. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue.js +1 -1
  309. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
  310. package/lib/poster-input/src/component/views/DkPosterViewText.vue.js +1 -1
  311. package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
  312. package/lib/poster-input/src/component/views/quick-action.vue.js +1 -1
  313. package/lib/poster-input/src/component/views/quick-action.vue2.js.map +1 -1
  314. package/lib/poster-input/src/poster-input.vue.js +1 -1
  315. package/lib/poster-input/src/poster-input.vue2.js.map +1 -1
  316. package/lib/poster-input/style/index.scss +2 -4
  317. package/lib/select/src/select.vue.js +1 -1
  318. package/lib/select/src/select.vue2.js +1 -9
  319. package/lib/select/src/select.vue2.js.map +1 -1
  320. package/lib/style-animation-input/src/props.js.map +1 -1
  321. package/lib/style-animation-input/src/style-animation-input.vue.js +1 -1
  322. package/lib/style-animation-input/src/style-animation-input.vue2.js +1 -1
  323. package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -1
  324. package/lib/style-background-input/src/style-background-input.vue.js +1 -1
  325. package/lib/style-border-input/src/style-border-input.vue.js +1 -1
  326. package/lib/style-border-input/src/style-border-input.vue2.js +1 -1
  327. package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
  328. package/lib/style-border-input/style/index.css +1 -1
  329. package/lib/style-box-input/src/style-box-input.vue.js +1 -1
  330. package/lib/style-box-input/src/style-box-input.vue2.js +2 -6
  331. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  332. package/lib/style-font-input/src/style-font-input.vue.js +1 -1
  333. package/lib/style-font-input/src/style-font-input.vue2.js +3 -21
  334. package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
  335. package/lib/style-input/src/style-input.vue.js +1 -1
  336. package/lib/style-input/src/style-input.vue2.js +0 -5
  337. package/lib/style-input/src/style-input.vue2.js.map +1 -1
  338. package/lib/style-number-input/src/style-number-input.vue.js +1 -1
  339. package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
  340. package/lib/style-position-input/src/style-position-input.vue.js +1 -1
  341. package/lib/style-position-input/src/style-position-input.vue2.js +1 -4
  342. package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
  343. package/lib/style-shadow-input/src/style-shadow-content.vue.js +1 -1
  344. package/lib/style-shadow-input/src/style-shadow-content.vue2.js +2 -6
  345. package/lib/style-shadow-input/src/style-shadow-content.vue2.js.map +1 -1
  346. package/lib/style-shadow-input/src/style-shadow-input.vue.js +1 -1
  347. package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
  348. package/lib/table/src/components/ComSearch.vue.js +1 -1
  349. package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
  350. package/lib/table/src/components/FieldRender.vue.js +1 -1
  351. package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
  352. package/lib/table/src/components/RecycleDialog.vue.js +1 -1
  353. package/lib/table/src/components/RecycleDialog.vue2.js +1 -3
  354. package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
  355. package/lib/table/src/components/header.vue.js +1 -1
  356. package/lib/table/src/components/header.vue2.js +3 -17
  357. package/lib/table/src/components/header.vue2.js.map +1 -1
  358. package/lib/table/src/props.js +1 -11
  359. package/lib/table/src/props.js.map +1 -1
  360. package/lib/table/src/table.vue.js +1 -1
  361. package/lib/table/src/table.vue2.js +3 -13
  362. package/lib/table/src/table.vue2.js.map +1 -1
  363. package/lib/table/utils/dkTable.js +8 -31
  364. package/lib/table/utils/dkTable.js.map +1 -1
  365. package/lib/table/utils/dkTableApi.js.map +1 -1
  366. package/lib/test/src/test.vue.js +1 -1
  367. package/lib/tiny-editor/src/tiny-editor.vue.js +1 -1
  368. package/lib/tiny-editor/src/tiny-editor.vue2.js +2 -4
  369. package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
  370. package/lib/tiny-editor/style/index.css +1 -1
  371. package/lib/tiny-editor/style/index.scss +3 -2
  372. package/lib/video-input/src/video-input.vue.js +1 -1
  373. package/lib/video-list-input/src/video-list-input.vue.js +1 -1
  374. package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
  375. package/package.json +3 -3
@@ -96,12 +96,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
96
96
  }
97
97
  };
98
98
  watch(position, () => {
99
- form.x = parseInt(
100
- String((position.left - props.boxSize / 2) / props.boxSize * props.max)
101
- );
102
- form.y = parseInt(
103
- String((position.top - props.boxSize / 2) / props.boxSize * props.max)
104
- );
99
+ form.x = parseInt(String((position.left - props.boxSize / 2) / props.boxSize * props.max));
100
+ form.y = parseInt(String((position.top - props.boxSize / 2) / props.boxSize * props.max));
105
101
  });
106
102
  watch(form, () => {
107
103
  let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`;
@@ -1 +1 @@
1
- {"version":3,"file":"style-shadow-content.vue2.mjs","sources":["../../../src/style-shadow-input/src/style-shadow-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowContent',\n});\n</script>\n<template>\n <div\n ref=\"el\"\n class=\"dk-style-shadow-content\"\n :style=\"{ '--shadow-box-width': boxSize + 'px' }\"\n >\n <el-form\n label-width=\"60px\"\n label-position=\"left\"\n class=\"shadow-form-content\"\n :size=\"size\"\n >\n <el-form-item label=\"模式\">\n <el-radio-group v-model=\"form.type\">\n <el-radio-button value=\"external\">外部</el-radio-button>\n <el-radio-button value=\"inset\">内部</el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <dk-color-input v-model=\"form.color\" show-alpha></dk-color-input>\n </el-form-item>\n <el-form-item label=\"x轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.x\" type=\"number\"> </el-input>\n <el-select v-model=\"form.x_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"y轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.y\" type=\"number\"> </el-input>\n <el-select v-model=\"form.y_unit\" placeholder=\"请选择\" class=\"w-40px\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"模糊\">\n <div class=\"flex\">\n <el-input v-model=\"form.vague\" type=\"number\"> </el-input>\n <el-select v-model=\"form.vague_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"扩展\">\n <div class=\"flex\">\n <el-input v-model=\"form.extend\" type=\"number\"> </el-input>\n <el-select v-model=\"form.extend_unit\" placeholder=\"请选择\">\n <el-option\n v-for=\"item in units\"\n :key=\"item\"\n :label=\"item\"\n :value=\"item\"\n />\n </el-select>\n </div>\n </el-form-item>\n </el-form>\n <div class=\"shadow-content-shortcut\">\n <div class=\"default-css m-b-10px\">\n <div class=\"m-b-10px\">常用样式</div>\n <el-button\n v-for=\"(item, key) in props.defaultStyles\"\n :key=\"key\"\n size=\"small\"\n @click=\"setStyle(item)\"\n >{{ item.label }}</el-button\n >\n </div>\n <div\n ref=\"box\"\n class=\"shadow-content-box\"\n :class=\"down ? 'down' : ''\"\n :style=\"{ height: boxSize + 'px', width: boxSize + 'px' }\"\n @click=\"getMouseXY($event, 1)\"\n @mousedown=\"onMousedown\"\n @mouseup=\"down = false\"\n @mousemove=\"getMouseXY($event, 0)\"\n >\n <span id=\"spot\" :style=\"spotStyle\">\n <i id=\"center\" />\n </span>\n <span\n id=\"center-spot\"\n :style=\"{ top: boxSize / 2 + 'px', left: boxSize / 2 + 'px' }\"\n />\n <div class=\"x-hr\" :style=\"{ top: boxSize / 2 + 'px' }\" />\n <div class=\"y-hr\" :style=\"{ left: boxSize / 2 + 'px' }\" />\n <div class=\"line\" :style=\"lineStyle\" />\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\n\n// interface StyleOption {\n// label: string\n// value: string\n// }\nconst props = defineProps({\n boxSize: {\n default: 180,\n type: Number,\n },\n size: {\n default: 'small',\n type: String,\n },\n max: {\n default: 24,\n type: Number,\n },\n modelValue: {\n default: '0px 0px 0px rgba(0, 0, 0, 0)',\n type: String,\n },\n defaultStyles: {\n default: () => {\n return [\n { label: '经典', value: '3px 5px 7px 2px #CBCBCBFF' },\n { label: '扁平', value: '4px 4px 3px -2px #E7E5E5FF' },\n { label: '立体', value: '1px 2px 4px 2px #979797FF' },\n ]\n },\n type: Array as () => any,\n },\n})\nconst form = reactive({\n color: '',\n type: 'external',\n x: 0,\n y: 0,\n vague: 0,\n extend: 0,\n x_unit: 'px',\n y_unit: 'px',\n vague_unit: 'px',\n extend_unit: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst down = ref(false)\nconst position: any = reactive({\n left: 0,\n top: 0,\n})\n\nconst lineStyle = ref('')\nconst box = ref()\nconst spotStyle = computed(() => {\n return {\n left: position.left + 'px',\n top: position.top + 'px',\n }\n})\n\nconst getMouseXY = (e: any, force: any) => {\n if (down.value || force) {\n const _box = box.value.getBoundingClientRect()\n position.left = parseInt(String(e.clientX - _box.x))\n position.top = parseInt(String(e.clientY - _box.y))\n }\n}\n\nwatch(position, () => {\n form.x = parseInt(\n String(((position.left - props.boxSize / 2) / props.boxSize) * props.max)\n )\n form.y = parseInt(\n String(((position.top - props.boxSize / 2) / props.boxSize) * props.max)\n )\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(form, () => {\n let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`\n if (form.type === 'inset') {\n value = value + ' inset'\n }\n emit('update:modelValue', value)\n})\nconst onMousedown = (e: any) => {\n getMouseXY(e, 1)\n down.value = true\n}\n\nconst initStyle = (modelValue: any) => {\n if (modelValue?.indexOf(' inset') > -1) {\n form.type = 'inset'\n modelValue = modelValue.replace(' inset', '')\n }\n const shadowData = modelValue.split('rgba')\n let color, shadowValues: any\n\n if (shadowData.length > 1) {\n // 将颜色值和其他阴影值进行分离\n color = 'rgba' + shadowData[1].trim()\n shadowValues = shadowData[0].trim().split(' ')\n } else {\n shadowValues = shadowData[0].trim().split(' ')\n color = shadowValues.pop()\n }\n form.color = color || '#000'\n form.x = parseInt(shadowValues[0]) || 0\n form.y = parseInt(shadowValues[1]) || 0\n form.vague = parseInt(shadowValues[2]) || 0\n form.extend = parseInt(shadowValues[3]) || 0\n\n const getUnit = (value: any) => {\n let unit = value?.replace(/[-\\d.]/g, '') || 'px'\n if (units.indexOf(unit) === -1) {\n unit = 'px'\n }\n return unit\n }\n form.x_unit = getUnit(shadowValues[0])\n form.y_unit = getUnit(shadowValues[1])\n form.vague_unit = getUnit(shadowValues[2])\n form.extend_unit = getUnit(shadowValues[3])\n position.left = props.boxSize / 2 + (form.x / props.max) * props.boxSize || 0\n position.top = props.boxSize / 2 + (form.y / props.max) * props.boxSize || 0\n}\n\nconst setStyle = (item: any) => {\n const style = item.value\n initStyle(style)\n}\n\nonMounted(() => {\n // let modelValue = props.modelValue\n initStyle(props.modelValue)\n})\n</script>\n"],"names":["__M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AA,CAAM,GAAO,GAAA,KAAA,CAAM,OAAW,IAAA,CAAA,CAAA;AAAA,KAC7E,CAAA;AAEA,IAAM,MAAA,QAAA,GAAW,CAAC,IAAc,KAAA;AAC9B,MAAA,MAAM,QAAQ,IAAK,CAAA,KAAA,CAAA;AACnB,MAAA,SAAA,CAAU,KAAK,CAAA,CAAA;AAAA,KACjB,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AAEd,MAAA,SAAA,CAAU,MAAM,UAAU,CAAA,CAAA;AAAA,KAC3B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-shadow-content.vue2.mjs","sources":["../../../src/style-shadow-input/src/style-shadow-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowContent',\n});\n</script>\n<template>\n <div ref=\"el\" class=\"dk-style-shadow-content\" :style=\"{ '--shadow-box-width': boxSize + 'px' }\">\n <el-form label-width=\"60px\" label-position=\"left\" class=\"shadow-form-content\" :size=\"size\">\n <el-form-item label=\"模式\">\n <el-radio-group v-model=\"form.type\">\n <el-radio-button value=\"external\">外部</el-radio-button>\n <el-radio-button value=\"inset\">内部</el-radio-button>\n </el-radio-group>\n </el-form-item>\n <el-form-item label=\"颜色\">\n <dk-color-input v-model=\"form.color\" show-alpha></dk-color-input>\n </el-form-item>\n <el-form-item label=\"x轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.x\" type=\"number\"> </el-input>\n <el-select v-model=\"form.x_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"y轴\">\n <div class=\"flex\">\n <el-input v-model=\"form.y\" type=\"number\"> </el-input>\n <el-select v-model=\"form.y_unit\" placeholder=\"请选择\" class=\"w-40px\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"模糊\">\n <div class=\"flex\">\n <el-input v-model=\"form.vague\" type=\"number\"> </el-input>\n <el-select v-model=\"form.vague_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n <el-form-item label=\"扩展\">\n <div class=\"flex\">\n <el-input v-model=\"form.extend\" type=\"number\"> </el-input>\n <el-select v-model=\"form.extend_unit\" placeholder=\"请选择\">\n <el-option v-for=\"item in units\" :key=\"item\" :label=\"item\" :value=\"item\" />\n </el-select>\n </div>\n </el-form-item>\n </el-form>\n <div class=\"shadow-content-shortcut\">\n <div class=\"default-css m-b-10px\">\n <div class=\"m-b-10px\">常用样式</div>\n <el-button v-for=\"(item, key) in props.defaultStyles\" :key=\"key\" size=\"small\" @click=\"setStyle(item)\">{{\n item.label\n }}</el-button>\n </div>\n <div\n ref=\"box\"\n class=\"shadow-content-box\"\n :class=\"down ? 'down' : ''\"\n :style=\"{ height: boxSize + 'px', width: boxSize + 'px' }\"\n @click=\"getMouseXY($event, 1)\"\n @mousedown=\"onMousedown\"\n @mouseup=\"down = false\"\n @mousemove=\"getMouseXY($event, 0)\"\n >\n <span id=\"spot\" :style=\"spotStyle\">\n <i id=\"center\" />\n </span>\n <span id=\"center-spot\" :style=\"{ top: boxSize / 2 + 'px', left: boxSize / 2 + 'px' }\" />\n <div class=\"x-hr\" :style=\"{ top: boxSize / 2 + 'px' }\" />\n <div class=\"y-hr\" :style=\"{ left: boxSize / 2 + 'px' }\" />\n <div class=\"line\" :style=\"lineStyle\" />\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport { useElementSize } from '@vueuse/core'\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\n\n\n// interface StyleOption {\n// label: string\n// value: string\n// }\nconst props = defineProps({\n boxSize: {\n default: 180,\n type: Number,\n },\n size: {\n default: 'small',\n type: String,\n },\n max: {\n default: 24,\n type: Number,\n },\n modelValue: {\n default: '0px 0px 0px rgba(0, 0, 0, 0)',\n type: String,\n },\n defaultStyles: {\n default: () => {\n return [\n { label: '经典', value: '3px 5px 7px 2px #CBCBCBFF' },\n { label: '扁平', value: '4px 4px 3px -2px #E7E5E5FF' },\n { label: '立体', value: '1px 2px 4px 2px #979797FF' },\n ]\n },\n type: Array as () => any,\n },\n})\nconst form = reactive({\n color: '',\n type: 'external',\n x: 0,\n y: 0,\n vague: 0,\n extend: 0,\n x_unit: 'px',\n y_unit: 'px',\n vague_unit: 'px',\n extend_unit: 'px',\n})\n\nconst units = ['px', '%', 'rem', 'em', 'vw', 'vh']\nconst down = ref(false)\nconst position: any = reactive({\n left: 0,\n top: 0,\n})\n\nconst lineStyle = ref('')\nconst box = ref()\nconst spotStyle = computed(() => {\n return {\n left: position.left + 'px',\n top: position.top + 'px',\n }\n})\n\nconst getMouseXY = (e: any, force: any) => {\n if (down.value || force) {\n const _box = box.value.getBoundingClientRect()\n position.left = parseInt(String(e.clientX - _box.x))\n position.top = parseInt(String(e.clientY - _box.y))\n }\n}\n\nwatch(position, () => {\n form.x = parseInt(String(((position.left - props.boxSize / 2) / props.boxSize) * props.max))\n form.y = parseInt(String(((position.top - props.boxSize / 2) / props.boxSize) * props.max))\n})\nconst emit = defineEmits(['update:modelValue'])\nwatch(form, () => {\n let value = `${form.x}${form.x_unit} ${form.y}${form.y_unit} ${form.vague}${form.vague_unit} ${form.extend}${form.extend_unit} ${form.color}`\n if (form.type === 'inset') {\n value = value + ' inset'\n }\n emit('update:modelValue', value)\n})\nconst onMousedown = (e: any) => {\n getMouseXY(e, 1)\n down.value = true\n}\n\nconst initStyle = (modelValue: any) => {\n if (modelValue?.indexOf(' inset') > -1) {\n form.type = 'inset'\n modelValue = modelValue.replace(' inset', '')\n }\n const shadowData = modelValue.split('rgba')\n let color, shadowValues: any\n\n if (shadowData.length > 1) {\n // 将颜色值和其他阴影值进行分离\n color = 'rgba' + shadowData[1].trim()\n shadowValues = shadowData[0].trim().split(' ')\n } else {\n shadowValues = shadowData[0].trim().split(' ')\n color = shadowValues.pop()\n }\n form.color = color || '#000'\n form.x = parseInt(shadowValues[0]) || 0\n form.y = parseInt(shadowValues[1]) || 0\n form.vague = parseInt(shadowValues[2]) || 0\n form.extend = parseInt(shadowValues[3]) || 0\n\n const getUnit = (value: any) => {\n let unit = value?.replace(/[-\\d.]/g, '') || 'px'\n if (units.indexOf(unit) === -1) {\n unit = 'px'\n }\n return unit\n }\n form.x_unit = getUnit(shadowValues[0])\n form.y_unit = getUnit(shadowValues[1])\n form.vague_unit = getUnit(shadowValues[2])\n form.extend_unit = getUnit(shadowValues[3])\n position.left = props.boxSize / 2 + (form.x / props.max) * props.boxSize || 0\n position.top = props.boxSize / 2 + (form.y / props.max) * props.boxSize || 0\n}\n\nconst setStyle = (item: any) => {\n const style = item.value\n initStyle(style)\n}\n\nonMounted(() => {\n // let modelValue = props.modelValue\n initStyle(props.modelValue)\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,sBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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A;AACnB,MAAA,SAAA,CAAU,KAAK,CAAA,CAAA;AAAA,KACjB,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AAEd,MAAA,SAAA,CAAU,MAAM,UAAU,CAAA,CAAA;AAAA,KAC3B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './style-shadow-input.vue2.mjs';
2
2
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var _StyleShadowInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\style-shadow-input\\src\\style-shadow-input.vue"]]);
4
+ var _StyleShadowInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\style-shadow-input\\src\\style-shadow-input.vue"]]);
5
5
 
6
6
  export { _StyleShadowInput as default };
7
7
  //# sourceMappingURL=style-shadow-input.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"style-shadow-input.vue2.mjs","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item\n v-for=\"(item, key) in shadows\"\n :key=\"key\"\n :title=\"item\"\n :name=\"key + ''\"\n >\n <dk-style-shadow-content\n v-model=\"shadows[key]\"\n ></dk-style-shadow-content>\n </el-collapse-item>\n </el-collapse>\n <ul v-else class=\"shadow-list\">\n <li v-for=\"(item, key) in shadows\" :key=\"key\">\n <el-input v-model=\"shadows[key]\" disabled>\n <template #append>\n <el-popover\n placement=\"right-start\"\n title=\"\"\n width=\"380\"\n trigger=\"click\"\n >\n <template #reference>\n <el-button>设置</el-button>\n </template>\n <dk-style-shadow-content\n v-model=\"shadows[key]\"\n ></dk-style-shadow-content>\n </el-popover>\n </template>\n </el-input>\n <dk-icon\n class=\"close-shadow\"\n icon=\"Close\"\n hover-color=\"#f00\"\n @click=\"delShadow(key)\"\n ></dk-icon>\n </li>\n </ul>\n <el-button class=\"m-t-10px w-100%\" @click=\"addShadow\">\n <dk-icon icon=\"Plus\"></dk-icon>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shadowInputProps } from './props'\nimport { computed, onMounted, ref, watch } from 'vue'\n\n\n\nconst props = defineProps(shadowInputProps)\n\nconst shadows: any = ref([])\n\nconst activeName = ref('1')\nconst addShadow = () => {\n shadows.value.push('1px 1px 1px 1px #000')\n activeName.value = shadows.value.length - 1 + ''\n}\n\nconst delShadow = (index: number) => {\n shadows.value.splice(index, 1)\n}\n\nconst init = () => {\n if (props.modelValue.boxShadow) {\n shadows.value = props.modelValue.boxShadow.split(',')\n }\n}\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst boxShadow = computed(() => {\n return shadows.value.join(',')\n})\n\nwatch(boxShadow, (n, o) => {\n emit('update:modelValue', { boxShadow: boxShadow.value })\n emit('change', { boxShadow: boxShadow.value })\n})\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n { de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A;AAAA,KAC9C,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OACP;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"style-shadow-input.vue2.mjs","sources":["../../../src/style-shadow-input/src/style-shadow-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleShadowInput',\n});\n</script>\n<template>\n <div class=\"dk-style-shadow-input\">\n <el-collapse v-if=\"type === 'collapse'\" v-model=\"activeName\" accordion>\n <el-collapse-item v-for=\"(item, key) in shadows\" :key=\"key\" :title=\"item\" :name=\"key + ''\">\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-collapse-item>\n </el-collapse>\n <ul v-else class=\"shadow-list\">\n <li v-for=\"(item, key) in shadows\" :key=\"key\">\n <el-input v-model=\"shadows[key]\" disabled>\n <template #append>\n <el-popover placement=\"right-start\" title=\"\" width=\"380\" trigger=\"click\">\n <template #reference>\n <el-button>设置</el-button>\n </template>\n <dk-style-shadow-content v-model=\"shadows[key]\"></dk-style-shadow-content>\n </el-popover>\n </template>\n </el-input>\n <dk-icon class=\"close-shadow\" icon=\"Close\" hover-color=\"#f00\" @click=\"delShadow(key)\"></dk-icon>\n </li>\n </ul>\n <el-button class=\"m-t-10px w-100%\" @click=\"addShadow\">\n <dk-icon icon=\"Plus\"></dk-icon>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { shadowInputProps } from './props'\nimport { computed, onMounted, ref, watch } from 'vue'\n\n\n\nconst props = defineProps(shadowInputProps)\n\nconst shadows: any = ref([])\n\nconst activeName = ref('1')\nconst addShadow = () => {\n shadows.value.push('1px 1px 1px 1px #000')\n activeName.value = shadows.value.length - 1 + ''\n}\n\nconst delShadow = (index: number) => {\n shadows.value.splice(index, 1)\n}\n\nconst init = () => {\n if (props.modelValue.boxShadow) {\n shadows.value = props.modelValue.boxShadow.split(',')\n }\n}\n\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst boxShadow = computed(() => {\n return shadows.value.join(',')\n})\n\nwatch(boxShadow, (n, o) => {\n emit('update:modelValue', { boxShadow: boxShadow.value })\n emit('change', { boxShadow: boxShadow.value })\n})\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n { deep: true }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,oBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAsCD,IAAM,MAAA,OAAA,GAAe,GAAI,CAAA,EAAE,CAAA,CAAA;AAE3B,IAAM,MAAA,UAAA,GAAa,IAAI,GAAG,CAAA,CAAA;AAC1B,IAAA,MAAM,YAAY,MAAM;AACtB,MAAQ,OAAA,CAAA,KAAA,CAAM,KAAK,sBAAsB,CAAA,CAAA;AACzC,MAAA,UAAA,CAAW,KAAQ,GAAA,OAAA,CAAQ,KAAM,CAAA,MAAA,GAAS,CAAI,GAAA,EAAA,CAAA;AAAA,KAChD,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,CAAC,KAAkB,KAAA;AACnC,MAAQ,OAAA,CAAA,KAAA,CAAM,MAAO,CAAA,KAAA,EAAO,CAAC,CAAA,CAAA;AAAA,KAC/B,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAI,IAAA,KAAA,CAAM,WAAW,SAAW,EAAA;AAC9B,QAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAM,UAAW,CAAA,SAAA,CAAU,MAAM,GAAG,CAAA,CAAA;AAAA,OACtD;AAAA,KACF,CAAA;AAIA,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAO,OAAA,OAAA,CAAQ,KAAM,CAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAM,KAAA,CAAA,SAAA,EAAW,CAAC,CAAA,EAAG,CAAM,KAAA;AACzB,MAAA,IAAA,CAAK,mBAAqB,EAAA,EAAE,SAAW,EAAA,SAAA,CAAU,OAAO,CAAA,CAAA;AACxD,MAAA,IAAA,CAAK,QAAU,EAAA,EAAE,SAAW,EAAA,SAAA,CAAU,OAAO,CAAA,CAAA;AAAA,KAC9C,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OACP;AAAA,MACA,EAAE,MAAM,IAAK,EAAA;AAAA,KACf,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './ComSearch.vue2.mjs';
2
2
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var ComSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\table\\src\\components\\ComSearch.vue"]]);
4
+ var ComSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\ComSearch.vue"]]);
5
5
 
6
6
  export { ComSearch as default };
7
7
  //# sourceMappingURL=ComSearch.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComSearch.vue2.mjs","sources":["../../../../src/table/src/components/ComSearch.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"table-com-search\">\n <el-form\n label-position=\"top\"\n :model=\"DkTable.comSearch.form\"\n @submit.prevent=\"\"\n @keyup.enter=\"onComSearch\"\n >\n <el-row>\n <template v-for=\"(item, idx) in DkTable.table.column\" :key=\"idx\">\n <template v-if=\"item.operator !== false\">\n <!-- 自定义渲染 component、slot -->\n <el-col\n v-if=\"\n item.comSearchRender == 'customRender' ||\n item.comSearchRender == 'slot'\n \"\n :span=\"spans.common\"\n >\n <!-- 外部可以使用 :deep() 选择器修改css样式 -->\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input\">\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"item.comSearchComponent\"\n v-if=\"item.comSearchRender == 'customRender'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n v-bind=\"item.comSearchProps\"\n :placeholder=\"item.operatorPlaceholder\"\n ></component>\n\n <!-- 自定义渲染-slot -->\n <slot\n v-else-if=\"item.comSearchRender == 'slot'\"\n :name=\"item.comSearchSlotName\"\n ></slot>\n </div>\n </div>\n </el-col>\n\n <!-- 时间范围 -->\n <el-col\n v-else-if=\"\n item.render == 'datetime' &&\n (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\n \"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-date-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : [new Date(), new Date()]\n \"\n :type=\"\n item.comSearchRender == 'date'\n ? 'daterange'\n : 'datetimerange'\n \"\n range-separator=\"到\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n :value-format=\"\n item.comSearchRender == 'date'\n ? 'YYYY-MM-DD'\n : 'YYYY-MM-DD HH:mm:ss'\n \"\n :teleported=\"false\"\n />\n </div>\n </div>\n </el-col>\n <!--时间范围-->\n <el-col\n v-else-if=\"\n item.render == 'time' &&\n (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\n \"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-time-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n is-range\n range-separator=\"到\"\n format=\"HH:mm:ss\"\n value-format=\"HH:mm:ss\"\n start-placeholder=\"开始时间\"\n end-placeholder=\"结束时间\"\n ></el-time-picker>\n </div>\n </div>\n </el-col>\n <el-col v-else :span=\"spans.common\">\n <div class=\"com-search-col\">\n <div\n v-if=\"item.comSearchShowLabel !== false\"\n class=\"com-search-col-label\"\n >\n {{ item.label }}\n </div>\n <!-- 数字范围 -->\n <div\n v-if=\"\n item.operator == 'RANGE' || item.operator == 'NOT RANGE'\n \"\n class=\"com-search-col-input-range\"\n >\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-start']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n <div class=\"range-separator\">到</div>\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-end']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n <!-- 是否 [NOT] NULL -->\n <div\n v-else-if=\"\n item.operator == 'NULL' || item.operator == 'NOT NULL'\n \"\n class=\"com-search-col-input\"\n >\n <el-checkbox\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :label=\"item.operator\"\n size=\"large\"\n ></el-checkbox>\n </div>\n <div v-else-if=\"item.operator\" class=\"com-search-col-input\">\n <!-- 时间筛选 -->\n <el-date-picker\n v-if=\"\n item.render == 'datetime' ||\n item.comSearchRender == 'date'\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :type=\"item.comSearchRender == 'date' ? 'date' : 'datetime'\"\n :value-format=\"\n item.comSearchRender == 'date'\n ? 'YYYY-MM-DD'\n : 'YYYY-MM-DD HH:mm:ss'\n \"\n :placeholder=\"item.operatorPlaceholder\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : new Date()\n \"\n :teleported=\"false\"\n />\n <!-- 年筛选 -->\n <el-date-picker\n v-if=\"item.render == 'year'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n type=\"year\"\n value-format=\"YYYY\"\n style=\"width: 100%\"\n :placeholder=\"item.operatorPlaceholder\"\n />\n <!-- tag、tags、select -->\n <el-select\n v-else-if=\"\n (item.render == 'tag' ||\n item.render == 'tags' ||\n item.comSearchRender == 'select') &&\n item.replaceValue\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </el-select>\n\n <!-- 远程 select -->\n <dk-select\n v-else-if=\"item.comSearchRender == 'remoteSelect'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n filterable\n :placeholder=\"item.operatorPlaceholder\"\n :remote-url=\"item.remoteUrl\"\n ></dk-select>\n\n <!-- 开关 -->\n <el-select\n v-else-if=\"item.render == 'switch'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <template v-if=\"!isEmpty(item.replaceValue)\">\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </template>\n <template v-else>\n <el-option label=\"开\" value=\"1\" />\n <el-option label=\"关\" value=\"0\" />\n </template>\n </el-select>\n\n <!-- 字符串 -->\n <el-input\n v-else\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n </div>\n </el-col>\n </template>\n </template>\n <el-col :xs=\"24\" :sm=\"6\">\n <div class=\"com-search-col pl-20\">\n <el-button v-blur type=\"primary\" @click=\"onComSearch\">\n 搜索</el-button\n >\n <el-button @click=\"onResetForm()\">重置</el-button>\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, ref, computed } from 'vue'\nimport { isEmpty } from 'lodash-es'\nimport { useElementSize } from '@vueuse/core'\nimport DkTableClass from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as DkTableClass\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\nconst spans = computed(() => {\n if (width.value < 768) {\n return {\n common: 24,\n datetime: 24,\n }\n }\n if (width.value < 900) {\n return {\n common: 12,\n datetime: 24,\n }\n }\n if (width.value < 1200) {\n return {\n common: 8,\n datetime: 16,\n }\n }\n return {\n common: 6,\n datetime: 12,\n }\n})\nconst onComSearch = () => {\n const comSearchData: comSearchData[] = []\n for (const key in DkTable.comSearch.form) {\n if (!DkTable.comSearch.fieldData.has(key)) {\n continue\n }\n let val = ''\n const fieldDataTemp = DkTable.comSearch.fieldData.get(key)\n if (\n fieldDataTemp.render == 'datetime' &&\n (fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (\n DkTable.comSearch.form[key] &&\n DkTable.comSearch.form[key].length >= 2\n ) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n if (fieldDataTemp.comSearchRender == 'date') {\n val =\n DkTable.comSearch.form[key][0] +\n ' 00:00:00' +\n ',' +\n DkTable.comSearch.form[key][1] +\n ' 23:59:59'\n } else {\n val =\n DkTable.comSearch.form[key][0] +\n ',' +\n DkTable.comSearch.form[key][1]\n }\n }\n } else if (\n fieldDataTemp.render == 'time' &&\n (fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (\n DkTable.comSearch.form[key] &&\n DkTable.comSearch.form[key].length >= 2\n ) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n // if (fieldDataTemp.comSearchRender == 'date') {\n // val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n // } else {\n val =\n DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n // console.log('val', val, DkTable.comSearch.form[key])\n // }\n }\n } else if (\n fieldDataTemp.operator == 'RANGE' ||\n fieldDataTemp.operator == 'NOT RANGE'\n ) {\n // 普通的范围筛选,DkTable在初始化时已准备好start和end字段\n if (\n !DkTable.comSearch.form[key + '-start'] &&\n !DkTable.comSearch.form[key + '-end']\n ) {\n continue\n }\n val =\n DkTable.comSearch.form[key + '-start'] +\n ',' +\n DkTable.comSearch.form[key + '-end']\n } else if (DkTable.comSearch.form[key]) {\n val = DkTable.comSearch.form[key]\n }\n\n if (val) {\n comSearchData.push({\n field: key,\n val,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n\n // console.log('comSearchData', comSearchData)\n DkTable.onTableAction('com-search', comSearchData)\n}\n\nconst onResetForm = () => {\n // 封装好的onResetForm在此处不能使用\n for (const key in DkTable.comSearch.form) {\n DkTable.comSearch.form[key] = ''\n }\n onComSearch()\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiRA,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAChC,IAAM,MAAA,EAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAA,cAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,IAAM,EAAA;AACtB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,CAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAO,OAAA;AAAA,QACL,MAAQ,EAAA,CAAA;AAAA,QACR,QAAU,EAAA,EAAA;AAAA,OACZ,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAA,MAAM,cAAc,MAAM;AACxB,MAAA,MAAM,gBAAiC,EAAC,CAAA;AACxC,MAAW,KAAA,MAAA,GAAA,IAAO,OAAQ,CAAA,SAAA,CAAU,IAAM,EAAA;AACxC,QAAA,IAAI,CAAC,OAAQ,CAAA,SAAA,CAAU,SAAU,CAAA,GAAA,CAAI,GAAG,CAAG,EAAA;AACzC,UAAA,SAA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Y,WAAA,EAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ComSearch.vue2.mjs","sources":["../../../../src/table/src/components/ComSearch.vue"],"sourcesContent":["<template>\n <div ref=\"el\" class=\"table-com-search\">\n <el-form label-position=\"top\" :model=\"DkTable.comSearch.form\" @submit.prevent=\"\" @keyup.enter=\"onComSearch\">\n <el-row>\n <template v-for=\"(item, idx) in DkTable.table.column\" :key=\"idx\">\n <template v-if=\"item.operator !== false\">\n <!-- 自定义渲染 component、slot -->\n <el-col\n v-if=\"item.comSearchRender == 'customRender' || item.comSearchRender == 'slot'\"\n :span=\"spans.common\"\n >\n <!-- 外部可以使用 :deep() 选择器修改css样式 -->\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input\">\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"item.comSearchComponent\"\n v-if=\"item.comSearchRender == 'customRender'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n v-bind=\"item.comSearchProps\"\n :placeholder=\"item.operatorPlaceholder\"\n ></component>\n\n <!-- 自定义渲染-slot -->\n <slot v-else-if=\"item.comSearchRender == 'slot'\" :name=\"item.comSearchSlotName\"></slot>\n </div>\n </div>\n </el-col>\n\n <!-- 时间范围 -->\n <el-col\n v-else-if=\"item.render == 'datetime' && (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-date-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : [new Date(), new Date()]\n \"\n :type=\"item.comSearchRender == 'date' ? 'daterange' : 'datetimerange'\"\n range-separator=\"到\"\n start-placeholder=\"开始日期\"\n end-placeholder=\"结束日期\"\n :value-format=\"item.comSearchRender == 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss'\"\n :teleported=\"false\"\n />\n </div>\n </div>\n </el-col>\n <!--时间范围-->\n <el-col\n v-else-if=\"item.render == 'time' && (item.operator == 'RANGE' || item.operator == 'NOT RANGE')\"\n :span=\"spans.datetime\"\n >\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <div class=\"com-search-col-input-range\">\n <el-time-picker\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n is-range\n range-separator=\"到\"\n format=\"HH:mm:ss\"\n value-format=\"HH:mm:ss\"\n start-placeholder=\"开始时间\"\n end-placeholder=\"结束时间\"\n ></el-time-picker>\n </div>\n </div>\n </el-col>\n <el-col v-else :span=\"spans.common\">\n <div class=\"com-search-col\">\n <div v-if=\"item.comSearchShowLabel !== false\" class=\"com-search-col-label\">\n {{ item.label }}\n </div>\n <!-- 数字范围 -->\n <div v-if=\"item.operator == 'RANGE' || item.operator == 'NOT RANGE'\" class=\"com-search-col-input-range\">\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-start']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n <div class=\"range-separator\">到</div>\n <el-input\n v-model=\"DkTable.comSearch.form[item.prop! + '-end']\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n <!-- 是否 [NOT] NULL -->\n <div v-else-if=\"item.operator == 'NULL' || item.operator == 'NOT NULL'\" class=\"com-search-col-input\">\n <el-checkbox\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :label=\"item.operator\"\n size=\"large\"\n ></el-checkbox>\n </div>\n <div v-else-if=\"item.operator\" class=\"com-search-col-input\">\n <!-- 时间筛选 -->\n <el-date-picker\n v-if=\"item.render == 'datetime' || item.comSearchRender == 'date'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n :type=\"item.comSearchRender == 'date' ? 'date' : 'datetime'\"\n :value-format=\"item.comSearchRender == 'date' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH:mm:ss'\"\n :placeholder=\"item.operatorPlaceholder\"\n :default-value=\"\n DkTable.comSearch.form[item.prop! + '-default']\n ? DkTable.comSearch.form[item.prop! + '-default']\n : new Date()\n \"\n :teleported=\"false\"\n />\n <!-- 年筛选 -->\n <el-date-picker\n v-if=\"item.render == 'year'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n class=\"datetime-picker\"\n type=\"year\"\n value-format=\"YYYY\"\n style=\"width: 100%\"\n :placeholder=\"item.operatorPlaceholder\"\n />\n <!-- tag、tags、select -->\n <el-select\n v-else-if=\"\n (item.render == 'tag' || item.render == 'tags' || item.comSearchRender == 'select') &&\n item.replaceValue\n \"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </el-select>\n\n <!-- 远程 select -->\n <dk-select\n v-else-if=\"item.comSearchRender == 'remoteSelect'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n filterable\n :placeholder=\"item.operatorPlaceholder\"\n :remote-url=\"item.remoteUrl\"\n ></dk-select>\n\n <!-- 开关 -->\n <el-select\n v-else-if=\"item.render == 'switch'\"\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n :clearable=\"true\"\n >\n <template v-if=\"!isEmpty(item.replaceValue)\">\n <el-option\n v-for=\"(opt, okey) in item.replaceValue\"\n :key=\"item.prop! + okey\"\n :label=\"opt\"\n :value=\"okey\"\n />\n </template>\n <template v-else>\n <el-option label=\"开\" value=\"1\" />\n <el-option label=\"关\" value=\"0\" />\n </template>\n </el-select>\n\n <!-- 字符串 -->\n <el-input\n v-else\n v-model=\"DkTable.comSearch.form[item.prop!]\"\n :placeholder=\"item.operatorPlaceholder\"\n type=\"string\"\n :clearable=\"true\"\n ></el-input>\n </div>\n </div>\n </el-col>\n </template>\n </template>\n <el-col :xs=\"24\" :sm=\"6\">\n <div class=\"com-search-col pl-20\">\n <el-button v-blur type=\"primary\" @click=\"onComSearch\"> 搜索</el-button>\n <el-button @click=\"onResetForm()\">重置</el-button>\n </div>\n </el-col>\n </el-row>\n </el-form>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, ref, computed } from 'vue'\nimport { isEmpty } from 'lodash-es'\nimport { useElementSize } from '@vueuse/core'\nimport DkTableClass from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as DkTableClass\nconst el: any = ref(null)\nconst { width } = useElementSize(el) // 当前组件宽度\nconst spans = computed(() => {\n if (width.value < 768) {\n return {\n common: 24,\n datetime: 24,\n }\n }\n if (width.value < 900) {\n return {\n common: 12,\n datetime: 24,\n }\n }\n if (width.value < 1200) {\n return {\n common: 8,\n datetime: 16,\n }\n }\n return {\n common: 6,\n datetime: 12,\n }\n})\nconst onComSearch = () => {\n const comSearchData: comSearchData[] = []\n for (const key in DkTable.comSearch.form) {\n if (!DkTable.comSearch.fieldData.has(key)) {\n continue\n }\n let val = ''\n const fieldDataTemp = DkTable.comSearch.fieldData.get(key)\n if (\n fieldDataTemp.render == 'datetime' &&\n (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (DkTable.comSearch.form[key] && DkTable.comSearch.form[key].length >= 2) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n if (fieldDataTemp.comSearchRender == 'date') {\n val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n } else {\n val = DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n }\n }\n } else if (\n fieldDataTemp.render == 'time' &&\n (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE')\n ) {\n // 时间范围组件返回的是时间数组\n if (DkTable.comSearch.form[key] && DkTable.comSearch.form[key].length >= 2) {\n // 数组转字符串,以实现通过url参数传递预设搜索值\n // if (fieldDataTemp.comSearchRender == 'date') {\n // val = DkTable.comSearch.form[key][0] + ' 00:00:00' + ',' + DkTable.comSearch.form[key][1] + ' 23:59:59'\n // } else {\n val = DkTable.comSearch.form[key][0] + ',' + DkTable.comSearch.form[key][1]\n // console.log('val', val, DkTable.comSearch.form[key])\n // }\n }\n } else if (fieldDataTemp.operator == 'RANGE' || fieldDataTemp.operator == 'NOT RANGE') {\n // 普通的范围筛选,DkTable在初始化时已准备好start和end字段\n if (!DkTable.comSearch.form[key + '-start'] && !DkTable.comSearch.form[key + '-end']) {\n continue\n }\n val = DkTable.comSearch.form[key + '-start'] + ',' + DkTable.comSearch.form[key + '-end']\n } else if (DkTable.comSearch.form[key]) {\n val = DkTable.comSearch.form[key]\n }\n\n if (val) {\n comSearchData.push({\n field: key,\n val,\n operator: fieldDataTemp.operator,\n render: fieldDataTemp.render,\n })\n }\n }\n\n // console.log('comSearchData', comSearchData)\n DkTable.onTableAction('com-search', comSearchData)\n}\n\nconst onResetForm = () => {\n // 封装好的onResetForm在此处不能使用\n for (const key in DkTable.comSearch.form) {\n DkTable.comSearch.form[key] = ''\n }\n onComSearch()\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuNA,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAChC,IAAM,MAAA,EAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAA,MAAM,EAAE,KAAA,EAAU,GAAA,cAAA,CAAe,EAAE,CAAA,CAAA;AACnC,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,GAAK,EAAA;AACrB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,EAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAI,IAAA,KAAA,CAAM,QAAQ,IAAM,EAAA;AACtB,QAAO,OAAA;AAAA,UACL,MAAQ,EAAA,CAAA;AAAA,UACR,QAAU,EAAA,EAAA;AAAA,SACZ,CAAA;AAAA,OACF;AACA,MAAO,OAAA;AAAA,QACL,MAAQ,EAAA,CAAA;AAAA,QACR,QAAU,EAAA,EAAA;AAAA,OACZ,CAAA;AAAA,KACD,CAAA,CAAA;AACD,IAAA,MAAM,cAAc,MAAM;AACxB,MAAA,MAAM,gBAAiC,EAAC,CAAA;AACxC,MAAW,KAAA,MAAA,GAAA,IAAO,OAAQ,CAAA,SAAA,CAAU,IAAM,EAAA;AACxC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M,EAAA;AACxC,QAAQ,OAAA,CAAA,SAAA,CAAU,IAAK,CAAA,GAAG,CAAI,GAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAY,WAAA,EAAA,CAAA;AAAA,KACd,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './FieldRender.vue2.mjs';
2
2
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var DkFieldRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\table\\src\\components\\FieldRender.vue"]]);
4
+ var DkFieldRender = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\FieldRender.vue"]]);
5
5
 
6
6
  export { DkFieldRender as default };
7
7
  //# sourceMappingURL=FieldRender.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldRender.vue2.mjs","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon\n v-if=\"fieldValue || field.default\"\n :icon=\"fieldValue ? fieldValue : field.default\"\n />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{\n field.replaceValue ? field.replaceValue[tag] ?? tag : tag\n }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{\n field.replaceValue\n ? field.replaceValue[fieldValue] ?? fieldValue\n : fieldValue\n }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime'\">\n {{\n !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined)\n }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'tipButton' &&\n ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' &&\n ((btn.name == 'delete' && DkTable.auth('del')) ||\n btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip\n :disabled=\"!btn.title\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) ||\n btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { openUrl, timeFormat } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : ''\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name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A,GAAgB,CAAC,KAAe,KAAA;AACpC,MAAA,OAAA,CAAQ,cAAc,cAAgB,EAAA;AAAA,QACpC,GAAG,KAAA;AAAA,QACH,KAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,CAAC,GAAmB,KAAA;AACxC,MAAI,IAAA,OAAO,GAAI,CAAA,KAAA,KAAU,UAAY,EAAA;AACnC,QAAA,GAAA,CAAI,KAAM,CAAA,KAAA,CAAM,GAAK,EAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAChC,QAAA,OAAA;AAAA,OACF;AACA,MAAQ,OAAA,CAAA,aAAA,CAAc,GAAI,CAAA,IAAA,EAAM,KAAK,CAAA,CAAA;AAAA,KACvC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FieldRender.vue2.mjs","sources":["../../../../src/table/src/components/FieldRender.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkFieldRender',\n});\n</script>\n<template>\n <!--图标-->\n <div v-if=\"field.render == 'icon'\">\n <dk-icon v-if=\"fieldValue || field.default\" :icon=\"fieldValue ? fieldValue : field.default\" />\n <span v-else>-</span>\n </div>\n\n <!--开关-->\n <el-switch\n v-if=\"field.render == 'switch' && fieldValue !== ''\"\n :model-value=\"fieldValue.toString()\"\n :loading=\"row.loading\"\n inactive-value=\"0\"\n active-value=\"1\"\n size=\"small\"\n @change=\"onChangeField\"\n ></el-switch>\n\n <!-- 单图 -->\n <div v-if=\"field.render == 'image' && fieldValue\" class=\"ba-render-image\">\n <el-image\n :hide-on-click-modal=\"true\"\n :preview-teleported=\"true\"\n :preview-src-list=\"[fieldValue]\"\n :src=\"fieldValue\"\n fit=\"cover\"\n style=\"width: 50px; height: 50px\"\n ></el-image>\n </div>\n\n <!--多图片-->\n <div v-if=\"field.render == 'images'\" class=\"ba-render-image\">\n <template v-if=\"Array.isArray(fieldValue) && fieldValue.length\">\n <el-image\n v-for=\"(item, idx) in fieldValue\"\n :key=\"idx\"\n :initial-index=\"idx\"\n :preview-teleported=\"true\"\n :preview-src-list=\"fieldValue\"\n class=\"images-item\"\n :src=\"item\"\n style=\"width: 50px; height: 50px\"\n :hide-on-click-modal=\"true\"\n ></el-image>\n </template>\n </div>\n\n <div v-if=\"field.render == 'tag' && fieldValue !== ''\">\n <el-tag\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] : fieldValue }}\n </el-tag>\n </div>\n\n <!-- tags -->\n <div v-if=\"field.render == 'tags'\">\n <template v-if=\"Array.isArray(fieldValue)\">\n <template v-for=\"(tag, idx) in fieldValue\" :key=\"idx\">\n <el-tag\n v-if=\"tag !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(tag, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[tag] ?? tag : tag }}</el-tag\n >\n </template>\n </template>\n <template v-else>\n <el-tag\n v-if=\"fieldValue !== ''\"\n class=\"m-1px\"\n :type=\"getTagType(fieldValue, field.custom)\"\n :effect=\"field.effect ?? 'light'\"\n :size=\"field.size ?? 'default'\"\n >\n {{ field.replaceValue ? field.replaceValue[fieldValue] ?? fieldValue : fieldValue }}\n </el-tag>\n </template>\n </div>\n\n <!-- url -->\n <div v-if=\"field.render == 'url' && fieldValue\">\n <el-input :model-value=\"fieldValue\" placeholder=\"链接地址\">\n <template #append>\n <el-button\n @click=\"\n typeof field.click == 'function'\n ? field.click(row, field, fieldValue, column, index)\n : openUrl(fieldValue, field.target)\n \"\n >\n <dk-icon :color=\"'#606266'\" icon=\"Position\" />\n </el-button>\n </template>\n </el-input>\n </div>\n\n <!-- datetime -->\n <div v-if=\"field.render == 'datetime'\">\n {{ !fieldValue ? '-' : timeFormat(fieldValue, field.timeFormat ?? undefined) }}\n </div>\n\n <div v-if=\"field.render == 'time'\">\n {{ fieldValue }}\n </div>\n <div v-if=\"field.render == 'year'\">\n {{ fieldValue }}\n </div>\n <!-- color -->\n <div v-if=\"field.render == 'color'\">\n <div :style=\"{ background: fieldValue }\" class=\"dk-render-color\"></div>\n </div>\n\n <!-- 自定义组件/函数渲染 -->\n <component\n :is=\"field.customRender\"\n v-if=\"field.render == 'customRender'\"\n :render-row=\"row\"\n :render-field=\"field\"\n :render-value=\"fieldValue\"\n :render-column=\"column\"\n :render-index=\"index\"\n />\n\n <!-- 按钮组 -->\n <!-- 只对默认的编辑、删除、排序按钮进行鉴权,其他按钮请通过 display 属性控制按钮是否显示 -->\n <div v-if=\"field.render == 'buttons' && field.buttons\">\n <template v-for=\"(btn, idx) in field.buttons\" :key=\"idx\">\n <template v-if=\"btn.display ? btn.display(row, field) : true\">\n <!-- 常规按钮 未使用-->\n <el-button\n v-if=\"btn.render == 'basicButton'\"\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n\n <!-- 带提示信息的按钮 -->\n <el-tooltip\n v-if=\"btn.render == 'tipButton' && ((btn.name == 'edit' && DkTable.auth('edit')) || btn.name != 'edit')\"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n placement=\"top\"\n :hide-after=\"0\"\n :show-after=\"100\"\n >\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n @click=\"onButtonClick(btn)\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n\n <!-- 带确认框的按钮 -->\n <el-popconfirm\n v-if=\"\n btn.render == 'confirmButton' && ((btn.name == 'delete' && DkTable.auth('del')) || btn.name != 'delete')\n \"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.popconfirm\"\n :hide-after=\"0\"\n :show-after=\"100\"\n @confirm=\"onButtonClick(btn)\"\n >\n <template #reference>\n <div class=\"dk-tooltip-button\">\n <el-tooltip :disabled=\"!btn.title\" :content=\"btn.title ?? ''\" placement=\"top\">\n <el-button\n v-blur\n :class=\"btn.class\"\n class=\"table-operate\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">\n {{ btn.text }}\n </div>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n\n <!-- 带提示的可拖拽按钮 -->\n <el-tooltip\n v-if=\"\n btn.render == 'moveButton' &&\n ((btn.name == 'weigh-sort' && DkTable.auth('sortable')) || btn.name != 'weigh-sort')\n \"\n :disabled=\"!(btn.title && !btn.disabledTip)\"\n :content=\"btn.title ?? ''\"\n :hide-after=\"0\"\n :show-after=\"100\"\n placement=\"top\"\n >\n <el-button\n :class=\"btn.class\"\n class=\"table-operate move-button\"\n :type=\"btn.type\"\n :disabled=\"btn.disabled && btn.disabled(row, field)\"\n v-bind=\"btn.attr\"\n size=\"small\"\n >\n <dk-icon :icon=\"btn.icon\" />\n <div v-if=\"btn.text\" class=\"table-operate-text\">{{ btn.text }}</div>\n </el-button>\n </el-tooltip>\n </template>\n </template>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, ref } from 'vue'\nimport type { TableColumnCtx, TagProps } from 'element-plus'\nimport { openUrl, timeFormat } from '@vipl520/utils'\nimport type dkTable from '../../utils/dkTable'\n\nconst DkTable = inject('DkTable') as dkTable\n\ninterface Props {\n row: TableRow\n field: TableColumn\n column: TableColumnCtx<TableRow>\n index: number\n}\nconst props = defineProps<Props>()\n\nconst fieldName: any = ref(props.field.prop)\nconst fieldValue = ref(props.row[fieldName.value] ?? '')\n\nif (fieldName.value && fieldName.value.indexOf('.') > -1) {\n const fieldNameArr = fieldName.value.split('.')\n const val: any = ref(props.row[fieldNameArr[0]])\n for (let index = 1; index < fieldNameArr.length; index++) {\n val.value = val.value ? val.value[fieldNameArr[index]] ?? '' : ''\n }\n fieldValue.value = val.value\n}\n\nconst getTagType = (value: string, custom: any): TagProps['type'] => {\n return custom && custom[value] ? custom[value] : ''\n}\n\nconst onChangeField = (value: any) => {\n DkTable.onTableAction('field-change', {\n ...props,\n value,\n })\n}\n\nconst onButtonClick = (btn: OptButton) => {\n if (typeof btn.click === 'function') {\n btn.click(props.row, props.field)\n return\n }\n DkTable.onTableAction(btn.name, props)\n}\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;A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;AACxC,MAAI,IAAA,OAAO,GAAI,CAAA,KAAA,KAAU,UAAY,EAAA;AACnC,QAAA,GAAA,CAAI,KAAM,CAAA,KAAA,CAAM,GAAK,EAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAChC,QAAA,OAAA;AAAA,OACF;AACA,MAAQ,OAAA,CAAA,aAAA,CAAc,GAAI,CAAA,IAAA,EAAM,KAAK,CAAA,CAAA;AAAA,KACvC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './RecycleDialog.vue2.mjs';
2
2
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var RecycleDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\table\\src\\components\\RecycleDialog.vue"]]);
4
+ var RecycleDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\RecycleDialog.vue"]]);
5
5
 
6
6
  export { RecycleDialog as default };
7
7
  //# sourceMappingURL=RecycleDialog.vue.mjs.map
@@ -71,9 +71,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  const destroySelect = () => {
72
72
  destroy(getSelectionIds());
73
73
  };
74
- const enableBatchOpt = computed(
75
- () => DkTable.recycleTable.selection.length > 0
76
- );
74
+ const enableBatchOpt = computed(() => DkTable.recycleTable.selection.length > 0);
77
75
  return (_ctx, _cache) => {
78
76
  const _component_dk_icon = resolveComponent("dk-icon");
79
77
  const _component_el_button = resolveComponent("el-button");
@@ -1 +1 @@
1
- {"version":3,"file":"RecycleDialog.vue2.mjs","sources":["../../../../src/table/src/components/RecycleDialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'RecycleDialog',\n});\n</script>\n<template>\n <dk-dialog\n v-model=\"DkTable.recycleTable.showDialog\"\n title=\"回收站\"\n width=\"1000px\"\n class=\"dk-table\"\n >\n <div class=\"dk-table-header\">\n <el-button\n class=\"table-header-operate\"\n type=\"info\"\n @click=\"DkTable.onTableHeaderAction('refreshRecycle')\"\n >\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n <el-button\n class=\"table-header-operate\"\n type=\"primary\"\n :disabled=\"!enableBatchOpt\"\n @click=\"restoreSelect()\"\n >\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原</span>\n </el-button>\n <el-button\n class=\"table-header-operate\"\n type=\"danger\"\n :disabled=\"!enableBatchOpt\"\n @click=\"destroySelect()\"\n >\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">销毁</span>\n </el-button>\n <el-popconfirm\n confirm-button-text=\"还原\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要还原全部?\"\n @confirm=\"restore(null)\"\n >\n <template #reference>\n <div class=\"m-l-6px\">\n <el-button class=\"table-header-operate\" type=\"success\">\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <el-popconfirm\n confirm-button-text=\"清空\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要清空全部?\"\n @confirm=\"destroy(null)\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-button class=\"table-header-operate\" type=\"danger\">\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">清空全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <div class=\"table-search\">\n <el-input\n v-model=\"DkTable.recycleTable.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n </div>\n <!--表格s-->\n <el-table\n v-loading=\"DkTable.recycleTable.loading\"\n :data=\"DkTable.recycleTable.data\"\n class=\"dk-data-table\"\n @selection-change=\"onSelectionChange\"\n >\n <el-table-column\n v-for=\"(item, key) in DkTable.recycleTable.column\"\n v-bind=\"{ ...item }\"\n :key=\"key\"\n ></el-table-column>\n <!-- </template>-->\n <el-table-column label=\"操作\" align=\"right\">\n <template #default=\"{ row }\">\n <el-button\n icon=\"RefreshLeft\"\n type=\"primary\"\n size=\"small\"\n @click=\"restore([row.id])\"\n >\n 还原\n </el-button>\n <el-button\n icon=\"CloseBold\"\n type=\"danger\"\n size=\"small\"\n @click=\"destroy([row.id])\"\n >\n 销毁\n </el-button>\n </template>\n </el-table-column>\n </el-table>\n <!--表格e-->\n </dk-dialog>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport { debounce } from '@vipl520/utils'\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-recycle-search', {\n keyword: DkTable.recycleTable.filter!.quickSearch,\n })\n}\n\n/*\n * 记录选择的项\n */\nconst onSelectionChange = (selection: TableRow[]) => {\n DkTable.onTableAction('selection-recycle-change', selection)\n}\n\n/**\n * 销毁\n */\nconst destroy = (ids: any) => {\n DkTable.api.destroy(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\n/**\n * 还原\n */\nconst restore = (ids: any) => {\n DkTable.api.restore(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\nconst getSelectionIds = () => {\n const ids: string[] = []\n DkTable.recycleTable.selection?.forEach((item) => {\n ids.push(item[DkTable.recycleTable.pk!])\n })\n return ids\n}\n\nconst restoreSelect = () => {\n restore(getSelectionIds())\n}\n\nconst destroySelect = () => {\n destroy(getSelectionIds())\n}\n\nconst enableBatchOpt = computed(\n () => DkTable.recycleTable.selection!.length > 0\n)\n</script>\n<style scoped></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;AAuHD,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAEhC,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,oBAAoB,sBAAwB,EAAA;AAAA,QAClD,OAAA,EAAS,OAAQ,CAAA,YAAA,CAAa,MAAQ,CAAA,WAAA;AAAA,OACvC,CAAA,CAAA;AAAA,KACH,CAAA;AAKA,IAAM,MAAA,iBAAA,GAAoB,CAAC,SAA0B,KAAA;AACnD,MAAQ,OAAA,CAAA,aAAA,CAAc,4BAA4B,SAAS,CAAA,CAAA;AAAA,KAC7D,CAAA;AAKA,IAAM,MAAA,OAAA,GAAU,CAAC,GAAa,KAAA;AAC5B,MAAA,OAAA,CAAQ,IAAI,OAAQ,CAAA,GAAG,CAAE,CAAA,IAAA,CAAK,CAAC,GAAQ,KAAA;AACrC,QAAA,OAAA,CAAQ,oBAAoB,gBAAgB,CAAA,CAAA;AAAA,OAC7C,CAAA,CAAA;AAA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ent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'RecycleDialog',\n});\n</script>\n<template>\n <dk-dialog v-model=\"DkTable.recycleTable.showDialog\" title=\"回收站\" width=\"1000px\" class=\"dk-table\">\n <div class=\"dk-table-header\">\n <el-button class=\"table-header-operate\" type=\"info\" @click=\"DkTable.onTableHeaderAction('refreshRecycle')\">\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n <el-button class=\"table-header-operate\" type=\"primary\" :disabled=\"!enableBatchOpt\" @click=\"restoreSelect()\">\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原</span>\n </el-button>\n <el-button class=\"table-header-operate\" type=\"danger\" :disabled=\"!enableBatchOpt\" @click=\"destroySelect()\">\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">销毁</span>\n </el-button>\n <el-popconfirm\n confirm-button-text=\"还原\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要还原全部?\"\n @confirm=\"restore(null)\"\n >\n <template #reference>\n <div class=\"m-l-6px\">\n <el-button class=\"table-header-operate\" type=\"success\">\n <dk-icon icon=\"RefreshLeft\"></dk-icon>\n <span class=\"m-l-5px\">还原全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <el-popconfirm\n confirm-button-text=\"清空\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要清空全部?\"\n @confirm=\"destroy(null)\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-button class=\"table-header-operate\" type=\"danger\">\n <dk-icon icon=\"CloseBold\"></dk-icon>\n <span class=\"m-l-5px\">清空全部</span>\n </el-button>\n </div>\n </template>\n </el-popconfirm>\n <div class=\"table-search\">\n <el-input\n v-model=\"DkTable.recycleTable.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n </div>\n <!--表格s-->\n <el-table\n v-loading=\"DkTable.recycleTable.loading\"\n :data=\"DkTable.recycleTable.data\"\n class=\"dk-data-table\"\n @selection-change=\"onSelectionChange\"\n >\n <el-table-column\n v-for=\"(item, key) in DkTable.recycleTable.column\"\n v-bind=\"{ ...item }\"\n :key=\"key\"\n ></el-table-column>\n <!-- </template>-->\n <el-table-column label=\"操作\" align=\"right\">\n <template #default=\"{ row }\">\n <el-button icon=\"RefreshLeft\" type=\"primary\" size=\"small\" @click=\"restore([row.id])\"> 还原 </el-button>\n <el-button icon=\"CloseBold\" type=\"danger\" size=\"small\" @click=\"destroy([row.id])\"> 销毁 </el-button>\n </template>\n </el-table-column>\n </el-table>\n <!--表格e-->\n </dk-dialog>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport { debounce } from '@vipl520/utils'\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-recycle-search', {\n keyword: DkTable.recycleTable.filter!.quickSearch,\n })\n}\n\n/*\n * 记录选择的项\n */\nconst onSelectionChange = (selection: TableRow[]) => {\n DkTable.onTableAction('selection-recycle-change', selection)\n}\n\n/**\n * 销毁\n */\nconst destroy = (ids: any) => {\n DkTable.api.destroy(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\n/**\n * 还原\n */\nconst restore = (ids: any) => {\n DkTable.api.restore(ids).then((res) => {\n DkTable.onTableHeaderAction('refreshRecycle')\n })\n}\n\nconst getSelectionIds = () => {\n const ids: string[] = []\n DkTable.recycleTable.selection?.forEach((item) => {\n ids.push(item[DkTable.recycleTable.pk!])\n })\n return ids\n}\n\nconst restoreSelect = () => {\n restore(getSelectionIds())\n}\n\nconst destroySelect = () => {\n destroy(getSelectionIds())\n}\n\nconst enableBatchOpt = computed(() => DkTable.recycleTable.selection!.length > 0)\n</script>\n<style scoped></style>\n"],"names":["__MACROS_define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AAG,CAAC,CAAA,CAAA;AAAA,OACxC,CAAA,CAAA;AACD,MAAO,OAAA,GAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,iBAAiB,CAAA,CAAA;AAAA,KAC3B,CAAA;AAEA,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,iBAAiB,CAAA,CAAA;AAAA,KAC3B,CAAA;AAEA,IAAA,MAAM,iBAAiB,QAAS,CAAA,MAAM,QAAQ,YAAa,CAAA,SAAA,CAAW,SAAS,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './header.vue2.mjs';
2
2
  import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var DkTableHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\table\\src\\components\\header.vue"]]);
4
+ var DkTableHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\components\\header.vue"]]);
5
5
 
6
6
  export { DkTableHeader as default };
7
7
  //# sourceMappingURL=header.vue.mjs.map
@@ -55,16 +55,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  },
56
56
  buttons: {
57
57
  default: () => {
58
- return [
59
- "refresh",
60
- "add",
61
- "export_csv",
62
- "edit",
63
- "delete",
64
- "comSearch",
65
- "quickSearch",
66
- "columnDisplay"
67
- ];
58
+ return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"];
68
59
  },
69
60
  type: Array
70
61
  },
@@ -80,9 +71,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
80
71
  const columnDisplayArr = [];
81
72
  let cachedTableData = {};
82
73
  if (DkTable.url) {
83
- cachedTableData = JSON.parse(
84
- storage.get(DkTable.url + "show_column") || "{}"
85
- );
74
+ cachedTableData = JSON.parse(storage.get(DkTable.url + "show_column") || "{}");
86
75
  }
87
76
  for (const item of DkTable.table.column) {
88
77
  if (cachedTableData[item.prop] !== void 0) {
@@ -144,10 +133,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
144
133
  1536
145
134
  /* NEED_PATCH, DYNAMIC_SLOTS */
146
135
  ), [
147
- [
148
- vShow,
149
- props.buttons.includes("comSearch") && unref(DkTable).table.showComSearch
150
- ]
136
+ [vShow, props.buttons.includes("comSearch") && unref(DkTable).table.showComSearch]
151
137
  ])
152
138
  ]),
153
139
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"header.vue2.mjs","sources":["../../../../src/table/src/components/header.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTableHeader',\n});\n</script>\n<template>\n <el-collapse-transition>\n <ComSearch\n v-show=\"\n props.buttons.includes('comSearch') && DkTable.table.showComSearch\n \"\n >\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </ComSearch>\n </el-collapse-transition>\n <div class=\"dk-table-header\">\n <slot name=\"refreshPrepend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('refresh')\"\n content=\"刷新\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n type=\"info\"\n @click=\"onAction('refresh', { loading: true })\"\n >\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n </el-tooltip>\n <slot name=\"refreshAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('add') && DkTable.auth('add')\"\n content=\"新增\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('add')\"\n >\n <dk-icon icon=\"typcn:plus\"></dk-icon>\n <span class=\"m-l-5px\">新增</span>\n </el-button>\n </el-tooltip>\n <slot name=\"AddButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('export_csv') && DkTable.auth('export_csv')\"\n content=\"导出选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('export_csv')\"\n >\n <dk-icon icon=\"typcn:download\"></dk-icon>\n <span class=\"m-l-5px\">导出</span>\n </el-button>\n </el-tooltip>\n <slot name=\"ExportButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('edit') && DkTable.auth('edit')\"\n content=\"编辑选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('edit')\"\n >\n <dk-icon icon=\"typcn:edit\"></dk-icon>\n <span class=\"m-l-5px\">编辑</span>\n </el-button>\n </el-tooltip>\n <slot name=\"EditButtonAppend\"></slot>\n <el-popconfirm\n v-if=\"props.buttons.includes('delete') && DkTable.auth('del')\"\n confirm-button-text=\"删除\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要删除所选记录吗?\"\n :disabled=\"!enableBatchOpt\"\n @confirm=\"onAction('delete')\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-tooltip content=\"删除所选行\" placement=\"top\">\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"danger\"\n >\n <!-- <Icon name=\"fa fa-trash\" />-->\n <dk-icon icon=\"typcn:trash\"></dk-icon>\n <span class=\"m-l-5px\">删除</span>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n <slot name=\"DeleteButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('unfold')\"\n :content=\"(DkTable.table.expandAll ? '收缩' : '展开') + '所有子菜单'\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n :type=\"DkTable.table.expandAll ? 'danger' : 'warning'\"\n @click=\"\n DkTable.onTableHeaderAction('unfold', {\n unfold: !DkTable.table.expandAll,\n })\n \"\n >\n <span class=\"table-header-operate-text\">\n {{ DkTable.table.expandAll ? '收缩所有' : '展开所有' }}\n </span>\n </el-button>\n </el-tooltip>\n <slot name=\"UnfoldButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('recycle') && DkTable.auth('recycle')\"\n content=\"打开回收站\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate m-l-5px\"\n type=\"warning\"\n :loading=\"DkTable.recycleTable.showDialogLoading\"\n @click=\"onAction('recycle')\"\n >\n <span class=\"table-header-operate-text\"> 回收站 </span>\n </el-button>\n </el-tooltip>\n <slot name=\"RecycleButtonAppend\"></slot>\n <div class=\"table-search\">\n <div class=\"mr-1\">\n <el-input\n v-model=\"DkTable.table.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n :size=\"size\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n <div class=\"table-search-button-group\">\n <el-dropdown\n v-if=\"props.buttons.includes('columnDisplay')\"\n :max-height=\"380\"\n :hide-on-click=\"false\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n :class=\"props.buttons.includes('comSearch') ? 'right-border' : ''\"\n >\n <dk-icon icon=\"Grid\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item v-for=\"(item, idx) in columnDisplay\" :key=\"idx\">\n <el-checkbox\n v-if=\"item.prop\"\n :checked=\"!item.show\"\n :model-value=\"item.show\"\n :size=\"size\"\n :label=\"item.label\"\n @change=\"onChangeShowColumn($event, item.prop!)\"\n />\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <div>\n <el-tooltip\n v-if=\"props.buttons.includes('comSearch')\"\n :disabled=\"DkTable.table.showComSearch\"\n content=\"展开常规搜索\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n @click=\"\n DkTable.table.showComSearch = !DkTable.table.showComSearch\n \"\n >\n <dk-icon icon=\"Search\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, computed } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport ComSearch from './ComSearch.vue'\nimport { debounce, storage } from '@vipl520/utils'\n\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst props = defineProps({\n size: {\n default: 'small',\n type: String,\n },\n buttons: {\n default: () => {\n return [\n 'refresh',\n 'add',\n 'export_csv',\n 'edit',\n 'delete',\n 'comSearch',\n 'quickSearch',\n 'columnDisplay',\n ]\n },\n type: Array,\n },\n quickSearchPlaceholder: {\n default: '快捷搜索',\n type: String,\n },\n})\n\nconst columnDisplay = computed(() => {\n const columnDisplayArr = []\n let cachedTableData: any = {}\n if (DkTable.url) {\n cachedTableData = JSON.parse(\n storage.get(DkTable.url + 'show_column') || '{}'\n )\n }\n for (const item of DkTable.table.column) {\n if (cachedTableData[item.prop] !== undefined) {\n item.show = cachedTableData[item.prop]\n }\n // eslint-disable-next-line no-unused-expressions\n item.type === 'selection' ||\n item.render === 'buttons' ||\n item.enableColumnDisplayControl === false\n ? ''\n : columnDisplayArr.push(item)\n }\n return columnDisplayArr\n})\n\nconst enableBatchOpt = computed(() => DkTable.table.selection!.length > 0)\n\nconst onAction = (event: string, data: anyObj = {}) => {\n DkTable.onTableHeaderAction(event, data)\n}\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-search', {\n keyword: DkTable.table.filter!.quickSearch,\n })\n}\n\nconst onChangeShowColumn = (\n value: string | number | boolean,\n field: string\n) => {\n DkTable.onTableHeaderAction('change-show-column', {\n field,\n value,\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuND,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AA4BhC,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,MAAM,mBAAmB,EAAC,CAAA;AAC1B,MAAA,IAAI,kBAAuB,EAAC,CAAA;AAC5B,MAAA,IAAI,QAAQ,GAAK,EAAA;AACf,QAAA,eAAA,GAAkB,IAAK,CAAA,KAAA;AAAA,UACrB,OAAQ,CAAA,GAAA,CAAI,OAAQ,CAAA,GAAA,GAAM,aAAa,CAAK,IAAA,IAAA;AAAA,SAC9C,CAAA;AAAA,OACF;AACA,MAAW,KAAA,MAAA,IAAA,IAAQ,OAAQ,CAAA,KAAA,CAAM,MAAQ,EAAA;AACvC,QAAA,IAAI,eAAgB,CAAA,IAAA,CAAK,IAAI,CAAA,KAAM,KAAW,CAAA,EAAA;AAC5C,UAAK,IAAA,CAAA,IAAA,GAAO,eAAgB,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,SACvC;AAEA,QAAK,IAAA,CAAA,IAAA,KAAS,WACd,IAAA,IAAA,CAAK,MAAW,KAAA,SAAA,IAChB,IAAK,CAAA,0BAAA,KAA+B,KAChC,GAAA,EAAA,GACA,gBAAiB,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,OAChC;AACA,MAAO,OAAA,gBAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,iBAAiB,QAAS,CAAA,MAAM,QAAQ,KAAM,CAAA,SAAA,CAAW,SAAS,CAAC,CAAA,CAAA;AAEzE,IAAA,MAAM,QAAW,GAAA,CAAC,KAAe,EAAA,IAAA,GAAe,EAAO,KAAA;AACrD,MAAQ,OAAA,CAAA,mBAAA,CAAoB,OAAO,IAAI,CAAA,CAAA;AAAA,KACzC,CAAA;AAEA,IAAA,MAAM,gBAAgB,MAAM;AAC1B,MAAA,OAAA,CAAQ,oBAAoB,cAAgB,EAAA;AAAA,QAC1C,OAAA,EAAS,OAAQ,CAAA,KAAA,CAAM,MAAQ,CAAA,WAAA;AAAA,OAChC,CAAA,CAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,kBAAA,GAAqB,CACzB,KAAA,EACA,KACG,KAAA;AACH,MAAA,OAAA,CAAQ,oBAAoB,oBAAsB,EAAA;AAAA,QAChD,KAAA;AAAA,QACA,KAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"header.vue2.mjs","sources":["../../../../src/table/src/components/header.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTableHeader',\n});\n</script>\n<template>\n <el-collapse-transition>\n <ComSearch v-show=\"props.buttons.includes('comSearch') && DkTable.table.showComSearch\">\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </ComSearch>\n </el-collapse-transition>\n <div class=\"dk-table-header\">\n <slot name=\"refreshPrepend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('refresh')\" content=\"刷新\" placement=\"top\">\n <el-button v-blur class=\"table-header-operate\" type=\"info\" @click=\"onAction('refresh', { loading: true })\">\n <dk-icon icon=\"Refresh\"></dk-icon>\n </el-button>\n </el-tooltip>\n <slot name=\"refreshAppend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('add') && DkTable.auth('add')\" content=\"新增\" placement=\"top\">\n <el-button v-blur class=\"table-header-operate\" type=\"primary\" @click=\"onAction('add')\">\n <dk-icon icon=\"typcn:plus\"></dk-icon>\n <span class=\"m-l-5px\">新增</span>\n </el-button>\n </el-tooltip>\n <slot name=\"AddButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('export_csv') && DkTable.auth('export_csv')\"\n content=\"导出选中行\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('export_csv')\"\n >\n <dk-icon icon=\"typcn:download\"></dk-icon>\n <span class=\"m-l-5px\">导出</span>\n </el-button>\n </el-tooltip>\n <slot name=\"ExportButtonAppend\"></slot>\n <el-tooltip v-if=\"props.buttons.includes('edit') && DkTable.auth('edit')\" content=\"编辑选中行\" placement=\"top\">\n <el-button\n v-blur\n :disabled=\"!enableBatchOpt\"\n class=\"table-header-operate\"\n type=\"primary\"\n @click=\"onAction('edit')\"\n >\n <dk-icon icon=\"typcn:edit\"></dk-icon>\n <span class=\"m-l-5px\">编辑</span>\n </el-button>\n </el-tooltip>\n <slot name=\"EditButtonAppend\"></slot>\n <el-popconfirm\n v-if=\"props.buttons.includes('delete') && DkTable.auth('del')\"\n confirm-button-text=\"删除\"\n cancel-button-text=\"取消\"\n confirm-button-type=\"danger\"\n title=\"您确定要删除所选记录吗?\"\n :disabled=\"!enableBatchOpt\"\n @confirm=\"onAction('delete')\"\n >\n <template #reference>\n <div class=\"m-l-5px\">\n <el-tooltip content=\"删除所选行\" placement=\"top\">\n <el-button v-blur :disabled=\"!enableBatchOpt\" class=\"table-header-operate\" type=\"danger\">\n <!-- <Icon name=\"fa fa-trash\" />-->\n <dk-icon icon=\"typcn:trash\"></dk-icon>\n <span class=\"m-l-5px\">删除</span>\n </el-button>\n </el-tooltip>\n </div>\n </template>\n </el-popconfirm>\n <slot name=\"DeleteButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('unfold')\"\n :content=\"(DkTable.table.expandAll ? '收缩' : '展开') + '所有子菜单'\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate\"\n :type=\"DkTable.table.expandAll ? 'danger' : 'warning'\"\n @click=\"\n DkTable.onTableHeaderAction('unfold', {\n unfold: !DkTable.table.expandAll,\n })\n \"\n >\n <span class=\"table-header-operate-text\">\n {{ DkTable.table.expandAll ? '收缩所有' : '展开所有' }}\n </span>\n </el-button>\n </el-tooltip>\n <slot name=\"UnfoldButtonAppend\"></slot>\n <el-tooltip\n v-if=\"props.buttons.includes('recycle') && DkTable.auth('recycle')\"\n content=\"打开回收站\"\n placement=\"top\"\n >\n <el-button\n v-blur\n class=\"table-header-operate m-l-5px\"\n type=\"warning\"\n :loading=\"DkTable.recycleTable.showDialogLoading\"\n @click=\"onAction('recycle')\"\n >\n <span class=\"table-header-operate-text\"> 回收站 </span>\n </el-button>\n </el-tooltip>\n <slot name=\"RecycleButtonAppend\"></slot>\n <div class=\"table-search\">\n <div class=\"mr-1\">\n <el-input\n v-model=\"DkTable.table.filter!.quickSearch\"\n placeholder=\"请输入\"\n prefix-icon=\"Search\"\n :size=\"size\"\n @input=\"debounce(onSearchInput, 500)()\"\n />\n </div>\n <div class=\"table-search-button-group\">\n <el-dropdown v-if=\"props.buttons.includes('columnDisplay')\" :max-height=\"380\" :hide-on-click=\"false\">\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n :class=\"props.buttons.includes('comSearch') ? 'right-border' : ''\"\n >\n <dk-icon icon=\"Grid\"></dk-icon>\n </el-button>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item v-for=\"(item, idx) in columnDisplay\" :key=\"idx\">\n <el-checkbox\n v-if=\"item.prop\"\n :checked=\"!item.show\"\n :model-value=\"item.show\"\n :size=\"size\"\n :label=\"item.label\"\n @change=\"onChangeShowColumn($event, item.prop!)\"\n />\n </el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n <div>\n <el-tooltip\n v-if=\"props.buttons.includes('comSearch')\"\n :disabled=\"DkTable.table.showComSearch\"\n content=\"展开常规搜索\"\n placement=\"top\"\n >\n <el-button\n v-blur\n :size=\"size\"\n class=\"table-search-button-item\"\n @click=\"DkTable.table.showComSearch = !DkTable.table.showComSearch\"\n >\n <dk-icon icon=\"Search\"></dk-icon>\n </el-button>\n </el-tooltip>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { inject, computed } from 'vue'\nimport dkTable from '../../utils/dkTable'\nimport ComSearch from './ComSearch.vue'\nimport { debounce, storage } from '@vipl520/utils'\n\n\n\nconst DkTable = inject('DkTable') as dkTable\n\nconst props = defineProps({\n size: {\n default: 'small',\n type: String,\n },\n buttons: {\n default: () => {\n return ['refresh', 'add', 'export_csv', 'edit', 'delete', 'comSearch', 'quickSearch', 'columnDisplay']\n },\n type: Array,\n },\n quickSearchPlaceholder: {\n default: '快捷搜索',\n type: String,\n },\n})\n\nconst columnDisplay = computed(() => {\n const columnDisplayArr = []\n let cachedTableData: any = {}\n if (DkTable.url) {\n cachedTableData = JSON.parse(storage.get(DkTable.url + 'show_column') || '{}')\n }\n for (const item of DkTable.table.column) {\n if (cachedTableData[item.prop] !== undefined) {\n item.show = cachedTableData[item.prop]\n }\n // eslint-disable-next-line no-unused-expressions\n item.type === 'selection' || item.render === 'buttons' || item.enableColumnDisplayControl === false\n ? ''\n : columnDisplayArr.push(item)\n }\n return columnDisplayArr\n})\n\nconst enableBatchOpt = computed(() => DkTable.table.selection!.length > 0)\n\nconst onAction = (event: string, data: anyObj = {}) => {\n DkTable.onTableHeaderAction(event, data)\n}\n\nconst onSearchInput = () => {\n DkTable.onTableHeaderAction('quick-search', {\n keyword: DkTable.table.filter!.quickSearch,\n })\n}\n\nconst onChangeShowColumn = (value: string | number | boolean, field: string) => {\n DkTable.onTableHeaderAction('change-show-column', {\n field,\n value,\n })\n}\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;AAkLD,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAmBhC,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,MAAM,mBAAmB,EAAC,CAAA;AAC1B,MAAA,IAAI,kBAAuB,EAAC,CAAA;AAC5B,MAAA,IAAI,QAAQ,GAAK,EAAA;AACf,QAAkB,eAAA,GAAA,IAAA,CAAK,MAAM,OAAQ,CAAA,GAAA,CAAI,QAAQ,GAAM,GAAA,aAAa,KAAK,IAAI,CAAA,CAAA;AAAA,OAC/E;AACA,MAAW,KAAA,MAAA,IAAA,IAAQ,OAAQ,CAAA,KAAA,CAAM,MAAQ,EAAA;AACvC,QAAA,IAAI,eAAgB,CAAA,IAAA,CAAK,IAAI,CAAA,KAAM,KAAW,CAAA,EAAA;AAC5C,UAAK,IAAA,CAAA,IAAA,GAAO,eAAgB,CAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -21,17 +21,7 @@ const tableProps = {
21
21
  },
22
22
  buttons: {
23
23
  default: () => {
24
- return [
25
- "refresh",
26
- "add",
27
- "export_csv",
28
- "edit",
29
- "delete",
30
- "comSearch",
31
- "quickSearch",
32
- "columnDisplay",
33
- "recycle"
34
- ];
24
+ return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay", "recycle"];
35
25
  },
36
26
  type: Array
37
27
  },
@@ -1 +1 @@
1
- {"version":3,"file":"props.mjs","sources":["../../../src/table/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n// import ElTableNext from 'el-table-next'\n\nexport const tableProps = {\n tableApi: {\n default: '',\n type: String,\n },\n cacheTable: {\n default: true,\n type: Boolean,\n },\n tableBefore: {\n default: () => {\n return {}\n },\n type: Object,\n },\n tableAfter: {\n default: () => {\n return {}\n },\n type: Object,\n },\n buttons: {\n default: () => {\n return [\n 'refresh',\n 'add',\n 'export_csv',\n 'edit',\n 'delete',\n 'comSearch',\n 'quickSearch',\n 'columnDisplay',\n 'recycle',\n ]\n },\n type: Array,\n },\n hideButtons: {\n default: () => {\n return []\n },\n type: Array,\n },\n}\n\nexport type TableProps = ExtractPropTypes<typeof tableProps>\n"],"names":[],"mappings":"AAGO,MAAM,UAAa,GAAA;AAAA,EACxB,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,QACA,KAAA;AAAA,QACA,YAAA;AAAA,QACA,MAAA;AAAA,QACA,QAAA;AAAA,QACA,WAAA;AAAA,QACA,aAAA;AAAA,QACA,eAAA;AAAA,QACA,SAAA;AAAA,OACF,CAAA;AAAA,KACF;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AACF;;;;"}
1
+ {"version":3,"file":"props.mjs","sources":["../../../src/table/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n// import ElTableNext from 'el-table-next'\n\nexport const tableProps = {\n tableApi: {\n default: '',\n type: String,\n },\n cacheTable: {\n default: true,\n type: Boolean,\n },\n tableBefore: {\n default: () => {\n return {}\n },\n type: Object,\n },\n tableAfter: {\n default: () => {\n return {}\n },\n type: Object,\n },\n buttons: {\n default: () => {\n return ['refresh', 'add', 'export_csv', 'edit', 'delete', 'comSearch', 'quickSearch', 'columnDisplay', 'recycle']\n },\n type: Array,\n },\n hideButtons: {\n default: () => {\n return []\n },\n type: Array,\n },\n}\n\nexport type TableProps = ExtractPropTypes<typeof tableProps>\n"],"names":[],"mappings":"AAGO,MAAM,UAAa,GAAA;AAAA,EACxB,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,IAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAO,OAAA,CAAC,WAAW,KAAO,EAAA,YAAA,EAAc,QAAQ,QAAU,EAAA,WAAA,EAAa,aAAe,EAAA,eAAA,EAAiB,SAAS,CAAA,CAAA;AAAA,KAClH;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AACF;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from './table.vue2.mjs';
2
2
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
3
3
 
4
- var _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-vlib-starter\\dkgs-ui-doc\\packages\\dk-ui\\src\\table\\src\\table.vue"]]);
4
+ var _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table\\src\\table.vue"]]);
5
5
 
6
6
  export { _Table as default };
7
7
  //# sourceMappingURL=table.vue.mjs.map
@@ -17,11 +17,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
17
17
  const props = __props;
18
18
  const FormRef = ref();
19
19
  const TableRef = ref();
20
- const DkTable = new dkTable(
21
- props.tableApi,
22
- props.tableBefore,
23
- props.tableAfter
24
- );
20
+ const DkTable = new dkTable(props.tableApi, props.tableBefore, props.tableAfter);
25
21
  provide("DkTable", DkTable);
26
22
  onMounted(() => {
27
23
  DkTable.getTable(props.cacheTable)?.then(() => {
@@ -36,11 +32,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
36
32
  DkTable.form.ref = FormRef.value;
37
33
  });
38
34
  const effectiveButtons = computed(() => {
39
- return [
40
- ...new Set(
41
- props.buttons.filter((button) => !props.hideButtons.includes(button))
42
- )
43
- ];
35
+ return [...new Set(props.buttons.filter((button) => !props.hideButtons.includes(button)))];
44
36
  });
45
37
  const onTableSizeChange = (val) => {
46
38
  DkTable.onTableAction("page-size-change", { size: val });
@@ -80,9 +72,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
80
72
  }
81
73
  };
82
74
  const onSelectAll = (selection) => {
83
- if (isSelectAll(
84
- selection.map((row) => row[DkTable.table.pk].toString())
85
- )) {
75
+ if (isSelectAll(selection.map((row) => row[DkTable.table.pk].toString()))) {
86
76
  selection.map((row) => {
87
77
  if (row.children) {
88
78
  selectChildren(row.children, true);