@web-utils/form-ui 1.0.0-beta10 → 1.0.0-beta100

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 (631) hide show
  1. package/address-input/index.d.ts +53 -0
  2. package/address-input/index.mjs +2 -0
  3. package/address-input/style.css +1 -0
  4. package/affix/index.d.ts +50 -0
  5. package/affix/index.mjs +49 -0
  6. package/affix/style.css +1 -0
  7. package/api/index.d.ts +70 -0
  8. package/api/index.mjs +42 -0
  9. package/awesome-button/index.d.ts +61 -0
  10. package/awesome-button/index.mjs +49 -0
  11. package/base.css +1 -1
  12. package/basic-container/index.d.ts +16 -0
  13. package/basic-container/index.mjs +21 -0
  14. package/basic-container/style.css +1 -0
  15. package/biz-loading-view/index.d.ts +18 -0
  16. package/biz-loading-view/index.mjs +27 -0
  17. package/biz-loading-view/style.css +1 -0
  18. package/capsule-tab/index.d.ts +31 -0
  19. package/capsule-tab/index.mjs +2 -0
  20. package/capsule-tab/style.css +1 -0
  21. package/card/index.d.ts +42 -0
  22. package/card/index.mjs +91 -0
  23. package/card/style.css +1 -0
  24. package/chunks/0bRE9eWD.mjs +58 -0
  25. package/chunks/3Zmtl1F82.mjs +231 -0
  26. package/chunks/8zvAoiTw2.mjs +63 -0
  27. package/chunks/B-BmACqv.mjs +60 -0
  28. package/chunks/B1MSrc6f.mjs +8 -0
  29. package/chunks/B24kbvxB.mjs +181 -0
  30. package/chunks/B7DACryk.mjs +40 -0
  31. package/chunks/B7hlyq1n2.mjs +34 -0
  32. package/chunks/BABpWSRr2.mjs +92 -0
  33. package/chunks/BTDWXFoi.mjs +200 -0
  34. package/chunks/BUKFXHGg.mjs +30 -0
  35. package/chunks/BWNDImpw.mjs +299 -0
  36. package/chunks/BanS-yUY2.mjs +37 -0
  37. package/chunks/BcDeI1ZH.mjs +449 -0
  38. package/chunks/BdrgibgS.mjs +70 -0
  39. package/chunks/Bglnw37E.mjs +4795 -0
  40. package/chunks/BlxJzHgO.mjs +110 -0
  41. package/chunks/BqL4MXni.mjs +781 -0
  42. package/chunks/BqgrLeBK2.mjs +25 -0
  43. package/chunks/BrZxnDdM.mjs +61 -0
  44. package/chunks/BwPq7wF-.mjs +648 -0
  45. package/chunks/BxJpkb47.mjs +380 -0
  46. package/chunks/C-vVy7vH2.mjs +96 -0
  47. package/chunks/C1SZzAUY2.mjs +525 -0
  48. package/chunks/C23Qaggp.mjs +70 -0
  49. package/chunks/C2bqaC-E.mjs +52 -0
  50. package/chunks/C7vVbJ2c.mjs +30 -0
  51. package/chunks/C9nHZkbj.mjs +4085 -0
  52. package/chunks/C9uwTpHO.mjs +341 -0
  53. package/chunks/CA_-hYlN.mjs +32 -0
  54. package/chunks/CCkHwxt7.mjs +61 -0
  55. package/chunks/CCwW9An-.mjs +100 -0
  56. package/chunks/CKg0Nmff2.mjs +222 -0
  57. package/chunks/CKuwy9g12.mjs +31 -0
  58. package/chunks/CP0tXU4m.mjs +198 -0
  59. package/chunks/CPGrGc4W.mjs +595 -0
  60. package/chunks/CX7Oiw5N.mjs +384 -0
  61. package/chunks/CXHJqvbJ.mjs +204 -0
  62. package/chunks/CYjby4eo.mjs +17 -0
  63. package/chunks/C_QfuxeQ.mjs +98 -0
  64. package/chunks/CcW1bkgt.mjs +199 -0
  65. package/chunks/CikaZjdo2.mjs +29 -0
  66. package/chunks/CjXRUqu72.mjs +30 -0
  67. package/chunks/CjeEWpNr.mjs +303 -0
  68. package/chunks/ClVh1Lek.mjs +130 -0
  69. package/chunks/CmynK-Bt2.mjs +108 -0
  70. package/chunks/CoQf1XX62.mjs +39 -0
  71. package/chunks/CsiD_AYs.mjs +56 -0
  72. package/chunks/CtwvKHKB.mjs +1799 -0
  73. package/chunks/Cun90-R7.mjs +63 -0
  74. package/chunks/D1wwXnEw.mjs +46 -0
  75. package/chunks/D2NeD2g32.mjs +1361 -0
  76. package/chunks/D5twDi0x.mjs +218 -0
  77. package/chunks/D7kTwnJK2.mjs +27 -0
  78. package/chunks/D7p2ei_L.mjs +68 -0
  79. package/chunks/D8C17D2k.mjs +58 -0
  80. package/chunks/DEvsHOVL2.mjs +429 -0
  81. package/chunks/DG4q844M.mjs +65 -0
  82. package/chunks/DN2JYsQQ2.mjs +42 -0
  83. package/chunks/DPgFZVE12.mjs +112 -0
  84. package/chunks/DQVIughS.mjs +613 -0
  85. package/chunks/DTeHffqJ.mjs +185 -0
  86. package/chunks/DW0VZadU.mjs +55 -0
  87. package/chunks/DXi5_gZb.mjs +518 -0
  88. package/chunks/DdACGFy3.mjs +90 -0
  89. package/chunks/DptiCPnc.mjs +92 -0
  90. package/chunks/DzfHfYvS2.mjs +26 -0
  91. package/chunks/Dziwe2852.mjs +29 -0
  92. package/chunks/G5TPeMtF2.mjs +35 -0
  93. package/chunks/NYkLWtyw2.mjs +26 -0
  94. package/chunks/T_Uvq_1c.mjs +51 -0
  95. package/chunks/_7MDfW_y.mjs +156 -0
  96. package/chunks/dgRz6V6p2.mjs +26 -0
  97. package/chunks/fJ2ezOVH.mjs +206 -0
  98. package/chunks/mTmx7TI02.mjs +136 -0
  99. package/chunks/sl7eKGeX.mjs +684 -0
  100. package/chunks/tJ_t87kJ.mjs +89 -0
  101. package/chunks/tzjUpVIj.mjs +37 -0
  102. package/chunks/wkrkYyvs.mjs +17 -0
  103. package/chunks/xElkm-ja2.mjs +75 -0
  104. package/code-mirror-editor/index.d.ts +51 -0
  105. package/code-mirror-editor/index.mjs +100 -0
  106. package/code-mirror-editor/style.css +1 -0
  107. package/confirm-button/index.d.ts +123 -0
  108. package/confirm-button/index.mjs +35 -0
  109. package/confirmable/index.d.ts +94 -0
  110. package/confirmable/index.mjs +8 -0
  111. package/constants/index.d.ts +75 -0
  112. package/constants/index.mjs +4 -0
  113. package/context-menu/index.d.ts +184 -0
  114. package/context-menu/index.mjs +197 -0
  115. package/context-menu/style.css +1 -0
  116. package/count-up/index.d.ts +71 -0
  117. package/count-up/index.mjs +94 -0
  118. package/custom-scrollbar/index.d.ts +50 -0
  119. package/custom-scrollbar/index.mjs +93 -0
  120. package/data-box/index.d.ts +31 -0
  121. package/data-box/index.mjs +2 -0
  122. package/data-box/style.css +1 -0
  123. package/data-card/index.d.ts +21 -0
  124. package/data-card/index.mjs +65 -0
  125. package/data-card/style.css +1 -0
  126. package/data-card-text/index.d.ts +22 -0
  127. package/data-card-text/index.mjs +69 -0
  128. package/data-card-text/style.css +1 -0
  129. package/data-display/index.d.ts +21 -0
  130. package/data-display/index.mjs +75 -0
  131. package/data-display/style.css +1 -0
  132. package/data-icons/index.d.ts +22 -0
  133. package/data-icons/index.mjs +76 -0
  134. package/data-icons/style.css +1 -0
  135. package/data-imgtext/index.d.ts +19 -0
  136. package/data-imgtext/index.mjs +73 -0
  137. package/data-imgtext/style.css +1 -0
  138. package/data-operatext/index.d.ts +18 -0
  139. package/data-operatext/index.mjs +56 -0
  140. package/data-operatext/style.css +1 -0
  141. package/data-panel/index.d.ts +20 -0
  142. package/data-panel/index.mjs +63 -0
  143. package/data-panel/style.css +1 -0
  144. package/data-pay/index.d.ts +20 -0
  145. package/data-pay/index.mjs +112 -0
  146. package/data-pay/style.css +1 -0
  147. package/data-price/index.d.ts +18 -0
  148. package/data-price/index.mjs +53 -0
  149. package/data-price/style.css +1 -0
  150. package/data-progress/index.d.ts +20 -0
  151. package/data-progress/index.mjs +74 -0
  152. package/data-progress/style.css +1 -0
  153. package/data-rotate/index.d.ts +22 -0
  154. package/data-rotate/index.mjs +2 -0
  155. package/data-rotate/style.css +1 -0
  156. package/data-table-picker/index.d.ts +62 -0
  157. package/data-table-picker/index.mjs +120 -0
  158. package/data-tabs/index.d.ts +22 -0
  159. package/data-tabs/index.mjs +2 -0
  160. package/data-tabs/style.css +1 -0
  161. package/dialog-form/index.d.ts +38 -0
  162. package/dialog-form/index.mjs +155 -0
  163. package/dialog-form/style.css +1 -0
  164. package/dict-render/index.d.ts +29 -0
  165. package/dict-render/index.mjs +2 -0
  166. package/e-charts/index.d.ts +80 -0
  167. package/e-charts/index.mjs +180 -0
  168. package/e-charts/style.css +1 -0
  169. package/easy-popup/index.d.ts +115 -0
  170. package/easy-popup/index.mjs +93 -0
  171. package/easy-popup/style.css +1 -0
  172. package/editable-progress/index.d.ts +69 -0
  173. package/editable-progress/index.mjs +122 -0
  174. package/editable-progress/style.css +1 -0
  175. package/editable-tree/index.d.ts +282 -0
  176. package/editable-tree/index.mjs +597 -0
  177. package/editable-tree/style.css +1 -0
  178. package/element-dialog/index.d.ts +236 -43
  179. package/element-dialog/index.mjs +2 -91
  180. package/element-dialog/style.css +1 -1
  181. package/element-resize-observer/index.d.ts +9 -0
  182. package/element-resize-observer/index.mjs +41 -0
  183. package/element-resize-observer/style.css +1 -0
  184. package/empty-view/index.d.ts +95 -21
  185. package/empty-view/index.mjs +2 -1
  186. package/error-view/index.d.ts +73 -0
  187. package/error-view/index.mjs +38 -0
  188. package/error-view/style.css +1 -0
  189. package/flex-box/index.d.ts +45 -0
  190. package/flex-box/index.mjs +2 -0
  191. package/flex-column/index.d.ts +42 -0
  192. package/flex-column/index.mjs +2 -0
  193. package/flex-item/index.d.ts +78 -0
  194. package/flex-item/index.mjs +2 -0
  195. package/flex-row/index.d.ts +42 -0
  196. package/flex-row/index.mjs +2 -0
  197. package/flex-scroll-area/index.d.ts +14 -17
  198. package/flex-scroll-area/index.mjs +2 -1
  199. package/flex-scroller/index.d.ts +27 -0
  200. package/flex-scroller/index.mjs +30 -0
  201. package/flex-scroller/style.css +1 -0
  202. package/flow-designer/index.d.ts +287 -0
  203. package/flow-designer/index.mjs +2 -0
  204. package/flow-designer/style.css +1 -0
  205. package/flow-viewer/index.d.ts +63 -0
  206. package/flow-viewer/index.mjs +160 -0
  207. package/flow-viewer/style.css +1 -0
  208. package/form-advice/index.d.ts +8 -8
  209. package/form-advice/index.mjs +13 -12
  210. package/form-button/index.d.ts +124 -0
  211. package/form-button/index.mjs +36 -0
  212. package/form-card/index.d.ts +10 -0
  213. package/form-card/index.mjs +18 -0
  214. package/form-cascader/index.d.ts +479 -0
  215. package/form-cascader/index.mjs +2 -0
  216. package/form-cell/index.d.ts +17 -19
  217. package/form-cell/index.mjs +1 -0
  218. package/form-checkbox/index.d.ts +239 -31
  219. package/form-checkbox/index.mjs +1 -1
  220. package/form-checkbox-group/index.d.ts +374 -0
  221. package/form-checkbox-group/index.mjs +2 -0
  222. package/form-checkbox-group/style.css +1 -0
  223. package/form-date-picker/index.d.ts +377 -30
  224. package/form-date-picker/index.mjs +1 -1
  225. package/form-holder/index.d.ts +91 -23
  226. package/form-holder/index.mjs +1 -1
  227. package/form-holder/style.css +1 -1
  228. package/form-image/index.d.ts +139 -24
  229. package/form-image/index.mjs +1 -1
  230. package/form-input/index.d.ts +284 -51
  231. package/form-input/index.mjs +1 -1
  232. package/form-input-cron-expression/index.d.ts +224 -0
  233. package/form-input-cron-expression/index.mjs +2 -0
  234. package/form-input-cron-expression/style.css +1 -0
  235. package/form-input-email/index.d.ts +298 -26
  236. package/form-input-email/index.mjs +1 -1
  237. package/form-input-id-card/index.d.ts +298 -26
  238. package/form-input-id-card/index.mjs +1 -1
  239. package/form-input-number/index.d.ts +239 -30
  240. package/form-input-number/index.mjs +1 -1
  241. package/form-input-phone-number/index.d.ts +298 -26
  242. package/form-input-phone-number/index.mjs +1 -1
  243. package/form-input-tag/index.d.ts +270 -1
  244. package/form-input-tag/index.mjs +1 -3
  245. package/form-input-time/index.d.ts +441 -1
  246. package/form-input-time/index.mjs +1 -3
  247. package/form-item/index.d.ts +191 -0
  248. package/form-item/index.mjs +2 -0
  249. package/form-item/style.css +1 -0
  250. package/form-item-config-provider/index.d.ts +25 -4
  251. package/form-item-config-provider/index.mjs +7 -7
  252. package/form-item-group/index.d.ts +92 -17
  253. package/form-item-group/index.mjs +2 -78
  254. package/form-item-group/style.css +1 -1
  255. package/form-radio-group/index.d.ts +297 -29
  256. package/form-radio-group/index.mjs +1 -1
  257. package/form-rate/index.d.ts +246 -25
  258. package/form-rate/index.mjs +1 -1
  259. package/form-red-table/index.d.ts +12 -17
  260. package/form-red-table/index.mjs +28 -26
  261. package/form-row/index.d.ts +4 -3
  262. package/form-row/index.mjs +1 -1
  263. package/form-select/index.d.ts +529 -29
  264. package/form-select/index.mjs +1 -1
  265. package/form-slider/index.d.ts +275 -27
  266. package/form-slider/index.mjs +1 -1
  267. package/form-switch/index.d.ts +266 -27
  268. package/form-switch/index.mjs +1 -1
  269. package/form-table/index.d.ts +299 -0
  270. package/form-table/index.mjs +2 -0
  271. package/form-table-plus/index.d.ts +276 -0
  272. package/form-table-plus/index.mjs +2 -0
  273. package/form-text/index.d.ts +159 -24
  274. package/form-text/index.mjs +1 -1
  275. package/form-textarea/index.d.ts +352 -0
  276. package/form-textarea/index.mjs +2 -0
  277. package/form-time-select/index.d.ts +326 -0
  278. package/form-time-select/index.mjs +2 -0
  279. package/form-tree-select/index.d.ts +716 -0
  280. package/form-tree-select/index.mjs +2 -0
  281. package/form-tree-select/style.css +1 -0
  282. package/form-tree-select-multiple/index.d.ts +718 -0
  283. package/form-tree-select-multiple/index.mjs +2 -0
  284. package/form-view/index.d.ts +226 -1
  285. package/form-view/index.mjs +281 -6
  286. package/form-view/style.css +1 -0
  287. package/fy-array/index.d.ts +498 -0
  288. package/fy-array/index.mjs +131 -0
  289. package/fy-array/style.css +1 -0
  290. package/fy-avatar/index.d.ts +40 -0
  291. package/fy-avatar/index.mjs +58 -0
  292. package/fy-avatar/style.css +1 -0
  293. package/fy-cascader/index.d.ts +562 -0
  294. package/fy-cascader/index.mjs +116 -0
  295. package/fy-checkbox/index.d.ts +495 -0
  296. package/fy-checkbox/index.mjs +103 -0
  297. package/fy-checkbox/style.css +1 -0
  298. package/fy-curd/index.d.ts +1009 -0
  299. package/fy-curd/index.mjs +2 -0
  300. package/fy-date/index.d.ts +510 -0
  301. package/fy-date/index.mjs +80 -0
  302. package/fy-date/style.css +1 -0
  303. package/fy-dynamic/index.d.ts +532 -0
  304. package/fy-dynamic/index.mjs +2 -0
  305. package/fy-empty/index.d.ts +32 -0
  306. package/fy-empty/index.mjs +36 -0
  307. package/fy-empty/style.css +1 -0
  308. package/fy-form/index.d.ts +531 -0
  309. package/fy-form/index.mjs +2 -0
  310. package/fy-form/style.css +1 -0
  311. package/fy-input/index.d.ts +580 -0
  312. package/fy-input/index.mjs +122 -0
  313. package/fy-input-color/index.d.ts +499 -0
  314. package/fy-input-color/index.mjs +80 -0
  315. package/fy-input-icon/index.d.ts +508 -0
  316. package/fy-input-icon/index.mjs +134 -0
  317. package/fy-input-icon/style.css +1 -0
  318. package/fy-input-map/index.d.ts +530 -0
  319. package/fy-input-map/index.mjs +249 -0
  320. package/fy-input-map/style.css +1 -0
  321. package/fy-input-number/index.d.ts +530 -0
  322. package/fy-input-number/index.mjs +78 -0
  323. package/fy-input-table/index.d.ts +512 -0
  324. package/fy-input-table/index.mjs +167 -0
  325. package/fy-input-table/style.css +1 -0
  326. package/fy-input-tree/index.d.ts +615 -0
  327. package/fy-input-tree/index.mjs +266 -0
  328. package/fy-input-tree/style.css +1 -0
  329. package/fy-radio/index.d.ts +482 -0
  330. package/fy-radio/index.mjs +59 -0
  331. package/fy-radio/style.css +1 -0
  332. package/fy-rate/index.d.ts +552 -0
  333. package/fy-rate/index.mjs +91 -0
  334. package/fy-rate/style.css +1 -0
  335. package/fy-select/index.d.ts +588 -0
  336. package/fy-select/index.mjs +2 -0
  337. package/fy-select/style.css +1 -0
  338. package/fy-slider/index.d.ts +513 -0
  339. package/fy-slider/index.mjs +72 -0
  340. package/fy-switch/index.d.ts +493 -0
  341. package/fy-switch/index.mjs +71 -0
  342. package/fy-tabs/index.d.ts +21 -0
  343. package/fy-tabs/index.mjs +50 -0
  344. package/fy-time/index.d.ts +968 -0
  345. package/fy-time/index.mjs +85 -0
  346. package/fy-title/index.d.ts +488 -0
  347. package/fy-title/index.mjs +19 -0
  348. package/fy-title/style.css +1 -0
  349. package/fy-tree/index.d.ts +143 -0
  350. package/fy-tree/index.mjs +392 -0
  351. package/fy-tree/style.css +1 -0
  352. package/fy-u-editor/index.d.ts +117 -0
  353. package/fy-u-editor/index.mjs +2 -0
  354. package/fy-u-editor/style.css +1 -0
  355. package/fy-upload/index.d.ts +643 -0
  356. package/fy-upload/index.mjs +2 -0
  357. package/fy-upload/style.css +1 -0
  358. package/guide-steps/index.d.ts +32 -0
  359. package/guide-steps/index.mjs +78 -0
  360. package/guide-steps/style.css +1 -0
  361. package/helper/avue.d.ts +37 -0
  362. package/helper/avue.mjs +40 -0
  363. package/helper/dictionary.d.ts +29 -0
  364. package/helper/dictionary.mjs +97 -0
  365. package/helper/form-item.d.ts +17 -0
  366. package/helper/form-item.mjs +27 -0
  367. package/helper/input.d.ts +49 -0
  368. package/helper/input.mjs +2 -0
  369. package/helper/sub-table-plus.d.ts +98 -0
  370. package/helper/sub-table-plus.mjs +4 -0
  371. package/highlight-j-s/index.d.ts +19 -0
  372. package/highlight-j-s/index.mjs +52 -0
  373. package/highlight-j-s/style.css +1 -0
  374. package/icon-temp/index.d.ts +20 -0
  375. package/icon-temp/index.mjs +28 -0
  376. package/icon-temp/style.css +1 -0
  377. package/iframe-window/index.d.ts +19 -0
  378. package/iframe-window/index.mjs +38 -0
  379. package/iframe-window/style.css +1 -0
  380. package/image-cropper/index.d.ts +21 -0
  381. package/image-cropper/index.mjs +155 -0
  382. package/image-cropper/style.css +1 -0
  383. package/image-preview/index.d.ts +62 -0
  384. package/image-preview/index.mjs +202 -0
  385. package/image-preview/style.css +1 -0
  386. package/image-viewer/index.d.ts +26 -0
  387. package/image-viewer/index.mjs +71 -0
  388. package/image-viewer/style.css +1 -0
  389. package/index.css +2 -0
  390. package/index.d.ts +154 -36
  391. package/index.mjs +154 -62
  392. package/input-number-range/index.d.ts +42 -0
  393. package/input-number-range/index.mjs +78 -0
  394. package/input-number-range/style.css +1 -0
  395. package/json-editor/index.d.ts +7 -6
  396. package/json-editor/index.mjs +1 -1
  397. package/json-editor/style.css +1 -1
  398. package/keyboard/index.d.ts +65 -0
  399. package/keyboard/index.mjs +2 -0
  400. package/keyboard/style.css +1 -0
  401. package/loading-view/index.d.ts +66 -0
  402. package/loading-view/index.mjs +40 -0
  403. package/loading-view/style.css +1 -0
  404. package/monaco-editor/index.d.ts +127 -0
  405. package/monaco-editor/index.mjs +2 -0
  406. package/monaco-editor/style.css +1 -0
  407. package/name-avatar/index.d.ts +63 -0
  408. package/name-avatar/index.mjs +62 -0
  409. package/name-avatar/style.css +1 -0
  410. package/nav-bar/index.d.ts +24 -0
  411. package/nav-bar/index.mjs +36 -0
  412. package/nav-bar/style.css +1 -0
  413. package/nav-tab-panel/index.d.ts +30 -0
  414. package/nav-tab-panel/index.mjs +2 -0
  415. package/nav-tab-panel/style.css +1 -0
  416. package/package.json +30 -7
  417. package/page/index.d.ts +25 -0
  418. package/page/index.mjs +18 -0
  419. package/page/style.css +1 -0
  420. package/page-header/index.d.ts +39 -0
  421. package/page-header/index.mjs +26 -0
  422. package/page-header/style.css +1 -0
  423. package/page-index/index.d.ts +83 -0
  424. package/page-index/index.mjs +125 -0
  425. package/page-index/style.css +1 -0
  426. package/page-index-top/index.d.ts +39 -0
  427. package/page-index-top/index.mjs +87 -0
  428. package/page-skeleton/index.d.ts +43 -0
  429. package/page-skeleton/index.mjs +45 -0
  430. package/page-skeleton/style.css +1 -0
  431. package/page-skeleton-new/index.d.ts +63 -0
  432. package/page-skeleton-new/index.mjs +81 -0
  433. package/page-skeleton-new/style.css +1 -0
  434. package/pageable-table/index.d.ts +401 -0
  435. package/pageable-table/index.mjs +2 -0
  436. package/pageable-table/style.css +1 -0
  437. package/photo-swipe/index.d.ts +19 -0
  438. package/photo-swipe/index.mjs +2 -0
  439. package/props/cascader.d.ts +326 -0
  440. package/props/cascader.mjs +145 -0
  441. package/props/checkbox-group.d.ts +213 -0
  442. package/props/checkbox-group.mjs +83 -0
  443. package/props/checkbox.d.ts +205 -0
  444. package/props/checkbox.mjs +74 -0
  445. package/props/col.d.ts +74 -0
  446. package/props/col.mjs +32 -0
  447. package/props/common.d.ts +114 -0
  448. package/props/common.mjs +18 -0
  449. package/props/date.d.ts +336 -0
  450. package/props/date.mjs +158 -0
  451. package/props/form-item.d.ts +144 -0
  452. package/props/form-item.mjs +73 -0
  453. package/props/form.d.ts +157 -0
  454. package/props/form.mjs +89 -0
  455. package/props/image.d.ts +102 -0
  456. package/props/image.mjs +10 -0
  457. package/props/input-cron.d.ts +102 -0
  458. package/props/input-cron.mjs +16 -0
  459. package/props/input-number.d.ts +216 -0
  460. package/props/input-number.mjs +76 -0
  461. package/props/input-tag.d.ts +123 -0
  462. package/props/input-tag.mjs +33 -0
  463. package/props/input.d.ts +299 -0
  464. package/props/input.mjs +98 -0
  465. package/props/radio-group.d.ts +205 -0
  466. package/props/radio-group.mjs +84 -0
  467. package/props/rate.d.ts +211 -0
  468. package/props/rate.mjs +66 -0
  469. package/props/select.d.ts +450 -0
  470. package/props/select.mjs +218 -0
  471. package/props/slide.d.ts +235 -0
  472. package/props/slide.mjs +72 -0
  473. package/props/switch.d.ts +229 -0
  474. package/props/switch.mjs +80 -0
  475. package/props/text.d.ts +127 -0
  476. package/props/text.mjs +22 -0
  477. package/props/textarea.d.ts +266 -0
  478. package/props/textarea.mjs +82 -0
  479. package/props/time-select.d.ts +216 -0
  480. package/props/time-select.mjs +67 -0
  481. package/props/time.d.ts +304 -0
  482. package/props/time.mjs +138 -0
  483. package/props/tree-select-multiple.d.ts +324 -0
  484. package/props/tree-select-multiple.mjs +16 -0
  485. package/props/tree-select.d.ts +326 -0
  486. package/props/tree-select.mjs +25 -0
  487. package/props/tree.d.ts +76 -0
  488. package/props/tree.mjs +75 -0
  489. package/props/vue-tree-select.d.ts +458 -0
  490. package/props/vue-tree-select.mjs +213 -0
  491. package/resolver/components.d.ts +4 -0
  492. package/resolver/components.mjs +4 -0
  493. package/resolver/index.mjs +29 -0
  494. package/resolver/vite-optimize-deps-plugin.d.ts +9 -0
  495. package/resolver/vite-optimize-deps-plugin.mjs +13 -0
  496. package/sign-panel/index.d.ts +86 -0
  497. package/sign-panel/index.mjs +184 -0
  498. package/sign-panel/style.css +1 -0
  499. package/skeleton-panel/index.d.ts +35 -0
  500. package/skeleton-panel/index.mjs +39 -0
  501. package/skeleton-panel/style.css +1 -0
  502. package/split-pane/index.d.ts +107 -0
  503. package/split-pane/index.mjs +2 -0
  504. package/split-pane/style.css +1 -0
  505. package/stateful/index.d.ts +93 -0
  506. package/stateful/index.mjs +68 -0
  507. package/stateful/style.css +1 -0
  508. package/style/element-listeners.css +1 -0
  509. package/style/element-multi-instance.css +1 -0
  510. package/sub-table/index.d.ts +121 -0
  511. package/sub-table/index.mjs +2 -0
  512. package/sub-table/style.css +1 -0
  513. package/sub-table-plus/index.d.ts +121 -0
  514. package/sub-table-plus/index.mjs +2 -0
  515. package/sub-table-plus/style.css +1 -0
  516. package/swiper/index.d.ts +28 -0
  517. package/swiper/index.mjs +127 -0
  518. package/swiper/style.css +1 -0
  519. package/table-column/index.d.ts +164 -0
  520. package/table-column/index.mjs +2 -0
  521. package/table-column/style.css +1 -0
  522. package/table-column-def/index.d.ts +168 -0
  523. package/table-column-def/index.mjs +11 -0
  524. package/table-view/index.d.ts +349 -1
  525. package/table-view/index.mjs +468 -6
  526. package/table-view/style.css +1 -0
  527. package/tag-render/index.d.ts +49 -0
  528. package/tag-render/index.mjs +87 -0
  529. package/tag-render/style.css +1 -0
  530. package/text-ellipsis/index.d.ts +112 -0
  531. package/text-ellipsis/index.mjs +125 -0
  532. package/text-ellipsis/style.css +1 -0
  533. package/toolbar/index.d.ts +134 -1
  534. package/toolbar/index.mjs +1 -8
  535. package/toolbar/style.css +1 -0
  536. package/toolbar-button/index.d.ts +189 -1
  537. package/toolbar-button/index.mjs +1 -8
  538. package/toolbar-button/style.css +1 -0
  539. package/vue/directives/chat-drag.d.ts +2 -0
  540. package/vue/directives/chat-drag.mjs +12 -0
  541. package/vue/directives/click-outside.d.ts +10 -0
  542. package/vue/directives/click-outside.mjs +36 -0
  543. package/vue/directives/dialog-drag.d.ts +2 -0
  544. package/vue/directives/dialog-drag.mjs +15 -0
  545. package/vue/directives/drag-move.d.ts +10 -0
  546. package/vue/directives/drag-move.mjs +27 -0
  547. package/vue/directives/fix-fixed-column-height.d.ts +7 -0
  548. package/vue/directives/fix-fixed-column-height.mjs +20 -0
  549. package/vue/directives/index.d.ts +7 -0
  550. package/vue/directives/index.mjs +8 -0
  551. package/vue/directives/resize.d.ts +2 -0
  552. package/vue/directives/resize.mjs +12 -0
  553. package/vue/directives/scroll-bottom.d.ts +5 -0
  554. package/vue/directives/scroll-bottom.mjs +6 -0
  555. package/vue/hooks/index.d.ts +3 -0
  556. package/vue/hooks/index.mjs +4 -0
  557. package/vue/hooks/useDictionary.d.ts +60 -0
  558. package/vue/hooks/useDictionary.mjs +15 -0
  559. package/vue/hooks/useEventBus.d.ts +1 -0
  560. package/vue/hooks/useEventBus.mjs +20 -0
  561. package/vue/hooks/useVisibilityChange.d.ts +4 -0
  562. package/vue/hooks/useVisibilityChange.mjs +14 -0
  563. package/vue/index.d.ts +3 -0
  564. package/vue/index.mjs +83 -0
  565. package/vue/mixin/bus.d.ts +5 -0
  566. package/vue/mixin/bus.mjs +33 -0
  567. package/vue/mixin/dialog.d.ts +38 -0
  568. package/vue/mixin/dialog.mjs +2 -0
  569. package/vue/mixin/index.d.ts +6 -0
  570. package/vue/mixin/index.mjs +7 -0
  571. package/vue/mixin/message.d.ts +2 -0
  572. package/vue/mixin/message.mjs +27 -0
  573. package/vue/mixin/multi-items.d.ts +43 -0
  574. package/vue/mixin/multi-items.mjs +70 -0
  575. package/vue/mixin/page.d.ts +28 -0
  576. package/vue/mixin/page.mjs +38 -0
  577. package/vue/mixin/resize-mixin.d.ts +15 -0
  578. package/vue/mixin/resize-mixin.mjs +24 -0
  579. package/vue-cron/index.d.ts +192 -0
  580. package/vue-cron/index.mjs +2 -0
  581. package/vue-cron/style.css +1 -0
  582. package/vue-qr-code/index.d.ts +48 -0
  583. package/vue-qr-code/index.mjs +32 -0
  584. package/vue-tags-input/index.d.ts +374 -0
  585. package/vue-tags-input/index.mjs +351 -0
  586. package/vue-tags-input/style.css +1 -0
  587. package/vue-tree-select/index.d.ts +1535 -0
  588. package/vue-tree-select/index.mjs +2 -0
  589. package/vue-tree-select/style.css +1 -0
  590. package/vue-video-player/index.d.ts +118 -0
  591. package/vue-video-player/index.mjs +137 -0
  592. package/vue-video-player/style.css +1 -0
  593. package/watermark/index.d.ts +98 -0
  594. package/watermark/index.mjs +2 -0
  595. package/watermark/style.css +1 -0
  596. package/web-types.json +1 -1
  597. package/x-input-tag/index.d.ts +3 -0
  598. package/x-input-tag/index.mjs +233 -0
  599. package/x-input-tag/style.css +1 -0
  600. package/year-calendar/index.d.ts +100 -0
  601. package/year-calendar/index.mjs +2 -0
  602. package/year-calendar/style.css +1 -0
  603. package/chunks/5J-OUxoQ.mjs +0 -149
  604. package/chunks/8R_Eq-Q1.mjs +0 -94
  605. package/chunks/9r0_sTqG.mjs +0 -23
  606. package/chunks/B0sH1q9x.mjs +0 -43
  607. package/chunks/B7c_xqYl.mjs +0 -47
  608. package/chunks/C-lymD_X.mjs +0 -167
  609. package/chunks/CBsIU5Nz.mjs +0 -54
  610. package/chunks/CnmwUrOm.mjs +0 -35
  611. package/chunks/CoU4aVFm.mjs +0 -28
  612. package/chunks/CtXLogq9.mjs +0 -24239
  613. package/chunks/D6lrfzE7.mjs +0 -28
  614. package/chunks/DDKk9iwV.mjs +0 -92
  615. package/chunks/DF-zPBqJ.mjs +0 -32
  616. package/chunks/DPkBzek6.mjs +0 -28
  617. package/chunks/DQS-CovH.mjs +0 -74
  618. package/chunks/DuPXiRRS.mjs +0 -47
  619. package/chunks/EReAG82c.mjs +0 -4
  620. package/chunks/MyHLh1cw.mjs +0 -32
  621. package/chunks/TVsbSR1G.mjs +0 -35
  622. package/chunks/nNDPU9_n.mjs +0 -36
  623. package/constants.d.ts +0 -7
  624. package/constants.mjs +0 -4
  625. package/form-check-box-group/index.d.ts +0 -119
  626. package/form-check-box-group/index.mjs +0 -2
  627. package/form-item-x/index.d.ts +0 -75
  628. package/form-item-x/index.mjs +0 -2
  629. package/input/style.css +0 -1
  630. package/resolver.mjs +0 -81
  631. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,4085 @@
1
+ import { u as e } from "./ClVh1Lek.mjs";
2
+ import { def as t } from "../helper/avue.mjs";
3
+ import { t as n } from "./B1MSrc6f.mjs";
4
+ import { t as r } from "./B24kbvxB.mjs";
5
+ import { avueConfigContextKey as i } from "../constants/index.mjs";
6
+ import { t as a } from "./DTeHffqJ.mjs";
7
+ import { C as o, T as s, _ as c, a as l, b as u, c as d, d as f, g as p, h as m, l as h, m as g, n as ee, p as te, t as ne, v as _, x as re, y as v } from "./CXHJqvbJ.mjs";
8
+ import { a as ie, c as ae, i as oe, l as se, n as ce, o as le, r as y, s as ue, t as de, u as fe } from "./CX7Oiw5N.mjs";
9
+ import pe from "../fy-array/index.mjs";
10
+ import me from "../fy-cascader/index.mjs";
11
+ import he from "../fy-checkbox/index.mjs";
12
+ import ge from "../fy-date/index.mjs";
13
+ import _e from "../fy-input/index.mjs";
14
+ import { a as b, i as ve, n as ye, r as be, t as xe } from "./C9uwTpHO.mjs";
15
+ import { t as Se } from "./CsiD_AYs.mjs";
16
+ import Ce from "../icon-temp/index.mjs";
17
+ import we from "../fy-rate/index.mjs";
18
+ import Te from "../fy-input-color/index.mjs";
19
+ import Ee from "../fy-input-icon/index.mjs";
20
+ import De from "../fy-input-map/index.mjs";
21
+ import Oe from "../fy-input-number/index.mjs";
22
+ import ke from "../fy-radio/index.mjs";
23
+ import Ae from "../fy-slider/index.mjs";
24
+ import je from "../fy-switch/index.mjs";
25
+ import Me from "../fy-time/index.mjs";
26
+ import Ne from "../fy-title/index.mjs";
27
+ import { t as Pe } from "./DXi5_gZb.mjs";
28
+ import Fe from "../fy-input-tree/index.mjs";
29
+ import { ElButtonGroup as Ie, ElCard as Le, ElCheckbox as Re, ElCol as x, ElCollapse as ze, ElCollapseItem as Be, ElDrawer as S, ElDropdown as Ve, ElDropdownItem as He, ElDropdownMenu as Ue, ElEmpty as We, ElForm as Ge, ElFormItem as C, ElLink as Ke, ElLoadingDirective as qe, ElPagination as Je, ElRow as Ye, ElTabPane as Xe, ElTable as Ze, ElTableColumn as w, ElTabs as Qe, ElTag as $e, ElTooltip as et } from "element-plus/es";
30
+ import "element-plus/es/components/base/style/css";
31
+ import { Fragment as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as A, createTextVNode as j, createVNode as M, defineAsyncComponent as tt, guardReactiveProps as N, mergeProps as P, normalizeClass as F, normalizeProps as I, normalizeStyle as L, openBlock as R, renderList as z, renderSlot as B, resolveComponent as nt, resolveDirective as V, resolveDynamicComponent as H, toDisplayString as U, toHandlers as rt, vShow as it, withCtx as W, withDirectives as G, withKeys as at, withModifiers as K } from "vue";
32
+ import { isBlank as q } from "@web-utils/core";
33
+ import "element-plus/es/components/card/style/css";
34
+ import "element-plus/es/components/row/style/css";
35
+ import "element-plus/es/components/col/style/css";
36
+ import "element-plus/es/components/loading/style/css";
37
+ import "element-plus/es/components/tooltip/style/css";
38
+ import "element-plus/es/components/drawer/style/css";
39
+ import "element-plus/es/components/table/style/css";
40
+ import "element-plus/es/components/checkbox/style/css";
41
+ import "element-plus/es/components/table-column/style/css";
42
+ import "element-plus/es/components/pagination/style/css";
43
+ import "element-plus/es/components/empty/style/css";
44
+ import "element-plus/es/components/form/style/css";
45
+ import "element-plus/es/components/collapse/style/css";
46
+ import "element-plus/es/components/collapse-item/style/css";
47
+ import "element-plus/es/components/form-item/style/css";
48
+ import "element-plus/es/components/link/style/css";
49
+ import "element-plus/es/components/button-group/style/css";
50
+ import { formatDate as J } from "@web-utils/integrations/dayjs";
51
+ import "element-plus/es/components/dropdown/style/css";
52
+ import "element-plus/es/components/dropdown-menu/style/css";
53
+ import "element-plus/es/components/dropdown-item/style/css";
54
+ import "element-plus/es/components/tag/style/css";
55
+ import "element-plus/es/components/tabs/style/css";
56
+ import "element-plus/es/components/tab-pane/style/css";
57
+ import "../fy-form/style.css";
58
+ //#region src/components/avue/fy-from/components/FormGroup.vue
59
+ var ot = {
60
+ name: "FormGroup",
61
+ props: {
62
+ arrow: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ collapse: {
67
+ type: Boolean,
68
+ default: !0
69
+ },
70
+ header: {
71
+ type: Boolean,
72
+ default: !0
73
+ },
74
+ icon: { type: String },
75
+ display: {
76
+ type: Boolean,
77
+ default: !0
78
+ },
79
+ label: { type: String }
80
+ },
81
+ emits: ["change"],
82
+ data() {
83
+ return { activeName: "" };
84
+ },
85
+ computed: {
86
+ text() {
87
+ return +!!this.collapse;
88
+ },
89
+ isHeader() {
90
+ return this.$slots.header && this.header || (this.label || this.icon) && this.header;
91
+ }
92
+ },
93
+ watch: { text(e) {
94
+ this.activeName = [e];
95
+ } },
96
+ created() {
97
+ this.activeName = [this.text];
98
+ },
99
+ methods: { handleChange(e) {
100
+ this.$emit("change", e);
101
+ } }
102
+ }, st = { class: "avue-group__header" }, ct = {
103
+ key: 1,
104
+ class: "avue-group__title"
105
+ };
106
+ function lt(e, t, n, r, i, a) {
107
+ let o = Be, s = ze;
108
+ return n.display ? (R(), O("div", {
109
+ key: 0,
110
+ class: F(["avue-group", {
111
+ "avue-group--header": !a.isHeader,
112
+ "avue-group__arrow": !n.arrow
113
+ }])
114
+ }, [B(e.$slots, "tabs"), M(s, {
115
+ modelValue: i.activeName,
116
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => i.activeName = e),
117
+ value: a.text,
118
+ onChange: a.handleChange
119
+ }, {
120
+ default: W(() => [M(o, {
121
+ name: 1,
122
+ disabled: !n.arrow
123
+ }, {
124
+ title: W(() => [k("div", st, [B(e.$slots, "header", {}, () => [n.icon ? (R(), O("i", {
125
+ key: 0,
126
+ class: F([n.icon, "avue-group__icon"])
127
+ }, null, 2)) : D("v-if", !0), n.label ? (R(), O("h1", ct, U(n.label), 1)) : D("v-if", !0)])])]),
128
+ default: W(() => [B(e.$slots, "default")]),
129
+ _: 3
130
+ }, 8, ["disabled"])]),
131
+ _: 3
132
+ }, 8, [
133
+ "modelValue",
134
+ "value",
135
+ "onChange"
136
+ ])], 2)) : D("v-if", !0);
137
+ }
138
+ var ut = /* @__PURE__ */ n(ot, [["render", lt]]), dt = {
139
+ name: "FyFormMenu",
140
+ inject: ["formSafe"],
141
+ computed: {
142
+ menuSpan() {
143
+ return this.formSafe.parentOption.menuSpan || 24;
144
+ },
145
+ styleName() {
146
+ return this.menuSpan === 24 ? {} : { padding: 0 };
147
+ }
148
+ }
149
+ };
150
+ function ft(e, t, n, r, i, o) {
151
+ let s = a, c = C, l = x;
152
+ return o.formSafe.parentOption.menuBtn === !1 ? D("v-if", !0) : (R(), E(l, {
153
+ key: 0,
154
+ span: o.menuSpan,
155
+ md: o.menuSpan,
156
+ style: L(o.styleName),
157
+ class: F([
158
+ "menu",
159
+ o.formSafe.menuPosition,
160
+ "no-print"
161
+ ])
162
+ }, {
163
+ default: W(() => [M(c, {
164
+ "label-width": "0px",
165
+ style: { "text-align": "center" }
166
+ }, {
167
+ default: W(() => [
168
+ o.formSafe.isMock ? (R(), E(s, {
169
+ key: 0,
170
+ type: "primary",
171
+ size: o.formSafe.controlSize,
172
+ disabled: o.formSafe.allDisabled,
173
+ onClick: o.formSafe.handleMock
174
+ }, {
175
+ icon: W(() => [...t[0] || (t[0] = [k("i", { class: "el-icon-edit-outline" }, null, -1)])]),
176
+ default: W(() => [j(U(o.formSafe.parentOption.mockText || "模拟") + " ", 1)]),
177
+ _: 1
178
+ }, 8, [
179
+ "size",
180
+ "disabled",
181
+ "onClick"
182
+ ])) : D("v-if", !0),
183
+ o.formSafe.isPrint ? (R(), E(s, {
184
+ key: 1,
185
+ type: "primary",
186
+ size: o.formSafe.controlSize,
187
+ icon: "el-icon-printer",
188
+ disabled: o.formSafe.allDisabled,
189
+ onClick: o.formSafe.handlePrint
190
+ }, {
191
+ icon: W(() => [...t[1] || (t[1] = [k("i", { class: "el-icon-printer" }, null, -1)])]),
192
+ default: W(() => [j(U(o.formSafe.parentOption.printText || "打印") + " ", 1)]),
193
+ _: 1
194
+ }, 8, [
195
+ "size",
196
+ "disabled",
197
+ "onClick"
198
+ ])) : D("v-if", !0),
199
+ o.formSafe.parentOption.submitBtn === !1 ? D("v-if", !0) : (R(), E(s, {
200
+ key: 2,
201
+ type: "primary",
202
+ size: o.formSafe.controlSize,
203
+ loading: o.formSafe.allDisabled,
204
+ onClick: o.formSafe.submit
205
+ }, {
206
+ icon: W(() => [k("i", { class: F(o.formSafe.parentOption.submitIcon || "el-icon-check") }, null, 2)]),
207
+ default: W(() => [j(U(o.formSafe.parentOption.submitText || "提交") + " ", 1)]),
208
+ _: 1
209
+ }, 8, [
210
+ "size",
211
+ "loading",
212
+ "onClick"
213
+ ])),
214
+ o.formSafe.parentOption.emptyBtn === !1 ? D("v-if", !0) : (R(), E(s, {
215
+ key: 3,
216
+ size: o.formSafe.controlSize,
217
+ disabled: o.formSafe.allDisabled,
218
+ onClick: o.formSafe.resetForm
219
+ }, {
220
+ icon: W(() => [k("i", { class: F(o.formSafe.parentOption.emptyIcon || "el-icon-delete") }, null, 2)]),
221
+ default: W(() => [j(U(o.formSafe.parentOption.emptyText || "清空") + " ", 1)]),
222
+ _: 1
223
+ }, 8, [
224
+ "size",
225
+ "disabled",
226
+ "onClick"
227
+ ])),
228
+ B(e.$slots, "menuForm", {
229
+ disabled: o.formSafe.allDisabled,
230
+ size: o.formSafe.controlSize
231
+ })
232
+ ]),
233
+ _: 3
234
+ })]),
235
+ _: 3
236
+ }, 8, [
237
+ "span",
238
+ "md",
239
+ "style",
240
+ "class"
241
+ ]));
242
+ }
243
+ var pt = /* @__PURE__ */ n(dt, [["render", ft]]), mt = {
244
+ name: "DialogFilter",
245
+ inject: ["crud"],
246
+ data() {
247
+ return {
248
+ box: !1,
249
+ columnObj: {},
250
+ symbolDic: [
251
+ {
252
+ label: "=",
253
+ value: "="
254
+ },
255
+ {
256
+ label: "≠",
257
+ value: "≠"
258
+ },
259
+ {
260
+ label: "like",
261
+ value: "like"
262
+ },
263
+ {
264
+ label: ">",
265
+ value: ">"
266
+ },
267
+ {
268
+ label: "≥",
269
+ value: "≥"
270
+ },
271
+ {
272
+ label: "<",
273
+ value: "<"
274
+ },
275
+ {
276
+ label: "≤",
277
+ value: "≤"
278
+ },
279
+ {
280
+ label: "∈",
281
+ value: "∈"
282
+ }
283
+ ],
284
+ list: [],
285
+ columnOption: {}
286
+ };
287
+ },
288
+ methods: {
289
+ handleShow() {
290
+ this.getColumnOption(), this.box = !0;
291
+ },
292
+ getColumnOption() {
293
+ let e = [];
294
+ l(this.crud.propOption).forEach((t) => {
295
+ t.showColumn !== !1 && e.push(Object.assign(t, { value: t.prop }));
296
+ }), this.columnOption = e, this.columnObj = this.columnOption[0];
297
+ },
298
+ handleDelete(e) {
299
+ this.list.splice(e, 1);
300
+ },
301
+ handleClear() {
302
+ this.list = [];
303
+ },
304
+ handleValueClear() {
305
+ this.list.forEach((e) => {
306
+ e.value = "";
307
+ });
308
+ },
309
+ handleSubmit() {
310
+ let e = [];
311
+ this.list.forEach((t) => {
312
+ e.push([
313
+ t.text,
314
+ t.symbol,
315
+ t.value
316
+ ]);
317
+ }), this.crud.$emit("filter", e), this.box = !1;
318
+ },
319
+ handleChange(e) {
320
+ this.list[e].value = "";
321
+ },
322
+ handleAdd() {
323
+ let e = this.columnObj.prop;
324
+ this.list.push({
325
+ text: e,
326
+ value: "",
327
+ symbol: this.symbolDic[0].value
328
+ });
329
+ }
330
+ }
331
+ }, ht = { key: 0 }, gt = { class: "avue-crud__filter-menu" };
332
+ function _t(e, t, n, r, i, o) {
333
+ let s = a, c = Ie, l = xe, u = _e, d = x, f = Ye, p = S;
334
+ return i.box ? (R(), O("div", ht, [M(p, {
335
+ modelValue: i.box,
336
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => i.box = e),
337
+ class: F([["avue-crud__dialog", "avue-crud__filter"], "avue-dialog"]),
338
+ "lock-scroll": "",
339
+ "append-to-body": "",
340
+ title: "过滤条件",
341
+ size: o.crud.isMobile ? "100%" : "60%"
342
+ }, {
343
+ default: W(() => [M(f, { span: 24 }, {
344
+ default: W(() => [
345
+ k("div", gt, [M(c, null, {
346
+ default: W(() => [
347
+ M(s, {
348
+ type: "primary",
349
+ size: o.crud.isMediumSize,
350
+ onClick: o.handleAdd
351
+ }, {
352
+ default: W(() => [...t[2] || (t[2] = [j("新增条件", -1)])]),
353
+ _: 1
354
+ }, 8, ["size", "onClick"]),
355
+ M(s, {
356
+ type: "primary",
357
+ size: o.crud.isMediumSize,
358
+ onClick: o.handleClear
359
+ }, {
360
+ default: W(() => [...t[3] || (t[3] = [j("清空条件", -1)])]),
361
+ _: 1
362
+ }, 8, ["size", "onClick"]),
363
+ M(s, {
364
+ type: "primary",
365
+ size: o.crud.isMediumSize,
366
+ onClick: o.handleValueClear
367
+ }, {
368
+ default: W(() => [...t[4] || (t[4] = [j("清空数据", -1)])]),
369
+ _: 1
370
+ }, 8, ["size", "onClick"])
371
+ ]),
372
+ _: 1
373
+ })]),
374
+ (R(!0), O(T, null, z(i.list, (e, t) => (R(), E(d, {
375
+ key: t,
376
+ md: 12,
377
+ xs: 24,
378
+ sm: 12,
379
+ class: "avue-crud__filter-item"
380
+ }, {
381
+ default: W(() => [
382
+ M(l, {
383
+ modelValue: e.text,
384
+ "onUpdate:modelValue": (t) => e.text = t,
385
+ dic: i.columnOption,
386
+ clearable: !1,
387
+ size: o.crud.isMediumSize,
388
+ class: "avue-crud__filter-label",
389
+ onChange: (e) => o.handleChange(t)
390
+ }, null, 8, [
391
+ "modelValue",
392
+ "onUpdate:modelValue",
393
+ "dic",
394
+ "size",
395
+ "onChange"
396
+ ]),
397
+ M(l, {
398
+ modelValue: e.symbol,
399
+ "onUpdate:modelValue": (t) => e.symbol = t,
400
+ class: "avue-crud__filter-symbol",
401
+ dic: i.symbolDic,
402
+ clearable: !1,
403
+ size: o.crud.isMediumSize
404
+ }, null, 8, [
405
+ "modelValue",
406
+ "onUpdate:modelValue",
407
+ "dic",
408
+ "size"
409
+ ]),
410
+ M(u, {
411
+ modelValue: e.value,
412
+ "onUpdate:modelValue": (t) => e.value = t,
413
+ size: o.crud.isMediumSize,
414
+ class: "avue-crud__filter-value"
415
+ }, null, 8, [
416
+ "modelValue",
417
+ "onUpdate:modelValue",
418
+ "size"
419
+ ]),
420
+ M(s, {
421
+ type: "danger",
422
+ class: "avue-crud__filter-icon",
423
+ circle: "",
424
+ icon: "el-icon-minus",
425
+ onClick: (e) => o.handleDelete(t)
426
+ }, null, 8, ["onClick"])
427
+ ]),
428
+ _: 2
429
+ }, 1024))), 128)),
430
+ M(d, {
431
+ span: 24,
432
+ class: "avue-form__menu avue-form__menu--right"
433
+ }, {
434
+ default: W(() => [M(s, {
435
+ type: "primary",
436
+ size: o.crud.isMediumSize,
437
+ onClick: o.handleSubmit
438
+ }, {
439
+ default: W(() => [...t[5] || (t[5] = [j("确 定", -1)])]),
440
+ _: 1
441
+ }, 8, ["size", "onClick"]), M(s, {
442
+ size: o.crud.isMediumSize,
443
+ onClick: t[0] || (t[0] = (e) => i.box = !1)
444
+ }, {
445
+ default: W(() => [...t[6] || (t[6] = [j("取 消", -1)])]),
446
+ _: 1
447
+ }, 8, ["size"])]),
448
+ _: 1
449
+ })
450
+ ]),
451
+ _: 1
452
+ })]),
453
+ _: 1
454
+ }, 8, ["modelValue", "size"])])) : D("v-if", !0);
455
+ }
456
+ var vt = /* @__PURE__ */ n(mt, [["render", _t]]), Y = (e = {}, t = {}, n = {}, r = []) => {
457
+ let i = e[t.prop], a = t.type, o = t.separator;
458
+ if (t.bind && (i = f(e, t.bind)), q(i)) i = "";
459
+ else {
460
+ let e = s.includes(t.type) && t.multiple, l = u.includes(t.type);
461
+ if ((["string", "number"].includes(t.dataType) || e || l) && !Array.isArray(i) && (i = `${i}`.split(o || ","), t.dataType === "number" && (i = c(i))), v.includes(a)) i = Array.isArray(i) ? i.join(o || " | ") : i.split(o || ",").join(o || " | ");
462
+ else if (a === "password") i = te(i, "*");
463
+ else if (re.includes(a) && t.format) {
464
+ let e = t.format.replace("dd", "DD").replace("yyyy", "YYYY"), n = J(Date.now(), "YYYY-MM-DD");
465
+ if (a.indexOf("range") !== -1) {
466
+ let r = i[0] || "", o = i[1] || "";
467
+ a === "timerange" && r.length <= 8 && o.length < 8 && (r = `${n} ${r}`, o = `${n} ${o}`), i = [J(r, e), J(o, e)].join(t.separator || "~");
468
+ } else a === "time" && i.length <= 8 && (i = `${n} ${i}`), i = J(i, e);
469
+ }
470
+ i = h(r, i, t.props || n.props);
471
+ }
472
+ return t.formatter && typeof t.formatter == "function" && (i = t.formatter(e, e[t.prop], i, t)), i;
473
+ }, yt = {
474
+ name: "DialogExcel",
475
+ inject: ["crud"],
476
+ data() {
477
+ return {
478
+ option: {},
479
+ columnOption: {},
480
+ box: !1,
481
+ form: { name: this.crud.tableOption.title }
482
+ };
483
+ },
484
+ methods: {
485
+ handleShow() {
486
+ this.getColumnOption(), this.getOption(), this.box = !0;
487
+ },
488
+ handleSubmit() {
489
+ this.$Export.excel({
490
+ title: this.form.name,
491
+ columns: this.getColumn(),
492
+ data: this.handleSum()
493
+ }), this.box = !1;
494
+ },
495
+ handleSum() {
496
+ let e = this.crud.tableOption, t = this.crud.propOption, n = this.form.type ? this.crud.list : this.crud.tableSelect, r = [];
497
+ return this.form.params.includes("data") && n.forEach((n) => {
498
+ let i = l(n);
499
+ t.forEach((t) => {
500
+ let n = t.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[t.prop] : this.crud.DIC[t.prop];
501
+ i[t.prop] = Y(i, t, e, n);
502
+ }), r.push(i);
503
+ }), this.form.params.includes("sum") && e.showSummary && r.push(this.crud.sumsList), r;
504
+ },
505
+ getOption() {
506
+ this.option = {
507
+ submitBtn: !1,
508
+ emptyBtn: !1,
509
+ column: [
510
+ {
511
+ label: "文件名",
512
+ prop: "name",
513
+ span: 24
514
+ },
515
+ {
516
+ label: "选择数据",
517
+ prop: "type",
518
+ span: 24,
519
+ type: "select",
520
+ dicData: [{
521
+ label: "当前数据(当前页全部的数据)",
522
+ value: !0
523
+ }, {
524
+ label: "选中的数据(当前页选中的数据)",
525
+ disabled: this.crud.tableOption.selection !== !0,
526
+ value: !1
527
+ }]
528
+ },
529
+ {
530
+ label: "选择字段",
531
+ prop: "prop",
532
+ type: "tree",
533
+ multiple: !0,
534
+ checkStrictly: !0,
535
+ span: 24,
536
+ props: { value: "prop" },
537
+ dicData: this.columnOption
538
+ },
539
+ {
540
+ label: "参数设置",
541
+ prop: "params",
542
+ type: "checkbox",
543
+ span: 24,
544
+ value: ["header", "data"].concat((() => {
545
+ let e = [];
546
+ return this.crud.isHeader && e.push("headers"), this.crud.isShowSummary && e.push("sum"), e;
547
+ })()),
548
+ dicData: [{
549
+ label: "表头",
550
+ disabled: !0,
551
+ value: "header"
552
+ }, {
553
+ label: "数据源",
554
+ value: "data"
555
+ }].concat((() => {
556
+ let e = [];
557
+ return e.push({
558
+ label: "复杂表头",
559
+ value: "headers",
560
+ disabled: !this.crud.isHeader
561
+ }), e.push({
562
+ label: "合计统计",
563
+ value: "sum",
564
+ disabled: !this.crud.isShowSummary
565
+ }), e;
566
+ })())
567
+ }
568
+ ]
569
+ }, this.form.type = this.crud.selectLen === 0;
570
+ },
571
+ getColumnOption() {
572
+ let e = l(this.crud.columnOption), t = [], n = (e = []) => {
573
+ e.forEach((r, i) => {
574
+ let a = r.children;
575
+ a && !Array.isArray(a) ? delete r.children : r.showColumn === !1 ? e.splice(i, 1) : (t.push(r.prop), r.children && n(a));
576
+ });
577
+ };
578
+ n(e), this.columnOption = e, this.form.prop = t;
579
+ },
580
+ getColumn() {
581
+ let e = l(this.columnOption), t = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
582
+ if (!this.form.params) return [];
583
+ if (this.form.params.includes("headers")) {
584
+ let n = (e = []) => {
585
+ e.forEach((r, i) => {
586
+ t.includes(r.prop) ? r.children && n(r.children) : e.splice(i, 1);
587
+ });
588
+ };
589
+ return n(e), e;
590
+ } else {
591
+ let n = [], r = (e = []) => {
592
+ e.forEach((e) => {
593
+ e.children ? r(e.children) : t.includes(e.prop) && n.push(e);
594
+ });
595
+ };
596
+ return r(e), n;
597
+ }
598
+ }
599
+ }
600
+ }, bt = { key: 0 }, xt = { class: "dialog-footer" };
601
+ function St(e, t, n, i, o, s) {
602
+ let c = $, l = a, u = r;
603
+ return o.box ? (R(), O("div", bt, [M(u, {
604
+ modelValue: o.box,
605
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => o.box = e),
606
+ title: "导出",
607
+ "lock-scroll": "",
608
+ class: "avue-dialog",
609
+ width: s.crud.isMobile ? "100%" : "30%"
610
+ }, {
611
+ footer: W(() => [k("span", xt, [M(l, {
612
+ type: "primary",
613
+ size: s.crud.isMediumSize,
614
+ onClick: s.handleSubmit
615
+ }, {
616
+ default: W(() => [...t[3] || (t[3] = [j("确定", -1)])]),
617
+ _: 1
618
+ }, 8, ["size", "onClick"]), M(l, {
619
+ size: s.crud.isMediumSize,
620
+ onClick: t[1] || (t[1] = (e) => o.box = !1)
621
+ }, {
622
+ default: W(() => [...t[4] || (t[4] = [j("取消", -1)])]),
623
+ _: 1
624
+ }, 8, ["size"])])]),
625
+ default: W(() => [M(c, {
626
+ modelValue: o.form,
627
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => o.form = e),
628
+ option: o.option
629
+ }, null, 8, ["modelValue", "option"])]),
630
+ _: 1
631
+ }, 8, ["modelValue", "width"])])) : D("v-if", !0);
632
+ }
633
+ var Ct = /* @__PURE__ */ n(yt, [["render", St]]), X = {
634
+ menuWidth: 220,
635
+ menuFixed: "right",
636
+ menuXsWidth: 100,
637
+ menuAlign: "center",
638
+ menuHeaderAlign: "center",
639
+ headerAlign: "left",
640
+ cancelBtnIcon: "el-icon-circle-close",
641
+ viewBtnIcon: "el-icon-view",
642
+ editBtnIcon: "el-icon-edit",
643
+ copyBtnIcon: "el-icon-document-add",
644
+ addBtnIcon: "el-icon-plus",
645
+ printBtnIcon: "el-icon-printer",
646
+ excelBtnIcon: "el-icon-download",
647
+ delBtnIcon: "el-icon-delete",
648
+ searchBtnIcon: "el-icon-search",
649
+ emptyBtnIcon: "el-icon-delete",
650
+ saveBtnIcon: "el-icon-circle-plus-outline",
651
+ updateBtnIcon: "el-icon-circle-check",
652
+ columnBtnIcon: "el-icon-s-operation",
653
+ filterBtnIcon: "el-icon-tickets",
654
+ refreshBtnIcon: "el-icon-refresh",
655
+ viewBtn: !1,
656
+ editBtn: !0,
657
+ copyBtn: !1,
658
+ cancelBtn: !0,
659
+ addBtn: !0,
660
+ addRowBtn: !1,
661
+ printBtn: !1,
662
+ excelBtn: !1,
663
+ delBtn: !0,
664
+ cellBtn: !1,
665
+ dateBtn: !1,
666
+ updateBtn: !0,
667
+ saveBtn: !0,
668
+ refreshBtn: !0,
669
+ columnBtn: !0,
670
+ filterBtn: !1,
671
+ queryBtn: !0,
672
+ menuBtn: !1,
673
+ searchBtn: !0,
674
+ clearBtn: !0,
675
+ selectClearBtn: !0,
676
+ searchShow: !0,
677
+ tip: !0,
678
+ dialogWidth: "60%",
679
+ dialogDrag: !1,
680
+ formFullscreen: !1,
681
+ pageBackground: !0,
682
+ page: !0,
683
+ menu: !0,
684
+ indexLabel: "#",
685
+ indexWidth: 50,
686
+ indexFixed: "left",
687
+ selectionWidth: 50,
688
+ selectionFixed: "left",
689
+ expandWidth: 60,
690
+ expandFixed: "left",
691
+ filterMultiple: !0,
692
+ calcHeight: 300,
693
+ width: "100%",
694
+ searchGutter: 20,
695
+ searchLabelWidth: 80,
696
+ searchSpan: 6,
697
+ dropRowClass: ".el-table__body-wrapper > table > tbody",
698
+ dropColClass: ".el-table__header-wrapper tr",
699
+ ghostClass: "avue-crud__ghost"
700
+ }, wt = {
701
+ name: "DialogColumn",
702
+ inject: ["crud"],
703
+ data() {
704
+ return {
705
+ data: [],
706
+ columnBox: !1
707
+ };
708
+ },
709
+ computed: { defaultColumn() {
710
+ return [
711
+ {
712
+ label: "隐藏",
713
+ prop: "hide"
714
+ },
715
+ {
716
+ label: "冻结",
717
+ prop: "fixed"
718
+ },
719
+ {
720
+ label: "过滤",
721
+ prop: "filters"
722
+ },
723
+ {
724
+ label: "排序",
725
+ prop: "sortable"
726
+ },
727
+ {
728
+ label: "序号",
729
+ prop: "index",
730
+ hide: !0
731
+ },
732
+ {
733
+ label: "宽度",
734
+ prop: "width",
735
+ hide: !0
736
+ }
737
+ ];
738
+ } },
739
+ methods: {
740
+ handleShow() {
741
+ this.data = [], this.crud.propOption.forEach((e) => {
742
+ e.showColumn !== !1 && this.data.push(e);
743
+ }), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
744
+ },
745
+ handleChange(e) {
746
+ ["hide", "filters"].includes(e) && this.crud.refreshTable();
747
+ },
748
+ rowDrop() {
749
+ let e = this.$refs.table.$el.querySelectorAll(X.dropRowClass)[0];
750
+ this.crud.tableDrop("column", e, (e) => {
751
+ let t = e.oldIndex, n = e.newIndex;
752
+ this.crud.headerSort(t, n), this.crud.refreshTable(() => this.rowDrop());
753
+ });
754
+ }
755
+ }
756
+ }, Tt = { key: 0 };
757
+ function Et(e, t, n, r, i, a) {
758
+ let o = w, s = Re, c = Ze, l = S;
759
+ return i.columnBox ? (R(), O("div", Tt, [M(l, {
760
+ modelValue: i.columnBox,
761
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => i.columnBox = e),
762
+ class: "avue-crud__dialog avue-crud__column avue-dialog",
763
+ "lock-scroll": "",
764
+ "append-to-body": "",
765
+ title: "列显隐",
766
+ size: a.crud.isMobile ? "100%" : "40%"
767
+ }, {
768
+ default: W(() => [M(c, {
769
+ ref: "table",
770
+ data: i.data,
771
+ height: "100%",
772
+ border: ""
773
+ }, {
774
+ default: W(() => [M(o, {
775
+ key: "label",
776
+ align: "center",
777
+ width: "100",
778
+ "header-align": "center",
779
+ prop: "label",
780
+ label: "列名"
781
+ }), (R(!0), O(T, null, z(a.defaultColumn, (e, t) => (R(), O(T, null, [e.hide === !0 ? D("v-if", !0) : (R(), E(o, {
782
+ key: t,
783
+ label: e.label,
784
+ prop: e.prop,
785
+ align: "center",
786
+ "header-align": "center"
787
+ }, {
788
+ default: W(({ row: t }) => [M(s, {
789
+ modelValue: a.crud.objectOption[t.prop][e.prop],
790
+ "onUpdate:modelValue": (n) => a.crud.objectOption[t.prop][e.prop] = n,
791
+ onChange: (t) => a.handleChange(e.prop)
792
+ }, null, 8, [
793
+ "modelValue",
794
+ "onUpdate:modelValue",
795
+ "onChange"
796
+ ])]),
797
+ _: 2
798
+ }, 1032, ["label", "prop"]))], 64))), 256))]),
799
+ _: 1
800
+ }, 8, ["data"])]),
801
+ _: 1
802
+ }, 8, ["modelValue", "size"])])) : D("v-if", !0);
803
+ }
804
+ var Dt = /* @__PURE__ */ n(wt, [["render", Et]]), Ot = {
805
+ name: "FyDialogForm",
806
+ components: { ElementDialog: r },
807
+ inject: ["crud"],
808
+ data() {
809
+ return {
810
+ disabled: !1,
811
+ boxType: "",
812
+ fullscreen: !1,
813
+ size: null,
814
+ boxVisible: !1
815
+ };
816
+ },
817
+ computed: {
818
+ option() {
819
+ let e = l(this.crud.tableOption);
820
+ return e.boxType = this.boxType, e.column = l(this.crud.propOption), e.menuBtn = !1, this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (e.detail = !0), e.emptyBtn = e.cancelBtn, e.emptyText = this.crud.menuIcon("cancelBtn"), e.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), q(e.dicFlag) || e.column.forEach((t) => {
821
+ t.boxType = this.boxType, t.dicFlag = t.dicFlag || e.dicFlag;
822
+ }), e;
823
+ },
824
+ isView() {
825
+ return this.boxType === "view";
826
+ },
827
+ isAdd() {
828
+ return this.boxType === "add";
829
+ },
830
+ isEdit() {
831
+ return this.boxType === "edit";
832
+ },
833
+ direction() {
834
+ return this.crud.tableOption.dialogDirection;
835
+ },
836
+ width() {
837
+ return g(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${X.dialogWidth}`);
838
+ },
839
+ dialogType() {
840
+ return this.isDrawer ? S : r;
841
+ },
842
+ dialogTop() {
843
+ return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
844
+ },
845
+ isDrawer() {
846
+ return this.crud.tableOption.dialogType === "drawer";
847
+ },
848
+ params() {
849
+ return this.isDrawer ? {
850
+ size: this.fullscreen ? "100%" : this.width,
851
+ direction: this.crud.tableOption.dialogDirection
852
+ } : {
853
+ width: this.width,
854
+ fullscreen: this.fullscreen
855
+ };
856
+ },
857
+ dialogTitle() {
858
+ let e = `${this.boxType}`;
859
+ return q(this.boxType) ? "" : this.crud.tableOption[`${e}Title`] || {
860
+ tipStartTitle: "当前表格已选择",
861
+ tipEndTitle: "项",
862
+ editTitle: "编 辑",
863
+ copyTitle: "复 制",
864
+ addTitle: "新 增",
865
+ viewTitle: "查 看",
866
+ filterTitle: "过滤条件",
867
+ showTitle: "列显隐"
868
+ }[`${e}Title`];
869
+ },
870
+ dialogMenuPosition() {
871
+ return this.crud.option.dialogMenuPosition || "right";
872
+ }
873
+ },
874
+ methods: {
875
+ optVal: g,
876
+ uploadFun: _,
877
+ submit() {
878
+ this.$refs.tableForm.submit();
879
+ },
880
+ reset() {
881
+ this.$refs.tableForm.resetForm(!1);
882
+ },
883
+ getSlotName(e) {
884
+ return e.replace("Form", "");
885
+ },
886
+ initFun() {
887
+ [
888
+ "clearValidate",
889
+ "validate",
890
+ "resetForm",
891
+ "validateField"
892
+ ].forEach((e) => {
893
+ var t;
894
+ this.crud[e] = (t = this.$refs.tableForm) == null ? void 0 : t[e];
895
+ });
896
+ },
897
+ handleChange() {
898
+ this.crud.setVal();
899
+ },
900
+ handleTabClick(e, t) {
901
+ this.crud.$emit("tab-click", e, t);
902
+ },
903
+ handleFullScreen() {
904
+ this.isDrawer && (q(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
905
+ },
906
+ handleError(e) {
907
+ this.crud.$emit("error", e);
908
+ },
909
+ handleSubmit(e, t) {
910
+ this.isAdd ? this.rowSave(t) : this.isEdit && this.rowUpdate(t);
911
+ },
912
+ rowSave(e) {
913
+ this.crud.$emit("row-save", d(this.crud.tableForm, ["$"]), this.closeDialog, e);
914
+ },
915
+ rowUpdate(e) {
916
+ this.crud.$emit("row-update", d(this.crud.tableForm, ["$"]), this.crud.tableIndex, this.closeDialog, e);
917
+ },
918
+ closeDialog(e) {
919
+ e = l(e), e && (() => {
920
+ if (this.isEdit) {
921
+ let { parentList: t, index: n } = this.crud.findData(e[this.crud.rowKey]);
922
+ if (t) {
923
+ let r = t.splice(n, 1)[0];
924
+ e[this.crud.childrenKey] = r[this.crud.childrenKey], t.splice(n, 0, e);
925
+ }
926
+ } else if (this.isAdd) {
927
+ let { item: t } = this.crud.findData(e[this.crud.rowParentKey]);
928
+ t ? (t[this.crud.childrenKey] || (t[this.crud.childrenKey] = []), this.crud.tableOption.lazy && (t[this.crud.hasChildrenKey] = !0), t[this.crud.childrenKey].push(e)) : this.crud.list.push(e);
929
+ }
930
+ })(), this.hide();
931
+ },
932
+ hide(e) {
933
+ let t = () => {
934
+ e == null || e(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
935
+ };
936
+ typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(t, this.boxType) : t();
937
+ },
938
+ show(e) {
939
+ this.boxType = e;
940
+ let t = () => {
941
+ this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
942
+ this.initFun();
943
+ });
944
+ };
945
+ typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(t, this.boxType) : t();
946
+ }
947
+ }
948
+ };
949
+ function kt(e, t, n, r, i, o) {
950
+ let s = $, c = a;
951
+ return i.boxVisible ? (R(), E(H(o.dialogType), P({
952
+ key: 0,
953
+ modelValue: i.boxVisible,
954
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => i.boxVisible = e),
955
+ "lock-scroll": "",
956
+ "show-full-screen": "",
957
+ "destroy-on-close": o.crud.tableOption.dialogDestroy,
958
+ "wrapper-closable": o.crud.tableOption.dialogClickModal,
959
+ direction: o.direction,
960
+ class: "dialog-form",
961
+ "custom-class": o.crud.tableOption.dialogCustomClass,
962
+ "modal-append-to-body": "",
963
+ "append-to-body": "",
964
+ top: o.dialogTop,
965
+ title: o.dialogTitle,
966
+ "close-on-press-escape": o.crud.tableOption.dialogEscape,
967
+ "close-on-click-modal": o.optVal(o.crud.tableOption.dialogClickModal, !1),
968
+ modal: o.crud.tableOption.dialogModal,
969
+ "show-close": o.crud.tableOption.dialogCloseBtn
970
+ }, o.params, { "before-close": o.hide }), {
971
+ footer: W(() => [k("span", { class: F(["avue-dialog__footer", `avue-dialog__footer--${o.dialogMenuPosition}`]) }, [
972
+ o.optVal(o.option.submitBtn, !0) && !o.isView ? (R(), E(c, {
973
+ key: 0,
974
+ loading: i.disabled,
975
+ size: o.crud.controlSize,
976
+ icon: o.option.submitIcon,
977
+ type: "primary",
978
+ onClick: o.submit
979
+ }, {
980
+ default: W(() => [j(U(o.option.submitText), 1)]),
981
+ _: 1
982
+ }, 8, [
983
+ "loading",
984
+ "size",
985
+ "icon",
986
+ "onClick"
987
+ ])) : D("v-if", !0),
988
+ o.optVal(o.option.emptyBtn, !0) && !o.isView ? (R(), E(c, {
989
+ key: 1,
990
+ disabled: i.disabled,
991
+ size: o.crud.controlSize,
992
+ icon: o.option.emptyIcon,
993
+ onClick: o.reset
994
+ }, {
995
+ default: W(() => [j(U(o.option.emptyText), 1)]),
996
+ _: 1
997
+ }, 8, [
998
+ "disabled",
999
+ "size",
1000
+ "icon",
1001
+ "onClick"
1002
+ ])) : D("v-if", !0),
1003
+ B(e.$slots, "menuForm", {
1004
+ disabled: i.disabled,
1005
+ size: o.crud.controlSize,
1006
+ type: i.boxType
1007
+ })
1008
+ ], 2)]),
1009
+ default: W(() => [M(s, P({
1010
+ ref: "tableForm",
1011
+ modelValue: o.crud.tableForm,
1012
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => o.crud.tableForm = e),
1013
+ status: i.disabled,
1014
+ "onUpdate:status": t[1] || (t[1] = (e) => i.disabled = e)
1015
+ }, o.uploadFun({}, o.crud), {
1016
+ option: o.option,
1017
+ onChange: o.handleChange,
1018
+ onSubmit: o.handleSubmit,
1019
+ onResetChange: o.hide,
1020
+ onTabClick: o.handleTabClick,
1021
+ onError: o.handleError
1022
+ }), A({ _: 2 }, [z(o.crud.formSlot, (t) => ({
1023
+ name: o.getSlotName(t),
1024
+ fn: W((n) => [B(e.$slots, t, I(N(Object.assign(n, { type: i.boxType }))))])
1025
+ }))]), 1040, [
1026
+ "modelValue",
1027
+ "status",
1028
+ "option",
1029
+ "onChange",
1030
+ "onSubmit",
1031
+ "onResetChange",
1032
+ "onTabClick",
1033
+ "onError"
1034
+ ])]),
1035
+ _: 3
1036
+ }, 16, [
1037
+ "modelValue",
1038
+ "destroy-on-close",
1039
+ "wrapper-closable",
1040
+ "direction",
1041
+ "custom-class",
1042
+ "top",
1043
+ "title",
1044
+ "close-on-press-escape",
1045
+ "close-on-click-modal",
1046
+ "modal",
1047
+ "show-close",
1048
+ "before-close"
1049
+ ])) : D("v-if", !0);
1050
+ }
1051
+ var At = /* @__PURE__ */ n(Ot, [["render", kt]]), jt = {
1052
+ name: "TablePage",
1053
+ inject: ["crud"],
1054
+ data() {
1055
+ return { defaultPage: {
1056
+ single: !0,
1057
+ total: 0,
1058
+ pagerCount: 7,
1059
+ currentPage: 1,
1060
+ pageSize: 10,
1061
+ pageSizes: [
1062
+ 10,
1063
+ 20,
1064
+ 30,
1065
+ 40,
1066
+ 50,
1067
+ 100
1068
+ ],
1069
+ layout: "total, sizes, prev, pager, next, jumper",
1070
+ background: !0
1071
+ } };
1072
+ },
1073
+ computed: { pageFlag() {
1074
+ return this.defaultPage.total !== 0;
1075
+ } },
1076
+ watch: {
1077
+ "crud.page": {
1078
+ handler() {
1079
+ this.pageInit();
1080
+ },
1081
+ deep: !0
1082
+ },
1083
+ pageFlag() {
1084
+ this.crud.getTableHeight();
1085
+ },
1086
+ "defaultPage.total"() {
1087
+ this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && this.defaultPage.total !== 0 && (this.defaultPage.currentPage = this.defaultPage.currentPage - 1, this.currentChange(this.defaultPage.currentPage));
1088
+ }
1089
+ },
1090
+ created() {
1091
+ this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
1092
+ },
1093
+ methods: {
1094
+ optVal: g,
1095
+ pageInit() {
1096
+ this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
1097
+ },
1098
+ updateValue() {
1099
+ this.crud.$emit("update:page", this.defaultPage);
1100
+ },
1101
+ nextClick(e) {
1102
+ this.crud.$emit("next-click", e);
1103
+ },
1104
+ prevClick(e) {
1105
+ this.crud.$emit("prev-click", e);
1106
+ },
1107
+ sizeChange(e) {
1108
+ this.defaultPage.currentPage = 1, this.defaultPage.pageSize = e, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", e);
1109
+ },
1110
+ currentChange(e) {
1111
+ this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", e);
1112
+ }
1113
+ }
1114
+ };
1115
+ function Mt(e, t, n, r, i, a) {
1116
+ let o = Je, s = Le;
1117
+ return a.pageFlag && a.optVal(a.crud.tableOption.page, !0) ? (R(), E(s, {
1118
+ key: 0,
1119
+ shadow: a.crud.isCard,
1120
+ class: "avue-pagination"
1121
+ }, {
1122
+ default: W(() => [B(e.$slots, "page"), M(o, {
1123
+ "current-page": i.defaultPage.currentPage,
1124
+ "onUpdate:currentPage": t[0] || (t[0] = (e) => i.defaultPage.currentPage = e),
1125
+ small: a.crud.size === "mini",
1126
+ style: { "margin-top": "25px" },
1127
+ disabled: i.defaultPage.disabled,
1128
+ "hide-on-single-page": i.defaultPage.single,
1129
+ "pager-count": i.defaultPage.pagerCount,
1130
+ background: i.defaultPage.background,
1131
+ "page-size": i.defaultPage.pageSize,
1132
+ "page-sizes": i.defaultPage.pageSizes,
1133
+ layout: i.defaultPage.layout,
1134
+ total: i.defaultPage.total,
1135
+ onSizeChange: a.sizeChange,
1136
+ onPrevClick: a.prevClick,
1137
+ onNextClick: a.nextClick,
1138
+ onCurrentChange: a.currentChange
1139
+ }, null, 8, [
1140
+ "current-page",
1141
+ "small",
1142
+ "disabled",
1143
+ "hide-on-single-page",
1144
+ "pager-count",
1145
+ "background",
1146
+ "page-size",
1147
+ "page-sizes",
1148
+ "layout",
1149
+ "total",
1150
+ "onSizeChange",
1151
+ "onPrevClick",
1152
+ "onNextClick",
1153
+ "onCurrentChange"
1154
+ ])]),
1155
+ _: 3
1156
+ }, 8, ["shadow"])) : D("v-if", !0);
1157
+ }
1158
+ var Nt = /* @__PURE__ */ n(jt, [["render", Mt]]), Z = {}, Pt = {
1159
+ name: "ColumnSlot",
1160
+ inject: ["dynamic", "crud"],
1161
+ props: {
1162
+ column: Object,
1163
+ columnOption: Array
1164
+ },
1165
+ created() {
1166
+ let e = [
1167
+ "getColumnProp",
1168
+ "handleFilterMethod",
1169
+ "handleFilters"
1170
+ ];
1171
+ Object.keys(this.dynamic).forEach((t) => {
1172
+ e.includes(t) && (this[t] = this.dynamic[t]);
1173
+ });
1174
+ },
1175
+ methods: {
1176
+ isBlank: q,
1177
+ optVal: g,
1178
+ uploadFun: _,
1179
+ isMediaType(t, n) {
1180
+ return e(t, n);
1181
+ },
1182
+ vaildLabel(e, t, n) {
1183
+ if (e.rules && t.$cellEdit) return n;
1184
+ },
1185
+ columnChange(e, t, n) {
1186
+ let r = `${n}-${t.prop}`;
1187
+ Z[r] || (this.handleChange(t, e), typeof t.change == "function" && t.cell === !0 && t.change({
1188
+ row: e,
1189
+ column: t,
1190
+ index: n,
1191
+ value: e[t.prop]
1192
+ })), Z[r] = !0, this.$nextTick(() => {
1193
+ Z[r] = !1;
1194
+ });
1195
+ },
1196
+ handleChange(e, t) {
1197
+ e.cascader && this.$nextTick(() => {
1198
+ let n = e.cascader;
1199
+ n.forEach((r) => {
1200
+ let i = r, a = t[e.prop], s = t.$index, c = this.findObject(this.columnOption, i);
1201
+ q(c) || (q(this.crud.cascaderDIC[s]) && (this.crud.cascaderDIC[s] = {}), this.crud.cascaderIndexList.includes(s) && n.forEach((e) => {
1202
+ this.crud.cascaderDIC[s][e.prop] = [], n.forEach((e) => t[e] = "");
1203
+ }), !(q(n) || q(a) || q(c)) && b({
1204
+ column: c,
1205
+ value: a,
1206
+ form: t
1207
+ }).then((e) => {
1208
+ let n = e || [];
1209
+ this.crud.cascaderIndexList.includes(s) || this.crud.cascaderIndexList.push(s), this.crud.cascaderDicList[s] || (this.crud.cascaderDicList[s] = {}), this.crud.cascaderDicList[s][i] || (this.crud.cascaderDicList[s][i] = n), this.crud.cascaderDIC[s][i] = n, !q(n[c.cascaderIndex]) && !q(n) && !q(c.cascaderIndex) && (t[i] = n[c.cascaderIndex][(c.props || {}).value || o.value]);
1210
+ }));
1211
+ });
1212
+ });
1213
+ },
1214
+ handleDetail(e, t) {
1215
+ let n = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop], r = Y(e, t, this.crud.tableOption, n);
1216
+ return !q(n) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = r), r;
1217
+ },
1218
+ corArray(e, t) {
1219
+ let n = this.handleDetail(e, t);
1220
+ return Array.isArray(n) || (n = q(n) ? [] : n.split(" | ")), l(n);
1221
+ },
1222
+ openImg(e, t, n) {
1223
+ let r = this.getImgList(e, t);
1224
+ r = r.map((e) => ({
1225
+ thumbUrl: e,
1226
+ url: e,
1227
+ type: t.fileType
1228
+ })), this.$ImagePreview(r, n);
1229
+ },
1230
+ getImgList(e, t) {
1231
+ var n, r;
1232
+ let i = ((n = t.propsHttp) == null ? void 0 : n.home) || "", a = ((r = t.props) == null ? void 0 : r.value) || o.value, s = this.corArray(e, t);
1233
+ return s.forEach((e, t) => {
1234
+ s[t] = i + (e[a] ? e[a] : e);
1235
+ }), s;
1236
+ }
1237
+ }
1238
+ }, Ft = { key: 1 }, It = {
1239
+ key: 0,
1240
+ class: "avue-crud__img"
1241
+ }, Lt = ["src", "onClick"], Rt = { key: 1 }, zt = { key: 2 }, Bt = ["innerHTML"], Vt = ["textContent"];
1242
+ function Ht(e, t, n, r, i, a) {
1243
+ let o = On, s = et, c = C, l = Ke, u = we, d = Ce, f = w;
1244
+ return e.getColumnProp(n.column, "hide") ? (R(), E(f, {
1245
+ key: n.column.prop,
1246
+ prop: n.column.prop,
1247
+ label: n.column.label,
1248
+ "column-key": n.column.prop,
1249
+ "filter-placement": "bottom-end",
1250
+ filters: e.getColumnProp(n.column, "filters"),
1251
+ "filter-method": e.getColumnProp(n.column, "filterMethod") ? e.handleFilterMethod : void 0,
1252
+ "filter-multiple": a.optVal(n.column.filterMultiple, !0),
1253
+ "show-overflow-tooltip": n.column.overHidden,
1254
+ "min-width": n.column.minWidth,
1255
+ sortable: e.getColumnProp(n.column, "sortable"),
1256
+ "sort-method": n.column.sortMethod,
1257
+ "sort-orders": n.column.sortOrders,
1258
+ "sort-by": n.column.sortBy,
1259
+ resizable: n.column.resizable,
1260
+ "render-header": n.column.renderHeader,
1261
+ align: n.column.align || a.crud.tableOption.align,
1262
+ "header-align": n.column.headerAlign || a.crud.tableOption.headerAlign,
1263
+ width: e.getColumnProp(n.column, "width"),
1264
+ fixed: e.getColumnProp(n.column, "fixed")
1265
+ }, {
1266
+ header: W(({ $index: t }) => [a.crud.getSlotName(n.column, "H", a.crud.$slots) ? B(e.$slots, a.crud.getSlotName(n.column, "H"), I(P({ key: 0 }, {
1267
+ column: n.column,
1268
+ $index: t
1269
+ }))) : (R(), O("span", Ft, U(n.column.label), 1))]),
1270
+ default: W(({ row: t, $index: r }) => [t.$cellEdit && n.column.cell ? (R(), E(c, {
1271
+ key: 0,
1272
+ prop: a.crud.isTree ? "" : `list.${r}.${n.column.prop}`,
1273
+ label: a.vaildLabel(n.column, t, " "),
1274
+ "label-width": a.vaildLabel(n.column, t, "1px"),
1275
+ rules: n.column.rules
1276
+ }, {
1277
+ default: W(() => [M(s, {
1278
+ content: (a.crud.listError[`list.${r}.${n.column.prop}`] || {}).msg,
1279
+ disabled: !(a.crud.listError[`list.${r}.${n.column.prop}`] || {}).valid,
1280
+ placement: "top"
1281
+ }, {
1282
+ default: W(() => [a.crud.getSlotName(n.column, "F", a.crud.$slots) ? B(e.$slots, a.crud.getSlotName(n.column, "F"), I(P({ key: 0 }, {
1283
+ row: t,
1284
+ dic: a.crud.DIC[n.column.prop],
1285
+ size: a.crud.isMediumSize,
1286
+ index: r,
1287
+ disabled: a.crud.btnDisabledList[r],
1288
+ label: a.handleDetail(t, n.column),
1289
+ $cell: t.$cellEdit
1290
+ }))) : (R(), E(o, P({ key: 1 }, a.uploadFun(n.column, a.crud), {
1291
+ modelValue: t[n.column.prop],
1292
+ "onUpdate:modelValue": (e) => t[n.column.prop] = e,
1293
+ column: n.column,
1294
+ size: a.crud.isMediumSize,
1295
+ "table-data": {
1296
+ index: r,
1297
+ row: t,
1298
+ label: a.handleDetail(t, n.column)
1299
+ },
1300
+ dic: (a.crud.cascaderDIC[r] || {})[n.column.prop] || a.crud.DIC[n.column.prop],
1301
+ props: n.column.props || a.crud.tableOption.props,
1302
+ readonly: n.column.readonly,
1303
+ disabled: a.crud.disabled || a.crud.tableOption.disabled || n.column.disabled || a.crud.btnDisabledList[r],
1304
+ clearable: a.optVal(n.column.clearable, !1),
1305
+ "column-slot": a.crud.mainSlot,
1306
+ onChange: (e) => a.columnChange(t, n.column, r)
1307
+ }), A({ _: 2 }, [z(a.crud.mainSlot, (t) => ({
1308
+ name: t,
1309
+ fn: W((n) => [B(e.$slots, t, I(N(n)))])
1310
+ }))]), 1040, [
1311
+ "modelValue",
1312
+ "onUpdate:modelValue",
1313
+ "column",
1314
+ "size",
1315
+ "table-data",
1316
+ "dic",
1317
+ "props",
1318
+ "readonly",
1319
+ "disabled",
1320
+ "clearable",
1321
+ "column-slot",
1322
+ "onChange"
1323
+ ]))]),
1324
+ _: 2
1325
+ }, 1032, ["content", "disabled"])]),
1326
+ _: 2
1327
+ }, 1032, [
1328
+ "prop",
1329
+ "label",
1330
+ "label-width",
1331
+ "rules"
1332
+ ])) : a.crud.$slots[n.column.prop] ? B(e.$slots, n.column.prop, {
1333
+ key: 1,
1334
+ row: t,
1335
+ index: r,
1336
+ dic: a.crud.DIC[n.column.prop],
1337
+ size: a.crud.isMediumSize,
1338
+ label: a.handleDetail(t, n.column)
1339
+ }) : (R(), O(T, { key: 2 }, [["img", "upload"].includes(n.column.type) ? (R(), O("span", It, [(R(!0), O(T, null, z(a.getImgList(t, n.column), (e, r) => (R(), O(T, null, [a.isMediaType(e, n.column.fileType) ? (R(), E(H(a.isMediaType(e, n.column.fileType)), {
1340
+ key: r,
1341
+ src: e,
1342
+ onClick: K((e) => a.openImg(t, n.column, r), ["stop"])
1343
+ }, null, 8, ["src", "onClick"])) : (R(), O("i", {
1344
+ key: `e_${r}`,
1345
+ src: e,
1346
+ class: "el-icon-document",
1347
+ onClick: K((e) => a.openImg(t, n.column, r), ["stop"])
1348
+ }, null, 8, Lt))], 64))), 256))])) : n.column.type === "url" ? (R(), O("span", Rt, [(R(!0), O(T, null, z(a.corArray(t, n.column), (e, t) => (R(), E(l, {
1349
+ key: t,
1350
+ type: "primary",
1351
+ href: e,
1352
+ target: n.column.target || "_blank"
1353
+ }, {
1354
+ default: W(() => [j(U(e), 1)]),
1355
+ _: 2
1356
+ }, 1032, ["href", "target"]))), 128))])) : n.column.type === "rate" ? (R(), O("span", zt, [M(u, {
1357
+ modelValue: t[n.column.prop],
1358
+ "onUpdate:modelValue": (e) => t[n.column.prop] = e,
1359
+ disabled: ""
1360
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])])) : n.column.type === "color" ? (R(), O("i", {
1361
+ key: 3,
1362
+ class: "avue-crud__color",
1363
+ style: L({ backgroundColor: t[n.column.prop] })
1364
+ }, null, 4)) : n.column.type === "icon" ? (R(), E(d, {
1365
+ key: 4,
1366
+ text: t[n.column.prop]
1367
+ }, null, 8, ["text"])) : n.column.html ? (R(), O("span", {
1368
+ key: 5,
1369
+ innerHTML: a.handleDetail(t, n.column)
1370
+ }, null, 8, Bt)) : (R(), O("span", {
1371
+ key: 6,
1372
+ textContent: U(a.handleDetail(t, n.column))
1373
+ }, null, 8, Vt))], 64))]),
1374
+ _: 3
1375
+ }, 8, [
1376
+ "prop",
1377
+ "label",
1378
+ "column-key",
1379
+ "filters",
1380
+ "filter-method",
1381
+ "filter-multiple",
1382
+ "show-overflow-tooltip",
1383
+ "min-width",
1384
+ "sortable",
1385
+ "sort-method",
1386
+ "sort-orders",
1387
+ "sort-by",
1388
+ "resizable",
1389
+ "render-header",
1390
+ "align",
1391
+ "header-align",
1392
+ "width",
1393
+ "fixed"
1394
+ ])) : D("v-if", !0);
1395
+ }
1396
+ var Ut = /* @__PURE__ */ n(Pt, [["render", Ht]]), Wt = {
1397
+ name: "ColumnDynamic",
1398
+ inject: ["dynamic", "crud"],
1399
+ props: { columnOption: Object },
1400
+ created() {
1401
+ let e = [
1402
+ "getColumnProp",
1403
+ "handleFilterMethod",
1404
+ "handleFilters"
1405
+ ];
1406
+ Object.keys(this.dynamic).forEach((t) => {
1407
+ e.includes(t) && (this[t] = this.dynamic[t]);
1408
+ });
1409
+ },
1410
+ methods: { optVal: g }
1411
+ };
1412
+ function Gt(e, t, n, r, i, a) {
1413
+ let o = nt("ColumnDynamic", !0), s = Ut, c = w;
1414
+ return e.getColumnProp(n.columnOption, "hide") ? (R(), E(c, {
1415
+ key: n.columnOption.prop,
1416
+ prop: n.columnOption.prop,
1417
+ label: n.columnOption.label,
1418
+ "filter-placement": "bottom-end",
1419
+ filters: e.getColumnProp(n.columnOption, "filters"),
1420
+ "filter-method": e.getColumnProp(n.columnOption, "filterMethod") ? e.handleFilterMethod : void 0,
1421
+ "filter-multiple": a.optVal(n.columnOption.filterMultiple, !0),
1422
+ "show-overflow-tooltip": n.columnOption.overHidden,
1423
+ "min-width": n.columnOption.minWidth,
1424
+ sortable: e.getColumnProp(n.columnOption, "sortable"),
1425
+ "render-header": n.columnOption.renderHeader,
1426
+ align: n.columnOption.align || a.crud.tableOption.align,
1427
+ "header-align": n.columnOption.headerAlign || a.crud.tableOption.headerAlign,
1428
+ width: e.getColumnProp(n.columnOption, "width"),
1429
+ fixed: e.getColumnProp(n.columnOption, "fixed")
1430
+ }, {
1431
+ default: W(() => [(R(!0), O(T, null, z(n.columnOption.children, (t) => (R(), O(T, null, [t.children && t.children.length > 0 ? (R(), E(o, {
1432
+ key: t.prop,
1433
+ "column-option": t
1434
+ }, A({ _: 2 }, [z(a.crud.mainSlot, (t) => ({
1435
+ name: t,
1436
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, n))])
1437
+ }))]), 1032, ["column-option"])) : (R(), E(s, {
1438
+ key: t.prop,
1439
+ column: t,
1440
+ "column-option": n.columnOption.children
1441
+ }, A({ _: 2 }, [z(a.crud.mainSlot, (t) => ({
1442
+ name: t,
1443
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, n))])
1444
+ }))]), 1032, ["column", "column-option"]))], 64))), 256))]),
1445
+ _: 3
1446
+ }, 8, [
1447
+ "prop",
1448
+ "label",
1449
+ "filters",
1450
+ "filter-method",
1451
+ "filter-multiple",
1452
+ "show-overflow-tooltip",
1453
+ "min-width",
1454
+ "sortable",
1455
+ "render-header",
1456
+ "align",
1457
+ "header-align",
1458
+ "width",
1459
+ "fixed"
1460
+ ])) : D("v-if", !0);
1461
+ }
1462
+ var Kt = /* @__PURE__ */ n(Wt, [["render", Gt]]), qt = {
1463
+ name: "Column",
1464
+ inject: ["crud"],
1465
+ provide() {
1466
+ return {
1467
+ crud: this.crud,
1468
+ dynamic: this
1469
+ };
1470
+ },
1471
+ props: { columnOption: Array },
1472
+ computed: { list() {
1473
+ let e = [...this.columnOption];
1474
+ return e = ne(e, "index", (e, t) => {
1475
+ var n, r;
1476
+ return ((n = this.crud.objectOption[e.prop]) == null ? void 0 : n.index) - ((r = this.crud.objectOption[t.prop]) == null ? void 0 : r.index);
1477
+ }), e;
1478
+ } },
1479
+ methods: {
1480
+ handleFilterMethod(e, t, n) {
1481
+ let r = this.columnOption.filter((e) => e.prop === n.property)[0];
1482
+ return typeof r.filterMethod == "function" ? r.filterMethod(e, t, r) : t[r.prop] === e;
1483
+ },
1484
+ handleFilters(e, t) {
1485
+ if (t !== !0) return;
1486
+ let n = this.crud.DIC[e.prop] || [], r = [];
1487
+ return q(n) ? this.crud.cellForm.list.forEach((t) => {
1488
+ r.map((e) => e.text).includes(t[e.prop]) || r.push({
1489
+ text: t[e.prop],
1490
+ value: t[e.prop]
1491
+ });
1492
+ }) : n.forEach((t) => {
1493
+ let n = e.props || this.crud.tableOption.props || {};
1494
+ r.push({
1495
+ text: t[n.label || o.label],
1496
+ value: t[n.value || o.value]
1497
+ });
1498
+ }), r;
1499
+ },
1500
+ getColumnProp(e, t) {
1501
+ let n = this.crud.objectOption[e.prop] || {};
1502
+ if (t === "filterMethod") return n == null ? void 0 : n.filters;
1503
+ if (this.crud.isMobile && ["fixed"].includes(t)) return !1;
1504
+ let r = n == null ? void 0 : n[t];
1505
+ if (!(t === "width" && r === 0)) return t === "filters" ? this.handleFilters(e, r) : t === "hide" ? (n == null ? void 0 : n.hide) !== !0 : r;
1506
+ }
1507
+ }
1508
+ };
1509
+ function Jt(e, t, n, r, i, a) {
1510
+ let o = Kt, s = Ut;
1511
+ return R(), O(T, null, [
1512
+ B(e.$slots, "header"),
1513
+ D(" 动态列 "),
1514
+ (R(!0), O(T, null, z(a.list, (t) => (R(), O(T, null, [t.children && t.children.length > 0 ? (R(), E(o, {
1515
+ key: t.pop,
1516
+ "column-option": t
1517
+ }, A({ _: 2 }, [z(a.crud.mainSlot, (t) => ({
1518
+ name: t,
1519
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, n))])
1520
+ }))]), 1032, ["column-option"])) : (R(), E(s, {
1521
+ key: t.prop,
1522
+ column: t,
1523
+ "column-option": n.columnOption
1524
+ }, A({ _: 2 }, [z(a.crud.mainSlot, (t) => ({
1525
+ name: t,
1526
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, n))])
1527
+ }))]), 1032, ["column", "column-option"]))], 64))), 256)),
1528
+ B(e.$slots, "footer")
1529
+ ], 64);
1530
+ }
1531
+ var Yt = /* @__PURE__ */ n(qt, [["render", Jt]]), Q = (() => {
1532
+ function e(e, t) {
1533
+ t.value === !1 ? e.style.display = "none" : e.style.display = "";
1534
+ }
1535
+ return {
1536
+ bind(t, n) {
1537
+ e(t, n);
1538
+ },
1539
+ update(t, n) {
1540
+ e(t, n);
1541
+ }
1542
+ };
1543
+ })(), Xt = {
1544
+ name: "ColumnMenu",
1545
+ directives: { permission: Q },
1546
+ inject: {
1547
+ crud: { from: "crud" },
1548
+ AVUE: {
1549
+ from: i,
1550
+ default: null
1551
+ }
1552
+ },
1553
+ data() {
1554
+ return { config: X };
1555
+ },
1556
+ computed: {
1557
+ menuType() {
1558
+ var e;
1559
+ return this.crud.tableOption.menuType || ((e = this.AVUE) == null ? void 0 : e.menuType) || "button";
1560
+ },
1561
+ isIconMenu() {
1562
+ return this.menuType === "icon";
1563
+ },
1564
+ isTextMenu() {
1565
+ return this.menuType === "text";
1566
+ },
1567
+ isMenu() {
1568
+ return this.menuType === "menu";
1569
+ }
1570
+ },
1571
+ methods: {
1572
+ optVal: g,
1573
+ menuText(e) {
1574
+ return ["text", "menu"].includes(this.menuType) ? "text" : e;
1575
+ }
1576
+ }
1577
+ };
1578
+ function Zt(e, t, n, r, i, o) {
1579
+ let s = a, c = He, l = Ue, u = Ve, d = w, f = V("permission");
1580
+ return R(), O(T, null, [D(" 操作栏 "), o.optVal(o.crud.tableOption.menu, i.config.menu) && o.crud.getPermission("menu") ? (R(), E(d, {
1581
+ key: "menu",
1582
+ class: "avue-crud__btn",
1583
+ prop: "menu",
1584
+ fixed: o.optVal(o.crud.tableOption.menuFixed, i.config.menuFixed),
1585
+ label: o.crud.tableOption.menuTitle || "操作",
1586
+ align: o.crud.tableOption.menuAlign || i.config.menuAlign,
1587
+ "header-align": o.crud.tableOption.menuHeaderAlign || i.config.menuHeaderAlign,
1588
+ width: o.crud.isMobile ? o.crud.tableOption.menuXsWidth || i.config.menuXsWidth : o.crud.tableOption.menuWidth || i.config.menuWidth
1589
+ }, {
1590
+ default: W(({ row: n, $index: r }) => [o.isMenu ? (R(), E(u, {
1591
+ key: 0,
1592
+ size: o.crud.isMediumSize
1593
+ }, {
1594
+ dropdown: W(() => [M(l, null, {
1595
+ default: W(() => [
1596
+ o.optVal(o.crud.tableOption.viewBtn, i.config.viewBtn) ? G((R(), E(c, {
1597
+ key: 0,
1598
+ icon: o.crud.getBtnIcon("viewBtn"),
1599
+ onClick: (e) => o.crud.rowView(n, r)
1600
+ }, {
1601
+ default: W(() => [j(U(o.crud.menuIcon("viewBtn")), 1)]),
1602
+ _: 1
1603
+ }, 8, ["icon", "onClick"])), [[f, o.crud.getPermission("viewBtn", n, r)]]) : D("v-if", !0),
1604
+ o.optVal(o.crud.tableOption.editBtn, i.config.editBtn) ? G((R(), E(c, {
1605
+ key: 1,
1606
+ icon: o.crud.getBtnIcon("editBtn"),
1607
+ onClick: (e) => o.crud.rowEdit(n, r)
1608
+ }, {
1609
+ default: W(() => [j(U(o.crud.menuIcon("editBtn")), 1)]),
1610
+ _: 1
1611
+ }, 8, ["icon", "onClick"])), [[f, o.crud.getPermission("editBtn", n, r)]]) : D("v-if", !0),
1612
+ o.optVal(o.crud.tableOption.copyBtn, i.config.copyBtn) ? G((R(), E(c, {
1613
+ key: 2,
1614
+ icon: o.crud.getBtnIcon("copyBtn"),
1615
+ onClick: (e) => o.crud.rowCopy(n)
1616
+ }, {
1617
+ default: W(() => [j(U(o.crud.menuIcon("copyBtn")), 1)]),
1618
+ _: 1
1619
+ }, 8, ["icon", "onClick"])), [[f, o.crud.getPermission("copyBtn", n, r)]]) : D("v-if", !0),
1620
+ o.optVal(o.crud.tableOption.delBtn, i.config.delBtn) ? G((R(), E(c, {
1621
+ key: 3,
1622
+ icon: o.crud.getBtnIcon("delBtn"),
1623
+ onClick: (e) => o.crud.rowDel(n, r)
1624
+ }, {
1625
+ default: W(() => [j(U(o.crud.menuIcon("delBtn")), 1)]),
1626
+ _: 1
1627
+ }, 8, ["icon", "onClick"])), [[f, o.crud.getPermission("delBtn", n, r)]]) : D("v-if", !0),
1628
+ B(e.$slots, "menuBtn", {
1629
+ row: n,
1630
+ type: o.menuText("primary"),
1631
+ disabled: o.crud.btnDisabled,
1632
+ size: o.crud.isMediumSize,
1633
+ index: r
1634
+ })
1635
+ ]),
1636
+ _: 2
1637
+ }, 1024)]),
1638
+ default: W(() => [M(s, {
1639
+ text: "",
1640
+ size: o.crud.isMediumSize
1641
+ }, {
1642
+ default: W(() => [j(U(o.crud.tableOption.menuBtnTitle || "按钮") + " ", 1), t[0] || (t[0] = k("i", { class: "el-icon-arrow-down el-icon--right" }, null, -1))]),
1643
+ _: 1
1644
+ }, 8, ["size"])]),
1645
+ _: 2
1646
+ }, 1032, ["size"])) : [
1647
+ "button",
1648
+ "text",
1649
+ "icon"
1650
+ ].includes(o.menuType) ? (R(), O(T, { key: 1 }, [
1651
+ o.optVal(o.crud.tableOption.cellBtn, i.config.cellBtn) ? (R(), O(T, { key: 0 }, [o.optVal(o.crud.tableOption.editBtn, i.config.editBtn) && !n.$cellEdit ? G((R(), E(s, {
1652
+ key: 0,
1653
+ type: o.menuText("primary"),
1654
+ icon: o.crud.getBtnIcon("editBtn"),
1655
+ size: o.crud.isMediumSize,
1656
+ disabled: o.crud.btnDisabledList[r],
1657
+ onClick: K((e) => o.crud.rowCell(n, r), ["stop"])
1658
+ }, {
1659
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("editBtn")), 1)], 64))]),
1660
+ _: 1
1661
+ }, 8, [
1662
+ "type",
1663
+ "icon",
1664
+ "size",
1665
+ "disabled",
1666
+ "onClick"
1667
+ ])), [[f, o.crud.getPermission("editBtn", n, r)]]) : o.optVal(o.crud.tableOption.saveBtn, i.config.saveBtn) && n.$cellEdit ? G((R(), E(s, {
1668
+ key: 1,
1669
+ type: o.menuText("primary"),
1670
+ icon: o.crud.getBtnIcon("saveBtn"),
1671
+ size: o.crud.isMediumSize,
1672
+ disabled: o.crud.btnDisabledList[r],
1673
+ onClick: K((e) => o.crud.rowCell(n, r), ["stop"])
1674
+ }, {
1675
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("saveBtn")), 1)], 64))]),
1676
+ _: 1
1677
+ }, 8, [
1678
+ "type",
1679
+ "icon",
1680
+ "size",
1681
+ "disabled",
1682
+ "onClick"
1683
+ ])), [[f, o.crud.getPermission("saveBtn", n, r)]]) : D("v-if", !0), n.$cellEdit ? (R(), E(s, {
1684
+ key: 2,
1685
+ type: o.menuText("danger"),
1686
+ icon: o.crud.getBtnIcon("cancelBtn"),
1687
+ size: o.crud.isMediumSize,
1688
+ disabled: o.crud.btnDisabledList[r],
1689
+ onClick: K((e) => o.crud.rowCancel(n, r), ["stop"])
1690
+ }, {
1691
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("cancelBtn")), 1)], 64))]),
1692
+ _: 1
1693
+ }, 8, [
1694
+ "type",
1695
+ "icon",
1696
+ "size",
1697
+ "disabled",
1698
+ "onClick"
1699
+ ])) : D("v-if", !0)], 64)) : D("v-if", !0),
1700
+ o.optVal(o.crud.tableOption.viewBtn, i.config.viewBtn) ? G((R(), E(s, {
1701
+ key: 1,
1702
+ type: o.menuText("success"),
1703
+ icon: o.crud.getBtnIcon("viewBtn"),
1704
+ size: o.crud.isMediumSize,
1705
+ disabled: e.btnDisabled,
1706
+ onClick: K((e) => o.crud.rowView(n, r), ["stop"])
1707
+ }, {
1708
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("viewBtn")), 1)], 64))]),
1709
+ _: 1
1710
+ }, 8, [
1711
+ "type",
1712
+ "icon",
1713
+ "size",
1714
+ "disabled",
1715
+ "onClick"
1716
+ ])), [[f, o.crud.getPermission("viewBtn", n, r)]]) : D("v-if", !0),
1717
+ o.optVal(o.crud.tableOption.editBtn, i.config.editBtn) && !o.crud.tableOption.cellBtn ? G((R(), E(s, {
1718
+ key: 2,
1719
+ type: o.menuText("primary"),
1720
+ icon: o.crud.getBtnIcon("editBtn"),
1721
+ size: o.crud.isMediumSize,
1722
+ disabled: e.btnDisabled,
1723
+ onClick: K((e) => o.crud.rowEdit(n, r), ["stop"])
1724
+ }, {
1725
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("editBtn")), 1)], 64))]),
1726
+ _: 1
1727
+ }, 8, [
1728
+ "type",
1729
+ "icon",
1730
+ "size",
1731
+ "disabled",
1732
+ "onClick"
1733
+ ])), [[f, o.crud.getPermission("editBtn", n, r)]]) : D("v-if", !0),
1734
+ o.optVal(o.crud.tableOption.copyBtn, i.config.copyBtn) ? G((R(), E(s, {
1735
+ key: 3,
1736
+ type: o.menuText("primary"),
1737
+ icon: o.crud.getBtnIcon("copyBtn"),
1738
+ size: o.crud.isMediumSize,
1739
+ disabled: e.btnDisabled,
1740
+ onClick: K((e) => o.crud.rowCopy(n), ["stop"])
1741
+ }, {
1742
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("copyBtn")), 1)], 64))]),
1743
+ _: 1
1744
+ }, 8, [
1745
+ "type",
1746
+ "icon",
1747
+ "size",
1748
+ "disabled",
1749
+ "onClick"
1750
+ ])), [[f, o.crud.getPermission("copyBtn", n, r)]]) : D("v-if", !0),
1751
+ o.optVal(o.crud.tableOption.delBtn, i.config.delBtn) && !n.$cellEdit ? G((R(), E(s, {
1752
+ key: 4,
1753
+ type: o.menuText("danger"),
1754
+ icon: o.crud.getBtnIcon("delBtn"),
1755
+ size: o.crud.isMediumSize,
1756
+ disabled: e.btnDisabled,
1757
+ onClick: K((e) => o.crud.rowDel(n, r), ["stop"])
1758
+ }, {
1759
+ default: W(() => [o.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("delBtn")), 1)], 64))]),
1760
+ _: 1
1761
+ }, 8, [
1762
+ "type",
1763
+ "icon",
1764
+ "size",
1765
+ "disabled",
1766
+ "onClick"
1767
+ ])), [[f, o.crud.getPermission("delBtn", n, r)]]) : D("v-if", !0)
1768
+ ], 64)) : D("v-if", !0), B(e.$slots, "menu", {
1769
+ row: n,
1770
+ type: o.menuText("primary"),
1771
+ disabled: o.crud.btnDisabled,
1772
+ size: o.crud.isMediumSize,
1773
+ index: r
1774
+ })]),
1775
+ _: 3
1776
+ }, 8, [
1777
+ "fixed",
1778
+ "label",
1779
+ "align",
1780
+ "header-align",
1781
+ "width"
1782
+ ])) : D("v-if", !0)], 2112);
1783
+ }
1784
+ var Qt = /* @__PURE__ */ n(Xt, [["render", Zt]]), $t = {
1785
+ name: "ColumnDefault",
1786
+ inject: ["crud"],
1787
+ data() {
1788
+ return { config: X };
1789
+ },
1790
+ mounted() {
1791
+ this.setSort();
1792
+ },
1793
+ methods: {
1794
+ optVal: g,
1795
+ indexMethod(e) {
1796
+ return e + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
1797
+ },
1798
+ setSort() {
1799
+ this.rowDrop(), this.columnDrop();
1800
+ },
1801
+ rowDrop() {
1802
+ let e = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
1803
+ this.crud.tableDrop("row", e, (e) => {
1804
+ let t = e.oldIndex, n = e.newIndex, r = this.crud.list.splice(t, 1)[0];
1805
+ this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", t, n), this.crud.refreshTable(() => this.rowDrop());
1806
+ });
1807
+ },
1808
+ columnDrop() {
1809
+ let e = this.crud.$refs.table.$el.querySelector(this.config.dropColClass), t = 0;
1810
+ [
1811
+ "selection",
1812
+ "index",
1813
+ "expand"
1814
+ ].forEach((e) => {
1815
+ this.crud.tableOption[e] && (t += 1);
1816
+ }), this.crud.tableDrop("column", e, (e) => {
1817
+ this.crud.headerSort(e.oldIndex - t, e.newIndex - t), this.columnDrop();
1818
+ });
1819
+ }
1820
+ }
1821
+ };
1822
+ function en(e, t, n, r, i, a) {
1823
+ let o = w;
1824
+ return R(), O(T, null, [
1825
+ M(o, { width: "1px" }),
1826
+ D(" 折叠面板 "),
1827
+ a.crud.tableOption.expand ? (R(), E(o, {
1828
+ key: "expand",
1829
+ type: "expand",
1830
+ width: a.crud.tableOption.expandWidth || i.config.expandWidth,
1831
+ fixed: a.optVal(a.crud.tableOption.expandFixed, i.config.expandFixed),
1832
+ align: "center"
1833
+ }, {
1834
+ default: W(({ row: t }) => [B(e.$slots, "expand", {
1835
+ row: t,
1836
+ index: t.$index
1837
+ })]),
1838
+ _: 3
1839
+ }, 8, ["width", "fixed"])) : D("v-if", !0),
1840
+ D(" 选择框 "),
1841
+ a.crud.tableOption.selection ? (R(), E(o, {
1842
+ key: "selection",
1843
+ fixed: a.optVal(a.crud.tableOption.selectionFixed, i.config.selectionFixed),
1844
+ type: "selection",
1845
+ selectable: a.crud.tableOption.selectable,
1846
+ "reserve-selection": a.optVal(a.crud.tableOption.reserveSelection),
1847
+ width: a.crud.tableOption.selectionWidth || i.config.selectionWidth,
1848
+ align: "center"
1849
+ }, null, 8, [
1850
+ "fixed",
1851
+ "selectable",
1852
+ "reserve-selection",
1853
+ "width"
1854
+ ])) : D("v-if", !0),
1855
+ D(" 序号 "),
1856
+ a.optVal(a.crud.tableOption.index) ? (R(), E(o, {
1857
+ key: "index",
1858
+ fixed: a.optVal(a.crud.tableOption.indexFixed, i.config.indexFixed),
1859
+ label: a.crud.tableOption.indexLabel || i.config.indexLabel,
1860
+ type: "index",
1861
+ width: a.crud.tableOption.indexWidth || i.config.indexWidth,
1862
+ index: a.indexMethod,
1863
+ align: "center"
1864
+ }, null, 8, [
1865
+ "fixed",
1866
+ "label",
1867
+ "width",
1868
+ "index"
1869
+ ])) : D("v-if", !0)
1870
+ ], 64);
1871
+ }
1872
+ var tn = /* @__PURE__ */ n($t, [["render", en]]), nn = {
1873
+ name: "HeaderMenu",
1874
+ directives: { permission: Q },
1875
+ inject: ["crud"],
1876
+ data() {
1877
+ return {
1878
+ dateCreate: !1,
1879
+ pickerOptions: { shortcuts: [
1880
+ {
1881
+ text: "今日",
1882
+ onClick(e) {
1883
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
1884
+ n.setTime(n.getTime()), e.$emit("pick", [n, t]);
1885
+ }
1886
+ },
1887
+ {
1888
+ text: "昨日",
1889
+ onClick(e) {
1890
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
1891
+ n.setTime(n.getTime() - 3600 * 1e3 * 24 * 1), e.$emit("pick", [n, t]);
1892
+ }
1893
+ },
1894
+ {
1895
+ text: "最近一周",
1896
+ onClick(e) {
1897
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
1898
+ n.setTime(n.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [n, t]);
1899
+ }
1900
+ },
1901
+ {
1902
+ text: "最近一个月",
1903
+ onClick(e) {
1904
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
1905
+ n.setTime(n.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [n, t]);
1906
+ }
1907
+ },
1908
+ {
1909
+ text: "最近三个月",
1910
+ onClick(e) {
1911
+ let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
1912
+ n.setTime(n.getTime() - 3600 * 1e3 * 24 * 90), e.$emit("pick", [n, t]);
1913
+ }
1914
+ }
1915
+ ] },
1916
+ config: X
1917
+ };
1918
+ },
1919
+ created() {
1920
+ this.initFun();
1921
+ },
1922
+ methods: {
1923
+ optVal: g,
1924
+ dateChange(e) {
1925
+ this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
1926
+ },
1927
+ initFun() {
1928
+ this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
1929
+ },
1930
+ rowExcel() {
1931
+ this.crud.$refs.dialogExcel.handleShow();
1932
+ },
1933
+ rowPrint() {
1934
+ this.$Print(this.crud.$refs.table);
1935
+ }
1936
+ }
1937
+ }, rn = { class: "avue-crud__menu" }, an = {
1938
+ key: 0,
1939
+ class: "avue-crud__left"
1940
+ }, on = {
1941
+ key: 1,
1942
+ class: "avue-crud__right"
1943
+ };
1944
+ function sn(e, t, n, r, i, o) {
1945
+ let s = a, c = ge, l = V("permission");
1946
+ return R(), O("div", rn, [o.optVal(o.crud.tableOption.menuLeft, !0) ? (R(), O("div", an, [
1947
+ o.optVal(o.crud.tableOption.addBtn, i.config.addBtn) ? G((R(), E(s, {
1948
+ key: 0,
1949
+ type: "primary",
1950
+ icon: o.crud.getBtnIcon("addBtn"),
1951
+ size: o.crud.isMediumSize,
1952
+ onClick: o.crud.rowAdd
1953
+ }, {
1954
+ default: W(() => [o.crud.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("addBtn")), 1)], 64))]),
1955
+ _: 1
1956
+ }, 8, [
1957
+ "icon",
1958
+ "size",
1959
+ "onClick"
1960
+ ])), [[l, o.crud.getPermission("addBtn")]]) : D("v-if", !0),
1961
+ o.optVal(o.crud.tableOption.addRowBtn, i.config.addRowBtn) ? G((R(), E(s, {
1962
+ key: 1,
1963
+ type: "primary",
1964
+ icon: o.crud.getBtnIcon("addBtn"),
1965
+ size: o.crud.isMediumSize,
1966
+ onClick: o.crud.rowCellAdd
1967
+ }, {
1968
+ default: W(() => [o.crud.isIconMenu ? D("v-if", !0) : (R(), O(T, { key: 0 }, [j(U(o.crud.menuIcon("addBtn")), 1)], 64))]),
1969
+ _: 1
1970
+ }, 8, [
1971
+ "icon",
1972
+ "size",
1973
+ "onClick"
1974
+ ])), [[l, o.crud.getPermission("addRowBtn")]]) : D("v-if", !0),
1975
+ B(e.$slots, "menuLeft", { size: o.crud.isMediumSize })
1976
+ ])) : D("v-if", !0), o.optVal(o.crud.tableOption.menuRight, !0) ? (R(), O("div", on, [
1977
+ o.optVal(o.crud.tableOption.dateBtn, i.config.dateBtn) ? (R(), E(c, {
1978
+ key: 0,
1979
+ type: "datetimerange",
1980
+ "value-format": "YYYY-MM-dd HH:mm:ss",
1981
+ format: "YYYY-MM-dd HH:mm:ss",
1982
+ "picker-options": i.pickerOptions,
1983
+ style: {
1984
+ display: "inline-block",
1985
+ "margin-right": "20px"
1986
+ },
1987
+ size: o.crud.isMediumSize,
1988
+ onChange: o.dateChange
1989
+ }, null, 8, [
1990
+ "picker-options",
1991
+ "size",
1992
+ "onChange"
1993
+ ])) : D("v-if", !0),
1994
+ B(e.$slots, "menuRight", { size: o.crud.isMediumSize }),
1995
+ o.optVal(o.crud.tableOption.excelBtn, i.config.excelBtn) ? G((R(), E(s, {
1996
+ key: 1,
1997
+ icon: o.crud.getBtnIcon("excelBtn"),
1998
+ circle: "",
1999
+ size: o.crud.isMediumSize,
2000
+ onClick: o.rowExcel
2001
+ }, null, 8, [
2002
+ "icon",
2003
+ "size",
2004
+ "onClick"
2005
+ ])), [[l, o.crud.getPermission("excelBtn")]]) : D("v-if", !0),
2006
+ o.optVal(o.crud.tableOption.printBtn, i.config.printBtn) ? G((R(), E(s, {
2007
+ key: 2,
2008
+ icon: o.crud.getBtnIcon("printBtn"),
2009
+ circle: "",
2010
+ size: o.crud.isMediumSize,
2011
+ onClick: o.rowPrint
2012
+ }, null, 8, [
2013
+ "icon",
2014
+ "size",
2015
+ "onClick"
2016
+ ])), [[l, o.crud.getPermission("printBtn")]]) : D("v-if", !0),
2017
+ o.optVal(o.crud.tableOption.refreshBtn, i.config.refreshBtn) ? G((R(), E(s, {
2018
+ key: 3,
2019
+ icon: o.crud.getBtnIcon("refreshBtn"),
2020
+ circle: "",
2021
+ size: o.crud.isMediumSize,
2022
+ onClick: o.crud.refreshChange
2023
+ }, null, 8, [
2024
+ "icon",
2025
+ "size",
2026
+ "onClick"
2027
+ ])), [[l, o.crud.getPermission("refreshBtn")]]) : D("v-if", !0),
2028
+ o.optVal(o.crud.tableOption.columnBtn, i.config.columnBtn) ? G((R(), E(s, {
2029
+ key: 4,
2030
+ icon: o.crud.getBtnIcon("columnBtn"),
2031
+ circle: "",
2032
+ size: o.crud.isMediumSize,
2033
+ onClick: t[0] || (t[0] = (e) => o.crud.$refs.dialogColumn.handleShow())
2034
+ }, null, 8, ["icon", "size"])), [[l, o.crud.getPermission("columnBtn")]]) : D("v-if", !0),
2035
+ (o.crud.$refs.headerSearch || {}).searchFlag && o.optVal(o.crud.tableOption.searchShowBtn, !0) ? (R(), E(s, {
2036
+ key: 5,
2037
+ icon: o.crud.getBtnIcon("searchBtn"),
2038
+ circle: "",
2039
+ size: o.crud.isMediumSize,
2040
+ onClick: t[1] || (t[1] = (e) => o.crud.$refs.headerSearch.handleSearchShow())
2041
+ }, null, 8, ["icon", "size"])) : D("v-if", !0),
2042
+ o.optVal(o.crud.tableOption.filterBtn, i.config.filterBtn) ? G((R(), E(s, {
2043
+ key: 6,
2044
+ icon: o.crud.getBtnIcon("filterBtn"),
2045
+ circle: "",
2046
+ size: o.crud.isMediumSize,
2047
+ onClick: t[2] || (t[2] = (e) => o.crud.$refs.dialogFilter.handleShow())
2048
+ }, null, 8, ["icon", "size"])), [[l, o.crud.getPermission("filterBtn")]]) : D("v-if", !0)
2049
+ ])) : D("v-if", !0)]);
2050
+ }
2051
+ var cn = /* @__PURE__ */ n(nn, [["render", sn]]), ln = {
2052
+ name: "HeaderSearch",
2053
+ mixins: [y],
2054
+ inject: {
2055
+ crud: { from: "crud" },
2056
+ AVUE: {
2057
+ from: i,
2058
+ default: null
2059
+ }
2060
+ },
2061
+ props: { search: Object },
2062
+ data() {
2063
+ return {
2064
+ show: !1,
2065
+ searchIndex: 2,
2066
+ searchShow: !0
2067
+ };
2068
+ },
2069
+ computed: {
2070
+ searchForm: {
2071
+ get() {
2072
+ return this.crud.search;
2073
+ },
2074
+ set(e) {
2075
+ this.crud.$emit("update:search", e);
2076
+ }
2077
+ },
2078
+ option() {
2079
+ let e = this.crud.option, t = (t = []) => {
2080
+ t = l(t);
2081
+ let n = [], r = 0;
2082
+ return t = t.sort((e, t) => (t.searchOrder || 0) - (e.searchOrder || 0)), t.forEach((t) => {
2083
+ if (t.search) {
2084
+ let i = r < this.searchIndex, a = {};
2085
+ Object.keys(t).forEach((e) => {
2086
+ let n = "search";
2087
+ if (e !== "searchProp" && e.includes(n)) {
2088
+ let r = e.replace(n, "");
2089
+ if (r.length === 0) return;
2090
+ r = r.replace(r[0], r[0].toLowerCase()), a[r] = t[e];
2091
+ }
2092
+ }), t = Object.assign(t, a, {
2093
+ type: se(t),
2094
+ detail: !1,
2095
+ dicFlag: t.cascader ? !0 : g(t.dicFlag, !1),
2096
+ span: t.searchSpan || e.searchSpan || X.searchSpan,
2097
+ control: t.searchControl,
2098
+ gutter: t.searchGutter || e.searchGutter || X.searchGutter,
2099
+ labelWidth: t.searchLabelWidth || e.searchLabelWidth || X.searchLabelWidth,
2100
+ labelPosition: t.searchLabelPosition || e.searchLabelPosition,
2101
+ size: t.searchSize || e.searchSize,
2102
+ value: t.searchValue,
2103
+ rules: t.searchRules,
2104
+ row: t.searchRow,
2105
+ bind: t.searchBin,
2106
+ disabled: t.searchDisabled,
2107
+ readonly: t.searchReadonly,
2108
+ display: this.isSearchIcon ? this.show ? !0 : i : !0
2109
+ }), n.push(t), r += 1;
2110
+ }
2111
+ }), n;
2112
+ };
2113
+ return ((n) => {
2114
+ let r = l(n);
2115
+ return r.column = t(this.crud.propOption), r = Object.assign(r, {
2116
+ rowKey: e.searchRowKey || "null",
2117
+ tabs: !1,
2118
+ group: !1,
2119
+ printBtn: !1,
2120
+ mockBtn: !1,
2121
+ filterDic: e.searchFilterDic,
2122
+ filterNull: e.searchFilterNull,
2123
+ filterParam: e.searchFilterParam,
2124
+ enter: e.searchEnter,
2125
+ size: e.searchSize,
2126
+ submitText: e.searchBtnText || "搜 索",
2127
+ submitBtn: g(e.searchBtn, X.searchSubBtn),
2128
+ submitIcon: this.crud.getBtnIcon("searchBtn"),
2129
+ emptyText: e.emptyBtnText || "清 空",
2130
+ emptyBtn: g(e.emptyBtn, X.emptyBtn),
2131
+ emptyIcon: this.crud.getBtnIcon("emptyBtn"),
2132
+ menuSpan: this.show || !this.isSearchIcon || e.searchMenuSpan < 6 ? e.searchMenuSpan : 6,
2133
+ menuPosition: e.searchMenuPosition || "center",
2134
+ dicFlag: !1,
2135
+ dicData: this.crud.DIC
2136
+ }), r;
2137
+ })(e);
2138
+ },
2139
+ isSearchIcon() {
2140
+ var e;
2141
+ return g(this.crud.option.searchIcon, (e = this.AVUE) == null ? void 0 : e.searchIcon) && this.searchLen > this.searchIndex;
2142
+ },
2143
+ searchLen() {
2144
+ let e = 0;
2145
+ return this.crud.propOption.forEach((t) => {
2146
+ t.search && e++;
2147
+ }), e;
2148
+ },
2149
+ searchFlag() {
2150
+ return !!this.crud.$slots.search || this.searchLen !== 0;
2151
+ }
2152
+ },
2153
+ watch: {
2154
+ "crud.propOption": {
2155
+ handler() {
2156
+ this.dataFormat();
2157
+ },
2158
+ deep: !0
2159
+ },
2160
+ show() {
2161
+ this.crud.getTableHeight();
2162
+ },
2163
+ searchShow() {
2164
+ this.crud.getTableHeight();
2165
+ },
2166
+ option: {
2167
+ immediate: !0,
2168
+ deep: !0,
2169
+ handler() {
2170
+ var e;
2171
+ this.searchIndex = ((e = this.option) == null ? void 0 : e.searchIndex) || 2;
2172
+ }
2173
+ }
2174
+ },
2175
+ created() {
2176
+ this.initFun(), this.dataFormat();
2177
+ },
2178
+ methods: {
2179
+ initFun() {
2180
+ ["searchReset", "searchChange"].forEach((e) => {
2181
+ this.crud[e] = this[e];
2182
+ });
2183
+ },
2184
+ getSlotName(e) {
2185
+ return e.replace("Search", "");
2186
+ },
2187
+ searchChange(e, t) {
2188
+ e = d(e), this.crud.propOption.forEach((t) => {
2189
+ t.searchProp && (e[t.searchProp] = e[t.prop], delete e[t.prop]);
2190
+ }), this.crud.$emit("search-change", e, t);
2191
+ },
2192
+ resetChange() {
2193
+ this.crud.$emit("search-reset", this.searchForm);
2194
+ },
2195
+ searchReset() {
2196
+ this.$refs.form.resetForm();
2197
+ },
2198
+ handleSearchShow() {
2199
+ this.searchShow = !this.searchShow;
2200
+ },
2201
+ dataFormat() {
2202
+ let e = this.crud.option;
2203
+ this.searchShow = g(e.searchShow, X.searchShow);
2204
+ }
2205
+ }
2206
+ };
2207
+ function un(e, t, n, r, i, o) {
2208
+ let s = a, c = $, l = Le;
2209
+ return o.searchFlag ? G((R(), E(l, {
2210
+ key: 0,
2211
+ shadow: o.crud.isCard,
2212
+ class: "avue-crud__search"
2213
+ }, {
2214
+ default: W(() => [B(e.$slots, "search", {
2215
+ row: o.searchForm,
2216
+ search: o.searchForm,
2217
+ size: o.crud.controlSize
2218
+ }), M(c, {
2219
+ ref: "form",
2220
+ modelValue: o.searchForm,
2221
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => o.searchForm = e),
2222
+ option: o.option,
2223
+ onSubmit: o.searchChange,
2224
+ onResetChange: o.resetChange
2225
+ }, {
2226
+ menuForm: W((n) => [B(e.$slots, "searchMenu", I(N(Object.assign(n, {
2227
+ search: o.searchForm,
2228
+ row: o.searchForm
2229
+ })))), o.isSearchIcon ? (R(), O(T, { key: 0 }, [i.show === !1 ? (R(), E(s, {
2230
+ key: 0,
2231
+ text: "",
2232
+ icon: "el-icon-arrow-down",
2233
+ onClick: t[0] || (t[0] = (e) => i.show = !0)
2234
+ }, {
2235
+ default: W(() => [...t[3] || (t[3] = [j("展 开", -1)])]),
2236
+ _: 1
2237
+ })) : D("v-if", !0), i.show === !0 ? (R(), E(s, {
2238
+ key: 1,
2239
+ text: "",
2240
+ icon: "el-icon-arrow-up",
2241
+ onClick: t[1] || (t[1] = (e) => i.show = !1)
2242
+ }, {
2243
+ default: W(() => [...t[4] || (t[4] = [j("收 缩", -1)])]),
2244
+ _: 1
2245
+ })) : D("v-if", !0)], 64)) : D("v-if", !0)]),
2246
+ default: W(() => [(R(!0), O(T, null, z(o.crud.searchSlot, (t) => B(e.$slots, t, P({ ref_for: !0 }, Object.assign(e.scope, {
2247
+ search: o.searchForm,
2248
+ row: o.searchForm
2249
+ })))), 256))]),
2250
+ _: 3
2251
+ }, 8, [
2252
+ "modelValue",
2253
+ "option",
2254
+ "onSubmit",
2255
+ "onResetChange"
2256
+ ])]),
2257
+ _: 3
2258
+ }, 8, ["shadow"])), [[it, i.searchShow && o.searchFlag]]) : D("v-if", !0);
2259
+ }
2260
+ var dn = /* @__PURE__ */ n(ln, [["render", un]]), fn = {
2261
+ mixins: [y],
2262
+ inject: { AVUE: {
2263
+ from: i,
2264
+ default: null
2265
+ } },
2266
+ props: {
2267
+ defaults: {
2268
+ type: Object,
2269
+ default() {
2270
+ return {};
2271
+ }
2272
+ },
2273
+ option: {
2274
+ type: Object,
2275
+ required: !0,
2276
+ default: () => ({})
2277
+ }
2278
+ },
2279
+ emits: ["update:defaults"],
2280
+ watch: {
2281
+ defaults: {
2282
+ handler(e) {
2283
+ this.objectOption = e;
2284
+ },
2285
+ deep: !0
2286
+ },
2287
+ objectOption: {
2288
+ handler(e) {
2289
+ this.$emit("update:defaults", e);
2290
+ },
2291
+ deep: !0
2292
+ },
2293
+ propOption: {
2294
+ handler(e) {
2295
+ let t = {};
2296
+ e.forEach((e) => {
2297
+ t[e.prop] = e;
2298
+ }), this.objectOption = t;
2299
+ },
2300
+ deep: !0
2301
+ },
2302
+ option: {
2303
+ handler() {
2304
+ this.init(!1);
2305
+ },
2306
+ deep: !0
2307
+ }
2308
+ },
2309
+ data() {
2310
+ return {
2311
+ DIC: {},
2312
+ cascaderDIC: {},
2313
+ tableOption: {},
2314
+ isMobile: "",
2315
+ objectOption: {}
2316
+ };
2317
+ },
2318
+ created() {
2319
+ this.init();
2320
+ },
2321
+ computed: {
2322
+ resultOption() {
2323
+ return Object.assign(l(this.tableOption), { column: this.propOption });
2324
+ },
2325
+ rowKey() {
2326
+ return this.tableOption.rowKey || o.rowKey;
2327
+ },
2328
+ formRules() {
2329
+ let e = {};
2330
+ return this.propOption.forEach((t) => {
2331
+ t.rules && t.display !== !1 && (e[t.prop] = t.rules);
2332
+ }), e;
2333
+ },
2334
+ isMediumSize() {
2335
+ return this.controlSize;
2336
+ },
2337
+ controlSize() {
2338
+ var e;
2339
+ return this.tableOption.size || ((e = this.AVUE) == null ? void 0 : e.size);
2340
+ }
2341
+ },
2342
+ methods: {
2343
+ init(e) {
2344
+ this.tableOption = this.option, this.getIsMobile(), this.handleLocalDic(), e !== !1 && this.handleLoadDic();
2345
+ },
2346
+ dicInit(e) {
2347
+ e === "cascader" ? this.handleLoadCascaderDic() : this.handleLoadDic();
2348
+ },
2349
+ getIsMobile() {
2350
+ this.isMobile = document.body.clientWidth <= 768;
2351
+ },
2352
+ updateDic(e, t) {
2353
+ let n = this.findObject(this.propOption, e);
2354
+ q(t) && q(e) ? this.handleLoadDic() : q(t) && !q(n.dicUrl) ? b({ column: n }).then((t) => {
2355
+ this.DIC[e] = t;
2356
+ }) : this.DIC[e] = t;
2357
+ },
2358
+ handleSetDic(e, t = {}) {
2359
+ Object.keys(t).forEach((n) => {
2360
+ e[n] = t[n];
2361
+ });
2362
+ },
2363
+ handleLocalDic() {
2364
+ this.handleSetDic(this.DIC, ve(this.resultOption));
2365
+ },
2366
+ handleLoadDic() {
2367
+ be(this.resultOption).then((e) => this.handleSetDic(this.DIC, e));
2368
+ },
2369
+ handleLoadCascaderDic() {
2370
+ ye(this.propOption, this.data).then((e) => this.handleSetDic(this.cascaderDIC, e));
2371
+ }
2372
+ }
2373
+ }, pn = {
2374
+ name: "FyCurd",
2375
+ directives: { permission: Q },
2376
+ mixins: [fn],
2377
+ provide() {
2378
+ return {
2379
+ crud: this,
2380
+ [i]: t
2381
+ };
2382
+ },
2383
+ props: {
2384
+ spanMethod: Function,
2385
+ summaryMethod: Function,
2386
+ rowStyle: Function,
2387
+ cellStyle: Function,
2388
+ beforeClose: Function,
2389
+ beforeOpen: Function,
2390
+ rowClassName: Function,
2391
+ cellClassName: Function,
2392
+ headerCellClassName: Function,
2393
+ uploadBefore: Function,
2394
+ uploadAfter: Function,
2395
+ uploadDelete: Function,
2396
+ uploadPreview: Function,
2397
+ uploadError: Function,
2398
+ uploadExceed: Function,
2399
+ permission: {
2400
+ type: [Function, Object],
2401
+ default: () => ({})
2402
+ },
2403
+ modelValue: {
2404
+ type: Object,
2405
+ default: () => ({})
2406
+ },
2407
+ search: {
2408
+ type: Object,
2409
+ default() {
2410
+ return {};
2411
+ }
2412
+ },
2413
+ page: {
2414
+ type: Object,
2415
+ default() {
2416
+ return {};
2417
+ }
2418
+ },
2419
+ tableLoading: {
2420
+ type: Boolean,
2421
+ default: !1
2422
+ },
2423
+ disabled: {
2424
+ type: Boolean,
2425
+ default: !1
2426
+ },
2427
+ data: {
2428
+ type: Array,
2429
+ default: () => []
2430
+ }
2431
+ },
2432
+ emits: /* @__PURE__ */ "tree-load.selection-clear.header-dragend.expand-change.current-row-change.refresh-change.selection-change.select.select-all.filter-change.sort-change.row-dblclick.row-click.cell-mouse-enter.cell-mouse-leave.cell-click.header-click.row-contextmenu.header-contextmenu.cell-dblclick.row-save.row-update.update:modelValue.change.error.row-del.update:search.update:page.search-change.search-reset.on-load".split("."),
2433
+ data() {
2434
+ return {
2435
+ reload: Math.random(),
2436
+ cellForm: { list: [] },
2437
+ config: X,
2438
+ list: [],
2439
+ listError: {},
2440
+ tableForm: {},
2441
+ tableHeight: void 0,
2442
+ tableIndex: -1,
2443
+ tableSelect: [],
2444
+ sumsList: {},
2445
+ cascaderIndexList: [],
2446
+ cascaderDicList: {},
2447
+ cascaderFormList: {},
2448
+ btnDisabledList: {},
2449
+ btnDisabled: !1,
2450
+ default: {}
2451
+ };
2452
+ },
2453
+ computed: {
2454
+ isHeightAuto() {
2455
+ return this.tableOption.height === "auto";
2456
+ },
2457
+ isSortable() {
2458
+ return this.tableOption.sortable;
2459
+ },
2460
+ isRowSort() {
2461
+ return this.tableOption.rowSort;
2462
+ },
2463
+ isColumnSort() {
2464
+ return this.tableOption.columnSort;
2465
+ },
2466
+ rowParentKey() {
2467
+ return this.option.rowParentKey || o.rowParentKey;
2468
+ },
2469
+ childrenKey() {
2470
+ return this.treeProps.children || o.children;
2471
+ },
2472
+ hasChildrenKey() {
2473
+ return this.treeProps.hasChildren || o.hasChildren;
2474
+ },
2475
+ treeProps() {
2476
+ return this.tableOption.treeProps || {};
2477
+ },
2478
+ isAutoHeight() {
2479
+ return this.tableOption.height === "auto";
2480
+ },
2481
+ formSlot() {
2482
+ return this.getSlotList([
2483
+ "Error",
2484
+ "Label",
2485
+ "Type",
2486
+ "Form"
2487
+ ], this.$slots, this.propOption);
2488
+ },
2489
+ searchSlot() {
2490
+ return this.getSlotList(["Search"], this.$slots, this.propOption);
2491
+ },
2492
+ mainSlot() {
2493
+ let e = [];
2494
+ return this.propOption.forEach((t) => {
2495
+ this.$slots[t.prop] && e.push(t.prop);
2496
+ }), this.getSlotList(["Header", "Form"], this.$slots, this.propOption).concat(e);
2497
+ },
2498
+ calcHeight() {
2499
+ var e;
2500
+ return (this.tableOption.calcHeight || 0) + ((e = this.AVUE) == null ? void 0 : e.calcHeight);
2501
+ },
2502
+ propOption() {
2503
+ let e = [];
2504
+ function t(n = []) {
2505
+ Array.isArray(n) && n.forEach((n) => {
2506
+ Array.isArray(n.children) ? t(n.children) : e.push(n);
2507
+ });
2508
+ }
2509
+ return t(this.columnOption), e = oe(e), e;
2510
+ },
2511
+ isShowSummary() {
2512
+ return this.option.showSummary;
2513
+ },
2514
+ isHeader() {
2515
+ let e = !1;
2516
+ return this.columnOption.forEach((t) => {
2517
+ t.children && (e = !0);
2518
+ }), e;
2519
+ },
2520
+ isTree() {
2521
+ let e = !1;
2522
+ return this.data.forEach((t) => {
2523
+ t.children && (e = !0);
2524
+ }), e;
2525
+ },
2526
+ isCard() {
2527
+ return this.option.card ? "always" : "never";
2528
+ },
2529
+ expandLevel() {
2530
+ return this.parentOption.expandLevel || 0;
2531
+ },
2532
+ expandAll() {
2533
+ return this.parentOption.expandAll || !1;
2534
+ },
2535
+ parentOption() {
2536
+ return this.tableOption || {};
2537
+ },
2538
+ columnOption() {
2539
+ return this.tableOption.column || [];
2540
+ },
2541
+ sumColumnList() {
2542
+ return this.tableOption.sumColumnList || [];
2543
+ },
2544
+ selectLen() {
2545
+ return this.tableSelect ? this.tableSelect.length : 0;
2546
+ }
2547
+ },
2548
+ watch: {
2549
+ modelValue: {
2550
+ handler() {
2551
+ this.tableForm = this.modelValue;
2552
+ },
2553
+ immediate: !0,
2554
+ deep: !0
2555
+ },
2556
+ list: {
2557
+ handler() {
2558
+ this.cellForm.list = this.list;
2559
+ },
2560
+ deep: !0
2561
+ },
2562
+ data: {
2563
+ handler() {
2564
+ this.dataInit();
2565
+ },
2566
+ deep: !0
2567
+ }
2568
+ },
2569
+ mounted() {
2570
+ this.dataInit(), this.getTableHeight(), this.refreshTable();
2571
+ },
2572
+ methods: {
2573
+ setPx: p,
2574
+ optVal: g,
2575
+ handleValidate(e, t, n) {
2576
+ this.listError[e] || (this.listError[e] = {
2577
+ valid: !1,
2578
+ msg: ""
2579
+ }), this.listError[e].valid = !t, this.listError[e].msg = n;
2580
+ },
2581
+ getPermission(e, t, n) {
2582
+ return typeof this.permission == "function" ? this.permission(e, t, n) : q(this.permission[e]) ? !0 : this.permission[e];
2583
+ },
2584
+ getTableHeight() {
2585
+ this.isAutoHeight ? this.$nextTick(() => {
2586
+ let e = this.$refs.table, t = this.$refs.tablePage;
2587
+ if (!e) return;
2588
+ let n = e.$el, r = t.$el.offsetHeight || 20;
2589
+ this.tableHeight = document.documentElement.clientHeight - n.offsetTop - r - this.calcHeight;
2590
+ }) : this.tableHeight = this.tableOption.height;
2591
+ },
2592
+ doLayout() {
2593
+ this.$refs.table.doLayout();
2594
+ },
2595
+ refreshTable(e) {
2596
+ this.reload = Math.random(), this.$nextTick(() => {
2597
+ e == null || e();
2598
+ });
2599
+ },
2600
+ treeLoad(e, t, n) {
2601
+ this.$emit("tree-load", e, t, (t) => {
2602
+ e.children = t, n(t);
2603
+ });
2604
+ },
2605
+ menuIcon(e) {
2606
+ return g(this.tableOption[`${e}Text`], fe(`crud.${e}`));
2607
+ },
2608
+ getBtnIcon(e) {
2609
+ let t = `${e}Icon`;
2610
+ return this.tableOption[t] || X[t];
2611
+ },
2612
+ validateField(e) {
2613
+ return this.$refs.dialogForm.$refs.tableForm.validateField(e);
2614
+ },
2615
+ selectClear() {
2616
+ this.$emit("selection-clear", l(this.tableSelect)), this.$refs.table.clearSelection();
2617
+ },
2618
+ toggleRowSelection(e, t) {
2619
+ this.$refs.table.toggleRowSelection(e, t);
2620
+ },
2621
+ toggleRowExpansion(e, t) {
2622
+ this.$refs.table.toggleRowExpansion(e, t);
2623
+ },
2624
+ setCurrentRow(e) {
2625
+ this.$refs.table.setCurrentRow(e);
2626
+ },
2627
+ dataInit() {
2628
+ this.list = this.data, this.list.forEach((e, t) => {
2629
+ e.$cellEdit && !this.cascaderFormList[t] && (this.cascaderFormList[t] = l(e)), e.$cellEdit = e.$cellEdit || !1, e.$index = t;
2630
+ });
2631
+ },
2632
+ headerDragend(e, t, n, r) {
2633
+ this.objectOption[n.property] && (this.objectOption[n.property].width = e), this.$emit("header-dragend", e, t, n, r);
2634
+ },
2635
+ headerSort(e, t) {
2636
+ let n = this.columnOption, r = n.splice(e, 1)[0];
2637
+ n.splice(t, 0, r), this.refreshTable();
2638
+ },
2639
+ clearFilter(e) {
2640
+ this.$refs.table.clearFilter(e);
2641
+ },
2642
+ expandChange(e, t) {
2643
+ this.$emit("expand-change", e, t);
2644
+ },
2645
+ currentRowChange(e, t) {
2646
+ this.$emit("current-row-change", e, t);
2647
+ },
2648
+ refreshChange() {
2649
+ this.$emit("refresh-change");
2650
+ },
2651
+ toggleSelection(e) {
2652
+ e ? e.forEach((e) => {
2653
+ this.$refs.table.toggleRowSelection(e);
2654
+ }) : this.$refs.table.clearSelection();
2655
+ },
2656
+ selectionChange(e) {
2657
+ this.tableSelect = e, this.$emit("selection-change", this.tableSelect);
2658
+ },
2659
+ select(e, t) {
2660
+ this.$emit("select", e, t);
2661
+ },
2662
+ selectAll(e) {
2663
+ this.$emit("select-all", e);
2664
+ },
2665
+ filterChange(e) {
2666
+ this.$emit("filter-change", e);
2667
+ },
2668
+ sortChange(e) {
2669
+ this.$emit("sort-change", e);
2670
+ },
2671
+ rowDblclick(e, t) {
2672
+ this.$emit("row-dblclick", e, t);
2673
+ },
2674
+ rowClick(e, t, n) {
2675
+ this.$emit("row-click", e, t, n);
2676
+ },
2677
+ clearSort() {
2678
+ this.$refs.table.clearSort();
2679
+ },
2680
+ cellMouseEnter(e, t, n, r) {
2681
+ this.$emit("cell-mouse-enter", e, t, n, r);
2682
+ },
2683
+ cellMouseLeave(e, t, n, r) {
2684
+ this.$emit("cell-mouse-leave", e, t, n, r);
2685
+ },
2686
+ cellClick(e, t, n, r) {
2687
+ this.$emit("cell-click", e, t, n, r);
2688
+ },
2689
+ headerClick(e, t) {
2690
+ this.$emit("header-click", e, t);
2691
+ },
2692
+ rowContextmenu(e, t, n) {
2693
+ this.$emit("row-contextmenu", e, t, n);
2694
+ },
2695
+ headerContextmenu(e, t) {
2696
+ this.$emit("header-contextmenu", e, t);
2697
+ },
2698
+ cellDblclick(e, t, n, r) {
2699
+ this.$emit("cell-dblclick", e, t, n, r);
2700
+ },
2701
+ rowCellAdd(e = {}) {
2702
+ let t = this.list.length, n = le(this.propOption).tableForm;
2703
+ e = l({
2704
+ $cellEdit: !0,
2705
+ $index: t,
2706
+ ...n,
2707
+ ...e
2708
+ }), this.list.push(e);
2709
+ },
2710
+ rowCancel(e, t) {
2711
+ q(e[this.rowKey]) ? (this.list.splice(t, 1), delete this.cascaderDIC[t]) : (this.cascaderFormList[t].$cellEdit = !1, this.cascaderDIC[t] = this.cascaderDicList[t], this.list[t] = this.cascaderFormList[t]), delete this.cascaderDicList[t], delete this.cascaderFormList[t], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1);
2712
+ },
2713
+ rowCell(e, t) {
2714
+ e.$cellEdit ? this.rowCellUpdate(e, t) : this.rowCellEdit(e, t);
2715
+ },
2716
+ rowCellUpdate(e, t) {
2717
+ e = l(e);
2718
+ let n = this.validateCellField(t), r = () => {
2719
+ this.btnDisabledList[t] = !1, this.btnDisabled = !1, this.list[t].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1), delete this.cascaderFormList[t];
2720
+ }, i = () => {
2721
+ this.btnDisabledList[t] = !1, this.btnDisabled = !1;
2722
+ };
2723
+ n && (this.btnDisabledList[t] = !0, this.btnDisabled = !0, q(e[this.rowKey]) ? this.$emit("row-save", e, r, i) : this.$emit("row-update", e, t, r, i));
2724
+ },
2725
+ rowCellEdit(e, t) {
2726
+ e.$cellEdit = !0, this.cascaderFormList[t] = l(e), this.cascaderDicList[t] = l(this.cascaderDIC[t]);
2727
+ },
2728
+ validateCellForm() {
2729
+ return new Promise((e) => {
2730
+ this.$refs.cellForm.validate((t, n) => {
2731
+ e(n);
2732
+ });
2733
+ });
2734
+ },
2735
+ validateCellField(e) {
2736
+ let t = !0;
2737
+ for (let n of this.$refs.cellForm.fields) if (n.prop.split(".")[1] === `${e}` && this.$refs.cellForm.validateField(n.prop, (e) => {
2738
+ e && (t = !1);
2739
+ }), !t) break;
2740
+ return t;
2741
+ },
2742
+ rowAdd() {
2743
+ this.$refs.dialogForm.show("add");
2744
+ },
2745
+ rowSave() {
2746
+ return this.$refs.dialogForm.$refs.tableForm.submit();
2747
+ },
2748
+ rowUpdate() {
2749
+ return this.$refs.dialogForm.$refs.tableForm.submit();
2750
+ },
2751
+ closeDialog() {
2752
+ return this.$refs.dialogForm.closeDialog();
2753
+ },
2754
+ getPropRef(e) {
2755
+ return this.$refs.dialogForm.$refs.tableForm.getPropRef(e);
2756
+ },
2757
+ setVal() {
2758
+ this.$emit("update:modelValue", this.tableForm), this.$emit("change", this.tableForm);
2759
+ },
2760
+ rowEdit(e, t) {
2761
+ this.tableForm = l(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("edit");
2762
+ },
2763
+ rowCopy(e) {
2764
+ this.tableForm = l(e), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
2765
+ },
2766
+ rowView(e, t) {
2767
+ this.tableForm = l(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("view");
2768
+ },
2769
+ rowDel(e, t) {
2770
+ this.$emit("row-del", e, t, () => {
2771
+ let { parentList: t, index: n } = this.findData(e[this.rowKey]);
2772
+ t && t.splice(n, 1);
2773
+ });
2774
+ },
2775
+ tableSpanMethod(e) {
2776
+ if (typeof this.spanMethod == "function") return this.spanMethod(e);
2777
+ },
2778
+ tableSummaryMethod(e) {
2779
+ let t = {};
2780
+ if (typeof this.summaryMethod == "function") return this.summaryMethod(e);
2781
+ let { columns: n, data: r } = e, i = [];
2782
+ return n.length > 0 && n.forEach((e, n) => {
2783
+ let a = this.sumColumnList.find((t) => t.name === e.property);
2784
+ if (a) {
2785
+ let o = a.decimals || 2, s = a.label || "", c = 1;
2786
+ switch (a.type) {
2787
+ case "count":
2788
+ i[n] = s + r.length;
2789
+ break;
2790
+ case "avg":
2791
+ i[n] = r.map((t) => Number(t[e.property])).reduce((e, t) => {
2792
+ let n = Number(t);
2793
+ return isNaN(n) ? e : (e * (c - 1) + t) / c++;
2794
+ }, 0), i[n] = s + i[n].toFixed(o);
2795
+ break;
2796
+ case "sum":
2797
+ i[n] = r.map((t) => Number(t[e.property])).reduce((e, t) => {
2798
+ let n = Number(t);
2799
+ return isNaN(n) ? e : e + t;
2800
+ }, 0), i[n] = s + i[n].toFixed(o);
2801
+ break;
2802
+ }
2803
+ t[e.property] = i[n];
2804
+ } else i[n] = "";
2805
+ }), this.sumsList = t, i;
2806
+ },
2807
+ tableDrop(e, t, n) {
2808
+ if (!(this.isSortable !== !0 && (e === "row" && !this.isRowSort || e === "column" && !this.isColumnSort))) {
2809
+ if (!window.Sortable) {
2810
+ Se.logs("Sortable");
2811
+ return;
2812
+ }
2813
+ window.Sortable.create(t, {
2814
+ ghostClass: X.ghostClass,
2815
+ chosenClass: X.ghostClass,
2816
+ animation: 500,
2817
+ delay: 0,
2818
+ onEnd: (e) => n(e)
2819
+ });
2820
+ }
2821
+ },
2822
+ findData(e) {
2823
+ let t = {}, n = (r, i) => {
2824
+ r.forEach((a, o) => {
2825
+ a[this.rowKey] === e && (t = {
2826
+ item: a,
2827
+ index: o,
2828
+ parentList: r,
2829
+ parent: i
2830
+ }), a[this.childrenKey] && n(a[this.childrenKey], a);
2831
+ });
2832
+ };
2833
+ return n(this.list), t;
2834
+ }
2835
+ }
2836
+ }, mn = { class: "avue-crud avue-crud--card" }, hn = { class: "avue-crud__tip-name" }, gn = { class: "avue-crud__tip-count" };
2837
+ function _n(e, t, n, r, i, o) {
2838
+ let s = dn, c = cn, l = a, u = $e, d = tn, f = Qt, p = Yt, m = We, h = Ze, g = Ge, ee = Nt, te = At, ne = Dt, _ = Ct, re = vt, v = V("permission"), ie = qe;
2839
+ return R(), O("div", mn, [
2840
+ e.tableOption.title ? (R(), E(H(e.tableOption.titleSize || "h2"), {
2841
+ key: 0,
2842
+ style: L(e.tableOption.titleStyle)
2843
+ }, {
2844
+ default: W(() => [j(U(e.tableOption.title), 1)]),
2845
+ _: 1
2846
+ }, 8, ["style"])) : D("v-if", !0),
2847
+ D(" 搜索组件 "),
2848
+ M(s, { ref: "headerSearch" }, A({
2849
+ search: W((t) => [B(e.$slots, "search", I(N(t)))]),
2850
+ searchMenu: W((t) => [B(e.$slots, "searchMenu", I(N(t)))]),
2851
+ _: 2
2852
+ }, [z(o.searchSlot, (t) => ({
2853
+ name: t,
2854
+ fn: W((n) => [B(e.$slots, t, I(N(n)))])
2855
+ }))]), 1536),
2856
+ D(" 表格功能列 "),
2857
+ o.optVal(e.tableOption.header, !0) ? (R(), E(c, {
2858
+ key: 1,
2859
+ ref: "headerMenu"
2860
+ }, {
2861
+ menuLeft: W((t) => [B(e.$slots, "menuLeft", I(N(t)))]),
2862
+ menuRight: W((t) => [B(e.$slots, "menuRight", I(N(t)))]),
2863
+ _: 3
2864
+ }, 512)) : D("v-if", !0),
2865
+ o.optVal(e.tableOption.tip, i.config.tip) && e.tableOption.selection ? (R(), E(u, {
2866
+ key: 2,
2867
+ "disable-transitions": "",
2868
+ class: "avue-crud__tip"
2869
+ }, {
2870
+ default: W(() => [
2871
+ k("span", hn, [
2872
+ t[0] || (t[0] = j(" 当前表格已选择 ", -1)),
2873
+ k("span", gn, U(o.selectLen), 1),
2874
+ t[1] || (t[1] = j(" 项 ", -1))
2875
+ ]),
2876
+ o.optVal(e.tableOption.selectClearBtn, i.config.selectClearBtn) && e.tableOption.selection ? G((R(), E(l, {
2877
+ key: 0,
2878
+ link: "",
2879
+ primary: "",
2880
+ size: "small",
2881
+ onClick: o.selectClear
2882
+ }, {
2883
+ default: W(() => [...t[2] || (t[2] = [j(" 清 空 ", -1)])]),
2884
+ _: 1
2885
+ }, 8, ["onClick"])), [[v, o.getPermission("selectClearBtn")]]) : D("v-if", !0),
2886
+ B(e.$slots, "tip")
2887
+ ]),
2888
+ _: 3
2889
+ })) : D("v-if", !0),
2890
+ B(e.$slots, "header"),
2891
+ M(g, {
2892
+ ref: "cellForm",
2893
+ model: i.cellForm,
2894
+ "show-message": !1,
2895
+ onValidate: o.handleValidate
2896
+ }, {
2897
+ default: W(() => {
2898
+ var t;
2899
+ return [G((R(), E(h, {
2900
+ key: i.reload,
2901
+ ref: "table",
2902
+ data: i.cellForm.list,
2903
+ "row-key": e.rowKey,
2904
+ class: F({ "avue-crud--indeterminate": o.optVal(e.tableOption.indeterminate, !1) }),
2905
+ size: ((t = e.AVUE) == null ? void 0 : t.tableSize) || e.controlSize,
2906
+ lazy: o.optVal(e.tableOption.lazy, !1),
2907
+ load: o.treeLoad,
2908
+ "tree-props": o.treeProps,
2909
+ "expand-row-keys": e.tableOption.expandRowKeys,
2910
+ "default-expand-all": e.tableOption.defaultExpandAll,
2911
+ "highlight-current-row": e.tableOption.highlightCurrentRow,
2912
+ "show-summary": e.tableOption.showSummary,
2913
+ "summary-method": o.tableSummaryMethod,
2914
+ "span-method": o.tableSpanMethod,
2915
+ stripe: e.tableOption.stripe,
2916
+ "show-header": e.tableOption.showHeader,
2917
+ "default-sort": e.tableOption.defaultSort,
2918
+ "row-class-name": n.rowClassName,
2919
+ "cell-class-name": n.cellClassName,
2920
+ "row-style": n.rowStyle,
2921
+ "cell-style": n.cellStyle,
2922
+ fit: e.tableOption.fit,
2923
+ "header-cell-class-name": n.headerCellClassName,
2924
+ "max-height": o.isAutoHeight ? i.tableHeight : e.tableOption.maxHeight,
2925
+ height: i.tableHeight,
2926
+ width: o.setPx(e.tableOption.width, i.config.width),
2927
+ border: e.tableOption.border,
2928
+ onCurrentChange: o.currentRowChange,
2929
+ onExpandChange: o.expandChange,
2930
+ onHeaderDragend: o.headerDragend,
2931
+ onRowClick: o.rowClick,
2932
+ onRowDblclick: o.rowDblclick,
2933
+ onCellMouseEnter: o.cellMouseEnter,
2934
+ onCellMouseLeave: o.cellMouseLeave,
2935
+ onCellClick: o.cellClick,
2936
+ onHeaderClick: o.headerClick,
2937
+ onRowContextmenu: o.rowContextmenu,
2938
+ onHeaderContextmenu: o.headerContextmenu,
2939
+ onCellDblclick: o.cellDblclick,
2940
+ onFilterChange: o.filterChange,
2941
+ onSelectionChange: o.selectionChange,
2942
+ onSelect: o.select,
2943
+ onSelectAll: o.selectAll,
2944
+ onSortChange: o.sortChange
2945
+ }, {
2946
+ empty: W(() => [e.$slots.empty ? B(e.$slots, "empty", { key: 0 }) : (R(), E(m, {
2947
+ key: 1,
2948
+ "image-size": 100,
2949
+ class: "avue-crud__empty",
2950
+ description: e.tableOption.emptyText
2951
+ }, null, 8, ["description"]))]),
2952
+ default: W(() => [M(p, { "column-option": o.columnOption }, A({
2953
+ header: W(() => [M(d, { ref: "columnDefault" }, {
2954
+ expand: W(({ row: t, index: n }) => [B(e.$slots, "expand", {
2955
+ row: t,
2956
+ index: n
2957
+ })]),
2958
+ _: 3
2959
+ }, 512)]),
2960
+ footer: W(() => [M(f, null, {
2961
+ menu: W((t) => [B(e.$slots, "menu", I(N(t)))]),
2962
+ menuBtn: W((t) => [B(e.$slots, "menuBtn", I(N(t)))]),
2963
+ _: 3
2964
+ })]),
2965
+ _: 2
2966
+ }, [z(o.mainSlot, (t) => ({
2967
+ name: t,
2968
+ fn: W((n) => [B(e.$slots, t, I(N(n)))])
2969
+ }))]), 1032, ["column-option"])]),
2970
+ _: 3
2971
+ }, 8, /* @__PURE__ */ "data.row-key.class.size.lazy.load.tree-props.expand-row-keys.default-expand-all.highlight-current-row.show-summary.summary-method.span-method.stripe.show-header.default-sort.row-class-name.cell-class-name.row-style.cell-style.fit.header-cell-class-name.max-height.height.width.border.onCurrentChange.onExpandChange.onHeaderDragend.onRowClick.onRowDblclick.onCellMouseEnter.onCellMouseLeave.onCellClick.onHeaderClick.onRowContextmenu.onHeaderContextmenu.onCellDblclick.onFilterChange.onSelectionChange.onSelect.onSelectAll.onSortChange".split("."))), [[ie, n.tableLoading]])];
2972
+ }),
2973
+ _: 3
2974
+ }, 8, ["model", "onValidate"]),
2975
+ B(e.$slots, "footer"),
2976
+ D(" 分页 "),
2977
+ M(ee, { ref: "tablePage" }, null, 512),
2978
+ D(" 表单 "),
2979
+ M(te, { ref: "dialogForm" }, A({
2980
+ menuForm: W((t) => [B(e.$slots, "menuForm", I(N(t)))]),
2981
+ _: 2
2982
+ }, [z(o.formSlot, (t) => ({
2983
+ name: t,
2984
+ fn: W((n) => [B(e.$slots, t, I(N(n)))])
2985
+ }))]), 1536),
2986
+ M(ne, { ref: "dialogColumn" }, null, 512),
2987
+ M(_, { ref: "dialogExcel" }, null, 512),
2988
+ M(re, { ref: "dialogFilter" }, null, 512)
2989
+ ]);
2990
+ }
2991
+ var vn = /* @__PURE__ */ n(pn, [["render", _n]]), yn = {
2992
+ name: "FyDynamic",
2993
+ mixins: [ce, de],
2994
+ props: {
2995
+ max: Number,
2996
+ columnSlot: {
2997
+ type: Array,
2998
+ default: () => []
2999
+ },
3000
+ children: {
3001
+ type: Object,
3002
+ default: () => ({})
3003
+ }
3004
+ },
3005
+ data() {
3006
+ return {
3007
+ reload: Math.random(),
3008
+ hoverList: []
3009
+ };
3010
+ },
3011
+ computed: {
3012
+ textLen() {
3013
+ return this.text.length;
3014
+ },
3015
+ maxFlag() {
3016
+ return this.max ? this.text.length !== this.max : !0;
3017
+ },
3018
+ showIndex() {
3019
+ return g(this.children.index, !0);
3020
+ },
3021
+ showType() {
3022
+ return this.children.type || "crud";
3023
+ },
3024
+ isForm() {
3025
+ return this.showType === "form";
3026
+ },
3027
+ isCrud() {
3028
+ return this.showType === "crud";
3029
+ },
3030
+ selectionChange() {
3031
+ return this.children.selectionChange;
3032
+ },
3033
+ sortableChange() {
3034
+ return this.children.sortableChange;
3035
+ },
3036
+ rowAdd() {
3037
+ return this.children.rowAdd;
3038
+ },
3039
+ rowDel() {
3040
+ return this.children.rowDel;
3041
+ },
3042
+ viewBtn() {
3043
+ return this.children.viewBtn === !1;
3044
+ },
3045
+ addBtn() {
3046
+ return this.children.addBtn === !1;
3047
+ },
3048
+ delBtn() {
3049
+ return this.children.delBtn === !1;
3050
+ },
3051
+ valueOption() {
3052
+ let e = {};
3053
+ return this.columnOption.forEach((t) => {
3054
+ t.value && (e[t.prop] = t.value);
3055
+ }), e;
3056
+ },
3057
+ rulesOption() {
3058
+ let e = {};
3059
+ return this.columnOption.forEach((t) => {
3060
+ t.rules && (e[t.prop] = t.rules);
3061
+ }), e;
3062
+ },
3063
+ columnOption() {
3064
+ return this.children.column || [];
3065
+ },
3066
+ option() {
3067
+ return {
3068
+ border: !0,
3069
+ header: !1,
3070
+ menu: !1,
3071
+ size: this.size,
3072
+ disabled: this.disabled,
3073
+ readonly: this.readonly,
3074
+ emptyBtn: !1,
3075
+ submitBtn: !1,
3076
+ ...(() => {
3077
+ let e = l(this.children);
3078
+ return delete e.column, e;
3079
+ })(),
3080
+ ...(() => {
3081
+ let e = [{
3082
+ label: this.children.indexLabel || "#",
3083
+ prop: "_index",
3084
+ display: this.showIndex,
3085
+ hide: !this.showIndex,
3086
+ fixed: !0,
3087
+ align: "center",
3088
+ headerAlign: "center",
3089
+ span: 24,
3090
+ width: 50
3091
+ }];
3092
+ return this.columnOption.forEach((t) => {
3093
+ e.push(Object.assign(t, { cell: g(t.cell, this.isCrud) }));
3094
+ }), { column: e };
3095
+ })()
3096
+ };
3097
+ }
3098
+ },
3099
+ watch: { text() {
3100
+ this.initData();
3101
+ } },
3102
+ mounted() {
3103
+ this.initData();
3104
+ },
3105
+ methods: {
3106
+ deepClone: l,
3107
+ handleSelectionChange(e) {
3108
+ var t;
3109
+ (t = this.selectionChange) == null || t.call(this, e);
3110
+ },
3111
+ handleSortableChange(e, t, n, r) {
3112
+ var i;
3113
+ (i = this.sortableChange) == null || i.call(this, e, t, n, r);
3114
+ },
3115
+ cellMouseenter(e) {
3116
+ let t = e.$index;
3117
+ this.mouseoverRow(t);
3118
+ },
3119
+ cellMouseLeave(e) {
3120
+ let t = e.$index;
3121
+ this.mouseoutRow(t);
3122
+ },
3123
+ initData() {
3124
+ this.text.forEach((e, t) => {
3125
+ e = Object.assign(e, {
3126
+ $cellEdit: !0,
3127
+ $index: t
3128
+ });
3129
+ });
3130
+ },
3131
+ mouseoverRow(e) {
3132
+ this.delBtn || (this.flagList(), this.hoverList[e] = !0);
3133
+ },
3134
+ mouseoutRow(e) {
3135
+ this.delBtn || (this.flagList(), this.hoverList[e] = !1);
3136
+ },
3137
+ flagList() {
3138
+ this.hoverList.forEach((e, t) => {
3139
+ this.hoverList[t] = !1;
3140
+ });
3141
+ },
3142
+ delRow(e) {
3143
+ let t = () => {
3144
+ let t = l(this.text);
3145
+ t.splice(e, 1), this.text = t, this.reload = Math.random();
3146
+ };
3147
+ typeof this.rowDel == "function" ? this.rowDel(this.text[e], t) : t();
3148
+ },
3149
+ addRow() {
3150
+ let e = (e = {}) => {
3151
+ e = Object.assign(this.valueOption, e, { $index: this.textLen }), this.isCrud ? this.$refs.main.rowCellAdd(e) : this.isForm && this.text.push(e);
3152
+ };
3153
+ typeof this.rowAdd == "function" ? this.rowAdd(e) : e();
3154
+ }
3155
+ }
3156
+ }, bn = { class: "avue-dynamic__header" }, xn = ["onMouseenter", "onMouseleave"], Sn = { key: 1 };
3157
+ function Cn(e, t, n, r, i, o) {
3158
+ let s = a, c = $, l = vn;
3159
+ return R(), O("div", {
3160
+ key: i.reload,
3161
+ class: "avue-dynamic"
3162
+ }, [o.isForm ? (R(), O(T, { key: 0 }, [k("div", bn, [!e.readonly && !e.disabled && !o.addBtn ? (R(), E(s, {
3163
+ key: 0,
3164
+ circle: "",
3165
+ disabled: e.disabled,
3166
+ type: "primary",
3167
+ icon: "el-icon-plus",
3168
+ onClick: o.addRow
3169
+ }, null, 8, ["disabled", "onClick"])) : D("v-if", !0)]), k("div", null, [(R(!0), O(T, null, z(e.text, (t, r) => (R(), O("div", {
3170
+ key: r,
3171
+ class: "avue-dynamic__row",
3172
+ onMouseenter: (e) => o.cellMouseenter({ $index: r }),
3173
+ onMouseleave: (e) => o.cellMouseLeave({ $index: r })
3174
+ }, [!e.readonly && !e.disabled && !o.delBtn && i.hoverList[r] ? (R(), E(s, {
3175
+ key: 0,
3176
+ type: "danger",
3177
+ class: "avue-dynamic__menu",
3178
+ disabled: e.disabled,
3179
+ icon: "el-icon-delete",
3180
+ circle: "",
3181
+ onClick: (e) => o.delRow(t.$index)
3182
+ }, null, 8, ["disabled", "onClick"])) : D("v-if", !0), (R(), E(c, {
3183
+ key: r,
3184
+ ref_for: !0,
3185
+ ref: "main",
3186
+ modelValue: e.text[r],
3187
+ "onUpdate:modelValue": (t) => e.text[r] = t,
3188
+ option: o.deepClone(o.option)
3189
+ }, A({
3190
+ _index: W(({}) => [k("div", null, [k("span", null, U(t.$index + 1), 1)])]),
3191
+ _: 2
3192
+ }, [z(n.columnSlot, (t) => ({
3193
+ name: t,
3194
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, Object.assign(n, { row: e.text[r] })))])
3195
+ }))]), 1032, [
3196
+ "modelValue",
3197
+ "onUpdate:modelValue",
3198
+ "option"
3199
+ ]))], 40, xn))), 128))])], 64)) : o.isCrud ? (R(), E(l, {
3200
+ key: 1,
3201
+ ref: "main",
3202
+ option: o.option,
3203
+ disabled: e.disabled,
3204
+ data: e.text,
3205
+ onCellMouseEnter: o.cellMouseenter,
3206
+ onCellMouseLeave: o.cellMouseLeave,
3207
+ onSelectionChange: o.handleSelectionChange,
3208
+ onSortableChange: o.handleSortableChange
3209
+ }, {
3210
+ _indexHeader: W(() => [!(o.addBtn || e.readonly) && o.maxFlag ? (R(), E(s, {
3211
+ key: 0,
3212
+ type: "primary",
3213
+ disabled: e.disabled,
3214
+ icon: "el-icon-plus",
3215
+ circle: "",
3216
+ onClick: t[0] || (t[0] = (e) => o.addRow())
3217
+ }, null, 8, ["disabled"])) : D("v-if", !0)]),
3218
+ _index: W((t) => [!e.readonly && !e.disabled && !o.delBtn && i.hoverList[t.row.$index] ? (R(), E(s, {
3219
+ key: 0,
3220
+ type: "danger",
3221
+ disabled: e.disabled,
3222
+ icon: "el-icon-delete",
3223
+ circle: "",
3224
+ onClick: (e) => o.delRow(t.row.$index)
3225
+ }, null, 8, ["disabled", "onClick"])) : (R(), O("div", Sn, U(t.row.$index + 1), 1))]),
3226
+ default: W(() => [(R(!0), O(T, null, z(n.columnSlot, (t) => B(e.$slots, t, P({ ref_for: !0 }, e.scope))), 256))]),
3227
+ _: 3
3228
+ }, 8, [
3229
+ "option",
3230
+ "disabled",
3231
+ "data",
3232
+ "onCellMouseEnter",
3233
+ "onCellMouseLeave",
3234
+ "onSelectionChange",
3235
+ "onSortableChange"
3236
+ ])) : D("v-if", !0)]);
3237
+ }
3238
+ var wn = /* @__PURE__ */ n(yn, [["render", Cn]]), Tn = {
3239
+ name: "FormTemp",
3240
+ components: {
3241
+ FyUEditor: tt(() => import("../fy-u-editor/index.mjs")),
3242
+ FyInputTable: tt(() => import("../fy-input-table/index.mjs")),
3243
+ FyInputTree: Fe,
3244
+ FyArray: pe,
3245
+ FyCascader: me,
3246
+ FyCheckbox: he,
3247
+ FyDate: ge,
3248
+ FyDynamic: wn,
3249
+ FyInput: _e,
3250
+ FyInputColor: Te,
3251
+ FyInputIcon: Ee,
3252
+ FyInputMap: De,
3253
+ FyInputNumber: Oe,
3254
+ FyRadio: ke,
3255
+ FyRate: we,
3256
+ FySelect: xe,
3257
+ FySlider: Ae,
3258
+ FySwitch: je,
3259
+ FyTime: Me,
3260
+ FyTitle: Ne,
3261
+ FyUpload: Pe
3262
+ },
3263
+ mixins: [y],
3264
+ props: {
3265
+ modelValue: [
3266
+ String,
3267
+ Object,
3268
+ Number,
3269
+ Boolean,
3270
+ Array
3271
+ ],
3272
+ columnSlot: {
3273
+ type: Array,
3274
+ default: () => []
3275
+ },
3276
+ tableData: {
3277
+ type: Object,
3278
+ default: () => ({})
3279
+ },
3280
+ enter: {
3281
+ type: Boolean,
3282
+ default: !1
3283
+ },
3284
+ type: { type: String },
3285
+ propsHttp: {
3286
+ type: Object,
3287
+ default: () => ({})
3288
+ },
3289
+ props: { type: Object },
3290
+ dic: { type: Array },
3291
+ size: { type: String },
3292
+ disabled: { type: Boolean },
3293
+ readonly: { type: Boolean },
3294
+ column: {
3295
+ type: Object,
3296
+ default: () => ({})
3297
+ }
3298
+ },
3299
+ emits: [
3300
+ "enter",
3301
+ "change",
3302
+ "update:modelValue"
3303
+ ],
3304
+ computed: {
3305
+ params() {
3306
+ return this.column.params || {};
3307
+ },
3308
+ event() {
3309
+ return this.column.event || {};
3310
+ },
3311
+ text: {
3312
+ get() {
3313
+ return this.modelValue;
3314
+ },
3315
+ set(e) {
3316
+ this.$emit("update:modelValue", e), this.$emit("change", e);
3317
+ }
3318
+ }
3319
+ },
3320
+ methods: {
3321
+ uploadFun: _,
3322
+ getComponent: ue,
3323
+ getPlaceholder: ae,
3324
+ enterChange() {
3325
+ typeof this.column.enter == "function" ? this.column.enter({
3326
+ value: this.text,
3327
+ column: this.column
3328
+ }) : this.enter && this.$emit("enter");
3329
+ }
3330
+ }
3331
+ }, En = ["innerHTML"];
3332
+ function Dn(e, t, n, r, i, a) {
3333
+ return R(), E(H(a.getComponent(n.column.type, n.column.component)), P(Object.assign(n.column, a.uploadFun(n.column)), {
3334
+ ref: "temp",
3335
+ modelValue: a.text,
3336
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => a.text = e),
3337
+ column: Object.assign(n.column, a.params),
3338
+ dic: n.dic,
3339
+ disabled: n.column.disabled || n.disabled,
3340
+ readonly: n.column.readonly || n.readonly,
3341
+ placeholder: a.getPlaceholder(n.column),
3342
+ props: n.column.props || n.props,
3343
+ "props-http": n.column.propsHttp || n.propsHttp,
3344
+ size: n.column.size || n.size,
3345
+ "table-data": n.tableData,
3346
+ type: n.type || n.column.type,
3347
+ "column-slot": n.columnSlot
3348
+ }, rt(a.event), { onKeyup: at(a.enterChange, ["enter"]) }), A({
3349
+ default: W(() => [a.params.html ? (R(), O("span", {
3350
+ key: 0,
3351
+ innerHTML: a.params.html
3352
+ }, null, 8, En)) : D("v-if", !0)]),
3353
+ _: 2
3354
+ }, [z(e.getSlotName(n.column, "T", e.$slots) ? [n.column] : [], (t) => ({
3355
+ name: t,
3356
+ fn: W((n) => [B(e.$slots, e.getSlotName(t, "T"), I(N(n)))])
3357
+ })), z(n.columnSlot, (t) => ({
3358
+ name: t,
3359
+ fn: W((n) => [B(e.$slots, t, I(N(n || {})))])
3360
+ }))]), 1040, [
3361
+ "modelValue",
3362
+ "column",
3363
+ "dic",
3364
+ "disabled",
3365
+ "readonly",
3366
+ "placeholder",
3367
+ "props",
3368
+ "props-http",
3369
+ "size",
3370
+ "table-data",
3371
+ "type",
3372
+ "column-slot",
3373
+ "onKeyup"
3374
+ ]);
3375
+ }
3376
+ var On = /* @__PURE__ */ n(Tn, [["render", Dn]]), kn = (e, t, n, r) => {
3377
+ if (!r) return;
3378
+ if (!window.Mock) {
3379
+ Se.logs("mock");
3380
+ return;
3381
+ }
3382
+ let i = (window.Mock || {}).Random, a = {};
3383
+ function o({ en: e }) {
3384
+ return e ? i.name(!0) : i.cname();
3385
+ }
3386
+ function s({ max: e, min: t, precision: n }) {
3387
+ if (n) {
3388
+ let r = `${i.float(t, e, n)}`, a = r.indexOf(".") + 1;
3389
+ return Number(r.substring(0, a + n));
3390
+ } else return i.integer(t, e);
3391
+ }
3392
+ function c({ header: e }) {
3393
+ let t = i.url(), n = t.indexOf("://");
3394
+ return t = e === !1 ? t.substring(n + 3) : `http://${t.substring(n + 3)}`, t;
3395
+ }
3396
+ function l({ format: e, now: t }) {
3397
+ return t ? i.now(e) : i.datetime(e);
3398
+ }
3399
+ function u({ min: e, max: t }) {
3400
+ return i.csentence(e, t);
3401
+ }
3402
+ function d() {
3403
+ return i.county(!0);
3404
+ }
3405
+ function f({ dic: e, props: t, columnType: n, multiple: r }) {
3406
+ let i = t.value || "value", a = e.length;
3407
+ if (["checkbox"].includes(n) || r) {
3408
+ let t = s({
3409
+ min: 1,
3410
+ max: a
3411
+ }), n = [];
3412
+ for (let r = 0; r < t; r++) {
3413
+ let t = !0;
3414
+ for (; t;) {
3415
+ let r = e[s({
3416
+ min: 0,
3417
+ max: a - 1
3418
+ })][i];
3419
+ n.includes(r) || (n.push(r), t = !1);
3420
+ }
3421
+ }
3422
+ return n;
3423
+ } else return e[s({
3424
+ min: 0,
3425
+ max: a - 1
3426
+ })][i];
3427
+ }
3428
+ function p() {
3429
+ Object.keys(e).forEach((r) => {
3430
+ let i = e[r];
3431
+ if (i.mock && typeof i.mock == "object") {
3432
+ let e = i.mock;
3433
+ switch (e.dic = typeof i.dicData == "string" ? t[i.dicData] : i.dicData || [], e.props = i.props || {}, e.columnType = i.type, e.multiple = i.multiple, e.type) {
3434
+ case "name":
3435
+ a[i.prop] = o(e);
3436
+ break;
3437
+ case "number":
3438
+ a[i.prop] = s(e);
3439
+ break;
3440
+ case "datetime":
3441
+ a[i.prop] = l(e);
3442
+ break;
3443
+ case "word":
3444
+ a[i.prop] = u(e);
3445
+ break;
3446
+ case "url":
3447
+ a[i.prop] = c(e);
3448
+ break;
3449
+ case "county":
3450
+ a[i.prop] = d();
3451
+ break;
3452
+ case "dic":
3453
+ a[i.prop] = f(e);
3454
+ break;
3455
+ }
3456
+ } else i.mock instanceof Function && (a[i.prop] = i.mock(n));
3457
+ });
3458
+ }
3459
+ return p(), a;
3460
+ }, An = {
3461
+ name: "FyForm",
3462
+ mixins: [fn],
3463
+ provide() {
3464
+ return { formSafe: this };
3465
+ },
3466
+ props: {
3467
+ uploadBefore: Function,
3468
+ uploadAfter: Function,
3469
+ uploadDelete: Function,
3470
+ uploadPreview: Function,
3471
+ uploadError: Function,
3472
+ uploadExceed: Function,
3473
+ status: {
3474
+ type: Boolean,
3475
+ default: !1
3476
+ },
3477
+ isCrud: {
3478
+ type: Boolean,
3479
+ default: !1
3480
+ },
3481
+ modelValue: {
3482
+ type: Object,
3483
+ default: () => ({})
3484
+ }
3485
+ },
3486
+ emits: [
3487
+ "submit",
3488
+ "error",
3489
+ "tab-click",
3490
+ "change",
3491
+ "update:modelValue",
3492
+ "reset-change",
3493
+ "update:status",
3494
+ "mock-change"
3495
+ ],
3496
+ data() {
3497
+ return {
3498
+ activeName: "",
3499
+ labelWidth: 90,
3500
+ allDisabled: !1,
3501
+ optionIndex: [],
3502
+ optionBox: !1,
3503
+ tableOption: {},
3504
+ itemSpanDefault: 12,
3505
+ form: {},
3506
+ formCreate: !1,
3507
+ formList: [],
3508
+ formBind: {}
3509
+ };
3510
+ },
3511
+ computed: {
3512
+ columnSlot() {
3513
+ return Object.keys(this.$slots).filter((e) => !this.propOption.map((e) => e.prop).includes(e));
3514
+ },
3515
+ labelSuffix() {
3516
+ return this.parentOption.labelSuffix || ":";
3517
+ },
3518
+ isMenu() {
3519
+ return this.columnOption.length !== 1;
3520
+ },
3521
+ isDetail() {
3522
+ return this.detail === !0;
3523
+ },
3524
+ isTabs() {
3525
+ return this.parentOption.tabs === !0;
3526
+ },
3527
+ isAdd() {
3528
+ return this.boxType === "add";
3529
+ },
3530
+ isEdit() {
3531
+ return this.boxType === "edit";
3532
+ },
3533
+ isView() {
3534
+ return this.boxType === "view";
3535
+ },
3536
+ gutter() {
3537
+ return p((this.parentOption.gutter || 10) / 2);
3538
+ },
3539
+ detail() {
3540
+ return this.parentOption.detail;
3541
+ },
3542
+ disabled() {
3543
+ return this.parentOption.disabled;
3544
+ },
3545
+ readonly() {
3546
+ return this.parentOption.readonly;
3547
+ },
3548
+ tabsType() {
3549
+ return this.parentOption.tabsType;
3550
+ },
3551
+ columnLen() {
3552
+ return this.columnOption.length;
3553
+ },
3554
+ dynamicOption() {
3555
+ let e = [];
3556
+ return this.propOption.forEach((t) => {
3557
+ t.type === "dynamic" && this.vaildDisplay(t) && e.push(t);
3558
+ }), e;
3559
+ },
3560
+ propOption() {
3561
+ let e = [];
3562
+ return this.columnOption.forEach((t) => {
3563
+ t.display !== !1 && t.column.forEach((t) => {
3564
+ e.push(t);
3565
+ });
3566
+ }), e;
3567
+ },
3568
+ parentOption() {
3569
+ return this.tableOption || {};
3570
+ },
3571
+ columnOption() {
3572
+ let e = this.tableOption.column || [], t = l(this.tableOption.group) || [], n = this.tableOption.footer || [];
3573
+ return t.unshift({
3574
+ header: !1,
3575
+ column: e
3576
+ }), n.length !== 0 && t.push({
3577
+ header: !1,
3578
+ column: n
3579
+ }), t.forEach((e) => {
3580
+ e.column = e.column || [], e.column.forEach((e, t) => {
3581
+ e.display !== !1 && !this.isMobile && (e = ie(e, this.itemSpanDefault, t === 0));
3582
+ }), e.column = oe(e.column), e.column = e.column.sort((e, t) => (t.order || 0) - (e.order || 0));
3583
+ }), t;
3584
+ },
3585
+ menuPosition() {
3586
+ return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
3587
+ },
3588
+ boxType() {
3589
+ return this.parentOption.boxType;
3590
+ },
3591
+ isPrint() {
3592
+ return this.parentOption.printBtn === !0;
3593
+ },
3594
+ tabsActive() {
3595
+ return this.tableOption.tabsActive || "1";
3596
+ },
3597
+ isMock() {
3598
+ return this.parentOption.mockBtn === !0;
3599
+ }
3600
+ },
3601
+ watch: {
3602
+ modelValue: {
3603
+ handler() {
3604
+ this.formCreate && this.setForm();
3605
+ },
3606
+ deep: !0
3607
+ },
3608
+ form: {
3609
+ handler() {
3610
+ this.formCreate && (this.setLabel(), this.setVal());
3611
+ },
3612
+ deep: !0
3613
+ },
3614
+ tabsActive: {
3615
+ handler() {
3616
+ this.activeName = this.tabsActive;
3617
+ },
3618
+ immediate: !0
3619
+ },
3620
+ DIC: {
3621
+ handler() {
3622
+ this.setLabel();
3623
+ },
3624
+ deep: !0,
3625
+ immediate: !0
3626
+ },
3627
+ allDisabled: {
3628
+ handler(e) {
3629
+ this.$emit("update:status", e);
3630
+ },
3631
+ deep: !0,
3632
+ immediate: !0
3633
+ }
3634
+ },
3635
+ mounted() {
3636
+ setTimeout(() => {
3637
+ this.dataFormat();
3638
+ });
3639
+ },
3640
+ beforeUnmount() {
3641
+ Object.keys(this.formBind).forEach((e) => {
3642
+ this.formBind[e].forEach((e) => {
3643
+ e();
3644
+ });
3645
+ });
3646
+ },
3647
+ methods: {
3648
+ setPx: p,
3649
+ deepClone: l,
3650
+ getComponent: ue,
3651
+ getPlaceholder: ae,
3652
+ uploadFun: _,
3653
+ getDisabled(e) {
3654
+ return this.vaildDetail(e) || this.isDetail || this.vaildDisabled(e) || this.allDisabled;
3655
+ },
3656
+ getSpan(e) {
3657
+ return e.span || this.parentOption.span || this.itemSpanDefault;
3658
+ },
3659
+ isGroupShow(e, t) {
3660
+ return this.isTabs ? `${t}` === this.activeName || t === 0 : !0;
3661
+ },
3662
+ dataFormat() {
3663
+ let e = le(this.propOption).tableForm, t = this.modelValue, n = {};
3664
+ Object.entries(Object.assign(e, t)).forEach((e) => {
3665
+ let r = e[0], i = e[1];
3666
+ q(t[r]) ? n[r] = i : n[r] = t[r];
3667
+ }), this.form = n, this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
3668
+ this.formCreate = !0, this.clearValidate();
3669
+ });
3670
+ },
3671
+ setControl() {
3672
+ this.propOption.forEach((e) => {
3673
+ let t = e.prop, n = e.bind, r = e.control;
3674
+ if (!this.formBind[t]) {
3675
+ let i = [];
3676
+ if (n) {
3677
+ let e = this.$watch(`form.${t}`, (e, t) => {
3678
+ e !== t && m(this.form, n, e);
3679
+ }), r = this.$watch(`form.${n}`, (e, n) => {
3680
+ e !== n && (this.form[t] = e);
3681
+ });
3682
+ i.push(e), i.push(r), this.form[t] = f(this.form, n);
3683
+ }
3684
+ if (r) {
3685
+ let n = () => {
3686
+ let t = r(this.form[e.prop], this.form) || {};
3687
+ Object.keys(t).forEach((e) => {
3688
+ let n = Object.assign(this.objectOption[e] || {}, t[e]);
3689
+ this.objectOption[e] = n, t[e].dicData && (this.DIC[e] = t[e].dicData);
3690
+ });
3691
+ }, a = this.$watch(`form.${t}`, () => {
3692
+ n();
3693
+ });
3694
+ i.push(a), n();
3695
+ }
3696
+ this.formBind[t] = i;
3697
+ }
3698
+ });
3699
+ },
3700
+ setForm() {
3701
+ Object.keys(this.modelValue).forEach((e) => {
3702
+ this.form[e] = this.modelValue[e];
3703
+ });
3704
+ },
3705
+ setVal() {
3706
+ this.$emit("update:modelValue", this.form), this.$emit("change", this.form);
3707
+ },
3708
+ setLabel() {
3709
+ this.tableOption.filterNull === !0 && (this.form = d(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = d(this.form, ["$"], !1) : this.propOption.forEach((e) => {
3710
+ let t = this.DIC[e.prop];
3711
+ if (q(t)) return;
3712
+ let n = Y(this.form, e, this.tableOption, t);
3713
+ n ? this.form[`$${e.prop}`] = n : delete this.form[`$${e.prop}`];
3714
+ });
3715
+ },
3716
+ handleGroupClick(e) {
3717
+ this.$emit("tab-click", e);
3718
+ },
3719
+ handleTabClick(e, t) {
3720
+ this.$emit("tab-click", e, t);
3721
+ },
3722
+ getLabelWidth(e, t) {
3723
+ let n;
3724
+ return n = q(e.labelWidth) ? q(t.labelWidth) ? this.parentOption.labelWidth : t.labelWidth : e.labelWidth, p(n, this.labelWidth);
3725
+ },
3726
+ validateField(e) {
3727
+ return this.$refs.form.validateField(e);
3728
+ },
3729
+ validTip(e) {
3730
+ return !e.tip || e.type === "upload";
3731
+ },
3732
+ getPropRef(e) {
3733
+ return this.$refs[e][0];
3734
+ },
3735
+ handleChange(e, t) {
3736
+ this.$nextTick(() => {
3737
+ let n = t.cascader, r = n.join(",");
3738
+ n.forEach((i) => {
3739
+ let a = i, s = this.form[t.prop], c = this.findObject(e, a);
3740
+ q(c) || (this.formList.includes(r) && n.forEach((e) => {
3741
+ this.form[e] = "", this.DIC[e] = [];
3742
+ }), !(q(n) || q(s) || q(c)) && b({
3743
+ column: c,
3744
+ value: s,
3745
+ form: this.form
3746
+ }).then((e) => {
3747
+ this.formList.includes(r) || this.formList.push(r);
3748
+ let t = e || [];
3749
+ this.DIC[a] = t, !q(t) && !q(t) && !q(c.cascaderIndex) && q(this.form[a]) && (this.form[a] = t[c.cascaderIndex][(c.props || {}).value || o.value]);
3750
+ }));
3751
+ });
3752
+ });
3753
+ },
3754
+ handlePrint() {
3755
+ this.$Print(this.$el);
3756
+ },
3757
+ propChange(e, t) {
3758
+ t.cascader && this.handleChange(e, t);
3759
+ },
3760
+ handleMock() {
3761
+ this.isMock && (this.columnOption.forEach((e) => {
3762
+ let t = kn(e.column, this.DIC, this.form, this.isMock);
3763
+ q(t) || Object.keys(t).forEach((e) => {
3764
+ this.form[e] = t[e];
3765
+ });
3766
+ }), this.$nextTick(() => {
3767
+ this.clearValidate(), this.$emit("mock-change", this.form);
3768
+ }));
3769
+ },
3770
+ vaildDetail(e) {
3771
+ let t;
3772
+ if (this.detail) return !1;
3773
+ if (!q(e.detail)) t = "detail";
3774
+ else if (this.isAdd) t = "addDetail";
3775
+ else if (this.isEdit) t = "editDetail";
3776
+ else if (this.isView) return !1;
3777
+ return t ? e[t] === !0 : !1;
3778
+ },
3779
+ vaildDisabled(e) {
3780
+ let t;
3781
+ if (this.disabled) return !0;
3782
+ if (!q(e.disabled)) t = "disabled";
3783
+ else if (this.isAdd) t = "addDisabled";
3784
+ else if (this.isEdit) t = "editDisabled";
3785
+ else if (this.isView) return !0;
3786
+ return t ? e[t] === !0 : !1;
3787
+ },
3788
+ vaildDisplay(e) {
3789
+ let t;
3790
+ return q(e.display) ? this.isAdd ? t = "addDisplay" : this.isEdit ? t = "editDisplay" : this.isView && (t = "viewDisplay") : t = "display", t ? g(e[t], !0) : !0;
3791
+ },
3792
+ clearValidate(e) {
3793
+ var t;
3794
+ (t = this.$refs.form) == null || t.clearValidate(e);
3795
+ },
3796
+ validateCellForm() {
3797
+ return new Promise((e) => {
3798
+ this.$refs.form.validate((t, n) => {
3799
+ e(n);
3800
+ });
3801
+ });
3802
+ },
3803
+ validate(e) {
3804
+ this.$refs.form.validate((t, n) => {
3805
+ let r = [], i = [], a = {};
3806
+ this.dynamicOption.forEach((e) => {
3807
+ let t = e.children.type === "form";
3808
+ i.push(e.prop), t ? q(this.$refs[e.prop][0].$refs.temp.$refs.main) || this.$refs[e.prop][0].$refs.temp.$refs.main.forEach((e) => {
3809
+ r.push(e.validateCellForm());
3810
+ }) : r.push(this.$refs[e.prop][0].$refs.temp.$refs.main.validateCellForm());
3811
+ }), Promise.all(r).then((t) => {
3812
+ t.forEach((e, t) => {
3813
+ q(e) || (a[i[t]] = e);
3814
+ });
3815
+ let r = Object.assign(a, n);
3816
+ q(r) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, r);
3817
+ });
3818
+ });
3819
+ },
3820
+ resetForm(e = !0) {
3821
+ if (e) {
3822
+ let e = this.propOption.map((e) => e.prop);
3823
+ this.form = ee(this.form, e, (this.tableOption.filterParams || []).concat([this.rowKey]));
3824
+ }
3825
+ this.$nextTick(() => {
3826
+ this.clearValidate(), this.$emit("reset-change");
3827
+ });
3828
+ },
3829
+ resetFields() {
3830
+ this.$refs.form.resetFields();
3831
+ },
3832
+ show() {
3833
+ this.allDisabled = !0;
3834
+ },
3835
+ hide() {
3836
+ this.allDisabled = !1;
3837
+ },
3838
+ submit() {
3839
+ this.validate((e, t) => {
3840
+ e ? this.$emit("submit", d(this.form, ["$"]), this.hide) : this.$emit("error", t);
3841
+ });
3842
+ }
3843
+ }
3844
+ }, jn = ["innerHTML"];
3845
+ function Mn(e, t, n, r, i, a) {
3846
+ var o;
3847
+ let s = Xe, c = Qe, l = et, u = On, d = C, f = x, p = pt, m = ut, h = Ye, g = Ge;
3848
+ return R(), O("div", {
3849
+ class: F(["avue-form", { "avue--detail": a.isDetail }]),
3850
+ style: L({ width: a.setPx(a.parentOption.formWidth, "100%") })
3851
+ }, [M(g, {
3852
+ ref: "form",
3853
+ "status-icon": a.parentOption.statusIcon,
3854
+ model: i.form,
3855
+ "label-suffix": a.labelSuffix,
3856
+ size: ((o = e.AVUE) == null ? void 0 : o.formSize) || e.controlSize,
3857
+ "label-position": a.parentOption.labelPosition,
3858
+ "label-width": a.setPx(a.parentOption.labelWidth, i.labelWidth),
3859
+ onSubmit: t[1] || (t[1] = K(() => {}, ["prevent"]))
3860
+ }, {
3861
+ default: W(() => [M(h, {
3862
+ span: 24,
3863
+ class: F({ "avue-form__tabs": a.isTabs })
3864
+ }, {
3865
+ default: W(() => [(R(!0), O(T, null, z(a.columnOption, (n, r) => (R(), E(m, {
3866
+ key: n.prop,
3867
+ tabs: a.isTabs,
3868
+ arrow: n.arrow,
3869
+ collapse: n.collapse,
3870
+ display: a.vaildDisplay(n),
3871
+ icon: n.icon,
3872
+ index: r,
3873
+ header: !a.isTabs,
3874
+ active: i.activeName,
3875
+ label: n.label,
3876
+ onChange: a.handleGroupClick
3877
+ }, A({
3878
+ tabs: W(() => [a.isTabs && r === 1 ? (R(), E(c, {
3879
+ key: 0,
3880
+ modelValue: i.activeName,
3881
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => i.activeName = e),
3882
+ class: "avue-form__tabs",
3883
+ type: a.tabsType,
3884
+ onTabClick: a.handleTabClick
3885
+ }, {
3886
+ default: W(() => [(R(!0), O(T, null, z(a.columnOption, (t, n) => (R(), O(T, null, [a.vaildDisplay(t) && n !== 0 ? (R(), E(s, {
3887
+ key: n,
3888
+ name: `${n}`
3889
+ }, {
3890
+ label: W(() => [k("span", null, [e.getSlotName(t, "H", e.$slots) ? B(e.$slots, e.getSlotName(t, "H"), {
3891
+ key: 0,
3892
+ column: e.column
3893
+ }) : (R(), O(T, { key: 1 }, [k("i", { class: F(t.icon) }, "\xA0", 2), j(" " + U(t.label), 1)], 64))])]),
3894
+ _: 2
3895
+ }, 1032, ["name"])) : D("v-if", !0)], 64))), 256))]),
3896
+ _: 3
3897
+ }, 8, [
3898
+ "modelValue",
3899
+ "type",
3900
+ "onTabClick"
3901
+ ])) : D("v-if", !0)]),
3902
+ default: W(() => [G(k("div", { class: F(["avue-form__group", { "avue-form__group--flex": n.flex === !1 }]) }, [(R(!0), O(T, null, z(n.column, (r, o) => (R(), O(T, null, [a.vaildDisplay(r) ? (R(), E(f, {
3903
+ key: o,
3904
+ style: L({
3905
+ paddingLeft: a.gutter,
3906
+ paddingRight: a.gutter
3907
+ }),
3908
+ span: a.getSpan(r),
3909
+ md: a.getSpan(r),
3910
+ sm: r.smSpan || n.smSpan || 12,
3911
+ xs: r.xsSpan || n.xmSpan || 24,
3912
+ offset: r.offset || n.offset,
3913
+ push: r.push || n.push,
3914
+ pull: r.pull || n.pull,
3915
+ class: F([
3916
+ "avue-form__row",
3917
+ { "avue--detail avue--detail__column": a.vaildDetail(r) },
3918
+ r.className
3919
+ ])
3920
+ }, {
3921
+ default: W(() => [M(d, {
3922
+ prop: r.prop,
3923
+ label: r.label,
3924
+ rules: r.rules,
3925
+ class: F(`avue-form__item--${r.labelPosition || n.labelPosition || ""}`),
3926
+ "label-position": r.labelPosition || n.labelPosition || a.parentOption.labelPosition,
3927
+ "label-width": a.getLabelWidth(r, n)
3928
+ }, A({
3929
+ default: W(() => [(R(), E(H(a.validTip(r) ? "div" : "elTooltip"), {
3930
+ class: "avue-form-item-input-wrapper",
3931
+ disabled: a.validTip(r),
3932
+ content: r.tip || a.getPlaceholder(r),
3933
+ placement: r.tipPlacement
3934
+ }, {
3935
+ default: W(() => [e.$slots[r.prop] ? B(e.$slots, r.prop, {
3936
+ key: 0,
3937
+ modelValue: i.form[r.prop],
3938
+ column: r,
3939
+ label: i.form[`$${r.prop}`],
3940
+ size: r.size || e.controlSize,
3941
+ readonly: a.readonly || r.readonly,
3942
+ disabled: a.getDisabled(r),
3943
+ dic: e.DIC[r.prop]
3944
+ }) : (R(), E(u, P({
3945
+ key: 1,
3946
+ ref_for: !0,
3947
+ ref: r.prop
3948
+ }, { ref_for: !0 }, a.uploadFun(r), {
3949
+ modelValue: i.form[r.prop],
3950
+ "onUpdate:modelValue": (e) => i.form[r.prop] = e,
3951
+ column: r,
3952
+ dic: e.DIC[r.prop],
3953
+ props: a.parentOption.props,
3954
+ "props-http": a.parentOption.propsHttp,
3955
+ disabled: a.getDisabled(r),
3956
+ readonly: r.readonly || a.readonly,
3957
+ enter: a.parentOption.enter,
3958
+ size: r.size || e.controlSize,
3959
+ "column-slot": a.columnSlot,
3960
+ onEnter: a.submit,
3961
+ onChange: (e) => a.propChange(n.column, r)
3962
+ }), A({
3963
+ default: W(() => [(R(!0), O(T, null, z(e.getSlotName(r, "T", e.$slots) ? [r] : [], (t) => B(e.$slots, e.getSlotName(t, "T"), P({ ref_for: !0 }, e.scope))), 256))]),
3964
+ _: 2
3965
+ }, [z(a.columnSlot, (t) => ({
3966
+ name: t,
3967
+ fn: W((n) => [B(e.$slots, t, P({ ref_for: !0 }, n))])
3968
+ }))]), 1040, [
3969
+ "modelValue",
3970
+ "onUpdate:modelValue",
3971
+ "column",
3972
+ "dic",
3973
+ "props",
3974
+ "props-http",
3975
+ "disabled",
3976
+ "readonly",
3977
+ "enter",
3978
+ "size",
3979
+ "column-slot",
3980
+ "onEnter",
3981
+ "onChange"
3982
+ ]))]),
3983
+ _: 2
3984
+ }, 1032, [
3985
+ "disabled",
3986
+ "content",
3987
+ "placement"
3988
+ ]))]),
3989
+ _: 2
3990
+ }, [e.getSlotName(r, "L", e.$slots) ? {
3991
+ name: "label",
3992
+ fn: W(() => [B(e.$slots, e.getSlotName(r, "L"), {
3993
+ column: r,
3994
+ modelValue: i.form[r.prop],
3995
+ readonly: r.readonly || a.readonly,
3996
+ disabled: a.getDisabled(r),
3997
+ size: r.size || e.controlSize,
3998
+ dic: e.DIC[r.prop]
3999
+ })]),
4000
+ key: "0"
4001
+ } : r.labelTip ? {
4002
+ name: "label",
4003
+ fn: W(() => [M(l, {
4004
+ class: "item",
4005
+ effect: "dark",
4006
+ placement: r.labelTipPlacement || "top-start"
4007
+ }, {
4008
+ content: W(() => [k("div", { innerHTML: r.labelTip }, null, 8, jn)]),
4009
+ default: W(() => [t[2] || (t[2] = k("i", { class: "el-icon-info" }, null, -1))]),
4010
+ _: 2
4011
+ }, 1032, ["placement"]), k("span", null, U(r.label) + U(a.labelSuffix), 1)]),
4012
+ key: "1"
4013
+ } : void 0, e.getSlotName(r, "E", e.$slots) ? {
4014
+ name: "error",
4015
+ fn: W((t) => [B(e.$slots, e.getSlotName(r, "E"), P({ ref_for: !0 }, Object.assign(t, {
4016
+ column: r,
4017
+ value: i.form[r.prop],
4018
+ readonly: a.readonly || r.readonly,
4019
+ disabled: a.getDisabled(r),
4020
+ size: r.size || e.controlSize,
4021
+ dic: e.DIC[r.prop]
4022
+ })))]),
4023
+ key: "2"
4024
+ } : void 0]), 1032, [
4025
+ "prop",
4026
+ "label",
4027
+ "rules",
4028
+ "class",
4029
+ "label-position",
4030
+ "label-width"
4031
+ ])]),
4032
+ _: 2
4033
+ }, 1032, [
4034
+ "style",
4035
+ "span",
4036
+ "md",
4037
+ "sm",
4038
+ "xs",
4039
+ "offset",
4040
+ "push",
4041
+ "pull",
4042
+ "class"
4043
+ ])) : D("v-if", !0), a.vaildDisplay(r) && r.row && r.span !== 24 && r.count ? (R(), O("div", {
4044
+ key: `line${o}`,
4045
+ class: "avue-form__line",
4046
+ style: L({ width: `${r.count / 24 * 100}%` })
4047
+ }, null, 4)) : D("v-if", !0)], 64))), 256)), !a.isDetail && !a.isMenu ? (R(), E(p, { key: 0 }, {
4048
+ menuForm: W((t) => [B(e.$slots, "menuForm", P({ ref_for: !0 }, t))]),
4049
+ _: 3
4050
+ })) : D("v-if", !0)], 2), [[it, a.isGroupShow(n, r)]])]),
4051
+ _: 2
4052
+ }, [e.getSlotName(n, "H", e.$slots) ? {
4053
+ name: "header",
4054
+ fn: W(() => [B(e.$slots, e.getSlotName(n, "H"), { column: n })]),
4055
+ key: "0"
4056
+ } : void 0]), 1032, [
4057
+ "tabs",
4058
+ "arrow",
4059
+ "collapse",
4060
+ "display",
4061
+ "icon",
4062
+ "index",
4063
+ "header",
4064
+ "active",
4065
+ "label",
4066
+ "onChange"
4067
+ ]))), 128)), !a.isDetail && a.isMenu ? (R(), E(p, { key: 0 }, {
4068
+ menuForm: W((t) => [B(e.$slots, "menuForm", I(N(t)))]),
4069
+ _: 3
4070
+ })) : D("v-if", !0)]),
4071
+ _: 3
4072
+ }, 8, ["class"])]),
4073
+ _: 3
4074
+ }, 8, [
4075
+ "status-icon",
4076
+ "model",
4077
+ "label-suffix",
4078
+ "size",
4079
+ "label-position",
4080
+ "label-width"
4081
+ ])], 6);
4082
+ }
4083
+ var $ = /* @__PURE__ */ n(An, [["render", Mn]]);
4084
+ //#endregion
4085
+ export { Q as i, wn as n, vn as r, $ as t };