@ljweb/layout-antdv-v4 0.0.0-stage → 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (608) hide show
  1. package/README.md +75 -2
  2. package/dist/style.css +9161 -0
  3. package/esm/_virtual/_plugin-vue_export-helper.js +11 -0
  4. package/esm/_virtual/_plugin-vue_export-helper.js.map +1 -0
  5. package/esm/assets/style.css +9161 -0
  6. package/esm/components/apple-window/AppleWindow.js +358 -0
  7. package/esm/components/apple-window/AppleWindow.js.map +1 -0
  8. package/esm/components/apple-window/AppleWindowHolder.js +55 -0
  9. package/esm/components/apple-window/AppleWindowHolder.js.map +1 -0
  10. package/esm/components/apple-window/command.js +11 -0
  11. package/esm/components/apple-window/command.js.map +1 -0
  12. package/esm/components/apple-window/helpers.js +19 -0
  13. package/esm/components/apple-window/helpers.js.map +1 -0
  14. package/esm/components/apple-window/index.js +10 -0
  15. package/esm/components/apple-window/index.js.map +1 -0
  16. package/esm/components/apple-window/index.module.less.js +48 -0
  17. package/esm/components/apple-window/index.module.less.js.map +1 -0
  18. package/esm/components/apple-window/layer.js +67 -0
  19. package/esm/components/apple-window/layer.js.map +1 -0
  20. package/esm/components/apple-window/records.js +45 -0
  21. package/esm/components/apple-window/records.js.map +1 -0
  22. package/esm/components/apple-window/types.js +2 -0
  23. package/esm/components/apple-window/types.js.map +1 -0
  24. package/esm/components/async-table/AsyncTable.js +290 -0
  25. package/esm/components/async-table/AsyncTable.js.map +1 -0
  26. package/esm/components/async-table/helpers.js +71 -0
  27. package/esm/components/async-table/helpers.js.map +1 -0
  28. package/esm/components/async-table/index.js +6 -0
  29. package/esm/components/async-table/index.js.map +1 -0
  30. package/esm/components/async-table/style.js +2 -0
  31. package/esm/components/async-table/style.js.map +1 -0
  32. package/esm/components/async-table/types.js +2 -0
  33. package/esm/components/async-table/types.js.map +1 -0
  34. package/esm/components/avatar-dropdown/AvatarDropdown.js +163 -0
  35. package/esm/components/avatar-dropdown/AvatarDropdown.js.map +1 -0
  36. package/esm/components/avatar-dropdown/index.js +12 -0
  37. package/esm/components/avatar-dropdown/index.js.map +1 -0
  38. package/esm/components/avatar-dropdown/style.js +2 -0
  39. package/esm/components/avatar-dropdown/style.js.map +1 -0
  40. package/esm/components/breadcrumb/Breadcrumb.js +112 -0
  41. package/esm/components/breadcrumb/Breadcrumb.js.map +1 -0
  42. package/esm/components/breadcrumb/index.js +10 -0
  43. package/esm/components/breadcrumb/index.js.map +1 -0
  44. package/esm/components/breadcrumb/style.js +3 -0
  45. package/esm/components/breadcrumb/style.js.map +1 -0
  46. package/esm/components/color-input/ColorInput.js +111 -0
  47. package/esm/components/color-input/ColorInput.js.map +1 -0
  48. package/esm/components/color-input/helpers.js +18 -0
  49. package/esm/components/color-input/helpers.js.map +1 -0
  50. package/esm/components/color-input/index.js +6 -0
  51. package/esm/components/color-input/index.js.map +1 -0
  52. package/esm/components/color-input/style.js +2 -0
  53. package/esm/components/color-input/style.js.map +1 -0
  54. package/esm/components/config-provider/ConfigProvider.js +105 -0
  55. package/esm/components/config-provider/ConfigProvider.js.map +1 -0
  56. package/esm/components/config-provider/index.js +6 -0
  57. package/esm/components/config-provider/index.js.map +1 -0
  58. package/esm/components/ext-button/ExtButton.vue.js +57 -0
  59. package/esm/components/ext-button/ExtButton.vue.js.map +1 -0
  60. package/esm/components/ext-button/ExtButton2.vue.js +5 -0
  61. package/esm/components/ext-button/ExtButton2.vue.js.map +1 -0
  62. package/esm/components/ext-button/color-map.js +49 -0
  63. package/esm/components/ext-button/color-map.js.map +1 -0
  64. package/esm/components/ext-button/index.js +12 -0
  65. package/esm/components/ext-button/index.js.map +1 -0
  66. package/esm/components/ext-table/ColumnSetting.vue.js +8 -0
  67. package/esm/components/ext-table/ColumnSetting.vue.js.map +1 -0
  68. package/esm/components/ext-table/ColumnSetting2.vue.js +277 -0
  69. package/esm/components/ext-table/ColumnSetting2.vue.js.map +1 -0
  70. package/esm/components/ext-table/ExtTable.vue.js +8 -0
  71. package/esm/components/ext-table/ExtTable.vue.js.map +1 -0
  72. package/esm/components/ext-table/ExtTable2.vue.js +1781 -0
  73. package/esm/components/ext-table/ExtTable2.vue.js.map +1 -0
  74. package/esm/components/ext-table/Operations.vue.js +8 -0
  75. package/esm/components/ext-table/Operations.vue.js.map +1 -0
  76. package/esm/components/ext-table/Operations2.vue.js +447 -0
  77. package/esm/components/ext-table/Operations2.vue.js.map +1 -0
  78. package/esm/components/ext-table/Status.vue.js +51 -0
  79. package/esm/components/ext-table/Status.vue.js.map +1 -0
  80. package/esm/components/ext-table/Status2.vue.js +5 -0
  81. package/esm/components/ext-table/Status2.vue.js.map +1 -0
  82. package/esm/components/ext-table/helpers.js +108 -0
  83. package/esm/components/ext-table/helpers.js.map +1 -0
  84. package/esm/components/ext-table/index.js +16 -0
  85. package/esm/components/ext-table/index.js.map +1 -0
  86. package/esm/components/ext-table/storage.js +54 -0
  87. package/esm/components/ext-table/storage.js.map +1 -0
  88. package/esm/components/ext-table/style.js +2 -0
  89. package/esm/components/ext-table/style.js.map +1 -0
  90. package/esm/components/ext-table/types.js +2 -0
  91. package/esm/components/ext-table/types.js.map +1 -0
  92. package/esm/components/ext-table/useColumnSetting.js +88 -0
  93. package/esm/components/ext-table/useColumnSetting.js.map +1 -0
  94. package/esm/components/ext-upload/ExtUpload.vue.js +8 -0
  95. package/esm/components/ext-upload/ExtUpload.vue.js.map +1 -0
  96. package/esm/components/ext-upload/ExtUpload2.vue.js +173 -0
  97. package/esm/components/ext-upload/ExtUpload2.vue.js.map +1 -0
  98. package/esm/components/ext-upload/helpers.js +129 -0
  99. package/esm/components/ext-upload/helpers.js.map +1 -0
  100. package/esm/components/ext-upload/images/excel.png.js +5 -0
  101. package/esm/components/ext-upload/images/excel.png.js.map +1 -0
  102. package/esm/components/ext-upload/images/pdf.png.js +5 -0
  103. package/esm/components/ext-upload/images/pdf.png.js.map +1 -0
  104. package/esm/components/ext-upload/images/video.png.js +5 -0
  105. package/esm/components/ext-upload/images/video.png.js.map +1 -0
  106. package/esm/components/ext-upload/images/word.png.js +5 -0
  107. package/esm/components/ext-upload/images/word.png.js.map +1 -0
  108. package/esm/components/ext-upload/index.js +12 -0
  109. package/esm/components/ext-upload/index.js.map +1 -0
  110. package/esm/components/ext-upload/types.js +12 -0
  111. package/esm/components/ext-upload/types.js.map +1 -0
  112. package/esm/components/format-value/CustomerLevel.vue.js +48 -0
  113. package/esm/components/format-value/CustomerLevel.vue.js.map +1 -0
  114. package/esm/components/format-value/CustomerLevel2.vue.js +5 -0
  115. package/esm/components/format-value/CustomerLevel2.vue.js.map +1 -0
  116. package/esm/components/format-value/Date.vue.js +25 -0
  117. package/esm/components/format-value/Date.vue.js.map +1 -0
  118. package/esm/components/format-value/Date2.vue.js +5 -0
  119. package/esm/components/format-value/Date2.vue.js.map +1 -0
  120. package/esm/components/format-value/Gender.vue.js +48 -0
  121. package/esm/components/format-value/Gender.vue.js.map +1 -0
  122. package/esm/components/format-value/Gender2.vue.js +5 -0
  123. package/esm/components/format-value/Gender2.vue.js.map +1 -0
  124. package/esm/components/format-value/LongString.vue.js +8 -0
  125. package/esm/components/format-value/LongString.vue.js.map +1 -0
  126. package/esm/components/format-value/LongString2.vue.js +100 -0
  127. package/esm/components/format-value/LongString2.vue.js.map +1 -0
  128. package/esm/components/format-value/Period.vue.js +24 -0
  129. package/esm/components/format-value/Period.vue.js.map +1 -0
  130. package/esm/components/format-value/Period2.vue.js +5 -0
  131. package/esm/components/format-value/Period2.vue.js.map +1 -0
  132. package/esm/components/format-value/index.js +13 -0
  133. package/esm/components/format-value/index.js.map +1 -0
  134. package/esm/components/index.js +93 -0
  135. package/esm/components/index.js.map +1 -0
  136. package/esm/components/json-editor/JsonEditor.js +61 -0
  137. package/esm/components/json-editor/JsonEditor.js.map +1 -0
  138. package/esm/components/json-editor/index.js +6 -0
  139. package/esm/components/json-editor/index.js.map +1 -0
  140. package/esm/components/layout-admin/BreadcrumbContainer.js +125 -0
  141. package/esm/components/layout-admin/BreadcrumbContainer.js.map +1 -0
  142. package/esm/components/layout-admin/LayoutAdmin.js +675 -0
  143. package/esm/components/layout-admin/LayoutAdmin.js.map +1 -0
  144. package/esm/components/layout-admin/index.js +34 -0
  145. package/esm/components/layout-admin/index.js.map +1 -0
  146. package/esm/components/layout-admin/multi-tab.js +219 -0
  147. package/esm/components/layout-admin/multi-tab.js.map +1 -0
  148. package/esm/components/layout-admin/style.js +3 -0
  149. package/esm/components/layout-admin/style.js.map +1 -0
  150. package/esm/components/locale-dropdown/LocaleDropdown.js +109 -0
  151. package/esm/components/locale-dropdown/LocaleDropdown.js.map +1 -0
  152. package/esm/components/locale-dropdown/index.js +10 -0
  153. package/esm/components/locale-dropdown/index.js.map +1 -0
  154. package/esm/components/locale-dropdown/style.js +2 -0
  155. package/esm/components/locale-dropdown/style.js.map +1 -0
  156. package/esm/components/mixins/index.js +14 -0
  157. package/esm/components/mixins/index.js.map +1 -0
  158. package/esm/components/mixins/layout.js +178 -0
  159. package/esm/components/mixins/layout.js.map +1 -0
  160. package/esm/components/scrollbar-table/ScrollbarTable.vue.js +8 -0
  161. package/esm/components/scrollbar-table/ScrollbarTable.vue.js.map +1 -0
  162. package/esm/components/scrollbar-table/ScrollbarTable2.vue.js +250 -0
  163. package/esm/components/scrollbar-table/ScrollbarTable2.vue.js.map +1 -0
  164. package/esm/components/scrollbar-table/helpers.js +17 -0
  165. package/esm/components/scrollbar-table/helpers.js.map +1 -0
  166. package/esm/components/scrollbar-table/index.js +6 -0
  167. package/esm/components/scrollbar-table/index.js.map +1 -0
  168. package/esm/components/scrollbar-table/types.js +2 -0
  169. package/esm/components/scrollbar-table/types.js.map +1 -0
  170. package/esm/components/search-form/SearchForm.vue.js +137 -0
  171. package/esm/components/search-form/SearchForm.vue.js.map +1 -0
  172. package/esm/components/search-form/SearchForm2.vue.js +5 -0
  173. package/esm/components/search-form/SearchForm2.vue.js.map +1 -0
  174. package/esm/components/search-form/index.js +6 -0
  175. package/esm/components/search-form/index.js.map +1 -0
  176. package/esm/components/setting-drawer/SettingDrawer.js +105 -0
  177. package/esm/components/setting-drawer/SettingDrawer.js.map +1 -0
  178. package/esm/components/setting-drawer/index.js +6 -0
  179. package/esm/components/setting-drawer/index.js.map +1 -0
  180. package/esm/components/splitter-pane/SplitterPane.vue.js +8 -0
  181. package/esm/components/splitter-pane/SplitterPane.vue.js.map +1 -0
  182. package/esm/components/splitter-pane/SplitterPane2.vue.js +271 -0
  183. package/esm/components/splitter-pane/SplitterPane2.vue.js.map +1 -0
  184. package/esm/components/splitter-pane/helpers.js +38 -0
  185. package/esm/components/splitter-pane/helpers.js.map +1 -0
  186. package/esm/components/splitter-pane/index.js +5 -0
  187. package/esm/components/splitter-pane/index.js.map +1 -0
  188. package/esm/components/splitter-pane/types.js +2 -0
  189. package/esm/components/splitter-pane/types.js.map +1 -0
  190. package/esm/components/utils/index.js +12 -0
  191. package/esm/components/utils/index.js.map +1 -0
  192. package/esm/components/utils/menu.js +131 -0
  193. package/esm/components/utils/menu.js.map +1 -0
  194. package/esm/components/utils/util.js +11 -0
  195. package/esm/components/utils/util.js.map +1 -0
  196. package/esm/components/variable-input/VariableInput.vue.js +8 -0
  197. package/esm/components/variable-input/VariableInput.vue.js.map +1 -0
  198. package/esm/components/variable-input/VariableInput2.vue.js +461 -0
  199. package/esm/components/variable-input/VariableInput2.vue.js.map +1 -0
  200. package/esm/components/variable-input/helpers.js +103 -0
  201. package/esm/components/variable-input/helpers.js.map +1 -0
  202. package/esm/components/variable-input/index.js +6 -0
  203. package/esm/components/variable-input/index.js.map +1 -0
  204. package/esm/components/variable-input/types.js +2 -0
  205. package/esm/components/variable-input/types.js.map +1 -0
  206. package/esm/context/i18n.js +13 -0
  207. package/esm/context/i18n.js.map +1 -0
  208. package/esm/context/index.js +20 -0
  209. package/esm/context/index.js.map +1 -0
  210. package/esm/context/multi-tab-cache.js +22 -0
  211. package/esm/context/multi-tab-cache.js.map +1 -0
  212. package/esm/context/theme.js +31 -0
  213. package/esm/context/theme.js.map +1 -0
  214. package/esm/context/useEffect.js +26 -0
  215. package/esm/context/useEffect.js.map +1 -0
  216. package/esm/index.js +145 -0
  217. package/esm/index.js.map +1 -0
  218. package/esm/package.json +1 -0
  219. package/esm/shared/expose.js +10 -0
  220. package/esm/shared/expose.js.map +1 -0
  221. package/esm/shared/index.js +11 -0
  222. package/esm/shared/index.js.map +1 -0
  223. package/esm/shared/useConfigProvider.js +17 -0
  224. package/esm/shared/useConfigProvider.js.map +1 -0
  225. package/esm/style.js +2 -0
  226. package/esm/style.js.map +1 -0
  227. package/esm/styles/index.js +2 -0
  228. package/esm/styles/index.js.map +1 -0
  229. package/esm/styles/variables.less.js +2 -0
  230. package/esm/styles/variables.less.js.map +1 -0
  231. package/esm/types.js +30 -0
  232. package/esm/types.js.map +1 -0
  233. package/esm/utils/download.js +17 -0
  234. package/esm/utils/download.js.map +1 -0
  235. package/esm/utils/format.js +50 -0
  236. package/esm/utils/format.js.map +1 -0
  237. package/esm/utils/index.js +18 -0
  238. package/esm/utils/index.js.map +1 -0
  239. package/esm/utils/size.js +12 -0
  240. package/esm/utils/size.js.map +1 -0
  241. package/esm/utils/upload.js +11 -0
  242. package/esm/utils/upload.js.map +1 -0
  243. package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
  244. package/lib/_virtual/_plugin-vue_export-helper.js.map +1 -0
  245. package/lib/assets/style.css +9161 -0
  246. package/lib/components/apple-window/AppleWindow.js +358 -0
  247. package/lib/components/apple-window/AppleWindow.js.map +1 -0
  248. package/lib/components/apple-window/AppleWindowHolder.js +55 -0
  249. package/lib/components/apple-window/AppleWindowHolder.js.map +1 -0
  250. package/lib/components/apple-window/command.js +11 -0
  251. package/lib/components/apple-window/command.js.map +1 -0
  252. package/lib/components/apple-window/helpers.js +19 -0
  253. package/lib/components/apple-window/helpers.js.map +1 -0
  254. package/lib/components/apple-window/index.js +10 -0
  255. package/lib/components/apple-window/index.js.map +1 -0
  256. package/lib/components/apple-window/index.module.less.js +48 -0
  257. package/lib/components/apple-window/index.module.less.js.map +1 -0
  258. package/lib/components/apple-window/layer.js +67 -0
  259. package/lib/components/apple-window/layer.js.map +1 -0
  260. package/lib/components/apple-window/records.js +45 -0
  261. package/lib/components/apple-window/records.js.map +1 -0
  262. package/lib/components/apple-window/types.js +2 -0
  263. package/lib/components/apple-window/types.js.map +1 -0
  264. package/lib/components/async-table/AsyncTable.js +290 -0
  265. package/lib/components/async-table/AsyncTable.js.map +1 -0
  266. package/lib/components/async-table/helpers.js +71 -0
  267. package/lib/components/async-table/helpers.js.map +1 -0
  268. package/lib/components/async-table/index.js +6 -0
  269. package/lib/components/async-table/index.js.map +1 -0
  270. package/lib/components/async-table/style.js +3 -0
  271. package/lib/components/async-table/style.js.map +1 -0
  272. package/lib/components/async-table/types.js +2 -0
  273. package/lib/components/async-table/types.js.map +1 -0
  274. package/lib/components/avatar-dropdown/AvatarDropdown.js +165 -0
  275. package/lib/components/avatar-dropdown/AvatarDropdown.js.map +1 -0
  276. package/lib/components/avatar-dropdown/index.js +11 -0
  277. package/lib/components/avatar-dropdown/index.js.map +1 -0
  278. package/lib/components/avatar-dropdown/style.js +3 -0
  279. package/lib/components/avatar-dropdown/style.js.map +1 -0
  280. package/lib/components/breadcrumb/Breadcrumb.js +112 -0
  281. package/lib/components/breadcrumb/Breadcrumb.js.map +1 -0
  282. package/lib/components/breadcrumb/index.js +10 -0
  283. package/lib/components/breadcrumb/index.js.map +1 -0
  284. package/lib/components/breadcrumb/style.js +4 -0
  285. package/lib/components/breadcrumb/style.js.map +1 -0
  286. package/lib/components/color-input/ColorInput.js +111 -0
  287. package/lib/components/color-input/ColorInput.js.map +1 -0
  288. package/lib/components/color-input/helpers.js +20 -0
  289. package/lib/components/color-input/helpers.js.map +1 -0
  290. package/lib/components/color-input/index.js +6 -0
  291. package/lib/components/color-input/index.js.map +1 -0
  292. package/lib/components/color-input/style.js +3 -0
  293. package/lib/components/color-input/style.js.map +1 -0
  294. package/lib/components/config-provider/ConfigProvider.js +105 -0
  295. package/lib/components/config-provider/ConfigProvider.js.map +1 -0
  296. package/lib/components/config-provider/index.js +6 -0
  297. package/lib/components/config-provider/index.js.map +1 -0
  298. package/lib/components/ext-button/ExtButton.vue.js +57 -0
  299. package/lib/components/ext-button/ExtButton.vue.js.map +1 -0
  300. package/lib/components/ext-button/ExtButton2.vue.js +5 -0
  301. package/lib/components/ext-button/ExtButton2.vue.js.map +1 -0
  302. package/lib/components/ext-button/color-map.js +49 -0
  303. package/lib/components/ext-button/color-map.js.map +1 -0
  304. package/lib/components/ext-button/index.js +12 -0
  305. package/lib/components/ext-button/index.js.map +1 -0
  306. package/lib/components/ext-table/ColumnSetting.vue.js +8 -0
  307. package/lib/components/ext-table/ColumnSetting.vue.js.map +1 -0
  308. package/lib/components/ext-table/ColumnSetting2.vue.js +279 -0
  309. package/lib/components/ext-table/ColumnSetting2.vue.js.map +1 -0
  310. package/lib/components/ext-table/ExtTable.vue.js +8 -0
  311. package/lib/components/ext-table/ExtTable.vue.js.map +1 -0
  312. package/lib/components/ext-table/ExtTable2.vue.js +1784 -0
  313. package/lib/components/ext-table/ExtTable2.vue.js.map +1 -0
  314. package/lib/components/ext-table/Operations.vue.js +8 -0
  315. package/lib/components/ext-table/Operations.vue.js.map +1 -0
  316. package/lib/components/ext-table/Operations2.vue.js +447 -0
  317. package/lib/components/ext-table/Operations2.vue.js.map +1 -0
  318. package/lib/components/ext-table/Status.vue.js +51 -0
  319. package/lib/components/ext-table/Status.vue.js.map +1 -0
  320. package/lib/components/ext-table/Status2.vue.js +5 -0
  321. package/lib/components/ext-table/Status2.vue.js.map +1 -0
  322. package/lib/components/ext-table/helpers.js +108 -0
  323. package/lib/components/ext-table/helpers.js.map +1 -0
  324. package/lib/components/ext-table/index.js +16 -0
  325. package/lib/components/ext-table/index.js.map +1 -0
  326. package/lib/components/ext-table/storage.js +54 -0
  327. package/lib/components/ext-table/storage.js.map +1 -0
  328. package/lib/components/ext-table/style.js +3 -0
  329. package/lib/components/ext-table/style.js.map +1 -0
  330. package/lib/components/ext-table/types.js +2 -0
  331. package/lib/components/ext-table/types.js.map +1 -0
  332. package/lib/components/ext-table/useColumnSetting.js +88 -0
  333. package/lib/components/ext-table/useColumnSetting.js.map +1 -0
  334. package/lib/components/ext-upload/ExtUpload.vue.js +8 -0
  335. package/lib/components/ext-upload/ExtUpload.vue.js.map +1 -0
  336. package/lib/components/ext-upload/ExtUpload2.vue.js +173 -0
  337. package/lib/components/ext-upload/ExtUpload2.vue.js.map +1 -0
  338. package/lib/components/ext-upload/helpers.js +129 -0
  339. package/lib/components/ext-upload/helpers.js.map +1 -0
  340. package/lib/components/ext-upload/images/excel.png.js +5 -0
  341. package/lib/components/ext-upload/images/excel.png.js.map +1 -0
  342. package/lib/components/ext-upload/images/pdf.png.js +5 -0
  343. package/lib/components/ext-upload/images/pdf.png.js.map +1 -0
  344. package/lib/components/ext-upload/images/video.png.js +5 -0
  345. package/lib/components/ext-upload/images/video.png.js.map +1 -0
  346. package/lib/components/ext-upload/images/word.png.js +5 -0
  347. package/lib/components/ext-upload/images/word.png.js.map +1 -0
  348. package/lib/components/ext-upload/index.js +12 -0
  349. package/lib/components/ext-upload/index.js.map +1 -0
  350. package/lib/components/ext-upload/types.js +12 -0
  351. package/lib/components/ext-upload/types.js.map +1 -0
  352. package/lib/components/format-value/CustomerLevel.vue.js +48 -0
  353. package/lib/components/format-value/CustomerLevel.vue.js.map +1 -0
  354. package/lib/components/format-value/CustomerLevel2.vue.js +5 -0
  355. package/lib/components/format-value/CustomerLevel2.vue.js.map +1 -0
  356. package/lib/components/format-value/Date.vue.js +27 -0
  357. package/lib/components/format-value/Date.vue.js.map +1 -0
  358. package/lib/components/format-value/Date2.vue.js +5 -0
  359. package/lib/components/format-value/Date2.vue.js.map +1 -0
  360. package/lib/components/format-value/Gender.vue.js +48 -0
  361. package/lib/components/format-value/Gender.vue.js.map +1 -0
  362. package/lib/components/format-value/Gender2.vue.js +5 -0
  363. package/lib/components/format-value/Gender2.vue.js.map +1 -0
  364. package/lib/components/format-value/LongString.vue.js +8 -0
  365. package/lib/components/format-value/LongString.vue.js.map +1 -0
  366. package/lib/components/format-value/LongString2.vue.js +100 -0
  367. package/lib/components/format-value/LongString2.vue.js.map +1 -0
  368. package/lib/components/format-value/Period.vue.js +26 -0
  369. package/lib/components/format-value/Period.vue.js.map +1 -0
  370. package/lib/components/format-value/Period2.vue.js +5 -0
  371. package/lib/components/format-value/Period2.vue.js.map +1 -0
  372. package/lib/components/format-value/index.js +13 -0
  373. package/lib/components/format-value/index.js.map +1 -0
  374. package/lib/components/index.js +93 -0
  375. package/lib/components/index.js.map +1 -0
  376. package/lib/components/json-editor/JsonEditor.js +63 -0
  377. package/lib/components/json-editor/JsonEditor.js.map +1 -0
  378. package/lib/components/json-editor/index.js +6 -0
  379. package/lib/components/json-editor/index.js.map +1 -0
  380. package/lib/components/layout-admin/BreadcrumbContainer.js +125 -0
  381. package/lib/components/layout-admin/BreadcrumbContainer.js.map +1 -0
  382. package/lib/components/layout-admin/LayoutAdmin.js +678 -0
  383. package/lib/components/layout-admin/LayoutAdmin.js.map +1 -0
  384. package/lib/components/layout-admin/index.js +34 -0
  385. package/lib/components/layout-admin/index.js.map +1 -0
  386. package/lib/components/layout-admin/multi-tab.js +219 -0
  387. package/lib/components/layout-admin/multi-tab.js.map +1 -0
  388. package/lib/components/layout-admin/style.js +4 -0
  389. package/lib/components/layout-admin/style.js.map +1 -0
  390. package/lib/components/locale-dropdown/LocaleDropdown.js +112 -0
  391. package/lib/components/locale-dropdown/LocaleDropdown.js.map +1 -0
  392. package/lib/components/locale-dropdown/index.js +10 -0
  393. package/lib/components/locale-dropdown/index.js.map +1 -0
  394. package/lib/components/locale-dropdown/style.js +3 -0
  395. package/lib/components/locale-dropdown/style.js.map +1 -0
  396. package/lib/components/mixins/index.js +14 -0
  397. package/lib/components/mixins/index.js.map +1 -0
  398. package/lib/components/mixins/layout.js +178 -0
  399. package/lib/components/mixins/layout.js.map +1 -0
  400. package/lib/components/scrollbar-table/ScrollbarTable.vue.js +8 -0
  401. package/lib/components/scrollbar-table/ScrollbarTable.vue.js.map +1 -0
  402. package/lib/components/scrollbar-table/ScrollbarTable2.vue.js +250 -0
  403. package/lib/components/scrollbar-table/ScrollbarTable2.vue.js.map +1 -0
  404. package/lib/components/scrollbar-table/helpers.js +17 -0
  405. package/lib/components/scrollbar-table/helpers.js.map +1 -0
  406. package/lib/components/scrollbar-table/index.js +6 -0
  407. package/lib/components/scrollbar-table/index.js.map +1 -0
  408. package/lib/components/scrollbar-table/types.js +2 -0
  409. package/lib/components/scrollbar-table/types.js.map +1 -0
  410. package/lib/components/search-form/SearchForm.vue.js +137 -0
  411. package/lib/components/search-form/SearchForm.vue.js.map +1 -0
  412. package/lib/components/search-form/SearchForm2.vue.js +5 -0
  413. package/lib/components/search-form/SearchForm2.vue.js.map +1 -0
  414. package/lib/components/search-form/index.js +6 -0
  415. package/lib/components/search-form/index.js.map +1 -0
  416. package/lib/components/setting-drawer/SettingDrawer.js +105 -0
  417. package/lib/components/setting-drawer/SettingDrawer.js.map +1 -0
  418. package/lib/components/setting-drawer/index.js +6 -0
  419. package/lib/components/setting-drawer/index.js.map +1 -0
  420. package/lib/components/splitter-pane/SplitterPane.vue.js +8 -0
  421. package/lib/components/splitter-pane/SplitterPane.vue.js.map +1 -0
  422. package/lib/components/splitter-pane/SplitterPane2.vue.js +271 -0
  423. package/lib/components/splitter-pane/SplitterPane2.vue.js.map +1 -0
  424. package/lib/components/splitter-pane/helpers.js +38 -0
  425. package/lib/components/splitter-pane/helpers.js.map +1 -0
  426. package/lib/components/splitter-pane/index.js +5 -0
  427. package/lib/components/splitter-pane/index.js.map +1 -0
  428. package/lib/components/splitter-pane/types.js +2 -0
  429. package/lib/components/splitter-pane/types.js.map +1 -0
  430. package/lib/components/utils/index.js +12 -0
  431. package/lib/components/utils/index.js.map +1 -0
  432. package/lib/components/utils/menu.js +131 -0
  433. package/lib/components/utils/menu.js.map +1 -0
  434. package/lib/components/utils/util.js +11 -0
  435. package/lib/components/utils/util.js.map +1 -0
  436. package/lib/components/variable-input/VariableInput.vue.js +8 -0
  437. package/lib/components/variable-input/VariableInput.vue.js.map +1 -0
  438. package/lib/components/variable-input/VariableInput2.vue.js +461 -0
  439. package/lib/components/variable-input/VariableInput2.vue.js.map +1 -0
  440. package/lib/components/variable-input/helpers.js +103 -0
  441. package/lib/components/variable-input/helpers.js.map +1 -0
  442. package/lib/components/variable-input/index.js +6 -0
  443. package/lib/components/variable-input/index.js.map +1 -0
  444. package/lib/components/variable-input/types.js +2 -0
  445. package/lib/components/variable-input/types.js.map +1 -0
  446. package/lib/context/i18n.js +13 -0
  447. package/lib/context/i18n.js.map +1 -0
  448. package/lib/context/index.js +20 -0
  449. package/lib/context/index.js.map +1 -0
  450. package/lib/context/multi-tab-cache.js +22 -0
  451. package/lib/context/multi-tab-cache.js.map +1 -0
  452. package/lib/context/theme.js +31 -0
  453. package/lib/context/theme.js.map +1 -0
  454. package/lib/context/useEffect.js +26 -0
  455. package/lib/context/useEffect.js.map +1 -0
  456. package/lib/index.js +145 -0
  457. package/lib/index.js.map +1 -0
  458. package/lib/shared/expose.js +10 -0
  459. package/lib/shared/expose.js.map +1 -0
  460. package/lib/shared/index.js +11 -0
  461. package/lib/shared/index.js.map +1 -0
  462. package/lib/shared/useConfigProvider.js +17 -0
  463. package/lib/shared/useConfigProvider.js.map +1 -0
  464. package/lib/style.js +3 -0
  465. package/lib/style.js.map +1 -0
  466. package/lib/styles/index.js +3 -0
  467. package/lib/styles/index.js.map +1 -0
  468. package/lib/styles/variables.less.js +2 -0
  469. package/lib/styles/variables.less.js.map +1 -0
  470. package/lib/types.js +30 -0
  471. package/lib/types.js.map +1 -0
  472. package/lib/utils/download.js +17 -0
  473. package/lib/utils/download.js.map +1 -0
  474. package/lib/utils/format.js +52 -0
  475. package/lib/utils/format.js.map +1 -0
  476. package/lib/utils/index.js +18 -0
  477. package/lib/utils/index.js.map +1 -0
  478. package/lib/utils/size.js +12 -0
  479. package/lib/utils/size.js.map +1 -0
  480. package/lib/utils/upload.js +11 -0
  481. package/lib/utils/upload.js.map +1 -0
  482. package/package.json +249 -4
  483. package/src/components/apple-window/index.module.less +167 -0
  484. package/src/components/avatar-dropdown/style.less +57 -0
  485. package/src/components/color-input/style.less +38 -0
  486. package/src/components/ext-button/style.less +144 -0
  487. package/src/components/ext-table/README.md +306 -0
  488. package/src/components/ext-table/style.less +51 -0
  489. package/src/components/ext-upload/README.md +29 -0
  490. package/src/components/layout-admin/style.less +537 -0
  491. package/src/components/locale-dropdown/style.less +29 -0
  492. package/src/styles/color/bezierEasing.less +110 -0
  493. package/src/styles/color/colorPalette.less +75 -0
  494. package/src/styles/color/tinyColor.less +1184 -0
  495. package/src/styles/component-reset.less +25 -0
  496. package/src/styles/core/1px.less +65 -0
  497. package/src/styles/core/colors.less +260 -0
  498. package/src/styles/core/globals.less +277 -0
  499. package/src/styles/core/index.less +4 -0
  500. package/src/styles/dark.less +12 -0
  501. package/src/styles/default.less +3 -0
  502. package/src/styles/index.less +14 -0
  503. package/src/styles/mixins/font-size.less +16 -0
  504. package/src/styles/mixins/index.less +8 -0
  505. package/src/styles/mixins/set-arrow.less +40 -0
  506. package/src/styles/mixins/set-color.less +243 -0
  507. package/src/styles/mixins/set-onepx.less +72 -0
  508. package/src/styles/mixins/text-overflow.less +17 -0
  509. package/src/styles/themes/dark.less +208 -0
  510. package/src/styles/themes/default.less +278 -0
  511. package/src/styles/themes/index.less +6 -0
  512. package/src/styles/variables.less +32 -0
  513. package/types/components/apple-window/AppleWindow.d.ts +105 -0
  514. package/types/components/apple-window/AppleWindowHolder.d.ts +14 -0
  515. package/types/components/apple-window/command.d.ts +7 -0
  516. package/types/components/apple-window/helpers.d.ts +4 -0
  517. package/types/components/apple-window/index.d.ts +6 -0
  518. package/types/components/apple-window/layer.d.ts +20 -0
  519. package/types/components/apple-window/records.d.ts +15 -0
  520. package/types/components/apple-window/types.d.ts +41 -0
  521. package/types/components/async-table/AsyncTable.d.ts +413 -0
  522. package/types/components/async-table/helpers.d.ts +18 -0
  523. package/types/components/async-table/index.d.ts +2 -0
  524. package/types/components/async-table/style.d.ts +1 -0
  525. package/types/components/async-table/types.d.ts +50 -0
  526. package/types/components/avatar-dropdown/AvatarDropdown.d.ts +205 -0
  527. package/types/components/avatar-dropdown/index.d.ts +4 -0
  528. package/types/components/avatar-dropdown/style.d.ts +1 -0
  529. package/types/components/breadcrumb/Breadcrumb.d.ts +60 -0
  530. package/types/components/breadcrumb/index.d.ts +4 -0
  531. package/types/components/breadcrumb/style.d.ts +2 -0
  532. package/types/components/color-input/ColorInput.d.ts +181 -0
  533. package/types/components/color-input/helpers.d.ts +3 -0
  534. package/types/components/color-input/index.d.ts +2 -0
  535. package/types/components/color-input/style.d.ts +1 -0
  536. package/types/components/config-provider/ConfigProvider.d.ts +287 -0
  537. package/types/components/config-provider/index.d.ts +4 -0
  538. package/types/components/ext-button/ExtButton.vue.d.ts +41 -0
  539. package/types/components/ext-button/color-map.d.ts +56 -0
  540. package/types/components/ext-button/index.d.ts +5 -0
  541. package/types/components/ext-table/ColumnSetting.vue.d.ts +34 -0
  542. package/types/components/ext-table/ExtTable.vue.d.ts +158 -0
  543. package/types/components/ext-table/Operations.vue.d.ts +52 -0
  544. package/types/components/ext-table/Status.vue.d.ts +19 -0
  545. package/types/components/ext-table/helpers.d.ts +30 -0
  546. package/types/components/ext-table/index.d.ts +8 -0
  547. package/types/components/ext-table/storage.d.ts +22 -0
  548. package/types/components/ext-table/style.d.ts +1 -0
  549. package/types/components/ext-table/types.d.ts +249 -0
  550. package/types/components/ext-table/useColumnSetting.d.ts +32 -0
  551. package/types/components/ext-upload/ExtUpload.vue.d.ts +90 -0
  552. package/types/components/ext-upload/helpers.d.ts +53 -0
  553. package/types/components/ext-upload/index.d.ts +5 -0
  554. package/types/components/ext-upload/types.d.ts +20 -0
  555. package/types/components/format-value/CustomerLevel.vue.d.ts +40 -0
  556. package/types/components/format-value/Date.vue.d.ts +44 -0
  557. package/types/components/format-value/Gender.vue.d.ts +40 -0
  558. package/types/components/format-value/LongString.vue.d.ts +69 -0
  559. package/types/components/format-value/Period.vue.d.ts +19 -0
  560. package/types/components/format-value/index.d.ts +5 -0
  561. package/types/components/index.d.ts +18 -0
  562. package/types/components/json-editor/JsonEditor.d.ts +29 -0
  563. package/types/components/json-editor/index.d.ts +3 -0
  564. package/types/components/layout-admin/BreadcrumbContainer.d.ts +55 -0
  565. package/types/components/layout-admin/LayoutAdmin.d.ts +177 -0
  566. package/types/components/layout-admin/index.d.ts +335 -0
  567. package/types/components/layout-admin/multi-tab.d.ts +73 -0
  568. package/types/components/layout-admin/style.d.ts +2 -0
  569. package/types/components/locale-dropdown/LocaleDropdown.d.ts +172 -0
  570. package/types/components/locale-dropdown/index.d.ts +3 -0
  571. package/types/components/locale-dropdown/style.d.ts +1 -0
  572. package/types/components/mixins/index.d.ts +2 -0
  573. package/types/components/mixins/layout.d.ts +56 -0
  574. package/types/components/scrollbar-table/helpers.d.ts +2 -0
  575. package/types/components/scrollbar-table/index.d.ts +4 -0
  576. package/types/components/scrollbar-table/types.d.ts +12 -0
  577. package/types/components/search-form/SearchForm.vue.d.ts +49 -0
  578. package/types/components/search-form/index.d.ts +3 -0
  579. package/types/components/setting-drawer/SettingDrawer.d.ts +49 -0
  580. package/types/components/setting-drawer/index.d.ts +3 -0
  581. package/types/components/splitter-pane/SplitterPane.vue.d.ts +76 -0
  582. package/types/components/splitter-pane/helpers.d.ts +6 -0
  583. package/types/components/splitter-pane/index.d.ts +2 -0
  584. package/types/components/splitter-pane/types.d.ts +3 -0
  585. package/types/components/utils/index.d.ts +2 -0
  586. package/types/components/utils/menu.d.ts +10 -0
  587. package/types/components/utils/util.d.ts +6 -0
  588. package/types/components/variable-input/VariableInput.vue.d.ts +74 -0
  589. package/types/components/variable-input/helpers.d.ts +14 -0
  590. package/types/components/variable-input/index.d.ts +4 -0
  591. package/types/components/variable-input/types.d.ts +18 -0
  592. package/types/context/i18n.d.ts +10 -0
  593. package/types/context/index.d.ts +4 -0
  594. package/types/context/multi-tab-cache.d.ts +40 -0
  595. package/types/context/theme.d.ts +41 -0
  596. package/types/context/useEffect.d.ts +3 -0
  597. package/types/index.d.ts +6 -0
  598. package/types/shared/expose.d.ts +2 -0
  599. package/types/shared/index.d.ts +3 -0
  600. package/types/shared/useConfigProvider.d.ts +10 -0
  601. package/types/style.d.ts +1 -0
  602. package/types/styles/index.d.ts +1 -0
  603. package/types/types.d.ts +219 -0
  604. package/types/utils/download.d.ts +1 -0
  605. package/types/utils/format.d.ts +14 -0
  606. package/types/utils/index.d.ts +4 -0
  607. package/types/utils/size.d.ts +4 -0
  608. package/types/utils/upload.d.ts +2 -0
@@ -0,0 +1,1781 @@
1
+ import { defineComponent, ref, shallowRef, inject, provide, useAttrs, useSlots, getCurrentInstance, computed, watch, nextTick, onMounted, onUnmounted, openBlock, createElementBlock, normalizeStyle, normalizeClass, createVNode, unref, withCtx, createCommentVNode, createBlock, createElementVNode, createTextVNode, renderSlot, mergeProps, createSlots, Fragment, toDisplayString, normalizeProps, guardReactiveProps, pushScopeId, popScopeId, h } from "vue";
2
+ import dayjs from "dayjs";
3
+ import sortablejs from "sortablejs";
4
+ import { hasIn, isUndefined, get, isFunction, isArray, isPlainObject } from "lodash-es";
5
+ import { promisify } from "@ace-util/core";
6
+ import { routerKey, routeLocationKey } from "vue-router";
7
+ import { useFullscreen, useClipboard } from "@vueuse/core";
8
+ import { Flex, Space, Button, Tooltip, Switch, Image, Progress, Pagination, Dropdown, Menu, MenuItem, MenuDivider, message, Input, DatePicker, Select } from "ant-design-vue";
9
+ import { useConfigContextInject } from "ant-design-vue/es/config-provider/context";
10
+ import { PlusOutlined, ExportOutlined, ImportOutlined, ReloadOutlined, SettingOutlined, FullscreenOutlined, FullscreenExitOutlined, CopyOutlined, SearchOutlined } from "@ant-design/icons-vue";
11
+ import { DEFAULT_FILE_TYPE_MAPPING, phoneMask, idCardMask, nameMask, formatPrice, DEFAULT_CUSTOMER_LEVEL_MAPPING, DEFAULT_GENDER_MAPPING } from "../../utils/format.js";
12
+ import _sfc_main$2 from "../format-value/CustomerLevel.vue.js";
13
+ import _sfc_main$1 from "../format-value/Gender.vue.js";
14
+ import FormatValueLongString from "../format-value/LongString.vue.js";
15
+ import _sfc_main$3 from "../format-value/Period.vue.js";
16
+ import ScrollbarTable from "../scrollbar-table/ScrollbarTable.vue.js";
17
+ import { useColumnSetting } from "./useColumnSetting.js";
18
+ import { getTableColumnStorageKey } from "./storage.js";
19
+ import { TABLE_SHOW_TOTAL, TABLE_SHOW_SIZE_CHANGER, TABLE_PAGE_SIZE_OPTIONS, NESTED_EXT_TABLE_KEY, orderColumnsByDataIndex, getCellText, getSelectedTextInCell, getCopyableRowColumns, getCopyColumnTitle, normalizeCopyText } from "./helpers.js";
20
+ import _sfc_main$4 from "./Status.vue.js";
21
+ import Operations from "./Operations.vue.js";
22
+ import ColumnSetting from "./ColumnSetting.vue.js";
23
+ const _withScopeId = (n) => (pushScopeId("data-v-60f82f19"), n = n(), popScopeId(), n);
24
+ const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
25
+ "svg",
26
+ {
27
+ viewBox: "64 64 896 896",
28
+ focusable: "false",
29
+ "data-icon": "holder",
30
+ width: "1em",
31
+ height: "1em",
32
+ fill: "currentColor",
33
+ "aria-hidden": "true"
34
+ },
35
+ [
36
+ /* @__PURE__ */ createElementVNode("path", { d: "M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" })
37
+ ],
38
+ -1
39
+ /* HOISTED */
40
+ ));
41
+ const _hoisted_2 = { class: "ext-table-batch-operations" };
42
+ const _hoisted_3 = {
43
+ key: 0,
44
+ class: "ext-table-selection-summary"
45
+ };
46
+ const _hoisted_4 = { class: "ext-table-batch-operations" };
47
+ const _hoisted_5 = {
48
+ key: 0,
49
+ class: "ext-table-selection-summary"
50
+ };
51
+ const _sfc_main = /* @__PURE__ */ defineComponent({
52
+ ...{
53
+ inheritAttrs: false
54
+ },
55
+ __name: "ExtTable",
56
+ props: {
57
+ formatMappings: {},
58
+ prefixCls: { default: void 0 },
59
+ size: {},
60
+ dataSource: { default: void 0 },
61
+ toolbar: { default: void 0 },
62
+ fixedColumns: {},
63
+ requiredColumns: {},
64
+ tableId: { default: void 0 },
65
+ showPagination: { type: Boolean, default: true },
66
+ paginationPosition: { default: "right" },
67
+ defaultPageSize: { default: 20 },
68
+ pageSizeOptions: { default: () => TABLE_PAGE_SIZE_OPTIONS },
69
+ showSizeChanger: { type: Boolean, default: TABLE_SHOW_SIZE_CHANGER },
70
+ showTotal: { type: Function, default: TABLE_SHOW_TOTAL },
71
+ columns: { default: () => [] },
72
+ emptyValue: { default: "-" },
73
+ batchOperations: { default: void 0 },
74
+ rowSelection: { default: void 0 },
75
+ rowKey: { default: "id" },
76
+ rowSort: { type: Function, default: void 0 },
77
+ resizable: { type: Boolean, default: false },
78
+ autoInit: { type: Boolean, default: true },
79
+ pageURI: { type: Boolean, default: false },
80
+ sortRemote: { type: Boolean, default: true },
81
+ bordered: { type: Boolean, default: true },
82
+ scrollTable: { type: Boolean, default: true },
83
+ striped: { type: Boolean, default: true }
84
+ },
85
+ emits: [
86
+ "switch",
87
+ "create",
88
+ "refresh",
89
+ "export",
90
+ "import",
91
+ "query",
92
+ "columnFilter",
93
+ "columnFilterReset",
94
+ "operation",
95
+ "batch-operation",
96
+ "change"
97
+ ],
98
+ setup(__props, { expose: __expose, emit: __emit }) {
99
+ const tableRef = ref(null);
100
+ const columnSettingVisible = ref(false);
101
+ const expandedLongStringRowKeys = ref(/* @__PURE__ */ new Set());
102
+ const isAllRowsLongStringExpanded = ref(false);
103
+ const getRowKeyValue = (record, index) => {
104
+ if (typeof props.rowKey === "function") {
105
+ return props.rowKey(record, index);
106
+ }
107
+ return record[props.rowKey];
108
+ };
109
+ const toggleCurrentRowExpand = (record) => {
110
+ const key = getRowKeyValue(record);
111
+ if (expandedLongStringRowKeys.value.has(key)) {
112
+ expandedLongStringRowKeys.value.delete(key);
113
+ } else {
114
+ expandedLongStringRowKeys.value.add(key);
115
+ }
116
+ };
117
+ const toggleAllRowsExpand = () => {
118
+ isAllRowsLongStringExpanded.value = !isAllRowsLongStringExpanded.value;
119
+ expandedLongStringRowKeys.value.clear();
120
+ };
121
+ const isRowLongStringExpanded = (record) => {
122
+ if (isAllRowsLongStringExpanded.value) return true;
123
+ const key = getRowKeyValue(record);
124
+ return expandedLongStringRowKeys.value.has(key);
125
+ };
126
+ const contextMenuVisible = ref(false);
127
+ const contextMenuPos = ref({ x: 0, y: 0 });
128
+ const contextMenuRecord = ref(null);
129
+ const contextMenuKey = ref(0);
130
+ const contextMenuPlacement = ref("bottomLeft");
131
+ const contextMenuCellText = shallowRef("");
132
+ const contextMenuSelectedText = shallowRef("");
133
+ const contextMenuRowIndex = shallowRef(0);
134
+ const quickMenuVisible = ref(false);
135
+ const quickMenuPos = ref({ x: 0, y: 0 });
136
+ const quickMenuRecord = ref(null);
137
+ const quickMenuKey = ref(0);
138
+ const quickMenuPlacement = ref("bottomLeft");
139
+ let quickMenuCloseTimer = null;
140
+ const clearQuickMenuTimer = () => {
141
+ if (quickMenuCloseTimer) {
142
+ clearTimeout(quickMenuCloseTimer);
143
+ quickMenuCloseTimer = null;
144
+ }
145
+ };
146
+ const startQuickMenuTimer = () => {
147
+ clearQuickMenuTimer();
148
+ quickMenuCloseTimer = setTimeout(() => {
149
+ quickMenuVisible.value = false;
150
+ }, 200);
151
+ };
152
+ const calculatePlacement = (e) => {
153
+ const windowWidth = window.innerWidth;
154
+ const windowHeight = window.innerHeight;
155
+ const isRight = windowWidth - e.clientX < 200;
156
+ const isBottom = windowHeight - e.clientY < 250;
157
+ if (isBottom && isRight) return "topRight";
158
+ if (isBottom) return "topLeft";
159
+ if (isRight) return "bottomRight";
160
+ return "bottomLeft";
161
+ };
162
+ const { isFullscreen, toggle } = useFullscreen(tableRef);
163
+ const { copy } = useClipboard({ legacy: true });
164
+ const copyWithMessage = (text) => {
165
+ return copy(text).then(() => message.success("复制成功")).catch((e) => message.error(e.message || "复制失败"));
166
+ };
167
+ const copyContextMenuText = () => copyWithMessage(contextMenuSelectedText.value || contextMenuCellText.value);
168
+ const emits = __emit;
169
+ const props = __props;
170
+ const isNestedExtTable = inject(NESTED_EXT_TABLE_KEY, false);
171
+ provide(NESTED_EXT_TABLE_KEY, true);
172
+ const { getPrefixCls } = useConfigContextInject();
173
+ const prefixCls = getPrefixCls("ext-table", props.prefixCls);
174
+ const attrs = useAttrs();
175
+ const slots = useSlots();
176
+ const instance = getCurrentInstance();
177
+ const rootClass = computed(() => [prefixCls, attrs.class]);
178
+ const rootStyle = computed(() => attrs.style);
179
+ const tableAttrs = computed(() => {
180
+ const attrsWithoutRootStyle = { ...attrs };
181
+ delete attrsWithoutRootStyle.class;
182
+ delete attrsWithoutRootStyle.style;
183
+ delete attrsWithoutRootStyle.rowSelection;
184
+ delete attrsWithoutRootStyle["row-selection"];
185
+ delete attrsWithoutRootStyle.customRow;
186
+ return attrsWithoutRootStyle;
187
+ });
188
+ const mergedCustomRow = (record, index) => {
189
+ const originalCustomRow = attrs.customRow;
190
+ const rowProps = originalCustomRow ? originalCustomRow(record, index) : {};
191
+ if (!slots["context-menu"] && !slots["quick-menu"] && !hasLongStringColumn.value) {
192
+ return rowProps;
193
+ }
194
+ return {
195
+ ...rowProps,
196
+ onContextmenu: (e) => {
197
+ contextMenuCellText.value = getCellText(e.target);
198
+ contextMenuSelectedText.value = getSelectedTextInCell(e.target, window.getSelection());
199
+ contextMenuRowIndex.value = index;
200
+ if (rowProps.onContextmenu) rowProps.onContextmenu(e);
201
+ if (!slots["context-menu"] && !hasLongStringColumn.value) return;
202
+ e.preventDefault();
203
+ e.stopPropagation();
204
+ contextMenuPos.value = { x: e.clientX, y: e.clientY };
205
+ contextMenuRecord.value = record;
206
+ contextMenuPlacement.value = calculatePlacement(e);
207
+ contextMenuKey.value++;
208
+ contextMenuVisible.value = true;
209
+ },
210
+ onMouseenter: (e) => {
211
+ if (rowProps.onMouseenter) rowProps.onMouseenter(e);
212
+ if (!slots["quick-menu"]) return;
213
+ clearQuickMenuTimer();
214
+ quickMenuPos.value = { x: e.clientX, y: e.clientY };
215
+ quickMenuRecord.value = record;
216
+ quickMenuPlacement.value = calculatePlacement(e);
217
+ quickMenuKey.value++;
218
+ quickMenuVisible.value = true;
219
+ },
220
+ onMouseleave: (e) => {
221
+ if (rowProps.onMouseleave) rowProps.onMouseleave(e);
222
+ if (!slots["quick-menu"]) return;
223
+ startQuickMenuTimer();
224
+ }
225
+ };
226
+ };
227
+ const showToolbar = computed(() => {
228
+ if (slots["toolbar-left"] || slots["toolbar-right"]) return true;
229
+ if (!props.toolbar) return false;
230
+ return Object.values(props.toolbar).some((value) => value === true);
231
+ });
232
+ const hasLongStringColumn = computed(() => {
233
+ return columnList.value.some((col) => col.format?.type === "long-string");
234
+ });
235
+ const router = inject(routerKey, void 0);
236
+ const route = inject(routeLocationKey, void 0);
237
+ const columnList = shallowRef([]);
238
+ const isLoading = ref(false);
239
+ const currentDataSource = ref([]);
240
+ const pageSize = ref(props.defaultPageSize);
241
+ const columnMeasureOwner = `ext-table-${getCurrentInstance()?.uid}`;
242
+ const measuredColumnWidths = ref({});
243
+ let measurableColumnIds = /* @__PURE__ */ new Set();
244
+ let hasCommittedDataSource = false;
245
+ let isTableMounted = false;
246
+ let columnWidthMeasureVersion = 0;
247
+ const isFiniteWidth = (width) => typeof width === "number" && Number.isFinite(width);
248
+ const getColumnMeasureId = (column) => {
249
+ if (column.key != null) return `key:${encodeURIComponent(String(column.key))}`;
250
+ if (column.dataIndex == null) return;
251
+ if (Array.isArray(column.dataIndex)) {
252
+ return `path:${column.dataIndex.map((item) => encodeURIComponent(String(item))).join("/")}`;
253
+ }
254
+ return `dataIndex:${encodeURIComponent(String(column.dataIndex))}`;
255
+ };
256
+ const getLeafColumnIdCounts = (columns) => {
257
+ const counts = /* @__PURE__ */ new Map();
258
+ const collect = (items) => {
259
+ items.forEach((column) => {
260
+ if (column.children?.length) {
261
+ collect(column.children);
262
+ return;
263
+ }
264
+ const id = getColumnMeasureId(column);
265
+ if (id) counts.set(id, (counts.get(id) || 0) + 1);
266
+ });
267
+ };
268
+ collect(columns);
269
+ return counts;
270
+ };
271
+ const {
272
+ hiddenKeys: hiddenColumns,
273
+ orderKeys: orderColumns,
274
+ columnWidths,
275
+ save: saveColumnSetting,
276
+ reset: resetColumnSetting,
277
+ load: loadCacheColumnSettings,
278
+ setColumnWidth
279
+ } = useColumnSetting({
280
+ defaultHiddenKeys: () => props.columns.filter((col) => col.hidden).map((col) => String(col.dataIndex || "")),
281
+ defaultColumnWidths: () => ({}),
282
+ defaultOrderKeys: () => []
283
+ });
284
+ const currentPage = ref(1);
285
+ const total = ref(0);
286
+ const tableSorter = ref(void 0);
287
+ const internalSelectedRowKeys = ref([]);
288
+ const internalSelectedRows = ref([]);
289
+ const computedBatchOperations = computed(() => {
290
+ const keys = props.rowSelection?.selectedRowKeys ?? internalSelectedRowKeys.value;
291
+ if (keys.length > 0) return props.batchOperations;
292
+ return props.batchOperations?.map((item) => ({ ...item, disabled: true }));
293
+ });
294
+ const batchOperationContext = computed(() => {
295
+ const keys = props.rowSelection?.selectedRowKeys ?? internalSelectedRowKeys.value;
296
+ return {
297
+ selectedRowKeys: keys,
298
+ selectedRows: internalSelectedRows.value
299
+ };
300
+ });
301
+ const computedRowSelection = computed(() => {
302
+ const outer = props.rowSelection;
303
+ const hasBatchOps = props.batchOperations && props.batchOperations.length > 0;
304
+ if (!outer && !hasBatchOps) {
305
+ return void 0;
306
+ }
307
+ return {
308
+ ...outer,
309
+ selectedRowKeys: outer?.selectedRowKeys ?? internalSelectedRowKeys.value,
310
+ onChange: (keys, selectedRows) => {
311
+ internalSelectedRowKeys.value = keys;
312
+ internalSelectedRows.value = selectedRows;
313
+ if (outer?.onChange) {
314
+ outer.onChange(keys, selectedRows);
315
+ }
316
+ }
317
+ };
318
+ });
319
+ const selectedRowCount = computed(() => {
320
+ const rowSel = computedRowSelection.value;
321
+ if (rowSel && rowSel.selectedRowKeys) {
322
+ return rowSel.selectedRowKeys.length;
323
+ }
324
+ return 0;
325
+ });
326
+ const handleBatchOperation = (item, context) => {
327
+ if (item.key === void 0) return;
328
+ emits("batch-operation", context);
329
+ };
330
+ const handleOperation = (item, record, index) => {
331
+ if (item.key === void 0) return;
332
+ emits("operation", { key: item.key, row: record, index });
333
+ };
334
+ const handleClearSelection = () => {
335
+ internalSelectedRowKeys.value = [];
336
+ const outer = props.rowSelection;
337
+ if (outer && outer.onChange) {
338
+ outer.onChange([], []);
339
+ }
340
+ };
341
+ const fixedColumns = computed(() => {
342
+ if (props.fixedColumns !== void 0) {
343
+ return props.fixedColumns;
344
+ }
345
+ return props.columns.filter((column) => column.fixed && column.dataIndex).map((column) => String(column.dataIndex));
346
+ });
347
+ const requiredColumns = computed(() => {
348
+ if (props.requiredColumns !== void 0) {
349
+ return props.requiredColumns;
350
+ }
351
+ return Array.from(/* @__PURE__ */ new Set(["operation", ...fixedColumns.value]));
352
+ });
353
+ const dataIndexToSortKey = (dataIndex) => {
354
+ if (dataIndex == null) return "";
355
+ return Array.isArray(dataIndex) ? dataIndex.join(".") : String(dataIndex);
356
+ };
357
+ const normalizeTableSorter = (sorter) => {
358
+ if (!sorter) return void 0;
359
+ const list = Array.isArray(sorter) ? sorter : [sorter];
360
+ const item = list.find((s) => s && (s.order === "ascend" || s.order === "descend"));
361
+ if (!item?.order) return void 0;
362
+ const rawField = item.field ?? item.columnKey;
363
+ if (rawField == null) return void 0;
364
+ const field = Array.isArray(rawField) ? rawField.join(".") : String(rawField);
365
+ return { field, order: item.order };
366
+ };
367
+ const isSameSorter = (a, b) => {
368
+ if (!a && !b) return true;
369
+ if (!a || !b) return false;
370
+ return a.field === b.field && a.order === b.order;
371
+ };
372
+ const settingColumns = computed(() => {
373
+ let columns = props.columns.slice();
374
+ if (orderColumns.value.length > 0) {
375
+ columns = orderColumnsByDataIndex(columns, orderColumns.value);
376
+ }
377
+ return columns.map((column) => ({
378
+ dataIndex: String(column.dataIndex || ""),
379
+ title: String(column.dataTitle || column.title || ""),
380
+ visible: !hiddenColumns.value.includes(column.dataIndex),
381
+ fixed: fixedColumns.value.includes(column.dataIndex),
382
+ required: requiredColumns.value.includes(column.dataIndex) || !!column.required
383
+ }));
384
+ });
385
+ const paginationJustify = computed(() => {
386
+ return {
387
+ left: "flex-start",
388
+ right: "flex-end",
389
+ center: "center"
390
+ }[props.paginationPosition];
391
+ });
392
+ const scheduleUndefinedColumnWidthMeasurement = async () => {
393
+ const measureVersion = ++columnWidthMeasureVersion;
394
+ if (!isTableMounted || !hasCommittedDataSource || !props.resizable) return;
395
+ const pendingIds = new Set(
396
+ Array.from(measurableColumnIds).filter((id) => !isFiniteWidth(measuredColumnWidths.value[id]))
397
+ );
398
+ if (pendingIds.size === 0) return;
399
+ await nextTick();
400
+ await new Promise((resolve) => requestAnimationFrame(() => resolve()));
401
+ if (measureVersion !== columnWidthMeasureVersion || !isTableMounted || !tableRef.value) return;
402
+ const nextWidths = {};
403
+ const headerCells = tableRef.value.querySelectorAll(`th[data-ext-table-owner="${columnMeasureOwner}"]`);
404
+ headerCells.forEach((cell) => {
405
+ const id = cell.dataset.extTableColumnId;
406
+ if (!id || !pendingIds.has(id) || !measurableColumnIds.has(id)) return;
407
+ if (cell.getClientRects().length === 0) return;
408
+ const style = window.getComputedStyle(cell);
409
+ if (style.display === "none" || style.visibility === "hidden") return;
410
+ const width = Math.ceil(cell.getBoundingClientRect().width);
411
+ if (!isFiniteWidth(width) || width <= 0) return;
412
+ nextWidths[id] = Math.max(nextWidths[id] || 0, width);
413
+ });
414
+ if (Object.keys(nextWidths).length === 0) return;
415
+ measuredColumnWidths.value = {
416
+ ...measuredColumnWidths.value,
417
+ ...nextWidths
418
+ };
419
+ columnList.value = getColumns(props.columns);
420
+ };
421
+ const commitDataSource = (dataSource) => {
422
+ currentDataSource.value = dataSource;
423
+ hasCommittedDataSource = true;
424
+ scheduleUndefinedColumnWidthMeasurement();
425
+ };
426
+ watch(
427
+ () => props.dataSource,
428
+ (dataSource) => {
429
+ if (dataSource !== void 0) {
430
+ commitDataSource(dataSource);
431
+ if (isTableMounted) initSortable();
432
+ }
433
+ },
434
+ { immediate: true }
435
+ );
436
+ const loadData = (isResetPage = false) => {
437
+ if (isResetPage) {
438
+ currentPage.value = 1;
439
+ }
440
+ return new Promise((resolve) => {
441
+ isLoading.value = true;
442
+ const queryParams = {
443
+ page: {
444
+ currentPage: currentPage.value,
445
+ pageSize: pageSize.value
446
+ },
447
+ ...props.sortRemote ? { sorter: tableSorter.value } : {},
448
+ success: (data = { list: [], count: 0 }) => {
449
+ if (data.list.length === 0 && props.showPagination && currentPage.value > 1) {
450
+ currentPage.value--;
451
+ loadData().then(resolve);
452
+ return;
453
+ }
454
+ isLoading.value = false;
455
+ expandedLongStringRowKeys.value.clear();
456
+ total.value = data.count;
457
+ commitDataSource(data.list);
458
+ initSortable();
459
+ handleClearSelection();
460
+ resolve();
461
+ },
462
+ fail: (err) => {
463
+ isLoading.value = false;
464
+ if (err && isPlainObject(err) && err.message) {
465
+ message.error({
466
+ content: err.message,
467
+ onClose: resolve
468
+ });
469
+ } else {
470
+ resolve();
471
+ }
472
+ }
473
+ };
474
+ if (typeof instance?.vnode.props?.onQuery !== "function") {
475
+ isLoading.value = false;
476
+ resolve();
477
+ return;
478
+ }
479
+ emits("query", queryParams);
480
+ });
481
+ };
482
+ const onTableChange = (_pagination, _filters, sorter, extra) => {
483
+ emits("change", _pagination, _filters, sorter, extra);
484
+ if (!props.sortRemote) {
485
+ return;
486
+ }
487
+ const next = normalizeTableSorter(sorter);
488
+ if (isSameSorter(tableSorter.value, next)) {
489
+ return;
490
+ }
491
+ tableSorter.value = next;
492
+ refreshColumns();
493
+ loadData(true);
494
+ };
495
+ const getRowClassName = (_record, index) => {
496
+ const classNames = [];
497
+ if (props.rowSort) {
498
+ classNames.push(`${prefixCls}-sortable-row`);
499
+ }
500
+ if (props.striped && index % 2 === 1) {
501
+ classNames.push(`${prefixCls}-striped-row`);
502
+ }
503
+ return classNames.join(" ");
504
+ };
505
+ const openColumnSetting = () => {
506
+ columnSettingVisible.value = true;
507
+ };
508
+ const handleColumnSetting = (columns) => {
509
+ saveColumnSetting(columns);
510
+ refreshColumns();
511
+ };
512
+ const handleColumnSettingReset = () => {
513
+ resetColumnSetting();
514
+ refreshColumns(true);
515
+ };
516
+ const reset = () => {
517
+ total.value = 0;
518
+ pageSize.value = props.defaultPageSize;
519
+ currentPage.value = 1;
520
+ isLoading.value = false;
521
+ currentDataSource.value = [];
522
+ tableSorter.value = void 0;
523
+ refreshColumns();
524
+ };
525
+ __expose({
526
+ query: loadData,
527
+ reset
528
+ });
529
+ const getCustomFilterDropdown = (column) => {
530
+ const { dataIndex, title = "", filter = true } = column;
531
+ if (!dataIndex) return;
532
+ let filterConfig = { type: "input" };
533
+ if (typeof filter === "string") {
534
+ filterConfig = { type: filter };
535
+ } else if (typeof filter === "object") {
536
+ filterConfig = filter;
537
+ }
538
+ return ({ setSelectedKeys, selectedKeys, confirm, clearFilters }) => {
539
+ const { type, ...props2 } = filterConfig;
540
+ return h("div", { style: { padding: "8px" } }, [
541
+ type === "input" ? h(Input, {
542
+ style: { width: "188px", marginBottom: "8px", display: "block" },
543
+ placeholder: `搜索 ${title}`,
544
+ ...props2,
545
+ value: selectedKeys[0],
546
+ onChange: (e) => setSelectedKeys(e.target.value ? [e.target.value] : []),
547
+ onPressEnter: () => handleFilter(selectedKeys, confirm, dataIndex, filterConfig)
548
+ }) : type === "date" ? h(DatePicker, {
549
+ style: { width: "188px", marginBottom: "8px", display: "flex" },
550
+ ...props2,
551
+ value: selectedKeys[0] ? dayjs(selectedKeys[0]) : void 0,
552
+ onChange: (date) => setSelectedKeys(date ? [date.format("YYYY-MM-DD")] : [])
553
+ }) : type === "date-range" ? h(DatePicker.RangePicker, {
554
+ style: { width: "250px", marginBottom: "8px", display: "flex" },
555
+ ...props2,
556
+ value: selectedKeys[0] ? [dayjs(selectedKeys[0]), dayjs(selectedKeys[1])] : void 0,
557
+ onChange: (dates) => {
558
+ setSelectedKeys(dates ? [dates[0].format("YYYY-MM-DD"), dates[1].format("YYYY-MM-DD")] : []);
559
+ }
560
+ }) : type === "select" ? h(Select, {
561
+ style: { width: "188px", marginBottom: "8px", display: "block" },
562
+ placeholder: `选择 ${title}`,
563
+ allowClear: true,
564
+ ...props2,
565
+ value: filterConfig.mode === "multiple" ? selectedKeys : selectedKeys[0],
566
+ onChange: (val) => {
567
+ if (filterConfig.mode === "multiple") {
568
+ setSelectedKeys(val || []);
569
+ } else {
570
+ setSelectedKeys(val ? [val] : []);
571
+ }
572
+ }
573
+ }) : null,
574
+ h(Space, {}, () => [
575
+ h(
576
+ Button,
577
+ {
578
+ type: "primary",
579
+ size: "small",
580
+ style: { width: "90px" },
581
+ onClick: () => handleFilter(selectedKeys, confirm, dataIndex, filterConfig)
582
+ },
583
+ () => [h(SearchOutlined), "搜索"]
584
+ ),
585
+ clearFilters ? h(
586
+ Button,
587
+ {
588
+ size: "small",
589
+ style: { width: "90px" },
590
+ onClick: () => handleReset(clearFilters, confirm, dataIndex, filterConfig)
591
+ },
592
+ () => "重置"
593
+ ) : null
594
+ ])
595
+ ]);
596
+ };
597
+ };
598
+ const handleFilter = (selectedKeys, confirm, dataIndex, filterConfig) => {
599
+ confirm();
600
+ emits("columnFilter", selectedKeys, dataIndex, filterConfig);
601
+ loadData(true);
602
+ };
603
+ const handleReset = (clearFilters, confirm, dataIndex, filterConfig) => {
604
+ clearFilters();
605
+ confirm();
606
+ emits("columnFilterReset", dataIndex, filterConfig);
607
+ loadData(true);
608
+ };
609
+ const getColumns = (columns) => {
610
+ let finalColumns = columns.slice();
611
+ if (props.rowSort) {
612
+ finalColumns.unshift({
613
+ title: "",
614
+ dataIndex: "rowsort",
615
+ width: 40,
616
+ format: {
617
+ type: "sort-handle"
618
+ }
619
+ });
620
+ }
621
+ if (orderColumns.value.length) {
622
+ finalColumns = orderColumnsByDataIndex(finalColumns, orderColumns.value);
623
+ }
624
+ finalColumns = finalColumns.filter((column) => !hiddenColumns.value.includes(column.dataIndex));
625
+ const leafColumnIdCounts = getLeafColumnIdCounts(finalColumns);
626
+ const nextMeasurableColumnIds = /* @__PURE__ */ new Set();
627
+ const transformColumn = (column) => {
628
+ const children = column.children?.length ? column.children.map(transformColumn) : void 0;
629
+ const isLeafColumn = !children?.length;
630
+ const columnId = isLeafColumn ? getColumnMeasureId(column) : void 0;
631
+ const savedWidth = columnWidths.value[column.dataIndex];
632
+ const canMeasure = props.resizable && column.resizable !== false && column.width === void 0 && savedWidth == null && !!columnId && leafColumnIdCounts.get(columnId) === 1;
633
+ if (canMeasure) nextMeasurableColumnIds.add(columnId);
634
+ const measuredWidth = canMeasure ? measuredColumnWidths.value[columnId] : void 0;
635
+ const effectiveWidth = savedWidth ?? column.width ?? measuredWidth;
636
+ const sortKey = dataIndexToSortKey(column.dataIndex);
637
+ const showSortOrder = props.sortRemote && !!column.sorter && !!tableSorter.value && !!sortKey && sortKey === tableSorter.value.field;
638
+ const originalCustomHeaderCell = column.customHeaderCell;
639
+ const copyText = column.copyText ?? (isLeafColumn && column.format ? (record, index) => getDefaultFormatCopyText(record, column, index) : void 0);
640
+ return {
641
+ filterDropdown: column.filter ? getCustomFilterDropdown({ ...column }) : void 0,
642
+ ...column,
643
+ ...children ? { children } : {},
644
+ ...effectiveWidth !== void 0 ? { width: effectiveWidth } : {},
645
+ ...canMeasure ? {
646
+ customHeaderCell: (resolvedColumn) => ({
647
+ ...originalCustomHeaderCell?.(resolvedColumn) || {},
648
+ "data-ext-table-owner": columnMeasureOwner,
649
+ "data-ext-table-column-id": columnId
650
+ })
651
+ } : {},
652
+ resizable: isLeafColumn && props.resizable && column.resizable !== false && isFiniteWidth(effectiveWidth),
653
+ ...showSortOrder ? { sortOrder: tableSorter.value.order } : {},
654
+ ...copyText ? { copyText } : {}
655
+ };
656
+ };
657
+ const transformedColumns = finalColumns.map(transformColumn);
658
+ measurableColumnIds = nextMeasurableColumnIds;
659
+ return transformedColumns;
660
+ };
661
+ const refreshColumns = (resetMeasuredWidths = false) => {
662
+ if (resetMeasuredWidths) measuredColumnWidths.value = {};
663
+ columnList.value = getColumns(props.columns);
664
+ const validMeasuredWidths = Object.fromEntries(
665
+ Object.entries(measuredColumnWidths.value).filter(([id]) => measurableColumnIds.has(id))
666
+ );
667
+ if (Object.keys(validMeasuredWidths).length !== Object.keys(measuredColumnWidths.value).length) {
668
+ measuredColumnWidths.value = validMeasuredWidths;
669
+ }
670
+ scheduleUndefinedColumnWidthMeasurement();
671
+ };
672
+ watch(
673
+ () => props.columns,
674
+ () => {
675
+ refreshColumns();
676
+ }
677
+ );
678
+ watch(
679
+ () => props.resizable,
680
+ () => {
681
+ refreshColumns();
682
+ }
683
+ );
684
+ watch(
685
+ () => props.rowSort,
686
+ (newVal) => {
687
+ refreshColumns();
688
+ if (newVal) {
689
+ nextTick(() => {
690
+ initSortable();
691
+ });
692
+ } else {
693
+ destroySortable();
694
+ }
695
+ }
696
+ );
697
+ watch(
698
+ () => route?.query,
699
+ (query) => {
700
+ if (!props.pageURI || !query) return;
701
+ let page = void 0;
702
+ let size = void 0;
703
+ if (hasIn(query, "currentPage")) {
704
+ page = Number(query.currentPage);
705
+ }
706
+ if (hasIn(query, "pageSize")) {
707
+ size = Number(query.pageSize);
708
+ }
709
+ let changed = false;
710
+ if (page !== void 0 && Number.isInteger(page) && page > 0 && page !== currentPage.value) {
711
+ currentPage.value = page;
712
+ changed = true;
713
+ }
714
+ if (size !== void 0 && Number.isInteger(size) && size > 0 && size !== pageSize.value) {
715
+ pageSize.value = size;
716
+ changed = true;
717
+ }
718
+ changed && loadData();
719
+ }
720
+ );
721
+ watch([currentPage, pageSize], ([currentPage2, pageSize2]) => {
722
+ if (!props.pageURI || !route || !router) return;
723
+ const query = JSON.parse(JSON.stringify(route.query));
724
+ if (currentPage2 !== void 0) {
725
+ query["currentPage"] = currentPage2;
726
+ }
727
+ if (pageSize2 !== void 0) {
728
+ query["pageSize"] = pageSize2;
729
+ }
730
+ const { fullPath } = router.resolve({ ...route, query });
731
+ fullPath !== route.fullPath && router.replace(fullPath);
732
+ });
733
+ if (props.pageURI && route) {
734
+ if (route.query["currentPage"] !== void 0) {
735
+ currentPage.value = parseInt(route.query["currentPage"]);
736
+ }
737
+ if (route.query["pageSize"] !== void 0) {
738
+ pageSize.value = parseInt(route.query["pageSize"]);
739
+ }
740
+ }
741
+ watch(
742
+ () => props.tableId,
743
+ (tableId) => {
744
+ loadCacheColumnSettings(tableId ? getTableColumnStorageKey(tableId) : null);
745
+ refreshColumns(true);
746
+ },
747
+ { immediate: true }
748
+ );
749
+ onMounted(() => {
750
+ isTableMounted = true;
751
+ props.autoInit && loadData();
752
+ initSortable();
753
+ scheduleUndefinedColumnWidthMeasurement();
754
+ });
755
+ onUnmounted(() => {
756
+ isTableMounted = false;
757
+ columnWidthMeasureVersion++;
758
+ destroySortable();
759
+ clearQuickMenuTimer();
760
+ });
761
+ const onPageChange = (page, size) => {
762
+ currentPage.value = pageSize.value !== size ? 1 : page;
763
+ pageSize.value = size;
764
+ loadData();
765
+ };
766
+ const isSlot = (column, type) => {
767
+ return get(column, "format.type") === type;
768
+ };
769
+ const isShowSlot = (row, column) => {
770
+ const hiddenFn = get(column, "format.options.hidden");
771
+ if (!isFunction(hiddenFn)) return true;
772
+ return hiddenFn(row);
773
+ };
774
+ const isDisabled = (row, column) => {
775
+ const disabledFn = get(column, "format.options.disabled");
776
+ if (!isFunction(disabledFn)) return true;
777
+ return disabledFn(row);
778
+ };
779
+ const onSwitchChange = (row, column) => {
780
+ emits("switch", { key: column.dataIndex, value: get(column, column.dataIndex), row });
781
+ };
782
+ const getSwitchValue = (row, column) => {
783
+ const openValue = get(column, "format.options.openValue");
784
+ const value = get(row, column.dataIndex);
785
+ return openValue === value;
786
+ };
787
+ const onCopy = (row, column) => {
788
+ const text = get(row, column.dataIndex, "");
789
+ copyWithMessage(text);
790
+ };
791
+ const getSlotOptions = (column) => {
792
+ return get(column, "format.options", {});
793
+ };
794
+ const formatField = (row, column) => {
795
+ const defaultValue = get(column, "format.options.default", "");
796
+ return get(row, column.dataIndex, defaultValue || props.emptyValue);
797
+ };
798
+ const formatIndex = (index) => {
799
+ return (currentPage.value - 1) * pageSize.value + index + 1;
800
+ };
801
+ const formatFileType = (row, column) => {
802
+ const value = get(row, column.dataIndex);
803
+ return (props.formatMappings?.fileType || DEFAULT_FILE_TYPE_MAPPING)[value] || props.emptyValue;
804
+ };
805
+ const formatMask = (row, column) => {
806
+ const options = getSlotOptions(column);
807
+ const { type = "mobile" } = options;
808
+ const value = get(row, column.dataIndex);
809
+ if (isUndefined(value)) return props.emptyValue;
810
+ if (type === "mobile") {
811
+ return phoneMask(value);
812
+ }
813
+ if (type === "idCard") {
814
+ return idCardMask(value);
815
+ }
816
+ if (type === "userName") {
817
+ return nameMask(value);
818
+ }
819
+ return value;
820
+ };
821
+ const formatPriceValue = (row, column) => {
822
+ const options = getSlotOptions(column);
823
+ const { getValue, format = "0.00", padZero = false, currency = "" } = options;
824
+ let value = get(row, column.dataIndex);
825
+ if (isUndefined(value)) return props.emptyValue;
826
+ if (isFunction(getValue)) {
827
+ value = getValue(value);
828
+ }
829
+ return formatPrice(value, format, padZero, currency);
830
+ };
831
+ const formatDateValue = (row, column) => {
832
+ const options = getSlotOptions(column);
833
+ const { format = "YYYY-MM-DD HH:mm:ss" } = options;
834
+ const value = get(row, column.dataIndex);
835
+ if (isUndefined(value)) return props.emptyValue;
836
+ return dayjs(value).format(format);
837
+ };
838
+ const formatBoolValue = (row, column) => {
839
+ const options = getSlotOptions(column);
840
+ const { trueText = "是", falseText = "否" } = options;
841
+ const value = get(row, column.dataIndex);
842
+ if (isUndefined(value)) return props.emptyValue;
843
+ return value ? trueText : falseText;
844
+ };
845
+ const formatArrayString = (row, column) => {
846
+ const options = getSlotOptions(column);
847
+ const { getValue = (v) => v.name, separator = "、" } = options;
848
+ const value = get(row, column.dataIndex);
849
+ if (isUndefined(value) || !isArray(value) || !value.length) return props.emptyValue;
850
+ const strList = value.map(getValue);
851
+ return strList.join(separator);
852
+ };
853
+ const getStatusField = (row, column, fieldName) => {
854
+ const id = get(row, column.dataIndex);
855
+ const status = get(column, "format.options.status", []);
856
+ const defaultValue = get(column, "format.options.default");
857
+ const state = status.find((v) => String(v.id) === String(id));
858
+ return state ? state[fieldName] : defaultValue || props.emptyValue;
859
+ };
860
+ const getOptionFieldValue = (column, fieldName, defaultValue = void 0) => {
861
+ const options = getSlotOptions(column);
862
+ return options[fieldName] ?? defaultValue;
863
+ };
864
+ const getValueWithFunction = (row, column, defaultValue) => {
865
+ const options = getSlotOptions(column);
866
+ const { getValue } = options;
867
+ const value = get(row, column.dataIndex);
868
+ if (isUndefined(value)) return defaultValue;
869
+ if (isFunction(getValue)) return getValue(value) || defaultValue;
870
+ return value;
871
+ };
872
+ const getValueByFieldName = (row, column) => {
873
+ return get(row, column.dataIndex);
874
+ };
875
+ const getValueByOptionFieldName = (row, column, fieldName) => {
876
+ const options = getSlotOptions(column);
877
+ return get(row, options[fieldName]);
878
+ };
879
+ const getDefaultFormatCopyText = (record, column, index) => {
880
+ switch (column.format?.type) {
881
+ case "field":
882
+ case "copy":
883
+ return formatField(record, column);
884
+ case "index":
885
+ return formatIndex(index);
886
+ case "price":
887
+ return formatPriceValue(record, column);
888
+ case "date":
889
+ return formatDateValue(record, column);
890
+ case "bool":
891
+ return formatBoolValue(record, column);
892
+ case "array-string":
893
+ return formatArrayString(record, column);
894
+ case "gender": {
895
+ const value = getValueByFieldName(record, column);
896
+ return (props.formatMappings?.gender || DEFAULT_GENDER_MAPPING)[value]?.label || props.emptyValue;
897
+ }
898
+ case "customerLevel": {
899
+ const value = getValueByFieldName(record, column);
900
+ return (props.formatMappings?.customerLevel || DEFAULT_CUSTOMER_LEVEL_MAPPING)[value]?.label || props.emptyValue;
901
+ }
902
+ case "period": {
903
+ const start = getValueByOptionFieldName(record, column, "start");
904
+ if (!start) return props.emptyValue;
905
+ const end = getValueByOptionFieldName(record, column, "end");
906
+ const format = getOptionFieldValue(column, "format", "YYYY.MM.DD");
907
+ return `${dayjs(start).format(format)} - ${dayjs(end).format(format)}`;
908
+ }
909
+ case "fileType":
910
+ return formatFileType(record, column);
911
+ case "mask":
912
+ return formatMask(record, column);
913
+ case "color-tag":
914
+ case "color-text":
915
+ return getStatusField(record, column, "name");
916
+ default: {
917
+ const value = getValueByFieldName(record, column);
918
+ return value !== null && typeof value === "object" ? void 0 : value;
919
+ }
920
+ }
921
+ };
922
+ const getRowCopyValue = (record, column, index) => {
923
+ if (column.copyText) return column.copyText(record, index);
924
+ return getValueByFieldName(record, column);
925
+ };
926
+ const copyContextMenuRow = () => {
927
+ try {
928
+ const text = getCopyableRowColumns(columnList.value, contextMenuRecord.value).flatMap((column) => {
929
+ const value = getRowCopyValue(contextMenuRecord.value, column, contextMenuRowIndex.value);
930
+ return value === void 0 ? [] : [`${getCopyColumnTitle(column)}: ${normalizeCopyText(value, props.emptyValue)}`];
931
+ }).join("\n");
932
+ if (!text) {
933
+ message.warning("当前行无可复制数据");
934
+ return;
935
+ }
936
+ copyWithMessage(text);
937
+ } catch (error) {
938
+ message.error(error instanceof Error ? error.message : "复制失败");
939
+ }
940
+ };
941
+ const handleResizeColumn = (w, col) => {
942
+ col.width = w;
943
+ const columnId = getColumnMeasureId(col);
944
+ if (columnId && measurableColumnIds.has(columnId)) {
945
+ measuredColumnWidths.value = {
946
+ ...measuredColumnWidths.value,
947
+ [columnId]: w
948
+ };
949
+ }
950
+ if (props.tableId) {
951
+ setColumnWidth(col.dataIndex, w);
952
+ }
953
+ };
954
+ const sortProcessing = ref(false);
955
+ let sortableInstance = null;
956
+ let lastDataSource;
957
+ const initSortable = () => {
958
+ if (!props.rowSort || !tableRef.value) {
959
+ return;
960
+ }
961
+ destroySortable();
962
+ nextTick(() => {
963
+ const tableBody = tableRef.value?.querySelector("tbody");
964
+ if (!tableBody) {
965
+ return;
966
+ }
967
+ try {
968
+ sortableInstance = new sortablejs(tableBody, {
969
+ animation: 150,
970
+ ghostClass: "sortable-ghost",
971
+ chosenClass: "sortable-chosen",
972
+ dragClass: "sortable-drag",
973
+ handle: `.${prefixCls}-sortable-handle`,
974
+ draggable: `.${prefixCls}-sortable-row`,
975
+ onEnd: (evt) => {
976
+ const { oldIndex, newIndex } = evt;
977
+ if (isUndefined(oldIndex) || isUndefined(newIndex)) {
978
+ return;
979
+ }
980
+ let actualOldIndex = oldIndex;
981
+ let actualNewIndex = newIndex;
982
+ const hasMeasureRow = Array.from(tableBody.children).some(
983
+ (child) => child.className.includes("table-measure-row")
984
+ );
985
+ if (hasMeasureRow) {
986
+ actualOldIndex = oldIndex - 1;
987
+ actualNewIndex = newIndex - 1;
988
+ }
989
+ lastDataSource = [...currentDataSource.value];
990
+ currentDataSource.value.splice(actualNewIndex, 0, currentDataSource.value.splice(actualOldIndex, 1)[0]);
991
+ const newArray = currentDataSource.value.slice(0);
992
+ currentDataSource.value = [];
993
+ nextTick(function() {
994
+ currentDataSource.value = newArray;
995
+ });
996
+ sortProcessing.value = true;
997
+ sortableInstance.option("disabled", true);
998
+ const minIndex = Math.min(actualOldIndex, actualNewIndex);
999
+ const maxIndex = Math.max(actualOldIndex, actualNewIndex);
1000
+ const changes = newArray.slice(minIndex, maxIndex + 1);
1001
+ promisify(
1002
+ props.rowSort({
1003
+ oldIndex: actualOldIndex,
1004
+ newIndex: actualNewIndex,
1005
+ changes,
1006
+ dataSource: [...newArray]
1007
+ })
1008
+ ).catch(() => {
1009
+ currentDataSource.value = lastDataSource;
1010
+ }).finally(() => {
1011
+ sortProcessing.value = false;
1012
+ sortableInstance.option("disabled", false);
1013
+ });
1014
+ }
1015
+ });
1016
+ } catch (error) {
1017
+ }
1018
+ });
1019
+ };
1020
+ const destroySortable = () => {
1021
+ if (sortableInstance) {
1022
+ sortableInstance.destroy();
1023
+ sortableInstance = null;
1024
+ }
1025
+ };
1026
+ return (_ctx, _cache) => {
1027
+ return openBlock(), createElementBlock(
1028
+ "div",
1029
+ {
1030
+ class: normalizeClass(rootClass.value),
1031
+ style: normalizeStyle(rootStyle.value),
1032
+ ref_key: "tableRef",
1033
+ ref: tableRef
1034
+ },
1035
+ [
1036
+ createVNode(unref(Flex), {
1037
+ vertical: "",
1038
+ gap: "small"
1039
+ }, {
1040
+ default: withCtx(() => [
1041
+ createCommentVNode(" toolbar "),
1042
+ showToolbar.value ? (openBlock(), createBlock(unref(Flex), {
1043
+ key: 0,
1044
+ gap: "middle",
1045
+ align: "center",
1046
+ justify: "space-between",
1047
+ class: "ext-table-toolbar"
1048
+ }, {
1049
+ default: withCtx(() => [
1050
+ createElementVNode("div", null, [
1051
+ createVNode(unref(Space), null, {
1052
+ default: withCtx(() => [
1053
+ _ctx.toolbar?.create ? (openBlock(), createBlock(unref(Button), {
1054
+ key: 0,
1055
+ type: "primary",
1056
+ onClick: _cache[0] || (_cache[0] = ($event) => emits("create"))
1057
+ }, {
1058
+ default: withCtx(() => [
1059
+ createVNode(unref(PlusOutlined)),
1060
+ createTextVNode(" 新增 ")
1061
+ ]),
1062
+ _: 1
1063
+ /* STABLE */
1064
+ })) : createCommentVNode("v-if", true),
1065
+ _ctx.toolbar?.export ? (openBlock(), createBlock(unref(Button), {
1066
+ key: 1,
1067
+ onClick: _cache[1] || (_cache[1] = ($event) => emits("export"))
1068
+ }, {
1069
+ default: withCtx(() => [
1070
+ createVNode(unref(ExportOutlined)),
1071
+ createTextVNode(" 导出 ")
1072
+ ]),
1073
+ _: 1
1074
+ /* STABLE */
1075
+ })) : createCommentVNode("v-if", true),
1076
+ _ctx.toolbar?.import ? (openBlock(), createBlock(unref(Button), {
1077
+ key: 2,
1078
+ onClick: _cache[2] || (_cache[2] = ($event) => emits("import"))
1079
+ }, {
1080
+ default: withCtx(() => [
1081
+ createVNode(unref(ImportOutlined)),
1082
+ createTextVNode(" 导入 ")
1083
+ ]),
1084
+ _: 1
1085
+ /* STABLE */
1086
+ })) : createCommentVNode("v-if", true),
1087
+ renderSlot(_ctx.$slots, "toolbar-left", {}, void 0, true)
1088
+ ]),
1089
+ _: 3
1090
+ /* FORWARDED */
1091
+ })
1092
+ ]),
1093
+ createElementVNode("div", null, [
1094
+ createVNode(unref(Space), { size: "small" }, {
1095
+ default: withCtx(() => [
1096
+ renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true),
1097
+ createElementVNode(
1098
+ "div",
1099
+ {
1100
+ class: normalizeClass({ "ext-table-toolbar-actions": !!_ctx.toolbar })
1101
+ },
1102
+ [
1103
+ _ctx.toolbar?.refresh ? (openBlock(), createBlock(unref(Tooltip), {
1104
+ key: 0,
1105
+ placement: "top",
1106
+ title: "刷新"
1107
+ }, {
1108
+ default: withCtx(() => [
1109
+ createVNode(unref(Button), {
1110
+ type: "text",
1111
+ shape: "circle",
1112
+ onClick: _cache[3] || (_cache[3] = ($event) => loadData())
1113
+ }, {
1114
+ default: withCtx(() => [
1115
+ createVNode(unref(ReloadOutlined))
1116
+ ]),
1117
+ _: 1
1118
+ /* STABLE */
1119
+ })
1120
+ ]),
1121
+ _: 1
1122
+ /* STABLE */
1123
+ })) : createCommentVNode("v-if", true),
1124
+ _ctx.toolbar?.columnSetting ? (openBlock(), createBlock(unref(Tooltip), {
1125
+ key: 1,
1126
+ placement: "top",
1127
+ title: "列设置"
1128
+ }, {
1129
+ default: withCtx(() => [
1130
+ createVNode(unref(Button), {
1131
+ type: "text",
1132
+ shape: "circle",
1133
+ onClick: openColumnSetting
1134
+ }, {
1135
+ default: withCtx(() => [
1136
+ createVNode(unref(SettingOutlined))
1137
+ ]),
1138
+ _: 1
1139
+ /* STABLE */
1140
+ })
1141
+ ]),
1142
+ _: 1
1143
+ /* STABLE */
1144
+ })) : createCommentVNode("v-if", true),
1145
+ _ctx.toolbar?.fullscreen ? (openBlock(), createBlock(unref(Tooltip), {
1146
+ key: 2,
1147
+ placement: "top",
1148
+ title: "全屏"
1149
+ }, {
1150
+ default: withCtx(() => [
1151
+ createVNode(unref(Button), {
1152
+ type: "text",
1153
+ onClick: unref(toggle),
1154
+ shape: "circle"
1155
+ }, {
1156
+ default: withCtx(() => [
1157
+ !unref(isFullscreen) ? (openBlock(), createBlock(unref(FullscreenOutlined), { key: 0 })) : createCommentVNode("v-if", true),
1158
+ unref(isFullscreen) ? (openBlock(), createBlock(unref(FullscreenExitOutlined), { key: 1 })) : createCommentVNode("v-if", true)
1159
+ ]),
1160
+ _: 1
1161
+ /* STABLE */
1162
+ }, 8, ["onClick"])
1163
+ ]),
1164
+ _: 1
1165
+ /* STABLE */
1166
+ })) : createCommentVNode("v-if", true)
1167
+ ],
1168
+ 2
1169
+ /* CLASS */
1170
+ )
1171
+ ]),
1172
+ _: 3
1173
+ /* FORWARDED */
1174
+ })
1175
+ ])
1176
+ ]),
1177
+ _: 3
1178
+ /* FORWARDED */
1179
+ })) : createCommentVNode("v-if", true),
1180
+ createCommentVNode(" table "),
1181
+ createVNode(unref(ScrollbarTable), mergeProps(tableAttrs.value, {
1182
+ disabled: unref(isNestedExtTable) || !_ctx.scrollTable,
1183
+ "row-selection": computedRowSelection.value,
1184
+ size: _ctx.size,
1185
+ bordered: _ctx.bordered,
1186
+ columns: columnList.value,
1187
+ loading: isLoading.value,
1188
+ pagination: false,
1189
+ "data-source": currentDataSource.value,
1190
+ "row-key": _ctx.rowKey,
1191
+ "row-class-name": getRowClassName,
1192
+ customRow: mergedCustomRow,
1193
+ onChange: onTableChange,
1194
+ onResizeColumn: handleResizeColumn
1195
+ }), createSlots({
1196
+ bodyCell: withCtx(({ column, index, record }) => [
1197
+ column && column.dataIndex ? renderSlot(_ctx.$slots, column.dataIndex, {
1198
+ key: 0,
1199
+ record,
1200
+ index,
1201
+ column
1202
+ }, void 0, true) : createCommentVNode("v-if", true),
1203
+ isSlot(column, "sort-handle") ? (openBlock(), createBlock(unref(Button), {
1204
+ key: 1,
1205
+ type: "link",
1206
+ title: "拖动排序",
1207
+ block: "",
1208
+ size: "small",
1209
+ class: normalizeClass(`${unref(prefixCls)}-sortable-handle`),
1210
+ disabled: sortProcessing.value
1211
+ }, {
1212
+ icon: withCtx(() => [
1213
+ _hoisted_1
1214
+ ]),
1215
+ _: 1
1216
+ /* STABLE */
1217
+ }, 8, ["class", "disabled"])) : isSlot(column, "field") ? (openBlock(), createElementBlock(
1218
+ Fragment,
1219
+ { key: 2 },
1220
+ [
1221
+ createTextVNode(
1222
+ toDisplayString(formatField(record, column)),
1223
+ 1
1224
+ /* TEXT */
1225
+ )
1226
+ ],
1227
+ 64
1228
+ /* STABLE_FRAGMENT */
1229
+ )) : isSlot(column, "index") ? (openBlock(), createElementBlock(
1230
+ Fragment,
1231
+ { key: 3 },
1232
+ [
1233
+ createTextVNode(
1234
+ toDisplayString(formatIndex(index)),
1235
+ 1
1236
+ /* TEXT */
1237
+ )
1238
+ ],
1239
+ 64
1240
+ /* STABLE_FRAGMENT */
1241
+ )) : isSlot(column, "price") ? (openBlock(), createElementBlock(
1242
+ Fragment,
1243
+ { key: 4 },
1244
+ [
1245
+ createTextVNode(
1246
+ toDisplayString(formatPriceValue(record, column)),
1247
+ 1
1248
+ /* TEXT */
1249
+ )
1250
+ ],
1251
+ 64
1252
+ /* STABLE_FRAGMENT */
1253
+ )) : isSlot(column, "date") ? (openBlock(), createElementBlock(
1254
+ Fragment,
1255
+ { key: 5 },
1256
+ [
1257
+ createTextVNode(
1258
+ toDisplayString(formatDateValue(record, column)),
1259
+ 1
1260
+ /* TEXT */
1261
+ )
1262
+ ],
1263
+ 64
1264
+ /* STABLE_FRAGMENT */
1265
+ )) : isSlot(column, "bool") ? (openBlock(), createElementBlock(
1266
+ Fragment,
1267
+ { key: 6 },
1268
+ [
1269
+ createTextVNode(
1270
+ toDisplayString(formatBoolValue(record, column)),
1271
+ 1
1272
+ /* TEXT */
1273
+ )
1274
+ ],
1275
+ 64
1276
+ /* STABLE_FRAGMENT */
1277
+ )) : isSlot(column, "array-string") ? (openBlock(), createElementBlock(
1278
+ Fragment,
1279
+ { key: 7 },
1280
+ [
1281
+ createTextVNode(
1282
+ toDisplayString(formatArrayString(record, column)),
1283
+ 1
1284
+ /* TEXT */
1285
+ )
1286
+ ],
1287
+ 64
1288
+ /* STABLE_FRAGMENT */
1289
+ )) : isSlot(column, "gender") ? (openBlock(), createBlock(unref(_sfc_main$1), {
1290
+ key: 8,
1291
+ mapping: _ctx.formatMappings?.gender,
1292
+ value: getValueByFieldName(record, column),
1293
+ type: getOptionFieldValue(column, "type", "text")
1294
+ }, null, 8, ["mapping", "value", "type"])) : isSlot(column, "customerLevel") ? (openBlock(), createBlock(unref(_sfc_main$2), {
1295
+ key: 9,
1296
+ mapping: _ctx.formatMappings?.customerLevel,
1297
+ value: getValueByFieldName(record, column),
1298
+ type: getOptionFieldValue(column, "type", "text")
1299
+ }, null, 8, ["mapping", "value", "type"])) : isSlot(column, "period") ? (openBlock(), createBlock(unref(_sfc_main$3), {
1300
+ key: 10,
1301
+ start: getValueByOptionFieldName(record, column, "start"),
1302
+ end: getValueByOptionFieldName(record, column, "end"),
1303
+ format: getOptionFieldValue(column, "format", "YYYY.MM.DD")
1304
+ }, null, 8, ["start", "end", "format"])) : isSlot(column, "long-string") ? (openBlock(), createBlock(unref(FormatValueLongString), {
1305
+ key: 11,
1306
+ value: getValueByFieldName(record, column),
1307
+ record,
1308
+ render: getOptionFieldValue(column, "render"),
1309
+ expanded: isRowLongStringExpanded(record),
1310
+ "expand-on-click": getOptionFieldValue(column, "expandOnClick", true),
1311
+ html: getOptionFieldValue(column, "html", false),
1312
+ "html-classes": getOptionFieldValue(column, "htmlClasses"),
1313
+ "html-styles": getOptionFieldValue(column, "htmlStyles"),
1314
+ width: column.width ?? getOptionFieldValue(column, "width", "220px"),
1315
+ lines: getOptionFieldValue(column, "lines", 1),
1316
+ "empty-value": _ctx.emptyValue
1317
+ }, null, 8, ["value", "record", "render", "expanded", "expand-on-click", "html", "html-classes", "html-styles", "width", "lines", "empty-value"])) : isSlot(column, "fileType") ? (openBlock(), createElementBlock(
1318
+ Fragment,
1319
+ { key: 12 },
1320
+ [
1321
+ createTextVNode(
1322
+ toDisplayString(formatFileType(record, column)),
1323
+ 1
1324
+ /* TEXT */
1325
+ )
1326
+ ],
1327
+ 64
1328
+ /* STABLE_FRAGMENT */
1329
+ )) : isSlot(column, "mask") ? (openBlock(), createElementBlock(
1330
+ Fragment,
1331
+ { key: 13 },
1332
+ [
1333
+ createTextVNode(
1334
+ toDisplayString(formatMask(record, column)),
1335
+ 1
1336
+ /* TEXT */
1337
+ )
1338
+ ],
1339
+ 64
1340
+ /* STABLE_FRAGMENT */
1341
+ )) : isSlot(column, "copy") ? (openBlock(), createBlock(
1342
+ unref(Flex),
1343
+ { key: 14 },
1344
+ {
1345
+ default: withCtx(() => [
1346
+ createElementVNode(
1347
+ "div",
1348
+ null,
1349
+ toDisplayString(formatField(record, column)),
1350
+ 1
1351
+ /* TEXT */
1352
+ ),
1353
+ createVNode(unref(Button), {
1354
+ type: "text",
1355
+ onClick: ($event) => onCopy(record, column)
1356
+ }, {
1357
+ default: withCtx(() => [
1358
+ createVNode(unref(CopyOutlined))
1359
+ ]),
1360
+ _: 2
1361
+ /* DYNAMIC */
1362
+ }, 1032, ["onClick"])
1363
+ ]),
1364
+ _: 2
1365
+ /* DYNAMIC */
1366
+ },
1367
+ 1024
1368
+ /* DYNAMIC_SLOTS */
1369
+ )) : isSlot(column, "switch") ? (openBlock(), createElementBlock(
1370
+ Fragment,
1371
+ { key: 15 },
1372
+ [
1373
+ isShowSlot(record, column) ? (openBlock(), createBlock(unref(Switch), {
1374
+ key: 0,
1375
+ disabled: isDisabled(record, column),
1376
+ checked: getSwitchValue(record, column),
1377
+ onChange: ($event) => onSwitchChange(record, column)
1378
+ }, null, 8, ["disabled", "checked", "onChange"])) : createCommentVNode("v-if", true)
1379
+ ],
1380
+ 64
1381
+ /* STABLE_FRAGMENT */
1382
+ )) : isSlot(column, "image") ? (openBlock(), createBlock(unref(Image), {
1383
+ key: 16,
1384
+ width: getOptionFieldValue(column, "width", 100),
1385
+ height: getOptionFieldValue(column, "height", 100),
1386
+ src: getValueWithFunction(record, column, "")
1387
+ }, null, 8, ["width", "height", "src"])) : isSlot(column, "progress") ? (openBlock(), createBlock(unref(Progress), {
1388
+ key: 17,
1389
+ type: getOptionFieldValue(column, "type", "line"),
1390
+ percent: getValueWithFunction(record, column, 0),
1391
+ size: getOptionFieldValue(column, "size", 12)
1392
+ }, null, 8, ["type", "percent", "size"])) : isSlot(column, "color-tag") ? (openBlock(), createBlock(_sfc_main$4, {
1393
+ key: 18,
1394
+ type: "tag",
1395
+ color: getStatusField(record, column, "color") || "",
1396
+ text: getStatusField(record, column, "name")
1397
+ }, null, 8, ["color", "text"])) : isSlot(column, "color-text") ? (openBlock(), createBlock(_sfc_main$4, {
1398
+ key: 19,
1399
+ type: "text",
1400
+ color: getStatusField(record, column, "color") || "",
1401
+ text: getStatusField(record, column, "name")
1402
+ }, null, 8, ["color", "text"])) : isSlot(column, "operation") ? (openBlock(), createElementBlock(
1403
+ Fragment,
1404
+ { key: 20 },
1405
+ [
1406
+ isShowSlot(record, column) ? (openBlock(), createBlock(Operations, {
1407
+ key: 0,
1408
+ buttons: getOptionFieldValue(column, "buttons", []),
1409
+ "max-button-count": getOptionFieldValue(column, "maxButtonCount"),
1410
+ context: record,
1411
+ index,
1412
+ onClick: handleOperation
1413
+ }, null, 8, ["buttons", "max-button-count", "context", "index"])) : createCommentVNode("v-if", true)
1414
+ ],
1415
+ 64
1416
+ /* STABLE_FRAGMENT */
1417
+ )) : createCommentVNode("v-if", true)
1418
+ ]),
1419
+ _: 2
1420
+ /* DYNAMIC */
1421
+ }, [
1422
+ _ctx.$slots.expandedRowRender ? {
1423
+ name: "expandedRowRender",
1424
+ fn: withCtx(({ record, index, indent, expanded }) => [
1425
+ renderSlot(_ctx.$slots, "expandedRowRender", {
1426
+ record,
1427
+ index,
1428
+ indent,
1429
+ expanded
1430
+ }, void 0, true)
1431
+ ]),
1432
+ key: "0"
1433
+ } : void 0,
1434
+ _ctx.$slots.expandIcon ? {
1435
+ name: "expandIcon",
1436
+ fn: withCtx((props2) => [
1437
+ renderSlot(_ctx.$slots, "expandIcon", normalizeProps(guardReactiveProps(props2)), void 0, true)
1438
+ ]),
1439
+ key: "1"
1440
+ } : void 0,
1441
+ _ctx.$slots.headerCell ? {
1442
+ name: "headerCell",
1443
+ fn: withCtx(({ column, title }) => [
1444
+ renderSlot(_ctx.$slots, "headerCell", {
1445
+ column,
1446
+ title
1447
+ }, void 0, true)
1448
+ ]),
1449
+ key: "2"
1450
+ } : void 0,
1451
+ _ctx.showPagination || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? {
1452
+ name: "default",
1453
+ fn: withCtx(() => [
1454
+ createVNode(unref(Flex), {
1455
+ justify: "space-between",
1456
+ align: "center",
1457
+ class: "ext-table-fixed-footer"
1458
+ }, {
1459
+ default: withCtx(() => [
1460
+ createElementVNode("div", _hoisted_2, [
1461
+ computedBatchOperations.value && computedBatchOperations.value.length > 0 ? (openBlock(), createBlock(Operations, {
1462
+ key: 0,
1463
+ placement: "topLeft",
1464
+ buttons: computedBatchOperations.value,
1465
+ "max-button-count": 3,
1466
+ context: batchOperationContext.value,
1467
+ onClick: handleBatchOperation
1468
+ }, {
1469
+ default: withCtx(() => [
1470
+ selectedRowCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_3, [
1471
+ createTextVNode(
1472
+ " 已选择 " + toDisplayString(selectedRowCount.value) + " 项 ",
1473
+ 1
1474
+ /* TEXT */
1475
+ ),
1476
+ createVNode(unref(Button), {
1477
+ type: "link",
1478
+ size: "small",
1479
+ onClick: handleClearSelection
1480
+ }, {
1481
+ default: withCtx(() => [
1482
+ createTextVNode("取消选择")
1483
+ ]),
1484
+ _: 1
1485
+ /* STABLE */
1486
+ })
1487
+ ])) : createCommentVNode("v-if", true)
1488
+ ]),
1489
+ _: 1
1490
+ /* STABLE */
1491
+ }, 8, ["buttons", "context"])) : _ctx.$slots["batch-operators"] ? renderSlot(_ctx.$slots, "batch-operators", {
1492
+ key: 1,
1493
+ selectedRowKeys: internalSelectedRowKeys.value,
1494
+ selectedRows: internalSelectedRows.value,
1495
+ clear: handleClearSelection
1496
+ }, void 0, true) : createCommentVNode("v-if", true)
1497
+ ]),
1498
+ _ctx.showPagination ? (openBlock(), createBlock(unref(Flex), {
1499
+ key: 0,
1500
+ justify: paginationJustify.value,
1501
+ class: "ext-table-pagination"
1502
+ }, {
1503
+ default: withCtx(() => [
1504
+ createVNode(unref(Pagination), {
1505
+ current: currentPage.value,
1506
+ "page-size": pageSize.value,
1507
+ total: total.value,
1508
+ "show-total": _ctx.showTotal,
1509
+ "page-size-options": _ctx.pageSizeOptions,
1510
+ "show-size-changer": _ctx.showSizeChanger,
1511
+ onChange: onPageChange
1512
+ }, null, 8, ["current", "page-size", "total", "show-total", "page-size-options", "show-size-changer"])
1513
+ ]),
1514
+ _: 1
1515
+ /* STABLE */
1516
+ }, 8, ["justify"])) : createCommentVNode("v-if", true)
1517
+ ]),
1518
+ _: 3
1519
+ /* FORWARDED */
1520
+ })
1521
+ ]),
1522
+ key: "3"
1523
+ } : void 0
1524
+ ]), 1040, ["disabled", "row-selection", "size", "bordered", "columns", "loading", "data-source", "row-key"]),
1525
+ createCommentVNode(" pagination "),
1526
+ _ctx.showPagination || computedBatchOperations.value && computedBatchOperations.value.length > 0 || _ctx.$slots["batch-operators"] ? (openBlock(), createBlock(unref(Flex), {
1527
+ key: 1,
1528
+ justify: "space-between",
1529
+ align: "center",
1530
+ class: "ext-table-footer"
1531
+ }, {
1532
+ default: withCtx(() => [
1533
+ createElementVNode("div", _hoisted_4, [
1534
+ computedBatchOperations.value && computedBatchOperations.value.length > 0 ? (openBlock(), createBlock(Operations, {
1535
+ key: 0,
1536
+ placement: "topLeft",
1537
+ buttons: computedBatchOperations.value,
1538
+ "max-button-count": 3,
1539
+ context: batchOperationContext.value,
1540
+ onClick: handleBatchOperation
1541
+ }, {
1542
+ default: withCtx(() => [
1543
+ selectedRowCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_5, [
1544
+ createTextVNode(
1545
+ " 已选择 " + toDisplayString(selectedRowCount.value) + " 项 ",
1546
+ 1
1547
+ /* TEXT */
1548
+ ),
1549
+ createVNode(unref(Button), {
1550
+ type: "link",
1551
+ size: "small",
1552
+ onClick: handleClearSelection
1553
+ }, {
1554
+ default: withCtx(() => [
1555
+ createTextVNode("取消选择")
1556
+ ]),
1557
+ _: 1
1558
+ /* STABLE */
1559
+ })
1560
+ ])) : createCommentVNode("v-if", true)
1561
+ ]),
1562
+ _: 1
1563
+ /* STABLE */
1564
+ }, 8, ["buttons", "context"])) : _ctx.$slots["batch-operators"] ? renderSlot(_ctx.$slots, "batch-operators", {
1565
+ key: 1,
1566
+ selectedRowKeys: internalSelectedRowKeys.value,
1567
+ selectedRows: internalSelectedRows.value,
1568
+ clear: handleClearSelection
1569
+ }, void 0, true) : createCommentVNode("v-if", true)
1570
+ ]),
1571
+ _ctx.showPagination ? (openBlock(), createBlock(unref(Flex), {
1572
+ key: 0,
1573
+ justify: paginationJustify.value,
1574
+ class: "ext-table-pagination"
1575
+ }, {
1576
+ default: withCtx(() => [
1577
+ createVNode(unref(Pagination), {
1578
+ current: currentPage.value,
1579
+ "page-size": pageSize.value,
1580
+ total: total.value,
1581
+ "show-total": _ctx.showTotal,
1582
+ "page-size-options": _ctx.pageSizeOptions,
1583
+ "show-size-changer": _ctx.showSizeChanger,
1584
+ onChange: onPageChange
1585
+ }, null, 8, ["current", "page-size", "total", "show-total", "page-size-options", "show-size-changer"])
1586
+ ]),
1587
+ _: 1
1588
+ /* STABLE */
1589
+ }, 8, ["justify"])) : createCommentVNode("v-if", true)
1590
+ ]),
1591
+ _: 3
1592
+ /* FORWARDED */
1593
+ })) : createCommentVNode("v-if", true)
1594
+ ]),
1595
+ _: 3
1596
+ /* FORWARDED */
1597
+ }),
1598
+ createCommentVNode(" 右键菜单锚点与弹层 "),
1599
+ (hasLongStringColumn.value || _ctx.$slots["context-menu"]) && contextMenuRecord.value && contextMenuVisible.value ? (openBlock(), createBlock(unref(Dropdown), {
1600
+ key: contextMenuKey.value,
1601
+ open: contextMenuVisible.value,
1602
+ "onUpdate:open": _cache[7] || (_cache[7] = ($event) => contextMenuVisible.value = $event),
1603
+ trigger: ["contextmenu"],
1604
+ placement: contextMenuPlacement.value
1605
+ }, {
1606
+ overlay: withCtx(() => [
1607
+ createVNode(unref(Menu), {
1608
+ style: { "min-width": "160px" },
1609
+ onClick: _cache[6] || (_cache[6] = ($event) => contextMenuVisible.value = false)
1610
+ }, {
1611
+ default: withCtx(() => [
1612
+ contextMenuSelectedText.value ? (openBlock(), createBlock(unref(MenuItem), {
1613
+ key: "copy",
1614
+ onClick: copyContextMenuText
1615
+ }, {
1616
+ default: withCtx(() => [
1617
+ createTextVNode("复制")
1618
+ ]),
1619
+ _: 1
1620
+ /* STABLE */
1621
+ })) : (openBlock(), createElementBlock(
1622
+ Fragment,
1623
+ { key: 1 },
1624
+ [
1625
+ createVNode(unref(MenuItem), {
1626
+ key: "copy-cell",
1627
+ onClick: copyContextMenuText
1628
+ }, {
1629
+ default: withCtx(() => [
1630
+ createTextVNode("复制单元格")
1631
+ ]),
1632
+ _: 1
1633
+ /* STABLE */
1634
+ }),
1635
+ createVNode(unref(MenuItem), {
1636
+ key: "copy-row",
1637
+ onClick: copyContextMenuRow
1638
+ }, {
1639
+ default: withCtx(() => [
1640
+ createTextVNode("复制行")
1641
+ ]),
1642
+ _: 1
1643
+ /* STABLE */
1644
+ })
1645
+ ],
1646
+ 64
1647
+ /* STABLE_FRAGMENT */
1648
+ )),
1649
+ createVNode(unref(MenuDivider)),
1650
+ hasLongStringColumn.value ? (openBlock(), createElementBlock(
1651
+ Fragment,
1652
+ { key: 2 },
1653
+ [
1654
+ createVNode(unref(MenuItem), {
1655
+ key: "long-string-toggle-current",
1656
+ onClick: _cache[4] || (_cache[4] = ($event) => toggleCurrentRowExpand(contextMenuRecord.value)),
1657
+ disabled: isAllRowsLongStringExpanded.value
1658
+ }, {
1659
+ default: withCtx(() => [
1660
+ createTextVNode(
1661
+ toDisplayString(isRowLongStringExpanded(contextMenuRecord.value) ? "折叠当前行" : "展开当前行"),
1662
+ 1
1663
+ /* TEXT */
1664
+ )
1665
+ ]),
1666
+ _: 1
1667
+ /* STABLE */
1668
+ }, 8, ["disabled"]),
1669
+ createVNode(unref(MenuItem), {
1670
+ key: "long-string-toggle-all",
1671
+ onClick: _cache[5] || (_cache[5] = ($event) => toggleAllRowsExpand())
1672
+ }, {
1673
+ default: withCtx(() => [
1674
+ createTextVNode(
1675
+ toDisplayString(isAllRowsLongStringExpanded.value ? "折叠所有行" : "展开所有行"),
1676
+ 1
1677
+ /* TEXT */
1678
+ )
1679
+ ]),
1680
+ _: 1
1681
+ /* STABLE */
1682
+ }),
1683
+ _ctx.$slots["context-menu"] ? (openBlock(), createBlock(unref(MenuDivider), { key: 0 })) : createCommentVNode("v-if", true)
1684
+ ],
1685
+ 64
1686
+ /* STABLE_FRAGMENT */
1687
+ )) : createCommentVNode("v-if", true),
1688
+ renderSlot(_ctx.$slots, "context-menu", { record: contextMenuRecord.value }, void 0, true)
1689
+ ]),
1690
+ _: 3
1691
+ /* FORWARDED */
1692
+ })
1693
+ ]),
1694
+ default: withCtx(() => [
1695
+ createElementVNode(
1696
+ "div",
1697
+ {
1698
+ style: normalizeStyle({
1699
+ position: "fixed",
1700
+ left: `${contextMenuPos.value.x}px`,
1701
+ top: `${contextMenuPos.value.y}px`,
1702
+ width: "1px",
1703
+ height: "1px",
1704
+ pointerEvents: "none"
1705
+ })
1706
+ },
1707
+ null,
1708
+ 4
1709
+ /* STYLE */
1710
+ )
1711
+ ]),
1712
+ _: 3
1713
+ /* FORWARDED */
1714
+ }, 8, ["open", "placement"])) : createCommentVNode("v-if", true),
1715
+ createCommentVNode(" 快捷操作悬浮层 "),
1716
+ _ctx.$slots["quick-menu"] && quickMenuRecord.value && quickMenuVisible.value ? (openBlock(), createBlock(unref(Dropdown), {
1717
+ key: `quick-${quickMenuKey.value}`,
1718
+ open: true,
1719
+ trigger: [],
1720
+ placement: quickMenuPlacement.value
1721
+ }, {
1722
+ overlay: withCtx(() => [
1723
+ createElementVNode(
1724
+ "div",
1725
+ {
1726
+ onMouseenter: clearQuickMenuTimer,
1727
+ onMouseleave: startQuickMenuTimer
1728
+ },
1729
+ [
1730
+ createVNode(unref(Menu), { style: { "min-width": "160px" } }, {
1731
+ default: withCtx(() => [
1732
+ renderSlot(_ctx.$slots, "quick-menu", { record: quickMenuRecord.value }, void 0, true)
1733
+ ]),
1734
+ _: 3
1735
+ /* FORWARDED */
1736
+ })
1737
+ ],
1738
+ 32
1739
+ /* NEED_HYDRATION */
1740
+ )
1741
+ ]),
1742
+ default: withCtx(() => [
1743
+ createElementVNode(
1744
+ "div",
1745
+ {
1746
+ style: normalizeStyle({
1747
+ position: "fixed",
1748
+ left: `${quickMenuPos.value.x}px`,
1749
+ top: `${quickMenuPos.value.y}px`,
1750
+ width: "1px",
1751
+ height: "1px",
1752
+ pointerEvents: "none"
1753
+ })
1754
+ },
1755
+ null,
1756
+ 4
1757
+ /* STYLE */
1758
+ )
1759
+ ]),
1760
+ _: 3
1761
+ /* FORWARDED */
1762
+ }, 8, ["placement"])) : createCommentVNode("v-if", true),
1763
+ createCommentVNode(" 列设置抽屉 "),
1764
+ createVNode(ColumnSetting, {
1765
+ modelValue: columnSettingVisible.value,
1766
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => columnSettingVisible.value = $event),
1767
+ columns: settingColumns.value,
1768
+ onConfirm: handleColumnSetting,
1769
+ onReset: handleColumnSettingReset
1770
+ }, null, 8, ["modelValue", "columns"])
1771
+ ],
1772
+ 6
1773
+ /* CLASS, STYLE */
1774
+ );
1775
+ };
1776
+ }
1777
+ });
1778
+ export {
1779
+ _sfc_main as default
1780
+ };
1781
+ //# sourceMappingURL=ExtTable2.vue.js.map