@vipl520/dk-ui 1.0.40 → 1.0.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (439) hide show
  1. package/dist/attributes.json +23 -3
  2. package/dist/index.css +1 -1
  3. package/dist/index.min.js +4 -13
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +4 -13
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/tags.json +7 -2
  8. package/dist/web-types.json +71 -12
  9. package/es/animate-select/src/animate-select.vue.mjs +1 -1
  10. package/es/animate-select/src/animate-select.vue2.mjs +5 -1
  11. package/es/animate-select/src/animate-select.vue2.mjs.map +1 -1
  12. package/es/api/attachment.mjs.map +1 -1
  13. package/es/attachment/src/attachment.vue.mjs +1 -1
  14. package/es/attachment/src/attachment.vue2.mjs +7 -1
  15. package/es/attachment/src/attachment.vue2.mjs.map +1 -1
  16. package/es/attachment/src/file-icon.vue.mjs +1 -1
  17. package/es/attachment-dialog/index.d.ts +9 -0
  18. package/es/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
  19. package/es/attachment-dialog/src/attachment-dialog.vue.mjs +1 -1
  20. package/es/attachment-dialog/src/attachment-dialog.vue2.mjs +3 -2
  21. package/es/attachment-dialog/src/attachment-dialog.vue2.mjs.map +1 -1
  22. package/es/attachment-dialog/src/props.d.ts +4 -0
  23. package/es/attachment-dialog/src/props.mjs +4 -0
  24. package/es/attachment-dialog/src/props.mjs.map +1 -1
  25. package/es/audio-input/src/audio-input.vue.mjs +1 -1
  26. package/es/audio-list-input/src/audio-list-input.vue.mjs +1 -1
  27. package/es/audio-list-input/src/audio-list-input.vue2.mjs.map +1 -1
  28. package/es/box-size-input/src/box-size-input.vue.mjs +1 -1
  29. package/es/box-size-input/src/box-size-input.vue2.mjs +60 -59
  30. package/es/box-size-input/src/box-size-input.vue2.mjs.map +1 -1
  31. package/es/box-size-input/style/index.css +1 -1
  32. package/es/box-size-input/style/index.scss +11 -4
  33. package/es/color-input/src/color-input.vue.mjs +1 -1
  34. package/es/dialog/src/dialog.vue.mjs +1 -1
  35. package/es/dialog/src/dialog.vue2.mjs +3 -1
  36. package/es/dialog/src/dialog.vue2.mjs.map +1 -1
  37. package/es/dialog/style/index.scss +1 -0
  38. package/es/file-input/src/file-input.vue.mjs +1 -1
  39. package/es/file-input/src/file-input.vue2.mjs.map +1 -1
  40. package/es/file-list-input/src/file-list-input.vue.mjs +1 -1
  41. package/es/file-list-input/src/file-list-input.vue2.mjs.map +1 -1
  42. package/es/file-list-input/style/index.css +1 -1
  43. package/es/file-list-input/style/index.scss +20 -16
  44. package/es/form/src/form.vue.mjs +1 -1
  45. package/es/form/src/form.vue2.mjs.map +1 -1
  46. package/es/group/src/group.vue.mjs +1 -1
  47. package/es/group/src/group.vue2.mjs +3 -3
  48. package/es/group/src/group.vue2.mjs.map +1 -1
  49. package/es/hot-area-input/src/component/hot-area-content.vue.mjs +1 -1
  50. package/es/hot-area-input/src/component/hot-area-content.vue2.mjs.map +1 -1
  51. package/es/hot-area-input/src/hot-area-input.vue.mjs +1 -1
  52. package/es/hot-area-input/src/hot-area-input.vue2.mjs.map +1 -1
  53. package/es/icon/src/icon.vue.mjs +1 -1
  54. package/es/icon/src/icon.vue2.mjs.map +1 -1
  55. package/es/icon-input/src/icon-content.vue.mjs +1 -1
  56. package/es/icon-input/src/icon-content.vue2.mjs +1 -1
  57. package/es/icon-input/src/icon-content.vue2.mjs.map +1 -1
  58. package/es/icon-input/src/icon-dialog.vue.mjs +1 -1
  59. package/es/icon-input/src/icon-input.vue.mjs +1 -1
  60. package/es/icon-input/src/icon-input.vue2.mjs.map +1 -1
  61. package/es/image-input/src/image-input.vue.mjs +1 -1
  62. package/es/image-list-input/src/image-list-input.vue.mjs +1 -1
  63. package/es/image-list-input/src/image-list-input.vue2.mjs.map +1 -1
  64. package/es/index.mjs +0 -10
  65. package/es/index.mjs.map +1 -1
  66. package/es/page-diy/index.mjs +0 -2
  67. package/es/page-diy/index.mjs.map +1 -1
  68. package/es/page-diy/src/components/DiyCloud.vue.mjs +1 -1
  69. package/es/page-diy/src/components/DiyCloud.vue.mjs.map +1 -1
  70. package/es/page-diy/src/components/DragBox.vue.mjs +7 -3
  71. package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
  72. package/es/page-diy/src/components/DragTool.vue.mjs +6 -2
  73. package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
  74. package/es/page-diy/src/components/PreviewPhone.vue.mjs +1 -1
  75. package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
  76. package/es/page-diy/src/components/forms/DkEventCreateInput.vue.mjs +1 -1
  77. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs +12 -10
  78. package/es/page-diy/src/components/forms/DkEventSelectInput.vue.mjs.map +1 -1
  79. package/es/page-diy/src/config/base/dkSetting.mjs.map +1 -1
  80. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs +9 -1
  81. package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs.map +1 -1
  82. package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs +3 -1
  83. package/es/page-diy/src/config/rule/min/common/DkMinHotArea.mjs.map +1 -1
  84. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +36 -6
  85. package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
  86. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs +6 -2
  87. package/es/page-diy/src/config/rule/min/common/DkMinVideo.mjs.map +1 -1
  88. package/es/page-diy/src/config/rule/min/common/index.mjs +8 -1
  89. package/es/page-diy/src/config/rule/min/common/index.mjs.map +1 -1
  90. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs +3 -1
  91. package/es/page-diy/src/config/rule/web/common/DkPosterBtn.mjs.map +1 -1
  92. package/es/page-diy/src/config/rule/web/common/DkViewBulletChat.mjs.map +1 -1
  93. package/es/page-diy/src/config/rule/web/common/DkViewDialog.mjs +7 -1
  94. package/es/page-diy/src/config/rule/web/common/DkViewDialog.mjs.map +1 -1
  95. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs +9 -3
  96. package/es/page-diy/src/config/rule/web/common/DkViewVideo.mjs.map +1 -1
  97. package/es/page-diy/src/page-diy.vue.mjs +102 -34
  98. package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
  99. package/es/page-diy/src/utils/eventData.mjs.map +1 -1
  100. package/es/page-diy/src/views/min/DkMinBlank.vue.mjs +1 -1
  101. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +24 -7
  102. package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
  103. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs +1 -1
  104. package/es/page-diy/src/views/min/DkMinSwiperImage.vue.mjs.map +1 -1
  105. package/es/page-diy/src/views/min/DkMinTextarea.vue.mjs +1 -1
  106. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs +1 -1
  107. package/es/page-diy/src/views/min/DkMinTitle.vue.mjs.map +1 -1
  108. package/es/page-diy/src/views/min/DkMinVideo.vue.mjs +1 -1
  109. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs +1 -1
  110. package/es/page-diy/src/views/web/DkViewBulletChat.vue.mjs.map +1 -1
  111. package/es/page-diy/src/views/web/DkViewCell.vue.mjs +1 -1
  112. package/es/page-diy/src/views/web/DkViewCell.vue.mjs.map +1 -1
  113. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs +4 -2
  114. package/es/page-diy/src/views/web/DkViewCommonBtn.vue.mjs.map +1 -1
  115. package/es/page-diy/src/views/web/DkViewDialog.vue.mjs +1 -1
  116. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs +1 -1
  117. package/es/page-diy/src/views/web/DkViewGridCellList.vue.mjs.map +1 -1
  118. package/es/page-diy/src/views/web/DkViewImage.vue.mjs +1 -1
  119. package/es/page-diy/src/views/web/DkViewImage.vue.mjs.map +1 -1
  120. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs +1 -1
  121. package/es/page-diy/src/views/web/DkViewMusic.vue.mjs.map +1 -1
  122. package/es/page-diy/src/views/web/DkViewNavBar.vue.mjs +1 -1
  123. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs +1 -1
  124. package/es/page-diy/src/views/web/DkViewNoticeBar.vue.mjs.map +1 -1
  125. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs +1 -1
  126. package/es/page-diy/src/views/web/DkViewSwipe.vue.mjs.map +1 -1
  127. package/es/page-diy/src/views/web/DkViewTabbar.vue.mjs +1 -1
  128. package/es/page-diy/src/views/web/DkViewTextarea.vue.mjs +1 -1
  129. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs +1 -1
  130. package/es/page-diy/src/views/web/DkViewTitle.vue.mjs.map +1 -1
  131. package/es/page-diy/src/views/web/DkViewVideo.vue.mjs +1 -1
  132. package/es/page-diy/style/dk-page-diy.css +1 -1
  133. package/es/page-diy/style/dk-page-diy.scss +3 -3
  134. package/es/page-diy/style/index.css +1 -1
  135. package/es/poster-input/src/component/poster.vue.mjs +1 -1
  136. package/es/poster-input/src/component/poster.vue2.mjs.map +1 -1
  137. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue.mjs +1 -1
  138. package/es/poster-input/src/component/views/DkPosterViewAvatar.vue2.mjs.map +1 -1
  139. package/es/poster-input/src/component/views/DkPosterViewImage.vue.mjs +1 -1
  140. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs +5 -2
  141. package/es/poster-input/src/component/views/DkPosterViewImage.vue2.mjs.map +1 -1
  142. package/es/poster-input/src/component/views/DkPosterViewName.vue.mjs +1 -1
  143. package/es/poster-input/src/component/views/DkPosterViewName.vue2.mjs.map +1 -1
  144. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue.mjs +1 -1
  145. package/es/poster-input/src/component/views/DkPosterViewQrcode.vue2.mjs.map +1 -1
  146. package/es/poster-input/src/component/views/DkPosterViewText.vue.mjs +1 -1
  147. package/es/poster-input/src/component/views/DkPosterViewText.vue2.mjs.map +1 -1
  148. package/es/poster-input/src/component/views/quick-action.vue.mjs +1 -1
  149. package/es/poster-input/src/component/views/quick-action.vue2.mjs.map +1 -1
  150. package/es/poster-input/src/poster-input.vue.mjs +1 -1
  151. package/es/poster-input/src/poster-input.vue2.mjs.map +1 -1
  152. package/es/poster-input/style/index.scss +4 -2
  153. package/es/select/src/select.vue.mjs +1 -1
  154. package/es/select/src/select.vue2.mjs +9 -1
  155. package/es/select/src/select.vue2.mjs.map +1 -1
  156. package/es/style-animation-input/src/props.mjs.map +1 -1
  157. package/es/style-animation-input/src/style-animation-input.vue.mjs +1 -1
  158. package/es/style-animation-input/src/style-animation-input.vue2.mjs +1 -1
  159. package/es/style-animation-input/src/style-animation-input.vue2.mjs.map +1 -1
  160. package/es/style-background-input/index.d.ts +2 -1
  161. package/es/style-background-input/src/style-background-input.vue.d.ts +2 -1
  162. package/es/style-background-input/src/style-background-input.vue.mjs +1 -1
  163. package/es/style-background-input/src/style-background-input.vue2.mjs +2 -1
  164. package/es/style-background-input/src/style-background-input.vue2.mjs.map +1 -1
  165. package/es/style-border-input/index.d.ts +2 -1
  166. package/es/style-border-input/src/style-border-input.vue.d.ts +2 -1
  167. package/es/style-border-input/src/style-border-input.vue.mjs +1 -1
  168. package/es/style-border-input/src/style-border-input.vue2.mjs +55 -38
  169. package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
  170. package/es/style-box-input/index.d.ts +2 -1
  171. package/es/style-box-input/src/style-box-input.vue.d.ts +2 -1
  172. package/es/style-box-input/src/style-box-input.vue.mjs +1 -1
  173. package/es/style-box-input/src/style-box-input.vue2.mjs +2 -1
  174. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  175. package/es/style-font-input/index.d.ts +2 -1
  176. package/es/style-font-input/src/style-font-input.vue.d.ts +2 -1
  177. package/es/style-font-input/src/style-font-input.vue.mjs +1 -1
  178. package/es/style-font-input/src/style-font-input.vue2.mjs +8 -7
  179. package/es/style-font-input/src/style-font-input.vue2.mjs.map +1 -1
  180. package/es/style-input/src/style-input.vue.mjs +1 -1
  181. package/es/style-input/src/style-input.vue2.mjs +15 -22
  182. package/es/style-input/src/style-input.vue2.mjs.map +1 -1
  183. package/es/style-number-input/src/style-number-input.vue.mjs +1 -1
  184. package/es/style-number-input/src/style-number-input.vue2.mjs.map +1 -1
  185. package/es/style-position-input/src/style-position-input.vue.mjs +1 -1
  186. package/es/style-position-input/src/style-position-input.vue2.mjs +4 -1
  187. package/es/style-position-input/src/style-position-input.vue2.mjs.map +1 -1
  188. package/es/style-shadow-input/index.d.ts +2 -1
  189. package/es/style-shadow-input/src/style-shadow-content.vue.mjs +1 -1
  190. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs +144 -155
  191. package/es/style-shadow-input/src/style-shadow-content.vue2.mjs.map +1 -1
  192. package/es/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -1
  193. package/es/style-shadow-input/src/style-shadow-input.vue.mjs +1 -1
  194. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs +2 -1
  195. package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
  196. package/es/table/src/components/ComSearch.vue.mjs +1 -1
  197. package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
  198. package/es/table/src/components/FieldRender.vue.mjs +1 -1
  199. package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
  200. package/es/table/src/components/RecycleDialog.vue.mjs +1 -1
  201. package/es/table/src/components/RecycleDialog.vue2.mjs +3 -1
  202. package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
  203. package/es/table/src/components/header.vue.mjs +1 -1
  204. package/es/table/src/components/header.vue2.mjs +17 -3
  205. package/es/table/src/components/header.vue2.mjs.map +1 -1
  206. package/es/table/src/props.mjs +11 -1
  207. package/es/table/src/props.mjs.map +1 -1
  208. package/es/table/src/table.vue.mjs +1 -1
  209. package/es/table/src/table.vue2.mjs +13 -3
  210. package/es/table/src/table.vue2.mjs.map +1 -1
  211. package/es/table/utils/dkTable.mjs +32 -11
  212. package/es/table/utils/dkTable.mjs.map +1 -1
  213. package/es/table/utils/dkTableApi.mjs.map +1 -1
  214. package/es/test/src/test.vue.mjs +1 -1
  215. package/es/tiny-editor/src/tiny-editor.vue.mjs +1 -1
  216. package/es/tiny-editor/src/tiny-editor.vue2.mjs +7 -3
  217. package/es/tiny-editor/src/tiny-editor.vue2.mjs.map +1 -1
  218. package/es/tiny-editor/style/index.css +1 -1
  219. package/es/tiny-editor/style/index.scss +5 -0
  220. package/es/video-input/src/video-input.vue.mjs +1 -1
  221. package/es/video-list-input/src/video-list-input.vue.mjs +1 -1
  222. package/es/video-list-input/src/video-list-input.vue2.mjs.map +1 -1
  223. package/lib/animate-select/src/animate-select.vue.js +1 -1
  224. package/lib/animate-select/src/animate-select.vue2.js +5 -1
  225. package/lib/animate-select/src/animate-select.vue2.js.map +1 -1
  226. package/lib/api/attachment.js.map +1 -1
  227. package/lib/attachment/src/attachment.vue.js +1 -1
  228. package/lib/attachment/src/attachment.vue2.js +7 -1
  229. package/lib/attachment/src/attachment.vue2.js.map +1 -1
  230. package/lib/attachment/src/file-icon.vue.js +1 -1
  231. package/lib/attachment-dialog/index.d.ts +9 -0
  232. package/lib/attachment-dialog/src/attachment-dialog.vue.d.ts +9 -0
  233. package/lib/attachment-dialog/src/attachment-dialog.vue.js +1 -1
  234. package/lib/attachment-dialog/src/attachment-dialog.vue2.js +3 -2
  235. package/lib/attachment-dialog/src/attachment-dialog.vue2.js.map +1 -1
  236. package/lib/attachment-dialog/src/props.d.ts +4 -0
  237. package/lib/attachment-dialog/src/props.js +4 -0
  238. package/lib/attachment-dialog/src/props.js.map +1 -1
  239. package/lib/audio-input/src/audio-input.vue.js +1 -1
  240. package/lib/audio-list-input/src/audio-list-input.vue.js +1 -1
  241. package/lib/audio-list-input/src/audio-list-input.vue2.js.map +1 -1
  242. package/lib/box-size-input/src/box-size-input.vue.js +1 -1
  243. package/lib/box-size-input/src/box-size-input.vue2.js +59 -58
  244. package/lib/box-size-input/src/box-size-input.vue2.js.map +1 -1
  245. package/lib/box-size-input/style/index.css +1 -1
  246. package/lib/box-size-input/style/index.scss +11 -4
  247. package/lib/color-input/src/color-input.vue.js +1 -1
  248. package/lib/dialog/src/dialog.vue.js +1 -1
  249. package/lib/dialog/src/dialog.vue2.js +3 -1
  250. package/lib/dialog/src/dialog.vue2.js.map +1 -1
  251. package/lib/dialog/style/index.scss +1 -0
  252. package/lib/file-input/src/file-input.vue.js +1 -1
  253. package/lib/file-input/src/file-input.vue2.js.map +1 -1
  254. package/lib/file-list-input/src/file-list-input.vue.js +1 -1
  255. package/lib/file-list-input/src/file-list-input.vue2.js.map +1 -1
  256. package/lib/file-list-input/style/index.css +1 -1
  257. package/lib/file-list-input/style/index.scss +20 -16
  258. package/lib/form/src/form.vue.js +1 -1
  259. package/lib/form/src/form.vue2.js.map +1 -1
  260. package/lib/group/src/group.vue.js +1 -1
  261. package/lib/group/src/group.vue2.js +2 -2
  262. package/lib/group/src/group.vue2.js.map +1 -1
  263. package/lib/hot-area-input/src/component/hot-area-content.vue.js +1 -1
  264. package/lib/hot-area-input/src/component/hot-area-content.vue2.js.map +1 -1
  265. package/lib/hot-area-input/src/hot-area-input.vue.js +1 -1
  266. package/lib/hot-area-input/src/hot-area-input.vue2.js.map +1 -1
  267. package/lib/icon/src/icon.vue.js +1 -1
  268. package/lib/icon/src/icon.vue2.js.map +1 -1
  269. package/lib/icon-input/src/icon-content.vue.js +1 -1
  270. package/lib/icon-input/src/icon-content.vue2.js +1 -1
  271. package/lib/icon-input/src/icon-content.vue2.js.map +1 -1
  272. package/lib/icon-input/src/icon-dialog.vue.js +1 -1
  273. package/lib/icon-input/src/icon-input.vue.js +1 -1
  274. package/lib/icon-input/src/icon-input.vue2.js.map +1 -1
  275. package/lib/image-input/src/image-input.vue.js +1 -1
  276. package/lib/image-list-input/src/image-list-input.vue.js +1 -1
  277. package/lib/image-list-input/src/image-list-input.vue2.js.map +1 -1
  278. package/lib/index.js +0 -10
  279. package/lib/index.js.map +1 -1
  280. package/lib/page-diy/index.js +0 -2
  281. package/lib/page-diy/index.js.map +1 -1
  282. package/lib/page-diy/src/components/DiyCloud.vue.js +1 -1
  283. package/lib/page-diy/src/components/DiyCloud.vue.js.map +1 -1
  284. package/lib/page-diy/src/components/DragBox.vue.js +7 -3
  285. package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
  286. package/lib/page-diy/src/components/DragTool.vue.js +6 -2
  287. package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
  288. package/lib/page-diy/src/components/PreviewPhone.vue.js +1 -1
  289. package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
  290. package/lib/page-diy/src/components/forms/DkEventCreateInput.vue.js +1 -1
  291. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js +12 -10
  292. package/lib/page-diy/src/components/forms/DkEventSelectInput.vue.js.map +1 -1
  293. package/lib/page-diy/src/config/base/dkSetting.js.map +1 -1
  294. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js +9 -1
  295. package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js.map +1 -1
  296. package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js +3 -1
  297. package/lib/page-diy/src/config/rule/min/common/DkMinHotArea.js.map +1 -1
  298. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +36 -6
  299. package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
  300. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js +6 -2
  301. package/lib/page-diy/src/config/rule/min/common/DkMinVideo.js.map +1 -1
  302. package/lib/page-diy/src/config/rule/min/common/index.js +8 -1
  303. package/lib/page-diy/src/config/rule/min/common/index.js.map +1 -1
  304. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js +3 -1
  305. package/lib/page-diy/src/config/rule/web/common/DkPosterBtn.js.map +1 -1
  306. package/lib/page-diy/src/config/rule/web/common/DkViewBulletChat.js.map +1 -1
  307. package/lib/page-diy/src/config/rule/web/common/DkViewDialog.js +7 -1
  308. package/lib/page-diy/src/config/rule/web/common/DkViewDialog.js.map +1 -1
  309. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js +9 -3
  310. package/lib/page-diy/src/config/rule/web/common/DkViewVideo.js.map +1 -1
  311. package/lib/page-diy/src/page-diy.vue.js +102 -34
  312. package/lib/page-diy/src/page-diy.vue.js.map +1 -1
  313. package/lib/page-diy/src/utils/eventData.js.map +1 -1
  314. package/lib/page-diy/src/views/min/DkMinBlank.vue.js +1 -1
  315. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +24 -7
  316. package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
  317. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js +1 -1
  318. package/lib/page-diy/src/views/min/DkMinSwiperImage.vue.js.map +1 -1
  319. package/lib/page-diy/src/views/min/DkMinTextarea.vue.js +1 -1
  320. package/lib/page-diy/src/views/min/DkMinTitle.vue.js +1 -1
  321. package/lib/page-diy/src/views/min/DkMinTitle.vue.js.map +1 -1
  322. package/lib/page-diy/src/views/min/DkMinVideo.vue.js +1 -1
  323. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js +1 -1
  324. package/lib/page-diy/src/views/web/DkViewBulletChat.vue.js.map +1 -1
  325. package/lib/page-diy/src/views/web/DkViewCell.vue.js +1 -1
  326. package/lib/page-diy/src/views/web/DkViewCell.vue.js.map +1 -1
  327. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js +4 -2
  328. package/lib/page-diy/src/views/web/DkViewCommonBtn.vue.js.map +1 -1
  329. package/lib/page-diy/src/views/web/DkViewDialog.vue.js +1 -1
  330. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js +1 -1
  331. package/lib/page-diy/src/views/web/DkViewGridCellList.vue.js.map +1 -1
  332. package/lib/page-diy/src/views/web/DkViewImage.vue.js +1 -1
  333. package/lib/page-diy/src/views/web/DkViewImage.vue.js.map +1 -1
  334. package/lib/page-diy/src/views/web/DkViewMusic.vue.js +1 -1
  335. package/lib/page-diy/src/views/web/DkViewMusic.vue.js.map +1 -1
  336. package/lib/page-diy/src/views/web/DkViewNavBar.vue.js +1 -1
  337. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js +1 -1
  338. package/lib/page-diy/src/views/web/DkViewNoticeBar.vue.js.map +1 -1
  339. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js +1 -1
  340. package/lib/page-diy/src/views/web/DkViewSwipe.vue.js.map +1 -1
  341. package/lib/page-diy/src/views/web/DkViewTabbar.vue.js +1 -1
  342. package/lib/page-diy/src/views/web/DkViewTextarea.vue.js +1 -1
  343. package/lib/page-diy/src/views/web/DkViewTitle.vue.js +1 -1
  344. package/lib/page-diy/src/views/web/DkViewTitle.vue.js.map +1 -1
  345. package/lib/page-diy/src/views/web/DkViewVideo.vue.js +1 -1
  346. package/lib/page-diy/style/dk-page-diy.css +1 -1
  347. package/lib/page-diy/style/dk-page-diy.scss +3 -3
  348. package/lib/page-diy/style/index.css +1 -1
  349. package/lib/poster-input/src/component/poster.vue.js +1 -1
  350. package/lib/poster-input/src/component/poster.vue2.js.map +1 -1
  351. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue.js +1 -1
  352. package/lib/poster-input/src/component/views/DkPosterViewAvatar.vue2.js.map +1 -1
  353. package/lib/poster-input/src/component/views/DkPosterViewImage.vue.js +1 -1
  354. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js +5 -2
  355. package/lib/poster-input/src/component/views/DkPosterViewImage.vue2.js.map +1 -1
  356. package/lib/poster-input/src/component/views/DkPosterViewName.vue.js +1 -1
  357. package/lib/poster-input/src/component/views/DkPosterViewName.vue2.js.map +1 -1
  358. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue.js +1 -1
  359. package/lib/poster-input/src/component/views/DkPosterViewQrcode.vue2.js.map +1 -1
  360. package/lib/poster-input/src/component/views/DkPosterViewText.vue.js +1 -1
  361. package/lib/poster-input/src/component/views/DkPosterViewText.vue2.js.map +1 -1
  362. package/lib/poster-input/src/component/views/quick-action.vue.js +1 -1
  363. package/lib/poster-input/src/component/views/quick-action.vue2.js.map +1 -1
  364. package/lib/poster-input/src/poster-input.vue.js +1 -1
  365. package/lib/poster-input/src/poster-input.vue2.js.map +1 -1
  366. package/lib/poster-input/style/index.scss +4 -2
  367. package/lib/select/src/select.vue.js +1 -1
  368. package/lib/select/src/select.vue2.js +9 -1
  369. package/lib/select/src/select.vue2.js.map +1 -1
  370. package/lib/style-animation-input/src/props.js.map +1 -1
  371. package/lib/style-animation-input/src/style-animation-input.vue.js +1 -1
  372. package/lib/style-animation-input/src/style-animation-input.vue2.js +1 -1
  373. package/lib/style-animation-input/src/style-animation-input.vue2.js.map +1 -1
  374. package/lib/style-background-input/index.d.ts +2 -1
  375. package/lib/style-background-input/src/style-background-input.vue.d.ts +2 -1
  376. package/lib/style-background-input/src/style-background-input.vue.js +1 -1
  377. package/lib/style-background-input/src/style-background-input.vue2.js +2 -1
  378. package/lib/style-background-input/src/style-background-input.vue2.js.map +1 -1
  379. package/lib/style-border-input/index.d.ts +2 -1
  380. package/lib/style-border-input/src/style-border-input.vue.d.ts +2 -1
  381. package/lib/style-border-input/src/style-border-input.vue.js +1 -1
  382. package/lib/style-border-input/src/style-border-input.vue2.js +55 -38
  383. package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
  384. package/lib/style-box-input/index.d.ts +2 -1
  385. package/lib/style-box-input/src/style-box-input.vue.d.ts +2 -1
  386. package/lib/style-box-input/src/style-box-input.vue.js +1 -1
  387. package/lib/style-box-input/src/style-box-input.vue2.js +2 -1
  388. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  389. package/lib/style-font-input/index.d.ts +2 -1
  390. package/lib/style-font-input/src/style-font-input.vue.d.ts +2 -1
  391. package/lib/style-font-input/src/style-font-input.vue.js +1 -1
  392. package/lib/style-font-input/src/style-font-input.vue2.js +8 -7
  393. package/lib/style-font-input/src/style-font-input.vue2.js.map +1 -1
  394. package/lib/style-input/src/style-input.vue.js +1 -1
  395. package/lib/style-input/src/style-input.vue2.js +14 -21
  396. package/lib/style-input/src/style-input.vue2.js.map +1 -1
  397. package/lib/style-number-input/src/style-number-input.vue.js +1 -1
  398. package/lib/style-number-input/src/style-number-input.vue2.js.map +1 -1
  399. package/lib/style-position-input/src/style-position-input.vue.js +1 -1
  400. package/lib/style-position-input/src/style-position-input.vue2.js +4 -1
  401. package/lib/style-position-input/src/style-position-input.vue2.js.map +1 -1
  402. package/lib/style-shadow-input/index.d.ts +2 -1
  403. package/lib/style-shadow-input/src/style-shadow-content.vue.js +1 -1
  404. package/lib/style-shadow-input/src/style-shadow-content.vue2.js +144 -155
  405. package/lib/style-shadow-input/src/style-shadow-content.vue2.js.map +1 -1
  406. package/lib/style-shadow-input/src/style-shadow-input.vue.d.ts +2 -1
  407. package/lib/style-shadow-input/src/style-shadow-input.vue.js +1 -1
  408. package/lib/style-shadow-input/src/style-shadow-input.vue2.js +2 -1
  409. package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
  410. package/lib/table/src/components/ComSearch.vue.js +1 -1
  411. package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
  412. package/lib/table/src/components/FieldRender.vue.js +1 -1
  413. package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
  414. package/lib/table/src/components/RecycleDialog.vue.js +1 -1
  415. package/lib/table/src/components/RecycleDialog.vue2.js +3 -1
  416. package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
  417. package/lib/table/src/components/header.vue.js +1 -1
  418. package/lib/table/src/components/header.vue2.js +17 -3
  419. package/lib/table/src/components/header.vue2.js.map +1 -1
  420. package/lib/table/src/props.js +11 -1
  421. package/lib/table/src/props.js.map +1 -1
  422. package/lib/table/src/table.vue.js +1 -1
  423. package/lib/table/src/table.vue2.js +13 -3
  424. package/lib/table/src/table.vue2.js.map +1 -1
  425. package/lib/table/utils/dkTable.js +32 -11
  426. package/lib/table/utils/dkTable.js.map +1 -1
  427. package/lib/table/utils/dkTableApi.js.map +1 -1
  428. package/lib/test/src/test.vue.js +1 -1
  429. package/lib/tiny-editor/src/tiny-editor.vue.js +1 -1
  430. package/lib/tiny-editor/src/tiny-editor.vue2.js +7 -3
  431. package/lib/tiny-editor/src/tiny-editor.vue2.js.map +1 -1
  432. package/lib/tiny-editor/style/index.css +1 -1
  433. package/lib/tiny-editor/style/index.scss +5 -0
  434. package/lib/video-input/src/video-input.vue.js +1 -1
  435. package/lib/video-list-input/src/video-list-input.vue.js +1 -1
  436. package/lib/video-list-input/src/video-list-input.vue2.js.map +1 -1
  437. package/package.json +3 -2
  438. package/dist/index.js +0 -34318
  439. package/dist/index.mjs +0 -34228
@@ -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 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,QAAA,IAAI,CAAC,OAAQ,CAAA,SAAA,CAAU,SAAU,CA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AAA,GAAG,CAAI,GAAA,EAAA,CAAA;AAAA,OAChC;AACA,MAAY,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\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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AAU,aAAc,CAAA,QAAA;AAAA,YACxB,QAAQ,aAAc,CAAA,MAAA;AAAA,WACvB,CAAA,CAAA;AAAA,SACH;AAAA,OACF;AAGA,MAAQ,OAAA,CAAA,aAAA,CAAc,cAAc,aAAa,CAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AAExB,MAAW,KAAA,MAAA,GAAA,IAAO,OAAQ,CAAA,SAAA,CAAU,IAAM,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-back\\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-vlib-starter\\dkgs-ui-doc\\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 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;;;;;;;;;;;AAgPD,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAUhC,IAAA,MAAM,SAAiB,GAAA,GAAA,CAAI,KAAM,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC3C,IAAA,MAAM,aAAa,GAAI,CAAA,KAAA,CAAM,IAAI,SAAU,CAAA,KAAK,KAAK,EAAE,CAAA,CAAA;AAEvD,IAAA,IAAI,UAAU,KAAS,IAAA,SAAA,CAAU,MAAM,OAAQ,CAAA,GAAG,IAAI,CAAI,CAAA,EAAA;AACxD,MAAA,MAAM,YAAe,GAAA,SAAA,CAAU,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAC9C,MAAA,MAAM,MAAW,GAAI,CAAA,KAAA,CAAM,IAAI,YAAa,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAC/C,MAAA,KAAA,IAAS,KAAQ,GAAA,CAAA,EAAG,KAAQ,GAAA,YAAA,CAAa,QAAQ,KAAS,EAAA,EAAA;AACxD,QAAI,GAAA,CAAA,KAAA,GAAQ,IAAI,KAAQ,GAAA,GAAA,CAAI,MAAM,YAAa,CAAA,KAAK,CAAC,CAAA,IAAK,EAAK,GAAA,EAAA,CAAA;AAAA,OACjE;AACA,MAAA,UAAA,CAAW,QAAQ,GAAI,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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, 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;;;;;;;;;;;AAqQD,IAAM,MAAA,OAAA,GAAU,OAAO,SAAS,CAAA,CAAA;AAUhC,IAAA,MAAM,SAAiB,GAAA,GAAA,CAAI,KAAM,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC3C,IAAA,MAAM,aAAa,GAAI,CAAA,KAAA,CAAM,IAAI,SAAU,CAAA,KAAK,KAAK,EAAE,CAAA,CAAA;AAEvD,IAAA,IAAI,UAAU,KAAS,IAAA,SAAA,CAAU,MAAM,OAAQ,CAAA,GAAG,IAAI,CAAI,CAAA,EAAA;AACxD,MAAA,MAAM,YAAe,GAAA,SAAA,CAAU,KAAM,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAC9C,MAAA,MAAM,MAAW,GAAI,CAAA,KAAA,CAAM,IAAI,YAAa,CAAA,CAAC,CAAC,CAAC,CAAA,CAAA;AAC/C,MAAA,KAAA,IAAS,KAAQ,GAAA,CAAA,EAAG,KAAQ,GAAA,YAAA,CAAa,QAAQ,KAAS,EAAA,EAAA;AACxD,QAAI,GAAA,CAAA,KAAA,GAAQ,IAAI,KAAQ,GAAA,GAAA,CAAI,MAAM,YAAa,CAAA,KAAK,CAAC,CAAA,IAAK,EAAK,GAAA,EAAA,CAAA;AAAA,OACjE;AACA,MAAA,UAAA,CAAW,QAAQ,GAAI,CAAA,KAAA,CAAA;AAAA,KACzB;AAEA,IAAM,MAAA,UAAA,GAAa,CAAC,KAAA,EAAe,MAAkC,KAAA;AACnE,MAAA,OAAO,UAAU,MAAO,CAAA,KAAK,CAAI,GAAA,MAAA,CAAO,KAAK,CAAI,GAAA,EAAA,CAAA;AAAA,KACnD,CAAA;AAEA,IAAM,MAAA,aAAA,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,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-back\\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-vlib-starter\\dkgs-ui-doc\\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,7 +71,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  const destroySelect = () => {
72
72
  destroy(getSelectionIds());
73
73
  };
74
- const enableBatchOpt = computed(() => DkTable.recycleTable.selection.length > 0);
74
+ const enableBatchOpt = computed(
75
+ () => DkTable.recycleTable.selection.length > 0
76
+ );
75
77
  return (_ctx, _cache) => {
76
78
  const _component_dk_icon = resolveComponent("dk-icon");
77
79
  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 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_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,eAAA;AACR,CAAC,CAAA,CAAA;;;;AAsFD,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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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;AAAA,KACH,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;AAAA,KACH,CAAA;AAEA,IAAA,MAAM,kBAAkB,MAAM;AAC5B,MAAA,MAAM,MAAgB,EAAC,CAAA;AACvB,MAAA,OAAA,CAAQ,YAAa,CAAA,SAAA,EAAW,OAAQ,CAAA,CAAC,IAAS,KAAA;AAChD,QAAA,GAAA,CAAI,IAAK,CAAA,IAAA,CAAK,OAAQ,CAAA,YAAA,CAAa,EAAG,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,cAAiB,GAAA,QAAA;AAAA,MACrB,MAAM,OAAA,CAAQ,YAAa,CAAA,SAAA,CAAW,MAAS,GAAA,CAAA;AAAA,KACjD,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-back\\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-vlib-starter\\dkgs-ui-doc\\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,7 +55,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
55
55
  },
56
56
  buttons: {
57
57
  default: () => {
58
- return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"];
58
+ return [
59
+ "refresh",
60
+ "add",
61
+ "export_csv",
62
+ "edit",
63
+ "delete",
64
+ "comSearch",
65
+ "quickSearch",
66
+ "columnDisplay"
67
+ ];
59
68
  },
60
69
  type: Array
61
70
  },
@@ -71,7 +80,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
71
80
  const columnDisplayArr = [];
72
81
  let cachedTableData = {};
73
82
  if (DkTable.url) {
74
- cachedTableData = JSON.parse(storage.get(DkTable.url + "show_column") || "{}");
83
+ cachedTableData = JSON.parse(
84
+ storage.get(DkTable.url + "show_column") || "{}"
85
+ );
75
86
  }
76
87
  for (const item of DkTable.table.column) {
77
88
  if (cachedTableData[item.prop] !== void 0) {
@@ -133,7 +144,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
133
144
  1536
134
145
  /* NEED_PATCH, DYNAMIC_SLOTS */
135
146
  ), [
136
- [vShow, props.buttons.includes("comSearch") && unref(DkTable).table.showComSearch]
147
+ [
148
+ vShow,
149
+ props.buttons.includes("comSearch") && unref(DkTable).table.showComSearch
150
+ ]
137
151
  ])
138
152
  ]),
139
153
  _: 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 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;AAAA,SACvC;AAEA,QAAK,IAAA,CAAA,IAAA,KAAS,WAAe,IAAA,IAAA,CAAK,MAAW,KAAA,SAAA,IAAa,IAAK,CAAA,0BAAA,KAA+B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../../../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,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -21,7 +21,17 @@ const tableProps = {
21
21
  },
22
22
  buttons: {
23
23
  default: () => {
24
- return ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay", "recycle"];
24
+ return [
25
+ "refresh",
26
+ "add",
27
+ "export_csv",
28
+ "edit",
29
+ "delete",
30
+ "comSearch",
31
+ "quickSearch",
32
+ "columnDisplay",
33
+ "recycle"
34
+ ];
25
35
  },
26
36
  type: Array
27
37
  },
@@ -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 ['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
+ {"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,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-back\\packages\\dk-ui\\src\\table\\src\\table.vue"]]);
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"]]);
5
5
 
6
6
  export { _Table as default };
7
7
  //# sourceMappingURL=table.vue.mjs.map
@@ -17,7 +17,11 @@ 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(props.tableApi, props.tableBefore, props.tableAfter);
20
+ const DkTable = new dkTable(
21
+ props.tableApi,
22
+ props.tableBefore,
23
+ props.tableAfter
24
+ );
21
25
  provide("DkTable", DkTable);
22
26
  onMounted(() => {
23
27
  DkTable.getTable(props.cacheTable)?.then(() => {
@@ -32,7 +36,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
32
36
  DkTable.form.ref = FormRef.value;
33
37
  });
34
38
  const effectiveButtons = computed(() => {
35
- return [...new Set(props.buttons.filter((button) => !props.hideButtons.includes(button)))];
39
+ return [
40
+ ...new Set(
41
+ props.buttons.filter((button) => !props.hideButtons.includes(button))
42
+ )
43
+ ];
36
44
  });
37
45
  const onTableSizeChange = (val) => {
38
46
  DkTable.onTableAction("page-size-change", { size: val });
@@ -72,7 +80,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
72
80
  }
73
81
  };
74
82
  const onSelectAll = (selection) => {
75
- if (isSelectAll(selection.map((row) => row[DkTable.table.pk].toString()))) {
83
+ if (isSelectAll(
84
+ selection.map((row) => row[DkTable.table.pk].toString())
85
+ )) {
76
86
  selection.map((row) => {
77
87
  if (row.children) {
78
88
  selectChildren(row.children, true);
@@ -1 +1 @@
1
- {"version":3,"file":"table.vue2.mjs","sources":["../../../src/table/src/table.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTable',\n});\n</script>\n<template>\n <div class=\"dk-table\">\n <!--顶部菜单-->\n <DkTableHeader size=\"default\" :buttons=\"effectiveButtons\">\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </DkTableHeader>\n <!--表格-->\n <el-table\n ref=\"TableRef\"\n v-loading=\"DkTable.table.loading\"\n class=\"dk-data-table w100\"\n header-cell-class-name=\"table-header-cell\"\n :default-expand-all=\"DkTable.table.expandAll\"\n :data=\"DkTable.table.data\"\n :row-key=\"DkTable.table.pk\"\n stripe\n v-bind=\"$attrs\"\n @select-all=\"onSelectAll\"\n @select=\"onSelect\"\n @selection-change=\"onSelectionChange\"\n @sort-change=\"onSortChange\"\n @cell-dblclick=\"ondblclick\"\n >\n <slot name=\"columnPrepend\"></slot>\n <template v-for=\"(item, key) in DkTable.table.column\">\n <template v-if=\"item.show !== false\">\n <!-- 渲染为 slot -->\n <el-table-column v-if=\"item.slotName\" :key=\"key\" v-bind=\"{ ...item }\">\n <template #default=\"scope\">\n <slot :name=\"item.slotName\" v-bind=\"scope\">\n <dk-field-render\n :key=\"\n key +\n '-' +\n scope.$index +\n '-' +\n item.render +\n '-' +\n (item.prop ? '-' + item.prop + '-' + scope.row[item.prop] : '')\n \"\n :field=\"item\"\n :row=\"scope.row\"\n :column=\"scope.column\"\n :index=\"scope.$index\"\n />\n </slot>\n </template>\n </el-table-column>\n <el-table-column v-else :key=\"key + 'default'\" v-bind=\"{ ...item }\"></el-table-column>\n </template>\n </template>\n <slot name=\"columnAppend\"></slot>\n </el-table>\n\n <div class=\"table-pagination\">\n <el-pagination\n :current-page=\"DkTable.table.filter!.page\"\n :page-size=\"DkTable.table.filter!.limit\"\n :page-sizes=\"pageSizes\"\n background\n :layout=\"'sizes,total, ->, prev, pager, next, jumper'\"\n :total=\"DkTable.table.total\"\n @size-change=\"onTableSizeChange\"\n @current-change=\"onTableCurrentChange\"\n ></el-pagination>\n </div>\n </div>\n <dk-form ref=\"FormRef\" :is-dialog=\"true\" @submit=\"DkTable.onSubmit\">\n <template #buttons>\n <el-button type=\"primary\" :loading=\"DkTable.form.ref.buttonLoading\" @click=\"DkTable.form.ref.checkForm\">\n {{ DkTable.form.operateIds!.length > 0 ? '保存并编辑下一项' : '提交' }}\n </el-button>\n </template>\n </dk-form>\n <RecycleDialog></RecycleDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, onMounted, nextTick, provide, computed } from 'vue'\nimport { tableProps } from './props'\nimport DkTableClass from '../utils/dkTable'\nimport DkTableHeader from './components/header.vue'\nimport DkFieldRender from './components/FieldRender.vue'\nimport RecycleDialog from './components/RecycleDialog.vue'\n\n\n\nconst props = defineProps(tableProps)\nconst FormRef = ref()\n// 表格的Ref\nconst TableRef = ref()\n// 表格的对象\nconst DkTable = new DkTableClass(props.tableApi, props.tableBefore, props.tableAfter)\n\nprovide('DkTable', DkTable)\n// 获取表格信息\nonMounted(() => {\n DkTable.getTable(props.cacheTable)?.then(() => {\n DkTable.getIndex()?.then(() => {\n nextTick(() => {\n DkTable.dragSort()\n })\n })\n DkTable.initComSearch()\n })\n DkTable.table.ref = TableRef.value\n DkTable.form.ref = FormRef.value\n})\n\nconst effectiveButtons = computed(() => {\n return [...new Set(props.buttons.filter((button) => !props.hideButtons.includes(button)))]\n})\n\nconst onTableSizeChange = (val: number) => {\n DkTable.onTableAction('page-size-change', { size: val })\n}\n\nconst onTableCurrentChange = (val: number) => {\n DkTable.onTableAction('current-page-change', { page: val })\n}\n\n// 双击\nconst ondblclick = (row: any) => {\n DkTable.toggleForm('Edit', [row[DkTable.table.pk!]])\n}\n\nconst onSortChange = ({ order, prop }: { order: string; prop: string }) => {\n DkTable.onTableAction('sort-change', {\n prop,\n order: order ? (order == 'ascending' ? 'asc' : 'desc') : '',\n })\n}\n\nconst pageSizes = computed(() => {\n const defaultSizes = [10, 20, 50, 100]\n if (DkTable.table.filter!.limit) {\n if (!defaultSizes.includes(DkTable.table.filter!.limit)) {\n defaultSizes.push(DkTable.table.filter!.limit)\n }\n }\n return defaultSizes\n})\n\n/*\n * 手动选择时,同时选择子级\n */\nconst onSelect = (selection: TableRow[], row: TableRow) => {\n if (\n selection.some((item: TableRow) => {\n return row[DkTable.table.pk!] === item[DkTable.table.pk!]\n })\n ) {\n if (row.children) {\n selectChildren(row.children, true)\n }\n } else {\n if (row.children) {\n selectChildren(row.children, false)\n }\n }\n}\n\n/**\n /*\n * 全选和取消全选\n * 实现子级同时选择和取消选中\n */\nconst onSelectAll = (selection: TableRow[]) => {\n if (isSelectAll(selection.map((row: TableRow) => row[DkTable.table.pk!].toString()))) {\n // eslint-disable-next-line array-callback-return\n selection.map((row: TableRow) => {\n if (row.children) {\n selectChildren(row.children, true)\n }\n })\n } else {\n TableRef.value?.clearSelection()\n }\n}\n\n/*\n * 是否是全选操作\n * 只检查第一个元素是否被选择\n * 全选时:selectIds为所有元素的id\n * 取消全选时:selectIds为所有子元素的id\n */\nconst isSelectAll = (selectIds: string[]) => {\n const data = DkTable.table.data as TableRow[]\n // eslint-disable-next-line no-unreachable-loop\n for (const key in data) {\n return selectIds.includes(data[key][DkTable.table.pk!].toString())\n }\n return false\n}\n\n/*\n * 选择子项-递归\n */\nconst selectChildren = (children: TableRow[], type: boolean) => {\n // eslint-disable-next-line array-callback-return\n children.map((j: TableRow) => {\n toggleSelection(j, type)\n if (j.children) {\n selectChildren(j.children, type)\n }\n })\n}\n\n/*\n * 执行选择操作\n */\nconst toggleSelection = (row: TableRow, type: boolean) => {\n if (row) {\n nextTick(() => {\n TableRef.value?.toggleRowSelection(row, type)\n })\n }\n}\n\n/*\n * 记录选择的项\n */\nconst onSelectionChange = (selection: TableRow[]) => {\n DkTable.onTableAction('selection-change', selection)\n}\n\n/*\n * 设置折叠所有-递归\n */\nconst setUnFoldAll = (children: TableRow[], unfold: boolean) => {\n for (const key in children) {\n TableRef.value?.toggleRowExpansion(children[key], unfold)\n if (children[key].children) {\n setUnFoldAll(children[key].children!, unfold)\n }\n }\n}\n\n/*\n * 折叠所有\n */\nconst unFoldAll = (unfold: boolean) => {\n setUnFoldAll(DkTable.table.data!, unfold)\n}\n\nconst slotNames = computed(() => {\n const column = DkTable.table.column\n const slotNames = []\n for (let i = 0; i < column.length; i++) {\n if (column[i].slotName) {\n slotNames.push(column[i].slotName)\n }\n }\n return slotNames\n})\n\nonMounted(() => {\n // injectTablePrimaryMethods()\n})\n\ndefineExpose({\n DkTable,\n TableRef,\n FormRef,\n})\n</script>\n<style lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent","DkTableClass","slotNames"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;AA4FD,IAAA,MAAM,UAAU,GAAI,EAAA,CAAA;AAEpB,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,OAAA,GAAU,IAAIC,OAAa,CAAA,KAAA,CAAM,UAAU,KAAM,CAAA,WAAA,EAAa,MAAM,UAAU,CAAA,CAAA;AAEpF,IAAA,OAAA,CAAQ,WAAW,OAAO,CAAA,CAAA;AAE1B,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,OAAA,CAAQ,QAAS,CAAA,KAAA,CAAM,UAAU,CAAA,EAAG,KAAK,MAAM;AAC7C,QAAQ,OAAA,CAAA,QAAA,EAAY,EAAA,IAAA,CAAK,MAAM;AAC7B,UAAA,QAAA,CAAS,MAAM;AACb,YAAA,OAAA,CAAQ,QAAS,EAAA,CAAA;AAAA,WAClB,CAAA,CAAA;AAAA,SACF,CAAA,CAAA;AACD,QAAA,OAAA,CAAQ,aAAc,EAAA,CAAA;AAAA,OACvB,CAAA,CAAA;AACD,MAAQ,OAAA,CAAA,KAAA,CAAM,MAAM,QAAS,CAAA,KAAA,CAAA;AAC7B,MAAQ,OAAA,CAAA,IAAA,CAAK,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA,KAC5B,CAAA,CAAA;AAED,IAAM,MAAA,gBAAA,GAAmB,SAAS,MAAM;AACtC,MAAA,OAAO,CAAC,GAAG,IAAI,GAAI,CAAA,KAAA,CAAM,QAAQ,MAAO,CAAA,CAAC,MAAW,KAAA,CAAC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M,CAAA,CAAA;AAAA,SAC9C;AAAA,OACF;AAAA,KACF,CAAA;AAKA,IAAM,MAAA,SAAA,GAAY,CAAC,MAAoB,KAAA;AACrC,MAAa,YAAA,CAAA,OAAA,CAAQ,KAAM,CAAA,IAAA,EAAO,MAAM,CAAA,CAAA;AAAA,KAC1C,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAC/B,MAAM,MAAA,MAAA,GAAS,QAAQ,KAAM,CAAA,MAAA,CAAA;AAC7B,MAAA,MAAMC,aAAY,EAAC,CAAA;AACnB,MAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,MAAA,CAAO,QAAQ,CAAK,EAAA,EAAA;AACtC,QAAI,IAAA,MAAA,CAAO,CAAC,CAAA,CAAE,QAAU,EAAA;AACtB,UAAAA,UAAU,CAAA,IAAA,CAAK,MAAO,CAAA,CAAC,EAAE,QAAQ,CAAA,CAAA;AAAA,SACnC;AAAA,OACF;AACA,MAAOA,OAAAA,UAAAA,CAAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,SAAA,CAAU,MAAM;AAAA,KAEf,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"table.vue2.mjs","sources":["../../../src/table/src/table.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTable',\n});\n</script>\n<template>\n <div class=\"dk-table\">\n <!--顶部菜单-->\n <DkTableHeader size=\"default\" :buttons=\"effectiveButtons\">\n <template v-for=\"(slot, idx) in $slots\" :key=\"idx\" #[idx]>\n <slot :name=\"idx\"></slot>\n </template>\n </DkTableHeader>\n <!--表格-->\n <el-table\n ref=\"TableRef\"\n v-loading=\"DkTable.table.loading\"\n class=\"dk-data-table w100\"\n header-cell-class-name=\"table-header-cell\"\n :default-expand-all=\"DkTable.table.expandAll\"\n :data=\"DkTable.table.data\"\n :row-key=\"DkTable.table.pk\"\n stripe\n v-bind=\"$attrs\"\n @select-all=\"onSelectAll\"\n @select=\"onSelect\"\n @selection-change=\"onSelectionChange\"\n @sort-change=\"onSortChange\"\n @cell-dblclick=\"ondblclick\"\n >\n <slot name=\"columnPrepend\"></slot>\n <template v-for=\"(item, key) in DkTable.table.column\">\n <template v-if=\"item.show !== false\">\n <!-- 渲染为 slot -->\n <el-table-column v-if=\"item.slotName\" :key=\"key\" v-bind=\"{ ...item }\">\n <template #default=\"scope\">\n <slot :name=\"item.slotName\" v-bind=\"scope\">\n <dk-field-render\n :key=\"\n key +\n '-' +\n scope.$index +\n '-' +\n item.render +\n '-' +\n (item.prop\n ? '-' + item.prop + '-' + scope.row[item.prop]\n : '')\n \"\n :field=\"item\"\n :row=\"scope.row\"\n :column=\"scope.column\"\n :index=\"scope.$index\"\n />\n </slot>\n </template>\n </el-table-column>\n <el-table-column\n v-else\n :key=\"key + 'default'\"\n v-bind=\"{ ...item }\"\n ></el-table-column>\n </template>\n </template>\n <slot name=\"columnAppend\"></slot>\n </el-table>\n\n <div class=\"table-pagination\">\n <el-pagination\n :current-page=\"DkTable.table.filter!.page\"\n :page-size=\"DkTable.table.filter!.limit\"\n :page-sizes=\"pageSizes\"\n background\n :layout=\"'sizes,total, ->, prev, pager, next, jumper'\"\n :total=\"DkTable.table.total\"\n @size-change=\"onTableSizeChange\"\n @current-change=\"onTableCurrentChange\"\n ></el-pagination>\n </div>\n </div>\n <dk-form ref=\"FormRef\" :is-dialog=\"true\" @submit=\"DkTable.onSubmit\">\n <template #buttons>\n <el-button\n type=\"primary\"\n :loading=\"DkTable.form.ref.buttonLoading\"\n @click=\"DkTable.form.ref.checkForm\"\n >\n {{ DkTable.form.operateIds!.length > 0 ? '保存并编辑下一项' : '提交' }}\n </el-button>\n </template>\n </dk-form>\n <RecycleDialog></RecycleDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, onMounted, nextTick, provide, computed } from 'vue'\nimport { tableProps } from './props'\nimport DkTableClass from '../utils/dkTable'\nimport DkTableHeader from './components/header.vue'\nimport DkFieldRender from './components/FieldRender.vue'\nimport RecycleDialog from './components/RecycleDialog.vue'\n\n\n\nconst props = defineProps(tableProps)\nconst FormRef = ref()\n// 表格的Ref\nconst TableRef = ref()\n// 表格的对象\nconst DkTable = new DkTableClass(\n props.tableApi,\n props.tableBefore,\n props.tableAfter\n)\n\nprovide('DkTable', DkTable)\n// 获取表格信息\nonMounted(() => {\n DkTable.getTable(props.cacheTable)?.then(() => {\n DkTable.getIndex()?.then(() => {\n nextTick(() => {\n DkTable.dragSort()\n })\n })\n DkTable.initComSearch()\n })\n DkTable.table.ref = TableRef.value\n DkTable.form.ref = FormRef.value\n})\n\nconst effectiveButtons = computed(() => {\n return [\n ...new Set(\n props.buttons.filter((button) => !props.hideButtons.includes(button))\n ),\n ]\n})\n\nconst onTableSizeChange = (val: number) => {\n DkTable.onTableAction('page-size-change', { size: val })\n}\n\nconst onTableCurrentChange = (val: number) => {\n DkTable.onTableAction('current-page-change', { page: val })\n}\n\n// 双击\nconst ondblclick = (row: any) => {\n DkTable.toggleForm('Edit', [row[DkTable.table.pk!]])\n}\n\nconst onSortChange = ({ order, prop }: { order: string; prop: string }) => {\n DkTable.onTableAction('sort-change', {\n prop,\n order: order ? (order == 'ascending' ? 'asc' : 'desc') : '',\n })\n}\n\nconst pageSizes = computed(() => {\n const defaultSizes = [10, 20, 50, 100]\n if (DkTable.table.filter!.limit) {\n if (!defaultSizes.includes(DkTable.table.filter!.limit)) {\n defaultSizes.push(DkTable.table.filter!.limit)\n }\n }\n return defaultSizes\n})\n\n/*\n * 手动选择时,同时选择子级\n */\nconst onSelect = (selection: TableRow[], row: TableRow) => {\n if (\n selection.some((item: TableRow) => {\n return row[DkTable.table.pk!] === item[DkTable.table.pk!]\n })\n ) {\n if (row.children) {\n selectChildren(row.children, true)\n }\n } else {\n if (row.children) {\n selectChildren(row.children, false)\n }\n }\n}\n\n/**\n /*\n * 全选和取消全选\n * 实现子级同时选择和取消选中\n */\nconst onSelectAll = (selection: TableRow[]) => {\n if (\n isSelectAll(\n selection.map((row: TableRow) => row[DkTable.table.pk!].toString())\n )\n ) {\n // eslint-disable-next-line array-callback-return\n selection.map((row: TableRow) => {\n if (row.children) {\n selectChildren(row.children, true)\n }\n })\n } else {\n TableRef.value?.clearSelection()\n }\n}\n\n/*\n * 是否是全选操作\n * 只检查第一个元素是否被选择\n * 全选时:selectIds为所有元素的id\n * 取消全选时:selectIds为所有子元素的id\n */\nconst isSelectAll = (selectIds: string[]) => {\n const data = DkTable.table.data as TableRow[]\n // eslint-disable-next-line no-unreachable-loop\n for (const key in data) {\n return selectIds.includes(data[key][DkTable.table.pk!].toString())\n }\n return false\n}\n\n/*\n * 选择子项-递归\n */\nconst selectChildren = (children: TableRow[], type: boolean) => {\n // eslint-disable-next-line array-callback-return\n children.map((j: TableRow) => {\n toggleSelection(j, type)\n if (j.children) {\n selectChildren(j.children, type)\n }\n })\n}\n\n/*\n * 执行选择操作\n */\nconst toggleSelection = (row: TableRow, type: boolean) => {\n if (row) {\n nextTick(() => {\n TableRef.value?.toggleRowSelection(row, type)\n })\n }\n}\n\n/*\n * 记录选择的项\n */\nconst onSelectionChange = (selection: TableRow[]) => {\n DkTable.onTableAction('selection-change', selection)\n}\n\n/*\n * 设置折叠所有-递归\n */\nconst setUnFoldAll = (children: TableRow[], unfold: boolean) => {\n for (const key in children) {\n TableRef.value?.toggleRowExpansion(children[key], unfold)\n if (children[key].children) {\n setUnFoldAll(children[key].children!, unfold)\n }\n }\n}\n\n/*\n * 折叠所有\n */\nconst unFoldAll = (unfold: boolean) => {\n setUnFoldAll(DkTable.table.data!, unfold)\n}\n\nconst slotNames = computed(() => {\n const column = DkTable.table.column\n const slotNames = []\n for (let i = 0; i < column.length; i++) {\n if (column[i].slotName) {\n slotNames.push(column[i].slotName)\n }\n }\n return slotNames\n})\n\nonMounted(() => {\n // injectTablePrimaryMethods()\n})\n\ndefineExpose({\n DkTable,\n TableRef,\n FormRef,\n})\n</script>\n<style lang=\"scss\"></style>\n"],"names":["__MACROS_defineComponent","DkTableClass","slotNames"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,SAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAsGD,IAAA,MAAM,UAAU,GAAI,EAAA,CAAA;AAEpB,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAA,MAAM,UAAU,IAAIC,OAAA;AAAA,MAClB,KAAM,CAAA,QAAA;AAAA,MACN,KAAM,CAAA,WAAA;AAAA,MACN,KAAM,CAAA,UAAA;AAAA,KACR,CAAA;AAEA,IAAA,OAAA,CAAQ,WAAW,OAAO,CAAA,CAAA;AAE1B,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,OAAA,CAAQ,QAAS,CAAA,KAAA,CAAM,UAAU,CAAA,EAAG,KAAK,MAAM;AAC7C,QAAQ,OAAA,CAAA,QAAA,EAAY,EAAA,IAAA,CAAK,MAAM;AAC7B,UAAA,QAAA,CAAS,MAAM;AACb,YAAA,OAAA,CAAQ,QAAS,EAAA,CAAA;AAAA,WAClB,CAAA,CAAA;AAAA,SACF,CAAA,CAAA;AACD,QAAA,OAAA,CAAQ,aAAc,EAAA,CAAA;AAAA,OACvB,CAAA,CAAA;AACD,MAAQ,OAAA,CAAA,KAAA,CAAM,MAAM,QAAS,CAAA,KAAA,CAAA;AAC7B,MAAQ,OAAA,CAAA,IAAA,CAAK,MAAM,OAAQ,CAAA,KAAA,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10 @@ class dkTable {
136
136
  if (res.data.pk) {
137
137
  this.table.pk = res.data.pk;
138
138
  }
139
- storage.set(this.api.actionUrl.get("table") + "_table", JSON.stringify(res.data));
139
+ storage.set(
140
+ this.api.actionUrl.get("table") + "_table",
141
+ JSON.stringify(res.data)
142
+ );
140
143
  this.runAfter("getTable", { res });
141
144
  }).finally(() => {
142
145
  this.table.columnLoading = false;
@@ -147,9 +150,7 @@ class dkTable {
147
150
  * 显示回收站
148
151
  */
149
152
  async showRecycle() {
150
- if (!this.runBefore("api", { name: "getRecycleTable" }))
151
- return;
152
- if (!this.runBefore("getRecycleTable"))
153
+ if (!this.runBefore("showRecycleTable"))
153
154
  return;
154
155
  this.recycleTable.showDialogLoading = true;
155
156
  if (this.recycleTable.column.length <= 0) {
@@ -355,7 +356,9 @@ class dkTable {
355
356
  exportCsv = () => {
356
357
  const header = this.table.column;
357
358
  const headerMap = new Map(
358
- header.filter((item) => item !== void 0 && item.label !== void 0 && item.export).map((item) => [item.label, item.prop])
359
+ header.filter(
360
+ (item) => item !== void 0 && item.label !== void 0 && item.export
361
+ ).map((item) => [item.label, item.prop])
359
362
  );
360
363
  const headerLabels = Array.from(headerMap.keys());
361
364
  function jsonToCsv(data) {
@@ -382,7 +385,10 @@ class dkTable {
382
385
  }
383
386
  function downloadCsv(csvContent, fileName) {
384
387
  const link = document.createElement("a");
385
- link.setAttribute("href", "data:text/csv;charset=utf-8," + encodeURIComponent(csvContent));
388
+ link.setAttribute(
389
+ "href",
390
+ "data:text/csv;charset=utf-8," + encodeURIComponent(csvContent)
391
+ );
386
392
  link.setAttribute("download", fileName + ".csv");
387
393
  document.body.appendChild(link);
388
394
  link.click();
@@ -426,7 +432,11 @@ class dkTable {
426
432
  const buttonsKey = getArrayKey(this.table.column, "render", "buttons");
427
433
  if (buttonsKey === false)
428
434
  return;
429
- const moveButton = getArrayKey(this.table.column[buttonsKey]?.buttons, "render", "moveButton");
435
+ const moveButton = getArrayKey(
436
+ this.table.column[buttonsKey]?.buttons,
437
+ "render",
438
+ "moveButton"
439
+ );
430
440
  if (moveButton === false)
431
441
  return;
432
442
  if (!this.table.ref) {
@@ -435,7 +445,9 @@ class dkTable {
435
445
  );
436
446
  return;
437
447
  }
438
- const el = this.table.ref.$el.querySelector(".el-table__body-wrapper .el-table__body tbody");
448
+ const el = this.table.ref.$el.querySelector(
449
+ ".el-table__body-wrapper .el-table__body tbody"
450
+ );
439
451
  const disabledTip = this.table.column[buttonsKey].buttons[moveButton].disabledTip;
440
452
  Sortable.create(el, {
441
453
  animation: 200,
@@ -446,8 +458,14 @@ class dkTable {
446
458
  },
447
459
  onEnd: (evt) => {
448
460
  this.table.column[buttonsKey].buttons[moveButton].disabledTip = disabledTip;
449
- const moveRow = findIndexRow(this.table.data, evt.oldIndex);
450
- const replaceRow = findIndexRow(this.table.data, evt.newIndex);
461
+ const moveRow = findIndexRow(
462
+ this.table.data,
463
+ evt.oldIndex
464
+ );
465
+ const replaceRow = findIndexRow(
466
+ this.table.data,
467
+ evt.newIndex
468
+ );
451
469
  if (this.table.dragSortLimitField && moveRow[this.table.dragSortLimitField] != replaceRow[this.table.dragSortLimitField]) {
452
470
  this.onTableHeaderAction("refresh", {});
453
471
  ElNotification({
@@ -605,7 +623,10 @@ class dkTable {
605
623
  const range = queryProp.split(",");
606
624
  if (field[key].render == "datetime") {
607
625
  if (range && range.length >= 2) {
608
- form[prop + "-default"] = [new Date(range[0]), new Date(range[1])];
626
+ form[prop + "-default"] = [
627
+ new Date(range[0]),
628
+ new Date(range[1])
629
+ ];
609
630
  }
610
631
  } else {
611
632
  form[prop + "-start"] = range[0] ?? "";