el-plus 0.0.2

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 (388) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/index.css +1 -0
  3. package/dist/index.full.js +2219 -0
  4. package/dist/index.full.min.js +2 -0
  5. package/dist/index.full.min.js.map +1 -0
  6. package/dist/index.full.min.mjs +2 -0
  7. package/dist/index.full.min.mjs.map +1 -0
  8. package/dist/index.full.mjs +2185 -0
  9. package/env.d.ts +17 -0
  10. package/es/components/base/style/css.d.ts +1 -0
  11. package/es/components/base/style/css.mjs +4 -0
  12. package/es/components/base/style/css.mjs.map +1 -0
  13. package/es/components/base/style/index.d.ts +1 -0
  14. package/es/components/base/style/index.mjs +4 -0
  15. package/es/components/base/style/index.mjs.map +1 -0
  16. package/es/components/buttons/index.d.ts +389 -0
  17. package/es/components/buttons/index.mjs +8 -0
  18. package/es/components/buttons/index.mjs.map +1 -0
  19. package/es/components/buttons/src/buttons-vue.d.ts +161 -0
  20. package/es/components/buttons/src/buttons-vue.mjs +70 -0
  21. package/es/components/buttons/src/buttons-vue.mjs.map +1 -0
  22. package/es/components/buttons/src/buttons.d.ts +66 -0
  23. package/es/components/buttons/src/buttons.mjs +32 -0
  24. package/es/components/buttons/src/buttons.mjs.map +1 -0
  25. package/es/components/buttons/style/css.d.ts +2 -0
  26. package/es/components/buttons/style/css.mjs +5 -0
  27. package/es/components/buttons/style/css.mjs.map +1 -0
  28. package/es/components/buttons/style/index.d.ts +2 -0
  29. package/es/components/buttons/style/index.mjs +5 -0
  30. package/es/components/buttons/style/index.mjs.map +1 -0
  31. package/es/components/form/index.d.ts +291 -0
  32. package/es/components/form/index.mjs +10 -0
  33. package/es/components/form/index.mjs.map +1 -0
  34. package/es/components/form/src/form-item-vue.d.ts +135 -0
  35. package/es/components/form/src/form-item-vue.mjs +40 -0
  36. package/es/components/form/src/form-item-vue.mjs.map +1 -0
  37. package/es/components/form/src/form-item.d.ts +68 -0
  38. package/es/components/form/src/form-item.mjs +33 -0
  39. package/es/components/form/src/form-item.mjs.map +1 -0
  40. package/es/components/form/src/form.d.ts +66 -0
  41. package/es/components/form/src/form.mjs +50 -0
  42. package/es/components/form/src/form.mjs.map +1 -0
  43. package/es/components/form/src/form.vue.d.ts +161 -0
  44. package/es/components/form/src/form.vue.mjs +6 -0
  45. package/es/components/form/src/form.vue.mjs.map +1 -0
  46. package/es/components/form/src/form.vue2.mjs +124 -0
  47. package/es/components/form/src/form.vue2.mjs.map +1 -0
  48. package/es/components/form/src/hooks/use-form-item.d.ts +12 -0
  49. package/es/components/form/src/hooks/use-form-item.mjs +97 -0
  50. package/es/components/form/src/hooks/use-form-item.mjs.map +1 -0
  51. package/es/components/form/src/hooks/use-form.d.ts +25 -0
  52. package/es/components/form/src/hooks/use-form.mjs +53 -0
  53. package/es/components/form/src/hooks/use-form.mjs.map +1 -0
  54. package/es/components/form/style/css.d.ts +2 -0
  55. package/es/components/form/style/css.mjs +5 -0
  56. package/es/components/form/style/css.mjs.map +1 -0
  57. package/es/components/form/style/index.d.ts +2 -0
  58. package/es/components/form/style/index.mjs +5 -0
  59. package/es/components/form/style/index.mjs.map +1 -0
  60. package/es/components/index.d.ts +6 -0
  61. package/es/components/index.mjs +15 -0
  62. package/es/components/index.mjs.map +1 -0
  63. package/es/components/input/index.d.ts +462 -0
  64. package/es/components/input/index.mjs +8 -0
  65. package/es/components/input/index.mjs.map +1 -0
  66. package/es/components/input/src/input.d.ts +122 -0
  67. package/es/components/input/src/input.mjs +28 -0
  68. package/es/components/input/src/input.mjs.map +1 -0
  69. package/es/components/input/src/input.vue.d.ts +268 -0
  70. package/es/components/input/src/input.vue.mjs +6 -0
  71. package/es/components/input/src/input.vue.mjs.map +1 -0
  72. package/es/components/input/src/input.vue2.mjs +144 -0
  73. package/es/components/input/src/input.vue2.mjs.map +1 -0
  74. package/es/components/input/style/css.d.ts +2 -0
  75. package/es/components/input/style/css.mjs +5 -0
  76. package/es/components/input/style/css.mjs.map +1 -0
  77. package/es/components/input/style/index.d.ts +2 -0
  78. package/es/components/input/style/index.mjs +5 -0
  79. package/es/components/input/style/index.mjs.map +1 -0
  80. package/es/components/searchListPage/index.d.ts +8577 -0
  81. package/es/components/searchListPage/index.mjs +8 -0
  82. package/es/components/searchListPage/index.mjs.map +1 -0
  83. package/es/components/searchListPage/src/searchListPage.d.ts +64 -0
  84. package/es/components/searchListPage/src/searchListPage.mjs +61 -0
  85. package/es/components/searchListPage/src/searchListPage.mjs.map +1 -0
  86. package/es/components/searchListPage/src/searchListPage.vue.d.ts +2760 -0
  87. package/es/components/searchListPage/src/searchListPage.vue.mjs +6 -0
  88. package/es/components/searchListPage/src/searchListPage.vue.mjs.map +1 -0
  89. package/es/components/searchListPage/src/searchListPage.vue2.mjs +99 -0
  90. package/es/components/searchListPage/src/searchListPage.vue2.mjs.map +1 -0
  91. package/es/components/searchListPage/src/use-search-list-page.d.ts +2671 -0
  92. package/es/components/searchListPage/src/use-search-list-page.mjs +177 -0
  93. package/es/components/searchListPage/src/use-search-list-page.mjs.map +1 -0
  94. package/es/components/searchListPage/style/css.d.ts +2 -0
  95. package/es/components/searchListPage/style/css.mjs +5 -0
  96. package/es/components/searchListPage/style/css.mjs.map +1 -0
  97. package/es/components/searchListPage/style/index.d.ts +2 -0
  98. package/es/components/searchListPage/style/index.mjs +5 -0
  99. package/es/components/searchListPage/style/index.mjs.map +1 -0
  100. package/es/components/select/index.d.ts +658 -0
  101. package/es/components/select/index.mjs +8 -0
  102. package/es/components/select/index.mjs.map +1 -0
  103. package/es/components/select/src/select.d.ts +283 -0
  104. package/es/components/select/src/select.mjs +47 -0
  105. package/es/components/select/src/select.mjs.map +1 -0
  106. package/es/components/select/src/select.vue.d.ts +384 -0
  107. package/es/components/select/src/select.vue.mjs +6 -0
  108. package/es/components/select/src/select.vue.mjs.map +1 -0
  109. package/es/components/select/src/select.vue2.mjs +113 -0
  110. package/es/components/select/src/select.vue2.mjs.map +1 -0
  111. package/es/components/select/src/use-select.d.ts +12 -0
  112. package/es/components/select/src/use-select.mjs +87 -0
  113. package/es/components/select/src/use-select.mjs.map +1 -0
  114. package/es/components/select/style/css.d.ts +2 -0
  115. package/es/components/select/style/css.mjs +5 -0
  116. package/es/components/select/style/css.mjs.map +1 -0
  117. package/es/components/select/style/index.d.ts +2 -0
  118. package/es/components/select/style/index.mjs +5 -0
  119. package/es/components/select/style/index.mjs.map +1 -0
  120. package/es/components/table/index.d.ts +2970 -0
  121. package/es/components/table/index.mjs +8 -0
  122. package/es/components/table/index.mjs.map +1 -0
  123. package/es/components/table/src/table.d.ts +781 -0
  124. package/es/components/table/src/table.mjs +81 -0
  125. package/es/components/table/src/table.mjs.map +1 -0
  126. package/es/components/table/src/table.vue.d.ts +1708 -0
  127. package/es/components/table/src/table.vue.mjs +6 -0
  128. package/es/components/table/src/table.vue.mjs.map +1 -0
  129. package/es/components/table/src/table.vue2.mjs +204 -0
  130. package/es/components/table/src/table.vue2.mjs.map +1 -0
  131. package/es/components/table/src/use-table.d.ts +241 -0
  132. package/es/components/table/src/use-table.mjs +260 -0
  133. package/es/components/table/src/use-table.mjs.map +1 -0
  134. package/es/components/table/style/css.d.ts +2 -0
  135. package/es/components/table/style/css.mjs +5 -0
  136. package/es/components/table/style/css.mjs.map +1 -0
  137. package/es/components/table/style/index.d.ts +2 -0
  138. package/es/components/table/style/index.mjs +5 -0
  139. package/es/components/table/style/index.mjs.map +1 -0
  140. package/es/components.d.ts +3 -0
  141. package/es/components.mjs +11 -0
  142. package/es/components.mjs.map +1 -0
  143. package/es/directives/index.d.ts +2 -0
  144. package/es/directives/index.mjs +3 -0
  145. package/es/directives/index.mjs.map +1 -0
  146. package/es/directives/permission/index.d.ts +6 -0
  147. package/es/directives/permission/index.mjs +55 -0
  148. package/es/directives/permission/index.mjs.map +1 -0
  149. package/es/directives/repeat-click/index.d.ts +16 -0
  150. package/es/directives/repeat-click/index.mjs +68 -0
  151. package/es/directives/repeat-click/index.mjs.map +1 -0
  152. package/es/directives/vite.config.d.ts +2 -0
  153. package/es/hooks/index.d.ts +1 -0
  154. package/es/hooks/index.mjs +2 -0
  155. package/es/hooks/index.mjs.map +1 -0
  156. package/es/hooks/use-request.d.ts +20 -0
  157. package/es/hooks/use-request.mjs +82 -0
  158. package/es/hooks/use-request.mjs.map +1 -0
  159. package/es/index.d.ts +9 -0
  160. package/es/index.mjs +30 -0
  161. package/es/index.mjs.map +1 -0
  162. package/es/package.json.mjs +4 -0
  163. package/es/package.json.mjs.map +1 -0
  164. package/es/types/env.d.mjs +2 -0
  165. package/es/types/env.d.mjs.map +1 -0
  166. package/es/types/global.d.mjs +2 -0
  167. package/es/types/global.d.mjs.map +1 -0
  168. package/es/types/vue-shim.d.mjs +2 -0
  169. package/es/types/vue-shim.d.mjs.map +1 -0
  170. package/es/utils/bem.d.ts +10 -0
  171. package/es/utils/bem.mjs +31 -0
  172. package/es/utils/bem.mjs.map +1 -0
  173. package/es/utils/cookie.d.ts +7 -0
  174. package/es/utils/cookie.mjs +29 -0
  175. package/es/utils/cookie.mjs.map +1 -0
  176. package/es/utils/env.d.ts +3 -0
  177. package/es/utils/env.mjs +27 -0
  178. package/es/utils/env.mjs.map +1 -0
  179. package/es/utils/props.d.ts +37 -0
  180. package/es/utils/props.mjs +66 -0
  181. package/es/utils/props.mjs.map +1 -0
  182. package/es/utils/request.d.ts +6 -0
  183. package/es/utils/request.mjs +157 -0
  184. package/es/utils/request.mjs.map +1 -0
  185. package/es/utils/type.d.ts +15 -0
  186. package/es/utils/type.mjs +2 -0
  187. package/es/utils/type.mjs.map +1 -0
  188. package/es/utils/with-install.d.ts +4 -0
  189. package/es/utils/with-install.mjs +9 -0
  190. package/es/utils/with-install.mjs.map +1 -0
  191. package/global.d.ts +16 -0
  192. package/lib/components/base/style/css.d.ts +1 -0
  193. package/lib/components/base/style/css.js +6 -0
  194. package/lib/components/base/style/css.js.map +1 -0
  195. package/lib/components/base/style/index.d.ts +1 -0
  196. package/lib/components/base/style/index.js +6 -0
  197. package/lib/components/base/style/index.js.map +1 -0
  198. package/lib/components/buttons/index.d.ts +389 -0
  199. package/lib/components/buttons/index.js +14 -0
  200. package/lib/components/buttons/index.js.map +1 -0
  201. package/lib/components/buttons/src/buttons-vue.d.ts +161 -0
  202. package/lib/components/buttons/src/buttons-vue.js +74 -0
  203. package/lib/components/buttons/src/buttons-vue.js.map +1 -0
  204. package/lib/components/buttons/src/buttons.d.ts +66 -0
  205. package/lib/components/buttons/src/buttons.js +34 -0
  206. package/lib/components/buttons/src/buttons.js.map +1 -0
  207. package/lib/components/buttons/style/css.d.ts +2 -0
  208. package/lib/components/buttons/style/css.js +7 -0
  209. package/lib/components/buttons/style/css.js.map +1 -0
  210. package/lib/components/buttons/style/index.d.ts +2 -0
  211. package/lib/components/buttons/style/index.js +7 -0
  212. package/lib/components/buttons/style/index.js.map +1 -0
  213. package/lib/components/form/index.d.ts +291 -0
  214. package/lib/components/form/index.js +22 -0
  215. package/lib/components/form/index.js.map +1 -0
  216. package/lib/components/form/src/form-item-vue.d.ts +135 -0
  217. package/lib/components/form/src/form-item-vue.js +44 -0
  218. package/lib/components/form/src/form-item-vue.js.map +1 -0
  219. package/lib/components/form/src/form-item.d.ts +68 -0
  220. package/lib/components/form/src/form-item.js +36 -0
  221. package/lib/components/form/src/form-item.js.map +1 -0
  222. package/lib/components/form/src/form.d.ts +66 -0
  223. package/lib/components/form/src/form.js +55 -0
  224. package/lib/components/form/src/form.js.map +1 -0
  225. package/lib/components/form/src/form.vue.d.ts +161 -0
  226. package/lib/components/form/src/form.vue.js +10 -0
  227. package/lib/components/form/src/form.vue.js.map +1 -0
  228. package/lib/components/form/src/form.vue2.js +128 -0
  229. package/lib/components/form/src/form.vue2.js.map +1 -0
  230. package/lib/components/form/src/hooks/use-form-item.d.ts +12 -0
  231. package/lib/components/form/src/hooks/use-form-item.js +101 -0
  232. package/lib/components/form/src/hooks/use-form-item.js.map +1 -0
  233. package/lib/components/form/src/hooks/use-form.d.ts +25 -0
  234. package/lib/components/form/src/hooks/use-form.js +56 -0
  235. package/lib/components/form/src/hooks/use-form.js.map +1 -0
  236. package/lib/components/form/style/css.d.ts +2 -0
  237. package/lib/components/form/style/css.js +7 -0
  238. package/lib/components/form/style/css.js.map +1 -0
  239. package/lib/components/form/style/index.d.ts +2 -0
  240. package/lib/components/form/style/index.js +7 -0
  241. package/lib/components/form/style/index.js.map +1 -0
  242. package/lib/components/index.d.ts +6 -0
  243. package/lib/components/index.js +47 -0
  244. package/lib/components/index.js.map +1 -0
  245. package/lib/components/input/index.d.ts +462 -0
  246. package/lib/components/input/index.js +16 -0
  247. package/lib/components/input/index.js.map +1 -0
  248. package/lib/components/input/src/input.d.ts +122 -0
  249. package/lib/components/input/src/input.js +32 -0
  250. package/lib/components/input/src/input.js.map +1 -0
  251. package/lib/components/input/src/input.vue.d.ts +268 -0
  252. package/lib/components/input/src/input.vue.js +10 -0
  253. package/lib/components/input/src/input.vue.js.map +1 -0
  254. package/lib/components/input/src/input.vue2.js +148 -0
  255. package/lib/components/input/src/input.vue2.js.map +1 -0
  256. package/lib/components/input/style/css.d.ts +2 -0
  257. package/lib/components/input/style/css.js +7 -0
  258. package/lib/components/input/style/css.js.map +1 -0
  259. package/lib/components/input/style/index.d.ts +2 -0
  260. package/lib/components/input/style/index.js +7 -0
  261. package/lib/components/input/style/index.js.map +1 -0
  262. package/lib/components/searchListPage/index.d.ts +8577 -0
  263. package/lib/components/searchListPage/index.js +14 -0
  264. package/lib/components/searchListPage/index.js.map +1 -0
  265. package/lib/components/searchListPage/src/searchListPage.d.ts +64 -0
  266. package/lib/components/searchListPage/src/searchListPage.js +63 -0
  267. package/lib/components/searchListPage/src/searchListPage.js.map +1 -0
  268. package/lib/components/searchListPage/src/searchListPage.vue.d.ts +2760 -0
  269. package/lib/components/searchListPage/src/searchListPage.vue.js +10 -0
  270. package/lib/components/searchListPage/src/searchListPage.vue.js.map +1 -0
  271. package/lib/components/searchListPage/src/searchListPage.vue2.js +103 -0
  272. package/lib/components/searchListPage/src/searchListPage.vue2.js.map +1 -0
  273. package/lib/components/searchListPage/src/use-search-list-page.d.ts +2671 -0
  274. package/lib/components/searchListPage/src/use-search-list-page.js +179 -0
  275. package/lib/components/searchListPage/src/use-search-list-page.js.map +1 -0
  276. package/lib/components/searchListPage/style/css.d.ts +2 -0
  277. package/lib/components/searchListPage/style/css.js +7 -0
  278. package/lib/components/searchListPage/style/css.js.map +1 -0
  279. package/lib/components/searchListPage/style/index.d.ts +2 -0
  280. package/lib/components/searchListPage/style/index.js +7 -0
  281. package/lib/components/searchListPage/style/index.js.map +1 -0
  282. package/lib/components/select/index.d.ts +658 -0
  283. package/lib/components/select/index.js +18 -0
  284. package/lib/components/select/index.js.map +1 -0
  285. package/lib/components/select/src/select.d.ts +283 -0
  286. package/lib/components/select/src/select.js +53 -0
  287. package/lib/components/select/src/select.js.map +1 -0
  288. package/lib/components/select/src/select.vue.d.ts +384 -0
  289. package/lib/components/select/src/select.vue.js +10 -0
  290. package/lib/components/select/src/select.vue.js.map +1 -0
  291. package/lib/components/select/src/select.vue2.js +117 -0
  292. package/lib/components/select/src/select.vue2.js.map +1 -0
  293. package/lib/components/select/src/use-select.d.ts +12 -0
  294. package/lib/components/select/src/use-select.js +89 -0
  295. package/lib/components/select/src/use-select.js.map +1 -0
  296. package/lib/components/select/style/css.d.ts +2 -0
  297. package/lib/components/select/style/css.js +7 -0
  298. package/lib/components/select/style/css.js.map +1 -0
  299. package/lib/components/select/style/index.d.ts +2 -0
  300. package/lib/components/select/style/index.js +7 -0
  301. package/lib/components/select/style/index.js.map +1 -0
  302. package/lib/components/table/index.d.ts +2970 -0
  303. package/lib/components/table/index.js +17 -0
  304. package/lib/components/table/index.js.map +1 -0
  305. package/lib/components/table/src/table.d.ts +781 -0
  306. package/lib/components/table/src/table.js +86 -0
  307. package/lib/components/table/src/table.js.map +1 -0
  308. package/lib/components/table/src/table.vue.d.ts +1708 -0
  309. package/lib/components/table/src/table.vue.js +10 -0
  310. package/lib/components/table/src/table.vue.js.map +1 -0
  311. package/lib/components/table/src/table.vue2.js +208 -0
  312. package/lib/components/table/src/table.vue2.js.map +1 -0
  313. package/lib/components/table/src/use-table.d.ts +241 -0
  314. package/lib/components/table/src/use-table.js +264 -0
  315. package/lib/components/table/src/use-table.js.map +1 -0
  316. package/lib/components/table/style/css.d.ts +2 -0
  317. package/lib/components/table/style/css.js +7 -0
  318. package/lib/components/table/style/css.js.map +1 -0
  319. package/lib/components/table/style/index.d.ts +2 -0
  320. package/lib/components/table/style/index.js +7 -0
  321. package/lib/components/table/style/index.js.map +1 -0
  322. package/lib/components.d.ts +3 -0
  323. package/lib/components.js +15 -0
  324. package/lib/components.js.map +1 -0
  325. package/lib/directives/index.d.ts +2 -0
  326. package/lib/directives/index.js +10 -0
  327. package/lib/directives/index.js.map +1 -0
  328. package/lib/directives/permission/index.d.ts +6 -0
  329. package/lib/directives/permission/index.js +60 -0
  330. package/lib/directives/permission/index.js.map +1 -0
  331. package/lib/directives/repeat-click/index.d.ts +16 -0
  332. package/lib/directives/repeat-click/index.js +72 -0
  333. package/lib/directives/repeat-click/index.js.map +1 -0
  334. package/lib/directives/vite.config.d.ts +2 -0
  335. package/lib/hooks/index.d.ts +1 -0
  336. package/lib/hooks/index.js +8 -0
  337. package/lib/hooks/index.js.map +1 -0
  338. package/lib/hooks/use-request.d.ts +20 -0
  339. package/lib/hooks/use-request.js +84 -0
  340. package/lib/hooks/use-request.js.map +1 -0
  341. package/lib/index.d.ts +9 -0
  342. package/lib/index.js +65 -0
  343. package/lib/index.js.map +1 -0
  344. package/lib/package.json.js +6 -0
  345. package/lib/package.json.js.map +1 -0
  346. package/lib/types/env.d.js +3 -0
  347. package/lib/types/env.d.js.map +1 -0
  348. package/lib/types/global.d.js +3 -0
  349. package/lib/types/global.d.js.map +1 -0
  350. package/lib/types/vue-shim.d.js +3 -0
  351. package/lib/types/vue-shim.d.js.map +1 -0
  352. package/lib/utils/bem.d.ts +10 -0
  353. package/lib/utils/bem.js +33 -0
  354. package/lib/utils/bem.js.map +1 -0
  355. package/lib/utils/cookie.d.ts +7 -0
  356. package/lib/utils/cookie.js +33 -0
  357. package/lib/utils/cookie.js.map +1 -0
  358. package/lib/utils/env.d.ts +3 -0
  359. package/lib/utils/env.js +30 -0
  360. package/lib/utils/env.js.map +1 -0
  361. package/lib/utils/props.d.ts +37 -0
  362. package/lib/utils/props.js +73 -0
  363. package/lib/utils/props.js.map +1 -0
  364. package/lib/utils/request.d.ts +6 -0
  365. package/lib/utils/request.js +162 -0
  366. package/lib/utils/request.js.map +1 -0
  367. package/lib/utils/type.d.ts +15 -0
  368. package/lib/utils/type.js +3 -0
  369. package/lib/utils/type.js.map +1 -0
  370. package/lib/utils/with-install.d.ts +4 -0
  371. package/lib/utils/with-install.js +11 -0
  372. package/lib/utils/with-install.js.map +1 -0
  373. package/package.json +51 -0
  374. package/theme-chalk/base.css +1 -0
  375. package/theme-chalk/buttons.css +1 -0
  376. package/theme-chalk/form.css +1 -0
  377. package/theme-chalk/index.css +1 -0
  378. package/theme-chalk/search-list-page.css +1 -0
  379. package/theme-chalk/src/base.scss +11 -0
  380. package/theme-chalk/src/buttons.scss +18 -0
  381. package/theme-chalk/src/common/var.scss +1 -0
  382. package/theme-chalk/src/form.scss +55 -0
  383. package/theme-chalk/src/index.scss +4 -0
  384. package/theme-chalk/src/mixins/config.scss +4 -0
  385. package/theme-chalk/src/mixins/mixins.scss +38 -0
  386. package/theme-chalk/src/search-list-page.scss +23 -0
  387. package/theme-chalk/src/table.scss +57 -0
  388. package/theme-chalk/table.css +1 -0
@@ -0,0 +1,2185 @@
1
+ /*! ElPlus v0.0.2 */
2
+
3
+ import { useAttrs, defineComponent, computed, createVNode, Fragment, withDirectives, resolveComponent, mergeProps, resolveDirective, useTemplateRef, ref, createTextVNode, h, mergeModels, useModel, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, withCtx, renderSlot, renderList, createBlock, vShow, toDisplayString, reactive, useSlots, watch, onMounted, createSlots, normalizeProps, guardReactiveProps, createElementVNode } from 'vue';
4
+ import { buttonProps, ElMessage, ElLoading, ElMessageBox, formProps as formProps$1, formEmits as formEmits$1, formItemProps as formItemProps$1, inputProps as inputProps$1, inputEmits as inputEmits$1, ElTable, selectProps as selectProps$1, selectEmits as selectEmits$1 } from 'element-plus';
5
+ import axios from 'axios';
6
+ import 'element-plus/es/components/message/style/css';
7
+ import 'element-plus/es/components/loading/style/css';
8
+ import elTableProps from 'element-plus/es/components/table/src/table/defaults';
9
+
10
+ const buttonsProps = {
11
+ ...buttonProps,
12
+ disabled: {
13
+ type: [Boolean, Function]
14
+ },
15
+ list: {
16
+ type: Array,
17
+ default: () => []
18
+ },
19
+ size: {
20
+ ...buttonProps.size,
21
+ default: "small"
22
+ },
23
+ type: {
24
+ ...buttonProps.type,
25
+ default: "default"
26
+ },
27
+ test: {
28
+ type: String,
29
+ required: true
30
+ },
31
+ test1: {
32
+ type: String,
33
+ required: true,
34
+ default: "test1"
35
+ }
36
+ };
37
+
38
+ function _bem(prefix, block, element, modifier) {
39
+ if (block) {
40
+ prefix += "-" + block;
41
+ }
42
+ if (element) {
43
+ prefix += "__" + element;
44
+ }
45
+ if (modifier) {
46
+ prefix += "--" + modifier;
47
+ }
48
+ return prefix;
49
+ }
50
+ function createBEM(prefix) {
51
+ return {
52
+ b: (block = "") => _bem(prefix, block, "", ""),
53
+ e: (element = "") => element ? _bem(prefix, "", element, "") : "",
54
+ m: (modifier = "") => modifier ? _bem(prefix, "", "", modifier) : "",
55
+ be: (block = "", element = "") => block && element ? _bem(prefix, block, element, "") : "",
56
+ bm: (block = "", modifier = "") => block && modifier ? _bem(prefix, block, "", modifier) : "",
57
+ em: (element = "", modifier = "") => element && modifier ? _bem(prefix, "", element, modifier) : "",
58
+ bem: (block = "", element = "", modifier) => block && element && modifier ? _bem(prefix, block, element, modifier) : "",
59
+ is: (name = "", state) => state ? `is-${name}` : ""
60
+ };
61
+ }
62
+ function createNameSpace(name) {
63
+ const prefix = `ep-${name}`;
64
+ return createBEM(prefix);
65
+ }
66
+
67
+ const apiProps = {
68
+ api: {
69
+ type: [String, Function]
70
+ },
71
+ method: {
72
+ type: String
73
+ },
74
+ reqData: {
75
+ type: Object
76
+ },
77
+ reqParams: {
78
+ type: Object
79
+ },
80
+ reqBefore: {
81
+ type: Function
82
+ },
83
+ reqAfter: {
84
+ type: Function
85
+ }
86
+ };
87
+ const visibleProps = {
88
+ show: {
89
+ type: [Boolean, Function]
90
+ },
91
+ hide: {
92
+ type: [Boolean, Function]
93
+ }
94
+ };
95
+ const prepareProps = (props, excludeKeys = []) => {
96
+ return Object.keys(props).reduce((acc, key) => {
97
+ if (!excludeKeys.includes(key)) {
98
+ acc[key] = props[key];
99
+ }
100
+ return acc;
101
+ }, {});
102
+ };
103
+ const prepareEvents = (emit, eventKeys) => {
104
+ return eventKeys.reduce(
105
+ (acc, key) => {
106
+ let eventName;
107
+ if (key.startsWith("on")) {
108
+ eventName = key;
109
+ } else {
110
+ if (key.includes("-")) {
111
+ eventName = "on" + key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
112
+ } else {
113
+ eventName = `on${key.charAt(0).toUpperCase()}${key.slice(1)}`;
114
+ }
115
+ }
116
+ acc[eventName] = (...args) => emit(key, ...args);
117
+ return acc;
118
+ },
119
+ {}
120
+ );
121
+ };
122
+ const prepareClassNames = () => {
123
+ return useAttrs().class || "";
124
+ };
125
+ const prepareStyles = () => {
126
+ return useAttrs().style || {};
127
+ };
128
+
129
+ const SCOPE = "_RepeatClick";
130
+ const vRepeatClick = {
131
+ name: "repeatClick",
132
+ // 在绑定元素的 attribute 前
133
+ // 或事件监听器应用前调用
134
+ // created(el, binding, vnode) {
135
+ // // el.style.display = 'none'
136
+ // // 下面会介绍各个参数的细节
137
+ // console.log('created', el, binding, vnode)
138
+ // },
139
+ // 在元素被插入到 DOM 前调用
140
+ beforeMount(el, binding) {
141
+ const { delay = 300, immediate } = typeof binding.value === "object" ? binding.value : {};
142
+ const handler = typeof binding.value === "object" ? binding.value.handler : binding.value;
143
+ let isPending = false;
144
+ let timer;
145
+ const start = (e) => {
146
+ if (e.button !== 0) return;
147
+ timer && clearTimeout(timer);
148
+ timer = setTimeout(() => {
149
+ if (immediate) {
150
+ isPending = false;
151
+ } else {
152
+ handler?.(e);
153
+ }
154
+ }, delay);
155
+ if (immediate) {
156
+ if (isPending) {
157
+ return;
158
+ }
159
+ isPending = true;
160
+ handler?.(e);
161
+ }
162
+ };
163
+ el[SCOPE] = { start };
164
+ el.addEventListener("click", start);
165
+ },
166
+ // // 在绑定元素的父组件
167
+ // // 及他自己的所有子节点都挂载完成后调用
168
+ // mounted(el, binding, vnode) {
169
+ // console.log('mounted', el, binding, vnode)
170
+ // },
171
+ // // 绑定元素的父组件更新前调用
172
+ // beforeUpdate(el, binding, vnode, prevVnode) {
173
+ // console.log('beforeUpdate', el, binding, vnode, prevVnode)
174
+ // },
175
+ // // 在绑定元素的父组件
176
+ // // 及他自己的所有子节点都更新后调用
177
+ // updated(el, binding, vnode, prevVnode) {
178
+ // console.log('updated', el, binding, vnode, prevVnode)
179
+ // },
180
+ // // 绑定元素的父组件卸载前调用
181
+ // beforeUnmount(el, binding, vnode) {
182
+ // console.log('beforeUnmount', el, binding, vnode)
183
+ // },
184
+ // 绑定元素的父组件卸载后调用
185
+ unmounted(el) {
186
+ if (!el[SCOPE]) return;
187
+ const { start } = el[SCOPE];
188
+ if (start) {
189
+ el.removeEventListener("mousedown", start);
190
+ }
191
+ el[SCOPE] = null;
192
+ }
193
+ };
194
+
195
+ const getEnv = (mark = "hxjf", hostname = window.location.hostname) => {
196
+ const tag = hostname.match(new RegExp(`.*(?=${mark})`));
197
+ if (hostname === "hxdv-ui.hongxinshop.com") {
198
+ return "production";
199
+ }
200
+ if (!tag) {
201
+ return "local";
202
+ }
203
+ return tag[0] ? tag[0].replace("-", "") : "production";
204
+ };
205
+ const getBaseUrl = (env = "sit", isOpenApi) => {
206
+ let url = "";
207
+ if (getEnv() === "local") {
208
+ const query = {};
209
+ query.devProxy = location.search.slice(1).split("=")[1] || location.hash.slice(1).split("=")[1];
210
+ const devProxy = query.devProxy || `${env}-api`;
211
+ url = `${devProxy}${""}`;
212
+ } else {
213
+ url = "/vue-api";
214
+ }
215
+ return url;
216
+ };
217
+
218
+ const getCookie = (name) => {
219
+ const reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
220
+ const arr = document.cookie.match(reg);
221
+ if (arr) {
222
+ return decodeURIComponent(arr[2]);
223
+ }
224
+ return null;
225
+ };
226
+
227
+ const instance = axios.create({
228
+ method: "post",
229
+ timeout: 2e4,
230
+ baseURL: getBaseUrl(),
231
+ headers: {
232
+ "Content-Type": "application/json"
233
+ }
234
+ });
235
+ let reqNum = 0;
236
+ let loading = { close: () => {
237
+ } };
238
+ function startLoading() {
239
+ if (reqNum === 0) {
240
+ loading = ElLoading.service({
241
+ fullscreen: true,
242
+ lock: true,
243
+ text: "\u8BF7\u7A0D\u7B49\uFF0C\u6B63\u5728\u52A0\u8F7D\u4E2D...",
244
+ spinner: "el-icon-loading",
245
+ background: "rgba(0,0,0,0.7)"
246
+ });
247
+ }
248
+ reqNum++;
249
+ }
250
+ function closeLoading() {
251
+ if (reqNum <= 0) {
252
+ return;
253
+ }
254
+ reqNum--;
255
+ if (reqNum === 0) {
256
+ loading.close();
257
+ }
258
+ }
259
+ function endLoading() {
260
+ closeLoading();
261
+ }
262
+ instance.interceptors.request.use(
263
+ async (config) => {
264
+ const token = getCookie("access_token");
265
+ if (token) {
266
+ config.headers["Authorization"] = `Bearer ${token}`;
267
+ }
268
+ if (config.loading) {
269
+ startLoading();
270
+ }
271
+ config.headers = {
272
+ ...config.headers,
273
+ ...window.hx && window.hx.getSignHeaders({
274
+ // 只有openapi接口需要传sign
275
+ sign: config.sign || window.ELPLUSSIGN,
276
+ config
277
+ })
278
+ };
279
+ const cancelRequest = config.cancelRequest;
280
+ config.cancelToken = new axios.CancelToken(function(cancel) {
281
+ cancelRequest && cancelRequest(cancel);
282
+ });
283
+ return config;
284
+ },
285
+ (error) => {
286
+ console.log(error);
287
+ return Promise.reject(error);
288
+ }
289
+ );
290
+ instance.interceptors.response.use(
291
+ (response) => {
292
+ const config = response.config;
293
+ if (config.loading) {
294
+ endLoading();
295
+ }
296
+ const responseCode = response.data.code;
297
+ const { hideToast, hideToastCode = {} } = response.config.headers;
298
+ hideToastCode.length = Object.keys(hideToastCode).length;
299
+ if (responseCode === 200) {
300
+ return Promise.resolve(response.data);
301
+ } else if (hideToast || Array.prototype.slice.call(hideToastCode).indexOf(responseCode) > -1) {
302
+ return Promise.reject(response.data);
303
+ } else {
304
+ setTimeout(() => {
305
+ ElMessage.error({
306
+ message: `<pre>${response.data.msg}</pre>`,
307
+ type: "error",
308
+ duration: 2e3,
309
+ dangerouslyUseHTMLString: true
310
+ });
311
+ }, 300);
312
+ return Promise.reject(response.data);
313
+ }
314
+ },
315
+ (error) => {
316
+ const { config = {}, message } = error;
317
+ const { url } = config;
318
+ if (config.loading) {
319
+ endLoading();
320
+ }
321
+ if (error && error.response) {
322
+ const { status } = error.response;
323
+ switch (status) {
324
+ case 400:
325
+ error.message = error.response.data.message || error.response.data.msg;
326
+ break;
327
+ case 403:
328
+ error.message = "\u62D2\u7EDD\u8BBF\u95EE(403)";
329
+ break;
330
+ case 404:
331
+ error.message = "\u8BF7\u6C42\u51FA\u9519(404)";
332
+ break;
333
+ case 408:
334
+ error.message = "\u8BF7\u6C42\u8D85\u65F6(408)";
335
+ break;
336
+ case 500:
337
+ error.message = "\u670D\u52A1\u5668\u9519\u8BEF(500)";
338
+ break;
339
+ case 501:
340
+ error.message = "\u670D\u52A1\u672A\u5B9E\u73B0(501)";
341
+ break;
342
+ case 502:
343
+ error.message = "\u7F51\u7EDC\u9519\u8BEF(502)";
344
+ break;
345
+ case 503:
346
+ error.message = "\u670D\u52A1\u4E0D\u53EF\u7528(503)";
347
+ break;
348
+ case 504:
349
+ error.message = "\u7F51\u7EDC\u8D85\u65F6(504)";
350
+ break;
351
+ case 505:
352
+ error.message = "HTTP\u7248\u672C\u4E0D\u53D7\u652F\u6301(505)";
353
+ break;
354
+ default:
355
+ error.message = `\u8FDE\u63A5\u51FA\u9519(${error.response.status})!`;
356
+ }
357
+ } else {
358
+ if (error.message.includes("timeout")) {
359
+ error.message = `\u8BF7\u6C42${url ? url : ""}\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u662F\u5426\u8FDE\u63A5\u6B63\u5E38`;
360
+ } else {
361
+ error.message = `\u8BF7\u6C42${url ? url : ""}\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u662F\u5426\u5DF2\u8FDE\u63A5`;
362
+ }
363
+ }
364
+ if (!axios.isCancel(error) || !config.noErrorMsg) {
365
+ ElMessage.error({
366
+ message: error.message,
367
+ type: "error",
368
+ duration: 2e3,
369
+ dangerouslyUseHTMLString: true
370
+ });
371
+ }
372
+ return Promise.reject(error);
373
+ }
374
+ );
375
+ const fetch = instance.request;
376
+
377
+ const vPermisson = {
378
+ name: "permission",
379
+ mounted(el, binding) {
380
+ const { arg, value } = binding.value;
381
+ if (!arg && !value) {
382
+ return;
383
+ }
384
+ el.style.display = "none";
385
+ const permission = `${arg}:${value}`;
386
+ checkPermission(permission, el);
387
+ },
388
+ updated(el, binding) {
389
+ const { arg, value } = binding.value;
390
+ if (!arg && !value) {
391
+ if (el.style.display === "none") {
392
+ el.style.display = "";
393
+ }
394
+ return;
395
+ }
396
+ const permission = `${arg}:${value}`;
397
+ checkPermission(permission, el);
398
+ }
399
+ };
400
+ async function checkPermission(permission, el) {
401
+ const { data: roles = [] } = await queryRoles();
402
+ const hasPermission = roles.indexOf(permission) > -1;
403
+ if (!hasPermission) {
404
+ el && el.parentNode && el.parentNode.removeChild(el);
405
+ } else {
406
+ el.style.display = "";
407
+ }
408
+ return hasPermission;
409
+ }
410
+ let requestPromise = null;
411
+ async function queryRoles() {
412
+ try {
413
+ if (requestPromise) {
414
+ return requestPromise;
415
+ }
416
+ requestPromise = fetch({
417
+ url: "/api-u/api/saas/user/appButtonRoleList",
418
+ loading: true,
419
+ noErrorMsg: true
420
+ });
421
+ return requestPromise;
422
+ } catch (error) {
423
+ console.error(error);
424
+ return { data: [] };
425
+ }
426
+ }
427
+
428
+ const bem$1 = createNameSpace("button");
429
+ var Buttons = /* @__PURE__ */ defineComponent({
430
+ name: "EpButtons",
431
+ directives: {
432
+ [vRepeatClick.name]: vRepeatClick,
433
+ [vPermisson.name]: vPermisson
434
+ },
435
+ inheritAttrs: false,
436
+ props: buttonsProps,
437
+ setup(props, {
438
+ emit
439
+ }) {
440
+ const {
441
+ list,
442
+ ...buttonProps
443
+ } = props;
444
+ const customList = computed(() => {
445
+ return list.filter((button) => {
446
+ if ("show" in button) {
447
+ return typeof button.show === "function" ? button.show(button) : button.show;
448
+ } else if ("hide" in button) {
449
+ return typeof button.hide === "function" ? !button.hide(button) : !button.hide;
450
+ }
451
+ return true;
452
+ });
453
+ });
454
+ const clickFn = async (item) => {
455
+ if (item.confirm) {
456
+ const confirmText = item.confirmText || `\u786E\u5B9A\u8981${item.name}\u5417\uFF1F`;
457
+ await ElMessageBox.confirm(confirmText, "Warning", {
458
+ confirmButtonText: "\u786E\u5B9A",
459
+ cancelButtonText: "\u53D6\u6D88",
460
+ type: "warning"
461
+ });
462
+ }
463
+ item.onClick();
464
+ };
465
+ return () => createVNode(Fragment, null, [customList.value.map((item) => {
466
+ const permissionArr = item.permission?.split(":") || [];
467
+ return withDirectives(createVNode(resolveComponent("el-button"), mergeProps({
468
+ "class": [bem$1.b(), prepareClassNames()],
469
+ "style": prepareStyles(),
470
+ "key": item.prop || item.name
471
+ }, {
472
+ ...prepareProps(buttonProps),
473
+ ...prepareProps(item, ["scopedSlots", "name", "onClick"])
474
+ }), {
475
+ default: () => item.name,
476
+ ...item.scopedSlots
477
+ }), [[resolveDirective("repeat-click"), typeof item.onClick === "function" ? {
478
+ handler: () => clickFn(item),
479
+ immediate: true
480
+ } : () => clickFn(item)], [resolveDirective("permission"), {
481
+ arg: permissionArr[0],
482
+ value: permissionArr[1]
483
+ }]]);
484
+ })]);
485
+ }
486
+ });
487
+
488
+ function withInstall(comp) {
489
+ comp.install = (app) => {
490
+ app.component(comp.name, comp);
491
+ };
492
+ return comp;
493
+ }
494
+
495
+ const EpButtons = withInstall(Buttons);
496
+
497
+ const expandFormProps = {
498
+ // 表单列表
499
+ formItemList: {
500
+ type: Array,
501
+ default: () => []
502
+ },
503
+ // 是否显示折叠
504
+ isShowFold: Boolean,
505
+ // 最大显示的表单数
506
+ showFieldCount: {
507
+ type: Number,
508
+ default: 8
509
+ },
510
+ // 每行的列数
511
+ col: {
512
+ type: Number,
513
+ default: 4
514
+ }
515
+ };
516
+ const formProps = {
517
+ ...formProps$1,
518
+ ...expandFormProps,
519
+ size: {
520
+ ...formProps$1.size,
521
+ default: "small"
522
+ },
523
+ // 标签的长度
524
+ labelWidth: {
525
+ ...formProps$1.labelWidth,
526
+ default: 120
527
+ },
528
+ scrollIntoViewOptions: {
529
+ ...formProps$1.scrollIntoViewOptions,
530
+ default: () => {
531
+ return { inline: "center" };
532
+ }
533
+ }
534
+ };
535
+ const expandFormPropsKeys = Object.keys(expandFormProps);
536
+ const formEmits = {
537
+ ...formEmits$1,
538
+ toggleStatus: (status) => true
539
+ // 折叠状态切换时触发
540
+ };
541
+ const formEmitsKeys = Object.keys(formEmits);
542
+
543
+ const useCollapse = ({ isShowFold, showFieldCount, filterFormItemList }, emit) => {
544
+ const open = ref(false);
545
+ const toggleStatus = () => {
546
+ open.value = !open.value;
547
+ emit("toggleStatus", open.value);
548
+ };
549
+ const isShowFoldBtn = computed(() => {
550
+ return isShowFold && filterFormItemList.value.length > showFieldCount;
551
+ });
552
+ const isShowFormItem = (index) => {
553
+ return index < showFieldCount || open.value || !isShowFoldBtn.value;
554
+ };
555
+ return {
556
+ open,
557
+ toggleStatus,
558
+ isShowFoldBtn,
559
+ isShowFormItem
560
+ };
561
+ };
562
+ const useForm$1 = (props) => {
563
+ const elFormRef = useTemplateRef("elFormRef");
564
+ const filterFormItemList = computed(() => {
565
+ return props.formItemList.filter((item) => {
566
+ if ("show" in item) {
567
+ return typeof item.show === "function" ? item.show(item) : item.show;
568
+ } else if ("hide" in item) {
569
+ return typeof item.hide === "function" ? !item.hide(item) : !item.hide;
570
+ }
571
+ return true;
572
+ });
573
+ });
574
+ const validate = () => {
575
+ return elFormRef.value.validate();
576
+ };
577
+ const resetFields = (props2) => {
578
+ return elFormRef.value.resetFields(props2);
579
+ };
580
+ const clearValidate = (props2) => {
581
+ return elFormRef.value.clearValidate(props2);
582
+ };
583
+ return {
584
+ filterFormItemList,
585
+ elFormRef,
586
+ validate,
587
+ resetFields,
588
+ clearValidate
589
+ };
590
+ };
591
+
592
+ const useFormItemSlots = (props) => {
593
+ const attrs = useAttrs();
594
+ const {
595
+ type,
596
+ label,
597
+ render,
598
+ required,
599
+ labelRender
600
+ } = props;
601
+ const prop = props.tableProp || props.prop;
602
+ const {
603
+ scopedSlots: renderScopedSlots,
604
+ ...renderProps
605
+ } = props.props || {};
606
+ const events = {};
607
+ for (const key in attrs) {
608
+ if (key.startsWith("on")) {
609
+ events[key] = attrs[key];
610
+ }
611
+ }
612
+ const formData = attrs["form-data"];
613
+ const scopedSlots = {
614
+ default: () => {
615
+ return type ? h(resolveComponent(type), {
616
+ modelValue: formData[prop],
617
+ "onUpdate:modelValue": (value) => {
618
+ formData[prop] = value;
619
+ },
620
+ ...renderProps,
621
+ ...events
622
+ }, renderScopedSlots) : formData[prop];
623
+ },
624
+ label: () => {
625
+ return createVNode(resolveComponent("el-tooltip"), {
626
+ "placement": "top",
627
+ "effect": "light",
628
+ "content": label,
629
+ "disabled": !props.isShowLabel
630
+ }, {
631
+ default: () => [createVNode("span", null, [!props.hideRequiredAsterisk && required ? createVNode("span", {
632
+ "style": "color: var(--el-color-danger);"
633
+ }, [createTextVNode("*")]) : null, props.isShowLabel ? createVNode("span", null, [label]) : ""])]
634
+ });
635
+ }
636
+ };
637
+ if (labelRender) {
638
+ scopedSlots.label = () => labelRender({
639
+ label
640
+ });
641
+ }
642
+ if (render) {
643
+ scopedSlots.default = render;
644
+ }
645
+ return {
646
+ scopedSlots
647
+ };
648
+ };
649
+ const useFormItemRules = (props) => {
650
+ const {
651
+ required,
652
+ rules,
653
+ label
654
+ } = props;
655
+ let mergeRules = [];
656
+ if (required) {
657
+ const requiredDefault = {
658
+ required: true
659
+ };
660
+ mergeRules.push(requiredDefault);
661
+ }
662
+ if (rules) {
663
+ if (Array.isArray(rules)) {
664
+ mergeRules = mergeRules.concat(rules);
665
+ }
666
+ if (Object.prototype.toString.call(rules) === "[object Object]") {
667
+ mergeRules.push(rules);
668
+ }
669
+ }
670
+ if (mergeRules) {
671
+ mergeRules.forEach((r) => {
672
+ if (r.required && typeof r.message === "undefined") {
673
+ r.message = `${label || ""}\u4E0D\u80FD\u4E3A\u7A7A`;
674
+ }
675
+ });
676
+ }
677
+ return {
678
+ rules: mergeRules
679
+ };
680
+ };
681
+
682
+ const expandFormItemProps = {
683
+ type: {
684
+ type: String
685
+ // default: 'EpInput',
686
+ },
687
+ col: Number,
688
+ render: Function,
689
+ labelRender: Function,
690
+ props: Object,
691
+ ...visibleProps,
692
+ class: String,
693
+ style: {
694
+ type: [String, Object]
695
+ },
696
+ isShowLabel: {
697
+ type: Boolean,
698
+ default: true
699
+ },
700
+ hideRequiredAsterisk: Boolean,
701
+ tableProp: String
702
+ // 用于table里的表单需要绑定的prop
703
+ };
704
+ const formItemProps = {
705
+ ...formItemProps$1,
706
+ ...expandFormItemProps
707
+ };
708
+ const expandFormItemPropsKeys = Object.keys(expandFormItemProps);
709
+
710
+ const bem = createNameSpace("form-item");
711
+ var EpFormItem = /* @__PURE__ */ defineComponent({
712
+ name: "EpFormItem",
713
+ inheritAttrs: false,
714
+ props: formItemProps,
715
+ setup(props, {
716
+ emit
717
+ }) {
718
+ const attrs = useAttrs();
719
+ const {
720
+ scopedSlots
721
+ } = useFormItemSlots(props);
722
+ const {
723
+ rules
724
+ } = useFormItemRules(props);
725
+ const {
726
+ props: childProps,
727
+ ...formItemProps2
728
+ } = props;
729
+ return () => {
730
+ return createVNode(resolveComponent("el-form-item"), mergeProps({
731
+ "class": [bem.b(), prepareClassNames()],
732
+ "style": prepareStyles()
733
+ }, {
734
+ ...prepareProps(formItemProps2, [...expandFormItemPropsKeys]),
735
+ rules,
736
+ "label-width": attrs["form-label-width"]
737
+ }), scopedSlots);
738
+ };
739
+ }
740
+ });
741
+
742
+ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
743
+ ...{
744
+ name: "EpForm",
745
+ inheritAttrs: false
746
+ },
747
+ __name: "form",
748
+ props: /* @__PURE__ */ mergeModels(formProps, {
749
+ "modelValue": { type: Object, ...{
750
+ default: () => reactive({})
751
+ } },
752
+ "modelModifiers": {}
753
+ }),
754
+ emits: /* @__PURE__ */ mergeModels(formEmits, ["update:modelValue"]),
755
+ setup(__props, { expose: __expose, emit: __emit }) {
756
+ const bem = createNameSpace("form");
757
+ const props = __props;
758
+ const emit = __emit;
759
+ const customAttrs = computed(() => {
760
+ return {
761
+ ...prepareProps(props, ["modelValue", "model", ...expandFormPropsKeys]),
762
+ hideRequiredAsterisk: true,
763
+ // 隐藏必填星号, 使用自己的*
764
+ scrollToError: true,
765
+ ...prepareEvents(emit, formEmitsKeys)
766
+ };
767
+ });
768
+ const formData = useModel(__props, "modelValue");
769
+ const { filterFormItemList, elFormRef, validate, resetFields, clearValidate } = useForm$1(props);
770
+ const { open, toggleStatus, isShowFoldBtn, isShowFormItem } = useCollapse(
771
+ {
772
+ filterFormItemList,
773
+ isShowFold: props.isShowFold,
774
+ showFieldCount: props.showFieldCount
775
+ },
776
+ emit
777
+ );
778
+ __expose({
779
+ elFormRef,
780
+ validate,
781
+ resetFields,
782
+ clearValidate
783
+ });
784
+ return (_ctx, _cache) => {
785
+ const _component_el_col = resolveComponent("el-col");
786
+ const _component_el_row = resolveComponent("el-row");
787
+ const _component_el_form = resolveComponent("el-form");
788
+ return openBlock(), createElementBlock(
789
+ "div",
790
+ {
791
+ class: normalizeClass([
792
+ unref(bem).b(),
793
+ unref(prepareClassNames)(),
794
+ unref(bem).is("open", unref(open)),
795
+ unref(bem).is("fold", unref(isShowFoldBtn))
796
+ ]),
797
+ style: normalizeStyle({
798
+ ...unref(prepareStyles)()
799
+ })
800
+ },
801
+ [
802
+ createVNode(_component_el_form, mergeProps({
803
+ ref_key: "elFormRef",
804
+ ref: elFormRef,
805
+ model: formData.value
806
+ }, customAttrs.value), {
807
+ default: withCtx(() => [
808
+ renderSlot(_ctx.$slots, "default", {}, () => [
809
+ createVNode(_component_el_row, null, {
810
+ default: withCtx(() => [
811
+ (openBlock(true), createElementBlock(
812
+ Fragment,
813
+ null,
814
+ renderList(unref(filterFormItemList), (item, index) => {
815
+ return withDirectives((openBlock(), createBlock(_component_el_col, {
816
+ key: item.prop || index,
817
+ class: normalizeClass(unref(bem).e("col")),
818
+ span: item.col || 24 / _ctx.col
819
+ }, {
820
+ default: withCtx(() => [
821
+ createVNode(unref(EpFormItem), mergeProps({
822
+ "form-data": formData.value,
823
+ "form-label-width": _ctx.labelWidth
824
+ }, { ref_for: true }, item), null, 16, ["form-data", "form-label-width"])
825
+ ]),
826
+ _: 2
827
+ /* DYNAMIC */
828
+ }, 1032, ["class", "span"])), [
829
+ [vShow, unref(isShowFormItem)(index)]
830
+ ]);
831
+ }),
832
+ 128
833
+ /* KEYED_FRAGMENT */
834
+ ))
835
+ ]),
836
+ _: 1
837
+ /* STABLE */
838
+ })
839
+ ])
840
+ ]),
841
+ _: 3
842
+ /* FORWARDED */
843
+ }, 16, ["model"]),
844
+ unref(isShowFoldBtn) ? (openBlock(), createElementBlock("div", {
845
+ key: 0,
846
+ class: normalizeClass(unref(bem).e("fold")),
847
+ onClick: unref(toggleStatus)
848
+ }, toDisplayString(unref(open) ? "\u6536\u8D77" : "\u66F4\u591A"), 11, ["onClick"])) : createCommentVNode("v-if", true)
849
+ ],
850
+ 6
851
+ /* CLASS, STYLE */
852
+ );
853
+ };
854
+ }
855
+ });
856
+
857
+ const EpForm = withInstall(_sfc_main$4);
858
+
859
+ const inputProps = {
860
+ ...inputProps$1,
861
+ max: Number,
862
+ min: Number,
863
+ radix: Number,
864
+ nonzero: Boolean,
865
+ placeholder: {
866
+ type: String,
867
+ default: "\u8BF7\u8F93\u5165"
868
+ },
869
+ thousand: {
870
+ type: Boolean,
871
+ default: true
872
+ },
873
+ clearable: {
874
+ ...inputProps$1.clearable,
875
+ default: true
876
+ }
877
+ };
878
+ const inputEmits = {
879
+ ...inputEmits$1
880
+ };
881
+ const inputEmitsKeys = Object.keys(inputEmits);
882
+
883
+ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
884
+ ...{
885
+ name: "EpInput",
886
+ inheritAttrs: false
887
+ },
888
+ __name: "input",
889
+ props: /* @__PURE__ */ mergeModels(inputProps, {
890
+ "modelValue": { type: null },
891
+ "modelModifiers": {}
892
+ }),
893
+ emits: /* @__PURE__ */ mergeModels(inputEmits, ["update:modelValue"]),
894
+ setup(__props, { emit: __emit }) {
895
+ const bem = createNameSpace("input");
896
+ const props = __props;
897
+ const emit = __emit;
898
+ const slots = computed(() => {
899
+ return Object.keys(useSlots());
900
+ });
901
+ let isBluring = false;
902
+ let isFocusing = false;
903
+ const customAttrs = computed(() => {
904
+ return {
905
+ ...prepareProps(props, ["modelValue"]),
906
+ ...prepareEvents(emit, inputEmitsKeys),
907
+ placeholder: props.disabled ? "" : props.placeholder,
908
+ onFocus: (e) => {
909
+ isFocusing = true;
910
+ if (props.thousand) {
911
+ e.target.value = value.value ? String(value.value) : "";
912
+ }
913
+ emit("focus", e);
914
+ },
915
+ onBlur: (e) => {
916
+ if (props.type === "number") {
917
+ let val = value.value;
918
+ if (props.nonzero && +val === 0) {
919
+ val = "";
920
+ }
921
+ if (val && val[val.length - 1] === ".") {
922
+ val = String(val).slice(0, -1);
923
+ }
924
+ if (val && val === "-") {
925
+ val = "";
926
+ }
927
+ value.value = val ? +val : val;
928
+ e.target.value = toThousand(value.value);
929
+ }
930
+ isBluring = true;
931
+ isFocusing = false;
932
+ emit("blur", e);
933
+ }
934
+ };
935
+ });
936
+ const value = useModel(__props, "modelValue");
937
+ const inputRef = ref();
938
+ const toThousand = (val) => {
939
+ if (props.thousand) {
940
+ return val ? window.hx.thousand(val) : val;
941
+ }
942
+ return val;
943
+ };
944
+ watch(
945
+ () => value.value,
946
+ (val) => {
947
+ if (props.type === "number") {
948
+ onMounted(() => {
949
+ inputRef.value.input.value = toThousand(val);
950
+ });
951
+ }
952
+ if (isBluring) {
953
+ isBluring = false;
954
+ return;
955
+ }
956
+ if (!isFocusing) {
957
+ return;
958
+ }
959
+ if (props.type === "number") {
960
+ if (typeof val === "number") {
961
+ val = "" + val;
962
+ }
963
+ if (typeof val === "string") {
964
+ const zeroReg = new RegExp("^[-+]?0[0-9]\\d*");
965
+ if (zeroReg.test(val)) {
966
+ val = val.replace("0", "");
967
+ }
968
+ const reg = new RegExp("^([-+])?\\d*(\\.?\\d*)", "g");
969
+ val = val.match(reg) ? val.match(reg)[0] : "";
970
+ if (props.radix || props.radix === 0) {
971
+ const reg2 = props.radix === 0 ? new RegExp("^([-+])?\\d*", "g") : new RegExp(`^([-+])?\\d*(\\.?\\d{0,${props.radix}})`, "g");
972
+ val = val.match(reg2) ? val.match(reg2)[0] : "";
973
+ }
974
+ if ((props.max || props.max === 0) && +val > props.max) {
975
+ val = props.max;
976
+ }
977
+ if ((props.min || props.min === 0) && (val || val === 0) && +val < props.min) {
978
+ val = props.min;
979
+ }
980
+ }
981
+ } else if (props.type === "text") {
982
+ val = val.trim();
983
+ }
984
+ value.value = val;
985
+ },
986
+ {
987
+ immediate: true
988
+ }
989
+ );
990
+ return (_ctx, _cache) => {
991
+ const _component_el_input = resolveComponent("el-input");
992
+ return openBlock(), createBlock(_component_el_input, mergeProps({
993
+ ref_key: "inputRef",
994
+ ref: inputRef,
995
+ modelValue: value.value,
996
+ "onUpdate:modelValue": ($event) => value.value = $event,
997
+ class: `${unref(bem).b()} ${unref(prepareClassNames)()}`,
998
+ style: {
999
+ ...unref(prepareStyles)()
1000
+ }
1001
+ }, customAttrs.value, {
1002
+ type: _ctx.type === "number" ? "text" : _ctx.type
1003
+ }), createSlots({
1004
+ _: 2
1005
+ /* DYNAMIC */
1006
+ }, [
1007
+ renderList(slots.value, (name) => {
1008
+ return {
1009
+ name,
1010
+ fn: withCtx((scope) => [
1011
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scope)))
1012
+ ])
1013
+ };
1014
+ })
1015
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "class", "style", "type"]);
1016
+ };
1017
+ }
1018
+ });
1019
+
1020
+ const EpInput = withInstall(_sfc_main$3);
1021
+
1022
+ const inheritTableProps = {
1023
+ ...elTableProps,
1024
+ // Table 的尺寸
1025
+ size: {
1026
+ ...elTableProps.size,
1027
+ default: "default"
1028
+ },
1029
+ // 是否带有纵向边框
1030
+ border: {
1031
+ ...elTableProps.border,
1032
+ default: true
1033
+ },
1034
+ // 表头样式
1035
+ headerCellStyle: {
1036
+ ...elTableProps.headerCellStyle,
1037
+ default: () => ({
1038
+ background: "#EEEFF3",
1039
+ // textAlign: 'center',
1040
+ fontSize: "14px",
1041
+ color: "#505050"
1042
+ })
1043
+ }
1044
+ };
1045
+ const expandTableProps = {
1046
+ ...apiProps,
1047
+ columns: {
1048
+ type: Array,
1049
+ default: () => []
1050
+ },
1051
+ // 是否显示勾选列
1052
+ showSelectionCol: Boolean,
1053
+ // 是否显示序号列
1054
+ showIndexCol: {
1055
+ type: Boolean,
1056
+ default: true
1057
+ },
1058
+ // 对齐方式
1059
+ align: {
1060
+ type: String,
1061
+ default: "center"
1062
+ },
1063
+ // 序号列自定义
1064
+ indexFormatter: {
1065
+ type: [Number, Function]
1066
+ },
1067
+ disabled: Boolean,
1068
+ reserveSelection: Boolean,
1069
+ selectable: {
1070
+ type: Function
1071
+ },
1072
+ paginationProps: {
1073
+ type: Object,
1074
+ default: () => ({})
1075
+ },
1076
+ showPagination: Boolean,
1077
+ isFrontPage: Boolean,
1078
+ // 操作列
1079
+ actionButtons: {
1080
+ type: Array,
1081
+ default: () => []
1082
+ },
1083
+ // 链接列
1084
+ linkProps: {
1085
+ type: Array,
1086
+ default: () => []
1087
+ }
1088
+ };
1089
+ const tableProps = {
1090
+ ...inheritTableProps,
1091
+ ...expandTableProps
1092
+ };
1093
+ const expandTablePropsKeys = Object.keys(expandTableProps);
1094
+ const tableEmits = ElTable.emits;
1095
+ const tableEmitsKeys = tableEmits;
1096
+
1097
+ const useRequest = ({
1098
+ api,
1099
+ method,
1100
+ reqData,
1101
+ reqParams,
1102
+ reqBefore,
1103
+ reqAfter,
1104
+ cancelToken,
1105
+ hooks
1106
+ }) => {
1107
+ if (!api) return {};
1108
+ const loading = ref(false);
1109
+ let cancelRequest;
1110
+ let apiFn;
1111
+ if (typeof api === "string") {
1112
+ const config = {
1113
+ url: api,
1114
+ method
1115
+ };
1116
+ if (cancelToken) {
1117
+ config.cancelRequest = (cancel) => {
1118
+ cancelRequest = cancel;
1119
+ };
1120
+ }
1121
+ apiFn = (data = {}, params) => {
1122
+ if (config.method === "get") {
1123
+ config.params = data;
1124
+ } else {
1125
+ config.data = data;
1126
+ config.params = params;
1127
+ }
1128
+ config.data = {
1129
+ ...reqData,
1130
+ ...config.data
1131
+ };
1132
+ config.params = {
1133
+ ...reqParams,
1134
+ ...config.params
1135
+ };
1136
+ if (data.$query) {
1137
+ config.data[data.$query] = data.$searchValue;
1138
+ delete data.$searchValue;
1139
+ }
1140
+ if (reqBefore) {
1141
+ reqBefore(config);
1142
+ }
1143
+ return fetch(config);
1144
+ };
1145
+ } else {
1146
+ apiFn = api;
1147
+ }
1148
+ const requestFn = async (data = {}) => {
1149
+ if (loading.value && !cancelToken) return;
1150
+ loading.value = true;
1151
+ try {
1152
+ cancelRequest && cancelRequest();
1153
+ const res = await apiFn(data);
1154
+ if (reqAfter) {
1155
+ reqAfter(res);
1156
+ }
1157
+ if (hooks?.success) {
1158
+ hooks.success(res.data);
1159
+ }
1160
+ } catch (error) {
1161
+ if (hooks?.fail) {
1162
+ hooks.fail(error);
1163
+ }
1164
+ } finally {
1165
+ loading.value = false;
1166
+ }
1167
+ };
1168
+ return {
1169
+ loading,
1170
+ requestFn
1171
+ };
1172
+ };
1173
+
1174
+ const useTable$1 = (props) => {
1175
+ const elFormRef = useTemplateRef("elFormRef");
1176
+ const elTableRef = useTemplateRef("elTableRef");
1177
+ const customData = ref([]);
1178
+ const {
1179
+ loading,
1180
+ requestFn
1181
+ } = useRequest({
1182
+ api: props.api,
1183
+ method: props.method,
1184
+ reqData: props.reqData,
1185
+ reqParams: props.reqParams,
1186
+ reqBefore: props.reqBefore,
1187
+ reqAfter: props.reqAfter,
1188
+ cancelToken: true,
1189
+ hooks: {
1190
+ success(data) {
1191
+ if (Array.isArray(data)) {
1192
+ customData.value = data;
1193
+ } else if (data && typeof data === "object") {
1194
+ const rawData = data;
1195
+ customData.value = rawData?.list || rawData?.data || [];
1196
+ } else {
1197
+ customData.value = [];
1198
+ }
1199
+ if (props.showPagination) {
1200
+ pagination.total = (props.isFrontPage ? customData.value.length : data.total) || 0;
1201
+ }
1202
+ },
1203
+ fail(error) {
1204
+ console.error(error);
1205
+ }
1206
+ }
1207
+ });
1208
+ const search = (init = false, isPagination = false) => {
1209
+ if (init) {
1210
+ pagination.pageNo = 1;
1211
+ }
1212
+ if (isPagination && props.isFrontPage) {
1213
+ const {
1214
+ pageNo,
1215
+ pageSize
1216
+ } = pagination;
1217
+ const data = customData.value.filter((item, index) => {
1218
+ return index < pageNo * pageSize && index >= (pageNo - 1) * pageSize;
1219
+ });
1220
+ customData.value = data;
1221
+ } else {
1222
+ if (props.api) {
1223
+ requestFn({
1224
+ pageNo: pagination.pageNo,
1225
+ pageSize: pagination.pageSize
1226
+ });
1227
+ } else if (props.data?.length) {
1228
+ customData.value = props.data;
1229
+ }
1230
+ }
1231
+ };
1232
+ const {
1233
+ pagination,
1234
+ paginationProps
1235
+ } = usePagination(props, search);
1236
+ search(true);
1237
+ const validate = () => {
1238
+ return elFormRef.value.validate();
1239
+ };
1240
+ const resetFields = (props2) => {
1241
+ return elFormRef.value.resetFields(props2);
1242
+ };
1243
+ const clearValidate = (props2) => {
1244
+ return elFormRef.value.clearValidate(props2);
1245
+ };
1246
+ const formatActionButtons = (list, scope) => {
1247
+ return list.map((item) => {
1248
+ if (item.onClick) {
1249
+ item.onClick = item.onClick.bind(null, scope);
1250
+ }
1251
+ return item;
1252
+ });
1253
+ };
1254
+ return {
1255
+ loading,
1256
+ data: customData,
1257
+ search,
1258
+ pagination,
1259
+ paginationProps,
1260
+ validate,
1261
+ resetFields,
1262
+ clearValidate,
1263
+ elFormRef,
1264
+ elTableRef,
1265
+ formatActionButtons
1266
+ };
1267
+ };
1268
+ const usePagination = function(props, search) {
1269
+ const pageSizes = [20, 50, 100, 200];
1270
+ const pagination = reactive({
1271
+ total: 0,
1272
+ pageNo: 1,
1273
+ pageSize: pageSizes[0]
1274
+ });
1275
+ const paginationProps = computed(() => {
1276
+ const defaultPaginationProps = props.paginationProps || {};
1277
+ const onSizeChange = defaultPaginationProps.onSizeChange;
1278
+ const onCurrentChange = defaultPaginationProps.onCurrentChange;
1279
+ return {
1280
+ ...defaultPaginationProps,
1281
+ pageSizes,
1282
+ layout: "total, sizes, prev, pager, next, jumper",
1283
+ onSizeChange: (value) => {
1284
+ onSizeChange && onSizeChange(value);
1285
+ search(true, true);
1286
+ },
1287
+ onCurrentChange: (value) => {
1288
+ onCurrentChange && onCurrentChange(value);
1289
+ search(false, true);
1290
+ }
1291
+ };
1292
+ });
1293
+ return {
1294
+ pagination,
1295
+ paginationProps
1296
+ };
1297
+ };
1298
+ const useTableColumn = (props, tableData) => {
1299
+ const columnProps = (column) => {
1300
+ const attrs = {
1301
+ align: column.align || props.align
1302
+ // ...prepareEvents<TableEmits>(emit, tableEmits),
1303
+ };
1304
+ if (!column.renderHeader) {
1305
+ let required = column.required;
1306
+ if (typeof column.required === "function") {
1307
+ required = column.required();
1308
+ }
1309
+ if (required) {
1310
+ attrs["renderHeader"] = (data) => {
1311
+ const {
1312
+ column: column2
1313
+ } = data;
1314
+ return createVNode("span", null, [createVNode("span", {
1315
+ "style": "color:var(--el-color-danger)"
1316
+ }, [createTextVNode(" * ")]), column2.label]);
1317
+ };
1318
+ }
1319
+ }
1320
+ if (column.headerRender) {
1321
+ attrs.renderHeader = column.headerRender;
1322
+ }
1323
+ if (column.filter) {
1324
+ const arr = tableData.value.map((item) => item[column.prop]);
1325
+ attrs.filters = [...new Set(arr)].map((item) => {
1326
+ return {
1327
+ text: item,
1328
+ value: item
1329
+ };
1330
+ });
1331
+ attrs.filterMethod = (value, row) => {
1332
+ return row[column.prop] === value;
1333
+ };
1334
+ }
1335
+ return {
1336
+ ...attrs,
1337
+ ...prepareProps(column)
1338
+ };
1339
+ };
1340
+ const columnList = computed(() => {
1341
+ return props.columns.filter((column) => {
1342
+ if (props.linkProps.length) {
1343
+ const linkColumn = props.linkProps.find((item) => item.prop === column.prop);
1344
+ if (linkColumn) {
1345
+ column.type = "EpButtons";
1346
+ column.className = "table-column-link";
1347
+ column.props = {
1348
+ list: [linkColumn],
1349
+ type: "text",
1350
+ ...column.props
1351
+ };
1352
+ }
1353
+ }
1354
+ if ("show" in column) {
1355
+ return typeof column.show === "function" ? column.show(column) : column.show;
1356
+ } else if ("hide" in column) {
1357
+ return typeof column.hide === "function" ? !column.hide(column) : !column.hide;
1358
+ }
1359
+ return true;
1360
+ });
1361
+ });
1362
+ return {
1363
+ columnProps,
1364
+ columnList
1365
+ };
1366
+ };
1367
+ const useTableFormItem = (props) => {
1368
+ const formItemProps = (scope, item) => {
1369
+ let required = item.required;
1370
+ if (typeof required === "function") {
1371
+ required = required();
1372
+ }
1373
+ if (item.cellRequired) {
1374
+ required = item.cellRequired(scope);
1375
+ }
1376
+ let disabled = props.disabled;
1377
+ if ("disabled" in item) {
1378
+ if (typeof item.disabled === "function") {
1379
+ disabled = item.disabled(scope);
1380
+ } else {
1381
+ disabled = item.disabled || false;
1382
+ }
1383
+ }
1384
+ if (item.type === "EpSelect" && item.props) {
1385
+ if ("options" in item.props && typeof item.props.options === "function") {
1386
+ item.props.options = item.props.options(scope);
1387
+ }
1388
+ if ("disabledOption" in item.props && typeof item.props.disabledOption === "function") {
1389
+ const disabledOption = item.props.disabledOption;
1390
+ item.props.disabledOption = (...args) => disabledOption(...args, scope);
1391
+ }
1392
+ }
1393
+ if (item.type === "EpButtons" && item.props) {
1394
+ item.props.list.forEach((btnItem) => {
1395
+ if (btnItem.prop) {
1396
+ btnItem.name = scope.row[btnItem.prop];
1397
+ }
1398
+ if (btnItem.onClick) {
1399
+ btnItem.onClick = btnItem.onClick.bind(null, scope);
1400
+ }
1401
+ });
1402
+ }
1403
+ for (const key in item) {
1404
+ if (key.startsWith("on") && typeof item[key] === "function") {
1405
+ const fn = item[key];
1406
+ item[key] = (...args) => fn(...args, scope);
1407
+ }
1408
+ }
1409
+ return {
1410
+ ...prepareProps(item),
1411
+ isShowLabel: false,
1412
+ required,
1413
+ hideRequiredAsterisk: "cellRequired" in item ? false : required,
1414
+ prop: `table.${scope.$index}.${item.prop}`,
1415
+ tableProp: item.prop,
1416
+ // table里的表单需要绑定的prop
1417
+ props: {
1418
+ ...item.props,
1419
+ disabled
1420
+ }
1421
+ };
1422
+ };
1423
+ return {
1424
+ formItemProps
1425
+ };
1426
+ };
1427
+
1428
+ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
1429
+ ...{
1430
+ name: "EpTable",
1431
+ inheritAttrs: false
1432
+ },
1433
+ __name: "table",
1434
+ props: tableProps,
1435
+ emits: tableEmits,
1436
+ setup(__props, {
1437
+ expose: __expose,
1438
+ emit: __emit
1439
+ }) {
1440
+ const bem = createNameSpace("table");
1441
+ const props = __props;
1442
+ const emit = __emit;
1443
+ const slots = computed(() => {
1444
+ return Object.keys(useSlots());
1445
+ });
1446
+ const customAttrs = computed(() => {
1447
+ return {
1448
+ ...prepareProps(props, ["modelValue", ...expandTablePropsKeys]),
1449
+ size: "small",
1450
+ data: data.value,
1451
+ ...prepareEvents(emit, tableEmitsKeys)
1452
+ };
1453
+ });
1454
+ const {
1455
+ pagination,
1456
+ paginationProps,
1457
+ data,
1458
+ validate,
1459
+ resetFields,
1460
+ clearValidate,
1461
+ loading,
1462
+ search,
1463
+ elFormRef,
1464
+ elTableRef,
1465
+ formatActionButtons
1466
+ } = useTable$1(props);
1467
+ const {
1468
+ columnProps,
1469
+ columnList
1470
+ } = useTableColumn(props, data);
1471
+ const {
1472
+ formItemProps
1473
+ } = useTableFormItem(props);
1474
+ __expose({
1475
+ elFormRef,
1476
+ elTableRef,
1477
+ validate,
1478
+ resetFields,
1479
+ clearValidate,
1480
+ search
1481
+ });
1482
+ return (_ctx, _cache) => {
1483
+ const _component_el_table_column = resolveComponent("el-table-column");
1484
+ const _component_EpButtons = resolveComponent("EpButtons");
1485
+ const _component_el_table = resolveComponent("el-table");
1486
+ const _component_el_form = resolveComponent("el-form");
1487
+ const _component_el_pagination = resolveComponent("el-pagination");
1488
+ const _directive_loading = resolveDirective("loading");
1489
+ return openBlock(), createElementBlock(
1490
+ "div",
1491
+ {
1492
+ class: normalizeClass(`${unref(bem).b()} ${unref(prepareClassNames)()}`),
1493
+ style: normalizeStyle({
1494
+ ...unref(prepareStyles)()
1495
+ })
1496
+ },
1497
+ [createVNode(_component_el_form, {
1498
+ ref_key: "elFormRef",
1499
+ ref: elFormRef,
1500
+ model: {
1501
+ table: unref(data)
1502
+ },
1503
+ size: "small",
1504
+ "hide-required-asterisk": "",
1505
+ "scroll-to-error": "",
1506
+ "scroll-into-view-options": {
1507
+ inline: "center"
1508
+ },
1509
+ class: "ep-form"
1510
+ }, {
1511
+ default: withCtx(() => [withDirectives((openBlock(), createBlock(
1512
+ _component_el_table,
1513
+ mergeProps({
1514
+ ref_key: "elTableRef",
1515
+ ref: elTableRef
1516
+ }, customAttrs.value),
1517
+ createSlots({
1518
+ default: withCtx(() => [_ctx.showSelectionCol ? (openBlock(), createBlock(_component_el_table_column, {
1519
+ key: 0,
1520
+ type: "selection",
1521
+ width: "55",
1522
+ align: _ctx.align,
1523
+ selectable: _ctx.selectable,
1524
+ fixed: ""
1525
+ }, null, 8, ["align", "selectable"])) : createCommentVNode("v-if", true), _ctx.showIndexCol ? (openBlock(), createBlock(_component_el_table_column, {
1526
+ key: 1,
1527
+ type: "index",
1528
+ width: "56",
1529
+ align: _ctx.align,
1530
+ label: "\u5E8F\u53F7",
1531
+ fixed: "",
1532
+ index: _ctx.indexFormatter
1533
+ }, null, 8, ["align", "index"])) : createCommentVNode("v-if", true), _ctx.actionButtons.length ? (openBlock(), createBlock(_component_el_table_column, {
1534
+ key: 2,
1535
+ label: "\u64CD\u4F5C",
1536
+ align: _ctx.align,
1537
+ fixed: "",
1538
+ width: "200"
1539
+ }, {
1540
+ default: withCtx((scope) => [createElementVNode(
1541
+ "span",
1542
+ {
1543
+ class: normalizeClass(unref(bem).e("action-buttons"))
1544
+ },
1545
+ [createVNode(_component_EpButtons, {
1546
+ list: unref(formatActionButtons)(_ctx.actionButtons, scope),
1547
+ type: "text"
1548
+ }, null, 8, ["list"])],
1549
+ 2
1550
+ /* CLASS */
1551
+ )]),
1552
+ _: 1
1553
+ /* STABLE */
1554
+ }, 8, ["align"])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(
1555
+ Fragment,
1556
+ null,
1557
+ renderList(unref(columnList), (item, index) => {
1558
+ return openBlock(), createBlock(
1559
+ _component_el_table_column,
1560
+ mergeProps({
1561
+ key: index
1562
+ }, {
1563
+ ref_for: true
1564
+ }, unref(columnProps)(item)),
1565
+ {
1566
+ default: withCtx((scope) => [item.type ? (openBlock(), createBlock(unref(EpFormItem), mergeProps({
1567
+ key: 0,
1568
+ "form-data": scope.row
1569
+ }, {
1570
+ ref_for: true
1571
+ }, unref(formItemProps)(scope, item)), null, 16, ["form-data"])) : (openBlock(), createElementBlock(
1572
+ Fragment,
1573
+ {
1574
+ key: 1
1575
+ },
1576
+ [createTextVNode(
1577
+ toDisplayString(scope.row[item.prop]),
1578
+ 1
1579
+ /* TEXT */
1580
+ )],
1581
+ 64
1582
+ /* STABLE_FRAGMENT */
1583
+ ))]),
1584
+ _: 2
1585
+ /* DYNAMIC */
1586
+ },
1587
+ 1040
1588
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1589
+ );
1590
+ }),
1591
+ 128
1592
+ /* KEYED_FRAGMENT */
1593
+ ))]),
1594
+ _: 2
1595
+ /* DYNAMIC */
1596
+ }, [renderList(slots.value, (name) => {
1597
+ return {
1598
+ name,
1599
+ fn: withCtx((scope) => [renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scope)))])
1600
+ };
1601
+ })]),
1602
+ 1040
1603
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1604
+ )), [[_directive_loading, unref(loading)]])]),
1605
+ _: 3
1606
+ /* FORWARDED */
1607
+ }, 8, ["model"]), _ctx.showPagination ? (openBlock(), createBlock(_component_el_pagination, mergeProps({
1608
+ key: 0,
1609
+ "current-page": unref(pagination).pageNo,
1610
+ "onUpdate:currentPage": ($event) => unref(pagination).pageNo = $event,
1611
+ "page-size": unref(pagination).pageSize,
1612
+ "onUpdate:pageSize": ($event) => unref(pagination).pageSize = $event,
1613
+ total: unref(pagination).total
1614
+ }, unref(paginationProps)), null, 16, ["current-page", "onUpdate:currentPage", "page-size", "onUpdate:pageSize", "total"])) : createCommentVNode("v-if", true)],
1615
+ 6
1616
+ /* CLASS, STYLE */
1617
+ );
1618
+ };
1619
+ }
1620
+ });
1621
+
1622
+ const EpTable = withInstall(_sfc_main$2);
1623
+
1624
+ console.log(formProps.formItemList);
1625
+ const searchListPageProps = {
1626
+ ...apiProps,
1627
+ customColumnModule: Number,
1628
+ // 自定义列模块
1629
+ showOperationColumn: Boolean,
1630
+ // 是否显示操作列
1631
+ // 表单列表
1632
+ formItemList: {
1633
+ ...formProps.formItemList
1634
+ },
1635
+ // 左侧按钮
1636
+ leftButtons: {
1637
+ ...buttonsProps.list
1638
+ },
1639
+ // 表格列
1640
+ columns: {
1641
+ ...tableProps.columns
1642
+ },
1643
+ // 操作列
1644
+ actionButtons: {
1645
+ ...tableProps.actionButtons
1646
+ },
1647
+ // 链接列
1648
+ linkProps: {
1649
+ ...tableProps.linkProps
1650
+ },
1651
+ showSelectionCol: Boolean,
1652
+ showIndexCol: {
1653
+ type: Boolean,
1654
+ default: true
1655
+ },
1656
+ add: Function,
1657
+ // 新增
1658
+ templateDownloadApi: String,
1659
+ // 模板下载
1660
+ importApi: String,
1661
+ // 导入
1662
+ exportApi: String,
1663
+ // 导出
1664
+ // 表格额外距离
1665
+ offsetTop: {
1666
+ type: Number,
1667
+ default: 0
1668
+ },
1669
+ formData: {
1670
+ type: Object,
1671
+ default: () => ({})
1672
+ },
1673
+ tableProps: Object,
1674
+ formProps: Object,
1675
+ buttonsProps: Object
1676
+ };
1677
+
1678
+ const useSearchListPage = (props) => {
1679
+ const { calcTableHeight, tableProps, tableRef } = useTable(props);
1680
+ const { formProps, validate, resetFields, formRef } = useForm(props, {
1681
+ calcTableHeight
1682
+ });
1683
+ const { buttonsProps, searchButtons, search, reset } = useButtons(props, {
1684
+ validate,
1685
+ resetFields,
1686
+ tableRef
1687
+ });
1688
+ return {
1689
+ formProps,
1690
+ tableProps,
1691
+ buttonsProps,
1692
+ searchButtons,
1693
+ search,
1694
+ reset,
1695
+ tableRef,
1696
+ formRef
1697
+ };
1698
+ };
1699
+ const useTable = (props) => {
1700
+ const instanceName = "tableRef";
1701
+ const tableRef = useTemplateRef(instanceName);
1702
+ const tableHeight = ref(window.innerHeight);
1703
+ const tableProps = computed(() => {
1704
+ return {
1705
+ ref: instanceName,
1706
+ columns: props.columns,
1707
+ showPagination: true,
1708
+ height: tableHeight.value,
1709
+ showIndexCol: props.showIndexCol,
1710
+ showSelectionCol: props.showSelectionCol,
1711
+ actionButtons: props.actionButtons,
1712
+ linkProps: props.linkProps,
1713
+ api: props.api,
1714
+ reqData: props.formData,
1715
+ ...props.tableProps
1716
+ };
1717
+ });
1718
+ const calcTableHeight = () => {
1719
+ const topHeight = document.getElementById("top").offsetHeight;
1720
+ const middleHeight = document.getElementById("middle").offsetHeight;
1721
+ let paginationHeight = 0;
1722
+ if (tableProps.value.showPagination) {
1723
+ paginationHeight = document.querySelector(".el-pagination").offsetHeight + 12;
1724
+ }
1725
+ const frameDistance = 40;
1726
+ tableHeight.value = window.innerHeight - topHeight - middleHeight - paginationHeight - frameDistance - props.offsetTop;
1727
+ };
1728
+ onMounted(calcTableHeight);
1729
+ return {
1730
+ tableRef,
1731
+ tableProps,
1732
+ calcTableHeight
1733
+ };
1734
+ };
1735
+ const useForm = (props, { calcTableHeight }) => {
1736
+ const instanceName = "formRef";
1737
+ const formRef = useTemplateRef(instanceName);
1738
+ const formProps = computed(() => {
1739
+ return {
1740
+ ref: instanceName,
1741
+ formItemList: props.formItemList,
1742
+ isShowFold: true,
1743
+ modelValue: props.formData,
1744
+ ...props.formProps,
1745
+ onToggleStatus: () => {
1746
+ setTimeout(() => {
1747
+ calcTableHeight();
1748
+ }, 0);
1749
+ }
1750
+ };
1751
+ });
1752
+ const validate = () => {
1753
+ return formRef.value.validate();
1754
+ };
1755
+ const resetFields = (props2) => {
1756
+ return formRef.value.resetFields(props2);
1757
+ };
1758
+ const clearValidate = (props2) => {
1759
+ return formRef.value.clearValidate(props2);
1760
+ };
1761
+ return {
1762
+ formProps,
1763
+ formRef,
1764
+ validate,
1765
+ resetFields,
1766
+ clearValidate
1767
+ };
1768
+ };
1769
+ const useButtons = (props, { validate, resetFields, tableRef }) => {
1770
+ const defaultButtons = [
1771
+ {
1772
+ name: "\u65B0\u589E",
1773
+ prop: "add",
1774
+ show: () => {
1775
+ return !!props.add;
1776
+ },
1777
+ onClick: () => {
1778
+ props.add?.();
1779
+ }
1780
+ },
1781
+ {
1782
+ name: "\u6A21\u7248\u4E0B\u8F7D",
1783
+ prop: "templateDownload",
1784
+ show: !!props.templateDownloadApi
1785
+ },
1786
+ {
1787
+ name: "\u5BFC\u5165",
1788
+ prop: "import",
1789
+ show: !!props.importApi
1790
+ },
1791
+ {
1792
+ name: "\u5BFC\u51FA",
1793
+ prop: "export",
1794
+ show: !!props.exportApi
1795
+ }
1796
+ ];
1797
+ props.leftButtons?.forEach((item) => {
1798
+ const defaultIndex = defaultButtons.findIndex(
1799
+ (item1) => item1.prop === item.prop
1800
+ );
1801
+ if (defaultIndex !== -1) {
1802
+ defaultButtons[defaultIndex] = {
1803
+ ...defaultButtons[defaultIndex],
1804
+ ...item
1805
+ };
1806
+ }
1807
+ });
1808
+ const list = defaultButtons.concat(props.leftButtons);
1809
+ list.forEach((item) => {
1810
+ if (item.onClick) {
1811
+ const clickFn = item.onClick;
1812
+ item.onClick = () => {
1813
+ const rows = tableRef.value.elTableRef.getSelectionRows();
1814
+ clickFn(rows);
1815
+ };
1816
+ }
1817
+ });
1818
+ const buttonsProps = computed(() => {
1819
+ return {
1820
+ list,
1821
+ ...props.buttonsProps
1822
+ };
1823
+ });
1824
+ const search = async () => {
1825
+ await validate();
1826
+ tableRef.value.search(true);
1827
+ };
1828
+ const reset = async () => {
1829
+ resetFields();
1830
+ search();
1831
+ };
1832
+ const searchButtons = [
1833
+ {
1834
+ name: "\u641C\u7D22",
1835
+ type: "primary",
1836
+ onClick: search
1837
+ },
1838
+ {
1839
+ name: "\u6E05\u7A7A",
1840
+ onClick: reset
1841
+ }
1842
+ ];
1843
+ return {
1844
+ buttonsProps,
1845
+ searchButtons,
1846
+ search,
1847
+ reset
1848
+ };
1849
+ };
1850
+
1851
+ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
1852
+ ...{ name: "EpSearchListPage" },
1853
+ __name: "searchListPage",
1854
+ props: searchListPageProps,
1855
+ setup(__props, { expose: __expose }) {
1856
+ const bem = createNameSpace("search-list-page");
1857
+ const props = __props;
1858
+ const {
1859
+ formProps,
1860
+ buttonsProps,
1861
+ searchButtons,
1862
+ search,
1863
+ reset,
1864
+ tableRef,
1865
+ formRef,
1866
+ tableProps
1867
+ } = useSearchListPage(props);
1868
+ __expose({
1869
+ search,
1870
+ reset,
1871
+ tableRef,
1872
+ formRef
1873
+ });
1874
+ return (_ctx, _cache) => {
1875
+ const _component_EpButtons = resolveComponent("EpButtons");
1876
+ return openBlock(), createElementBlock(
1877
+ "div",
1878
+ {
1879
+ class: normalizeClass([unref(bem).b(), unref(prepareClassNames)()]),
1880
+ style: normalizeStyle({
1881
+ ...unref(prepareStyles)()
1882
+ })
1883
+ },
1884
+ [
1885
+ createElementVNode("div", { id: "top" }, [
1886
+ createVNode(
1887
+ unref(EpForm),
1888
+ normalizeProps(guardReactiveProps(unref(formProps))),
1889
+ null,
1890
+ 16
1891
+ /* FULL_PROPS */
1892
+ )
1893
+ ]),
1894
+ createElementVNode("div", { id: "middle" }, [
1895
+ createElementVNode(
1896
+ "div",
1897
+ {
1898
+ class: normalizeClass(unref(bem).e("middle-left"))
1899
+ },
1900
+ [
1901
+ createVNode(
1902
+ _component_EpButtons,
1903
+ normalizeProps(guardReactiveProps(unref(buttonsProps))),
1904
+ null,
1905
+ 16
1906
+ /* FULL_PROPS */
1907
+ )
1908
+ ],
1909
+ 2
1910
+ /* CLASS */
1911
+ ),
1912
+ createElementVNode(
1913
+ "div",
1914
+ {
1915
+ class: normalizeClass(unref(bem).e("middle-right"))
1916
+ },
1917
+ [
1918
+ createVNode(_component_EpButtons, { list: unref(searchButtons) }, null, 8, ["list"])
1919
+ ],
1920
+ 2
1921
+ /* CLASS */
1922
+ )
1923
+ ]),
1924
+ renderSlot(_ctx.$slots, "tableBefore"),
1925
+ createVNode(
1926
+ unref(EpTable),
1927
+ normalizeProps(guardReactiveProps(unref(tableProps))),
1928
+ null,
1929
+ 16
1930
+ /* FULL_PROPS */
1931
+ )
1932
+ ],
1933
+ 6
1934
+ /* CLASS, STYLE */
1935
+ );
1936
+ };
1937
+ }
1938
+ });
1939
+
1940
+ const EpSearchListPage = withInstall(_sfc_main$1);
1941
+
1942
+ const inheritSelectProps = {
1943
+ ...selectProps$1,
1944
+ clearable: {
1945
+ ...selectProps$1.clearable,
1946
+ default: true
1947
+ }
1948
+ };
1949
+ const expandSelectProps = {
1950
+ ...apiProps,
1951
+ disabledOption: {
1952
+ type: Function,
1953
+ default: () => false
1954
+ },
1955
+ labelKey: {
1956
+ type: String,
1957
+ default: "label"
1958
+ },
1959
+ valueKey: {
1960
+ type: String,
1961
+ default: "value"
1962
+ },
1963
+ formatLabel: {
1964
+ type: Function
1965
+ },
1966
+ // api模式生效
1967
+ lazy: Boolean,
1968
+ // option是否同时展示code label, 默认值展示label, 传string展示指定字段
1969
+ codeInLabel: {
1970
+ type: [String, Boolean]
1971
+ }
1972
+ };
1973
+ const selectProps = {
1974
+ ...inheritSelectProps,
1975
+ ...expandSelectProps
1976
+ };
1977
+ const expandSelectPropsKeys = Object.keys(expandSelectProps);
1978
+ const selectEmits = {
1979
+ ...selectEmits$1,
1980
+ change: (value, item) => true
1981
+ };
1982
+ const selectEmitsKeys = Object.keys(selectEmits);
1983
+
1984
+ function useSelect(props, emit) {
1985
+ let hasLoaded = false;
1986
+ const { loading, requestFn } = useRequest({
1987
+ api: props.api,
1988
+ method: props.method,
1989
+ reqData: props.reqData,
1990
+ reqParams: props.reqParams,
1991
+ reqBefore: props.reqBefore,
1992
+ reqAfter: props.reqAfter,
1993
+ cancelToken: props.remote,
1994
+ hooks: {
1995
+ success(data) {
1996
+ if (Array.isArray(data)) {
1997
+ customOptions.value = data;
1998
+ } else if (data && typeof data === "object") {
1999
+ const rawData = data;
2000
+ customOptions.value = rawData?.list || rawData?.data || [];
2001
+ } else {
2002
+ customOptions.value = [];
2003
+ }
2004
+ hasLoaded = true;
2005
+ },
2006
+ fail(error) {
2007
+ console.error(error);
2008
+ }
2009
+ }
2010
+ });
2011
+ const customOptions = ref([]);
2012
+ const loadOptions = (value, desc) => {
2013
+ if ((value || value === 0) && desc) {
2014
+ customOptions.value = [
2015
+ {
2016
+ [props.labelKey]: desc,
2017
+ [props.valueKey]: value
2018
+ }
2019
+ ];
2020
+ }
2021
+ if (props.api) {
2022
+ if (!props.lazy && !props.remote) {
2023
+ requestFn();
2024
+ }
2025
+ } else if (props.options?.length) {
2026
+ customOptions.value = props.options;
2027
+ }
2028
+ };
2029
+ const getSelectItem = (value) => {
2030
+ if (Array.isArray(value)) {
2031
+ if (!props.options) return [];
2032
+ return props.options.filter((item) => {
2033
+ return value.indexOf(item[props.valueKey]) > -1;
2034
+ });
2035
+ }
2036
+ if (!props.options) return {};
2037
+ return props.options.find((item) => {
2038
+ return item[props.valueKey] === value;
2039
+ }) || {};
2040
+ };
2041
+ const expandAttrs = {
2042
+ loading: props.loading || loading?.value,
2043
+ remoteMethod: (query) => {
2044
+ if (!query) return;
2045
+ requestFn({
2046
+ $searchValue: query
2047
+ });
2048
+ },
2049
+ onChange(value) {
2050
+ emit("change", value, getSelectItem(value));
2051
+ },
2052
+ onVisibleChange(visible) {
2053
+ if (props.api && props.lazy && visible && !hasLoaded && !props.remote) {
2054
+ requestFn();
2055
+ }
2056
+ emit("visible-change", visible);
2057
+ }
2058
+ };
2059
+ return {
2060
+ customOptions,
2061
+ loadOptions,
2062
+ expandAttrs
2063
+ };
2064
+ }
2065
+
2066
+ var _sfc_main = /* @__PURE__ */ defineComponent({
2067
+ ...{
2068
+ name: "EpSelect",
2069
+ inheritAttrs: false
2070
+ },
2071
+ __name: "select",
2072
+ props: /* @__PURE__ */ mergeModels(selectProps, {
2073
+ "modelValue": { type: null },
2074
+ "modelModifiers": {},
2075
+ "desc": { type: String },
2076
+ "descModifiers": {}
2077
+ }),
2078
+ emits: /* @__PURE__ */ mergeModels(selectEmits, ["update:modelValue", "update:desc"]),
2079
+ setup(__props, { emit: __emit }) {
2080
+ const bem = createNameSpace("select");
2081
+ const props = __props;
2082
+ const emit = __emit;
2083
+ const slots = computed(() => {
2084
+ return Object.keys(useSlots());
2085
+ });
2086
+ const { customOptions, loadOptions, expandAttrs } = useSelect(props, emit);
2087
+ const value = useModel(__props, "modelValue");
2088
+ const desc = useModel(__props, "desc");
2089
+ const customAttrs = computed(() => {
2090
+ return {
2091
+ ...prepareProps(props, ["modelValue", "desc", ...expandSelectPropsKeys]),
2092
+ ...prepareEvents(emit, selectEmitsKeys),
2093
+ ...expandAttrs
2094
+ };
2095
+ });
2096
+ loadOptions(value.value, desc.value);
2097
+ return (_ctx, _cache) => {
2098
+ const _component_el_option = resolveComponent("el-option");
2099
+ const _component_el_select = resolveComponent("el-select");
2100
+ return openBlock(), createBlock(_component_el_select, mergeProps({
2101
+ modelValue: value.value,
2102
+ "onUpdate:modelValue": ($event) => value.value = $event,
2103
+ class: `${unref(bem).b()} ${unref(prepareClassNames)()}`
2104
+ }, customAttrs.value, {
2105
+ style: {
2106
+ ...unref(prepareStyles)()
2107
+ }
2108
+ }), createSlots({
2109
+ default: withCtx(() => [
2110
+ (openBlock(true), createElementBlock(
2111
+ Fragment,
2112
+ null,
2113
+ renderList(unref(customOptions), (item) => {
2114
+ return openBlock(), createBlock(_component_el_option, {
2115
+ key: item[_ctx.valueKey],
2116
+ class: normalizeClass(unref(bem).e("option")),
2117
+ label: item.formatLabel ? item.formatLabel(item) : _ctx.formatLabel ? _ctx.formatLabel(item) : item[_ctx.labelKey],
2118
+ value: item[_ctx.valueKey],
2119
+ disabled: _ctx.disabledOption(item)
2120
+ }, {
2121
+ default: withCtx(() => [
2122
+ renderSlot(_ctx.$slots, "option", { item }, () => [
2123
+ _ctx.codeInLabel || _ctx.codeInLabel === "" ? (openBlock(), createElementBlock(
2124
+ Fragment,
2125
+ { key: 0 },
2126
+ [
2127
+ createElementVNode(
2128
+ "span",
2129
+ { style: { "float": "left" } },
2130
+ toDisplayString(item[_ctx.labelKey]),
2131
+ 1
2132
+ /* TEXT */
2133
+ ),
2134
+ createElementVNode(
2135
+ "span",
2136
+ { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } },
2137
+ toDisplayString(item[typeof _ctx.codeInLabel === "string" && _ctx.codeInLabel ? _ctx.codeInLabel : _ctx.valueKey]),
2138
+ 1
2139
+ /* TEXT */
2140
+ )
2141
+ ],
2142
+ 64
2143
+ /* STABLE_FRAGMENT */
2144
+ )) : createCommentVNode("v-if", true)
2145
+ ])
2146
+ ]),
2147
+ _: 2
2148
+ /* DYNAMIC */
2149
+ }, 1032, ["class", "label", "value", "disabled"]);
2150
+ }),
2151
+ 128
2152
+ /* KEYED_FRAGMENT */
2153
+ ))
2154
+ ]),
2155
+ _: 2
2156
+ /* DYNAMIC */
2157
+ }, [
2158
+ renderList(slots.value, (name) => {
2159
+ return {
2160
+ name,
2161
+ fn: withCtx((scope) => [
2162
+ renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(scope)))
2163
+ ])
2164
+ };
2165
+ })
2166
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "class", "style"]);
2167
+ };
2168
+ }
2169
+ });
2170
+
2171
+ const EpSelect = withInstall(_sfc_main);
2172
+
2173
+ var components = [EpButtons, EpForm, EpInput, EpSearchListPage, EpSelect, EpTable];
2174
+
2175
+ var version = "0.0.2";
2176
+
2177
+ const install = (app, options) => {
2178
+ components.forEach((c) => app.use(c));
2179
+ };
2180
+ const plugin = {
2181
+ install,
2182
+ version
2183
+ };
2184
+
2185
+ export { EpButtons, EpForm, EpFormItem, EpInput, EpSearchListPage, EpSelect, EpTable, buttonsProps, plugin as default, expandFormItemPropsKeys, expandFormPropsKeys, expandSelectPropsKeys, expandTablePropsKeys, formEmits, formEmitsKeys, formItemProps, formProps, inheritSelectProps, inputEmits, inputEmitsKeys, inputProps, install, searchListPageProps, selectEmits, selectEmitsKeys, selectProps, tableEmits, tableEmitsKeys, tableProps, useRequest, vPermisson as vPermission, vRepeatClick };