bgi-plus 1.0.7 → 1.0.8

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 (622) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +18 -18
  3. package/dist/index.full.min.js +4 -4
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +4 -4
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +18 -18
  8. package/dist/locale/af.js +1 -1
  9. package/dist/locale/af.min.js +1 -1
  10. package/dist/locale/af.min.mjs +1 -1
  11. package/dist/locale/af.mjs +1 -1
  12. package/dist/locale/ar-eg.js +1 -1
  13. package/dist/locale/ar-eg.min.js +1 -1
  14. package/dist/locale/ar-eg.min.mjs +1 -1
  15. package/dist/locale/ar-eg.mjs +1 -1
  16. package/dist/locale/ar.js +1 -1
  17. package/dist/locale/ar.min.js +1 -1
  18. package/dist/locale/ar.min.mjs +1 -1
  19. package/dist/locale/ar.mjs +1 -1
  20. package/dist/locale/az.js +1 -1
  21. package/dist/locale/az.min.js +1 -1
  22. package/dist/locale/az.min.mjs +1 -1
  23. package/dist/locale/az.mjs +1 -1
  24. package/dist/locale/bg.js +1 -1
  25. package/dist/locale/bg.min.js +1 -1
  26. package/dist/locale/bg.min.mjs +1 -1
  27. package/dist/locale/bg.mjs +1 -1
  28. package/dist/locale/bn.js +1 -1
  29. package/dist/locale/bn.min.js +1 -1
  30. package/dist/locale/bn.min.mjs +1 -1
  31. package/dist/locale/bn.mjs +1 -1
  32. package/dist/locale/ca.js +1 -1
  33. package/dist/locale/ca.min.js +1 -1
  34. package/dist/locale/ca.min.mjs +1 -1
  35. package/dist/locale/ca.mjs +1 -1
  36. package/dist/locale/ckb.js +1 -1
  37. package/dist/locale/ckb.min.js +1 -1
  38. package/dist/locale/ckb.min.mjs +1 -1
  39. package/dist/locale/ckb.mjs +1 -1
  40. package/dist/locale/cs.js +1 -1
  41. package/dist/locale/cs.min.js +1 -1
  42. package/dist/locale/cs.min.mjs +1 -1
  43. package/dist/locale/cs.mjs +1 -1
  44. package/dist/locale/da.js +1 -1
  45. package/dist/locale/da.min.js +1 -1
  46. package/dist/locale/da.min.mjs +1 -1
  47. package/dist/locale/da.mjs +1 -1
  48. package/dist/locale/de.js +1 -1
  49. package/dist/locale/de.min.js +1 -1
  50. package/dist/locale/de.min.mjs +1 -1
  51. package/dist/locale/de.mjs +1 -1
  52. package/dist/locale/el.js +1 -1
  53. package/dist/locale/el.min.js +1 -1
  54. package/dist/locale/el.min.mjs +1 -1
  55. package/dist/locale/el.mjs +1 -1
  56. package/dist/locale/en.js +1 -1
  57. package/dist/locale/en.min.js +1 -1
  58. package/dist/locale/en.min.mjs +1 -1
  59. package/dist/locale/en.mjs +1 -1
  60. package/dist/locale/eo.js +1 -1
  61. package/dist/locale/eo.min.js +1 -1
  62. package/dist/locale/eo.min.mjs +1 -1
  63. package/dist/locale/eo.mjs +1 -1
  64. package/dist/locale/es.js +1 -1
  65. package/dist/locale/es.min.js +1 -1
  66. package/dist/locale/es.min.mjs +1 -1
  67. package/dist/locale/es.mjs +1 -1
  68. package/dist/locale/et.js +1 -1
  69. package/dist/locale/et.min.js +1 -1
  70. package/dist/locale/et.min.mjs +1 -1
  71. package/dist/locale/et.mjs +1 -1
  72. package/dist/locale/eu.js +1 -1
  73. package/dist/locale/eu.min.js +1 -1
  74. package/dist/locale/eu.min.mjs +1 -1
  75. package/dist/locale/eu.mjs +1 -1
  76. package/dist/locale/fa.js +1 -1
  77. package/dist/locale/fa.min.js +1 -1
  78. package/dist/locale/fa.min.mjs +1 -1
  79. package/dist/locale/fa.mjs +1 -1
  80. package/dist/locale/fi.js +1 -1
  81. package/dist/locale/fi.min.js +1 -1
  82. package/dist/locale/fi.min.mjs +1 -1
  83. package/dist/locale/fi.mjs +1 -1
  84. package/dist/locale/fr.js +1 -1
  85. package/dist/locale/fr.min.js +1 -1
  86. package/dist/locale/fr.min.mjs +1 -1
  87. package/dist/locale/fr.mjs +1 -1
  88. package/dist/locale/he.js +1 -1
  89. package/dist/locale/he.min.js +1 -1
  90. package/dist/locale/he.min.mjs +1 -1
  91. package/dist/locale/he.mjs +1 -1
  92. package/dist/locale/hi.js +1 -1
  93. package/dist/locale/hi.min.js +1 -1
  94. package/dist/locale/hi.min.mjs +1 -1
  95. package/dist/locale/hi.mjs +1 -1
  96. package/dist/locale/hr.js +1 -1
  97. package/dist/locale/hr.min.js +1 -1
  98. package/dist/locale/hr.min.mjs +1 -1
  99. package/dist/locale/hr.mjs +1 -1
  100. package/dist/locale/hu.js +1 -1
  101. package/dist/locale/hu.min.js +1 -1
  102. package/dist/locale/hu.min.mjs +1 -1
  103. package/dist/locale/hu.mjs +1 -1
  104. package/dist/locale/hy-am.js +1 -1
  105. package/dist/locale/hy-am.min.js +1 -1
  106. package/dist/locale/hy-am.min.mjs +1 -1
  107. package/dist/locale/hy-am.mjs +1 -1
  108. package/dist/locale/id.js +1 -1
  109. package/dist/locale/id.min.js +1 -1
  110. package/dist/locale/id.min.mjs +1 -1
  111. package/dist/locale/id.mjs +1 -1
  112. package/dist/locale/it.js +1 -1
  113. package/dist/locale/it.min.js +1 -1
  114. package/dist/locale/it.min.mjs +1 -1
  115. package/dist/locale/it.mjs +1 -1
  116. package/dist/locale/ja.js +1 -1
  117. package/dist/locale/ja.min.js +1 -1
  118. package/dist/locale/ja.min.mjs +1 -1
  119. package/dist/locale/ja.mjs +1 -1
  120. package/dist/locale/kk.js +1 -1
  121. package/dist/locale/kk.min.js +1 -1
  122. package/dist/locale/kk.min.mjs +1 -1
  123. package/dist/locale/kk.mjs +1 -1
  124. package/dist/locale/km.js +1 -1
  125. package/dist/locale/km.min.js +1 -1
  126. package/dist/locale/km.min.mjs +1 -1
  127. package/dist/locale/km.mjs +1 -1
  128. package/dist/locale/ko.js +1 -1
  129. package/dist/locale/ko.min.js +1 -1
  130. package/dist/locale/ko.min.mjs +1 -1
  131. package/dist/locale/ko.mjs +1 -1
  132. package/dist/locale/ku.js +1 -1
  133. package/dist/locale/ku.min.js +1 -1
  134. package/dist/locale/ku.min.mjs +1 -1
  135. package/dist/locale/ku.mjs +1 -1
  136. package/dist/locale/ky.js +1 -1
  137. package/dist/locale/ky.min.js +1 -1
  138. package/dist/locale/ky.min.mjs +1 -1
  139. package/dist/locale/ky.mjs +1 -1
  140. package/dist/locale/lo.js +1 -1
  141. package/dist/locale/lo.min.js +1 -1
  142. package/dist/locale/lo.min.mjs +1 -1
  143. package/dist/locale/lo.mjs +1 -1
  144. package/dist/locale/lt.js +1 -1
  145. package/dist/locale/lt.min.js +1 -1
  146. package/dist/locale/lt.min.mjs +1 -1
  147. package/dist/locale/lt.mjs +1 -1
  148. package/dist/locale/lv.js +1 -1
  149. package/dist/locale/lv.min.js +1 -1
  150. package/dist/locale/lv.min.mjs +1 -1
  151. package/dist/locale/lv.mjs +1 -1
  152. package/dist/locale/mg.js +1 -1
  153. package/dist/locale/mg.min.js +1 -1
  154. package/dist/locale/mg.min.mjs +1 -1
  155. package/dist/locale/mg.mjs +1 -1
  156. package/dist/locale/mn.js +1 -1
  157. package/dist/locale/mn.min.js +1 -1
  158. package/dist/locale/mn.min.mjs +1 -1
  159. package/dist/locale/mn.mjs +1 -1
  160. package/dist/locale/ms.js +1 -1
  161. package/dist/locale/ms.min.js +1 -1
  162. package/dist/locale/ms.min.mjs +1 -1
  163. package/dist/locale/ms.mjs +1 -1
  164. package/dist/locale/my.js +1 -1
  165. package/dist/locale/my.min.js +1 -1
  166. package/dist/locale/my.min.mjs +1 -1
  167. package/dist/locale/my.mjs +1 -1
  168. package/dist/locale/nb-no.js +1 -1
  169. package/dist/locale/nb-no.min.js +1 -1
  170. package/dist/locale/nb-no.min.mjs +1 -1
  171. package/dist/locale/nb-no.mjs +1 -1
  172. package/dist/locale/nl.js +1 -1
  173. package/dist/locale/nl.min.js +1 -1
  174. package/dist/locale/nl.min.mjs +1 -1
  175. package/dist/locale/nl.mjs +1 -1
  176. package/dist/locale/no.js +1 -1
  177. package/dist/locale/no.min.js +1 -1
  178. package/dist/locale/no.min.mjs +1 -1
  179. package/dist/locale/no.mjs +1 -1
  180. package/dist/locale/pa.js +1 -1
  181. package/dist/locale/pa.min.js +1 -1
  182. package/dist/locale/pa.min.mjs +1 -1
  183. package/dist/locale/pa.mjs +1 -1
  184. package/dist/locale/pl.js +1 -1
  185. package/dist/locale/pl.min.js +1 -1
  186. package/dist/locale/pl.min.mjs +1 -1
  187. package/dist/locale/pl.mjs +1 -1
  188. package/dist/locale/pt-br.js +1 -1
  189. package/dist/locale/pt-br.min.js +1 -1
  190. package/dist/locale/pt-br.min.mjs +1 -1
  191. package/dist/locale/pt-br.mjs +1 -1
  192. package/dist/locale/pt.js +1 -1
  193. package/dist/locale/pt.min.js +1 -1
  194. package/dist/locale/pt.min.mjs +1 -1
  195. package/dist/locale/pt.mjs +1 -1
  196. package/dist/locale/ro.js +1 -1
  197. package/dist/locale/ro.min.js +1 -1
  198. package/dist/locale/ro.min.mjs +1 -1
  199. package/dist/locale/ro.mjs +1 -1
  200. package/dist/locale/ru.js +1 -1
  201. package/dist/locale/ru.min.js +1 -1
  202. package/dist/locale/ru.min.mjs +1 -1
  203. package/dist/locale/ru.mjs +1 -1
  204. package/dist/locale/sk.js +1 -1
  205. package/dist/locale/sk.min.js +1 -1
  206. package/dist/locale/sk.min.mjs +1 -1
  207. package/dist/locale/sk.mjs +1 -1
  208. package/dist/locale/sl.js +1 -1
  209. package/dist/locale/sl.min.js +1 -1
  210. package/dist/locale/sl.min.mjs +1 -1
  211. package/dist/locale/sl.mjs +1 -1
  212. package/dist/locale/sr.js +1 -1
  213. package/dist/locale/sr.min.js +1 -1
  214. package/dist/locale/sr.min.mjs +1 -1
  215. package/dist/locale/sr.mjs +1 -1
  216. package/dist/locale/sv.js +1 -1
  217. package/dist/locale/sv.min.js +1 -1
  218. package/dist/locale/sv.min.mjs +1 -1
  219. package/dist/locale/sv.mjs +1 -1
  220. package/dist/locale/sw.js +1 -1
  221. package/dist/locale/sw.min.js +1 -1
  222. package/dist/locale/sw.min.mjs +1 -1
  223. package/dist/locale/sw.mjs +1 -1
  224. package/dist/locale/ta.js +1 -1
  225. package/dist/locale/ta.min.js +1 -1
  226. package/dist/locale/ta.min.mjs +1 -1
  227. package/dist/locale/ta.mjs +1 -1
  228. package/dist/locale/te.js +1 -1
  229. package/dist/locale/te.min.js +1 -1
  230. package/dist/locale/te.min.mjs +1 -1
  231. package/dist/locale/te.mjs +1 -1
  232. package/dist/locale/th.js +1 -1
  233. package/dist/locale/th.min.js +1 -1
  234. package/dist/locale/th.min.mjs +1 -1
  235. package/dist/locale/th.mjs +1 -1
  236. package/dist/locale/tk.js +1 -1
  237. package/dist/locale/tk.min.js +1 -1
  238. package/dist/locale/tk.min.mjs +1 -1
  239. package/dist/locale/tk.mjs +1 -1
  240. package/dist/locale/tr.js +1 -1
  241. package/dist/locale/tr.min.js +1 -1
  242. package/dist/locale/tr.min.mjs +1 -1
  243. package/dist/locale/tr.mjs +1 -1
  244. package/dist/locale/ug-cn.js +1 -1
  245. package/dist/locale/ug-cn.min.js +1 -1
  246. package/dist/locale/ug-cn.min.mjs +1 -1
  247. package/dist/locale/ug-cn.mjs +1 -1
  248. package/dist/locale/uk.js +1 -1
  249. package/dist/locale/uk.min.js +1 -1
  250. package/dist/locale/uk.min.mjs +1 -1
  251. package/dist/locale/uk.mjs +1 -1
  252. package/dist/locale/uz-uz.js +1 -1
  253. package/dist/locale/uz-uz.min.js +1 -1
  254. package/dist/locale/uz-uz.min.mjs +1 -1
  255. package/dist/locale/uz-uz.mjs +1 -1
  256. package/dist/locale/vi.js +1 -1
  257. package/dist/locale/vi.min.js +1 -1
  258. package/dist/locale/vi.min.mjs +1 -1
  259. package/dist/locale/vi.mjs +1 -1
  260. package/dist/locale/zh-cn.js +1 -1
  261. package/dist/locale/zh-cn.min.js +1 -1
  262. package/dist/locale/zh-cn.min.mjs +1 -1
  263. package/dist/locale/zh-cn.mjs +1 -1
  264. package/dist/locale/zh-hk.js +1 -1
  265. package/dist/locale/zh-hk.min.js +1 -1
  266. package/dist/locale/zh-hk.min.mjs +1 -1
  267. package/dist/locale/zh-hk.mjs +1 -1
  268. package/dist/locale/zh-mo.js +1 -1
  269. package/dist/locale/zh-mo.min.js +1 -1
  270. package/dist/locale/zh-mo.min.mjs +1 -1
  271. package/dist/locale/zh-mo.mjs +1 -1
  272. package/dist/locale/zh-tw.js +1 -1
  273. package/dist/locale/zh-tw.min.js +1 -1
  274. package/dist/locale/zh-tw.min.mjs +1 -1
  275. package/dist/locale/zh-tw.mjs +1 -1
  276. package/es/components/affix/src/affix.d.ts +1 -1
  277. package/es/components/affix/src/affix.vue.d.ts +3 -3
  278. package/es/components/alert/src/alert.d.ts +2 -2
  279. package/es/components/alert/src/alert.vue.d.ts +2 -2
  280. package/es/components/anchor/src/anchor.vue.d.ts +1 -1
  281. package/es/components/autocomplete/src/autocomplete.d.ts +5 -5
  282. package/es/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
  283. package/es/components/avatar/src/avatar-group-props.d.ts +1 -1
  284. package/es/components/avatar/src/avatar-group.d.ts +3 -3
  285. package/es/components/avatar/src/avatar.d.ts +2 -2
  286. package/es/components/avatar/src/avatar.vue.d.ts +1 -1
  287. package/es/components/backtop/src/backtop.vue.d.ts +1 -1
  288. package/es/components/badge/src/badge.d.ts +1 -1
  289. package/es/components/badge/src/badge.vue.d.ts +2 -2
  290. package/es/components/button/src/button-group.vue.d.ts +1 -1
  291. package/es/components/button/src/button.d.ts +1 -1
  292. package/es/components/button/src/button.vue.d.ts +4 -4
  293. package/es/components/card/src/card.d.ts +1 -1
  294. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -1
  295. package/es/components/carousel/src/carousel.d.ts +1 -1
  296. package/es/components/carousel/src/carousel.vue.d.ts +4 -4
  297. package/es/components/cascader/src/cascader.d.ts +4 -4
  298. package/es/components/cascader/src/cascader.vue.d.ts +16 -16
  299. package/es/components/cascader-panel/src/index.vue.d.ts +1 -1
  300. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  301. package/es/components/checkbox/src/checkbox-button.vue.d.ts +4 -4
  302. package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  303. package/es/components/checkbox/src/checkbox.d.ts +8 -8
  304. package/es/components/checkbox/src/checkbox.vue.d.ts +4 -4
  305. package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
  306. package/es/components/collapse/src/collapse.d.ts +1 -1
  307. package/es/components/collapse/src/collapse.vue.d.ts +1 -1
  308. package/es/components/color-picker/src/color-picker.vue.d.ts +7 -7
  309. package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  310. package/es/components/countdown/src/countdown.vue.d.ts +1 -1
  311. package/es/components/date-picker/src/date-picker.d.ts +11 -11
  312. package/es/components/date-picker/src/props.d.ts +2 -2
  313. package/es/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  314. package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  315. package/es/components/descriptions/src/description-item.d.ts +19 -19
  316. package/es/components/descriptions/src/description.vue.d.ts +1 -1
  317. package/es/components/dialog/src/dialog.vue.d.ts +2 -2
  318. package/es/components/divider/src/divider.d.ts +1 -1
  319. package/es/components/divider/src/divider.vue.d.ts +1 -1
  320. package/es/components/drawer/src/drawer.vue.d.ts +3 -3
  321. package/es/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  322. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  323. package/es/components/dropdown/src/dropdown.d.ts +3 -3
  324. package/es/components/dropdown/src/dropdown.vue.d.ts +68 -68
  325. package/es/components/extend/base-table/src/index.mjs.map +1 -1
  326. package/es/components/extend/base-table/src/index.vue.d.ts +4 -4
  327. package/es/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.mjs +2 -2
  328. package/es/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
  329. package/es/components/extend/base-table/src/utils.mjs +9 -14
  330. package/es/components/extend/base-table/src/utils.mjs.map +1 -1
  331. package/es/components/extend/dna-animation/src/index.vue.d.ts +1 -1
  332. package/es/components/extend/edit-cell/src/index.vue.d.ts +7 -7
  333. package/es/components/extend/edit-table/src/index.vue.d.ts +8 -8
  334. package/es/components/extend/form-dialog/src/index.vue.d.ts +1 -1
  335. package/es/components/extend/mutiline-text/src/index.vue.d.ts +1 -1
  336. package/es/components/extend/quill-editor/src/index.vue.d.ts +4 -4
  337. package/es/components/extend/v-button/src/index.vue.d.ts +14 -14
  338. package/es/components/extend/v-dialog/src/index.vue.d.ts +3 -3
  339. package/es/components/extend/v-form/src/form-item.vue.d.ts +5 -5
  340. package/es/components/extend/v-form/src/index.mjs.map +1 -1
  341. package/es/components/extend/v-form/src/index.vue.d.ts +8 -8
  342. package/es/components/extend/v-form/src/index.vue_vue_type_script_lang.mjs +6 -1
  343. package/es/components/extend/v-form/src/index.vue_vue_type_script_lang.mjs.map +1 -1
  344. package/es/components/extend/v-input-number/src/input-number.d.ts +2 -2
  345. package/es/components/extend/v-input-number/src/input-number.vue.d.ts +7 -7
  346. package/es/components/extend/v-switch/src/index.vue.d.ts +3 -3
  347. package/es/components/extend/v-upload/src/index.vue.d.ts +4 -4
  348. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  349. package/es/components/form/src/form-item.d.ts +1 -1
  350. package/es/components/form/src/form.d.ts +2 -2
  351. package/es/components/image/src/image.vue.d.ts +4 -4
  352. package/es/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
  353. package/es/components/input/src/input.d.ts +4 -4
  354. package/es/components/input/src/input.vue.d.ts +5 -5
  355. package/es/components/input-number/src/input-number.d.ts +2 -2
  356. package/es/components/input-number/src/input-number.vue.d.ts +6 -6
  357. package/es/components/input-tag/src/input-tag.d.ts +3 -3
  358. package/es/components/input-tag/src/input-tag.vue.d.ts +11 -11
  359. package/es/components/link/src/link.d.ts +2 -2
  360. package/es/components/link/src/link.vue.d.ts +1 -1
  361. package/es/components/mention/src/mention.d.ts +5 -5
  362. package/es/components/mention/src/mention.vue.d.ts +2 -2
  363. package/es/components/menu/src/menu.d.ts +2 -2
  364. package/es/components/menu/src/sub-menu.d.ts +1 -1
  365. package/es/components/message/src/message.d.ts +2 -2
  366. package/es/components/message/src/message.vue.d.ts +5 -5
  367. package/es/components/notification/src/notification.d.ts +2 -2
  368. package/es/components/notification/src/notification.vue.d.ts +4 -4
  369. package/es/components/pagination/src/pagination.d.ts +4 -4
  370. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  371. package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  372. package/es/components/popover/src/popover.d.ts +1 -1
  373. package/es/components/popover/src/popover.vue.d.ts +6 -6
  374. package/es/components/popper/src/composables/use-content.d.ts +4 -4
  375. package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  376. package/es/components/popper/src/content.vue.d.ts +4 -4
  377. package/es/components/popper/src/popper.d.ts +2 -2
  378. package/es/components/progress/src/progress.d.ts +1 -1
  379. package/es/components/progress/src/progress.vue.d.ts +1 -1
  380. package/es/components/radio/src/radio-button.d.ts +3 -3
  381. package/es/components/radio/src/radio-button.vue.d.ts +2 -2
  382. package/es/components/radio/src/radio-group.vue.d.ts +5 -5
  383. package/es/components/radio/src/radio.d.ts +6 -6
  384. package/es/components/radio/src/radio.vue.d.ts +3 -3
  385. package/es/components/rate/src/rate.vue.d.ts +3 -3
  386. package/es/components/result/src/result.d.ts +1 -1
  387. package/es/components/result/src/result.vue.d.ts +1 -1
  388. package/es/components/row/src/row.d.ts +2 -2
  389. package/es/components/row/src/row.vue.d.ts +1 -1
  390. package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  391. package/es/components/segmented/index.d.ts +3 -3
  392. package/es/components/segmented/src/segmented.d.ts +1 -1
  393. package/es/components/segmented/src/segmented.vue.d.ts +1 -1
  394. package/es/components/select/src/option.d.ts +2 -2
  395. package/es/components/select/src/option.vue.d.ts +5 -5
  396. package/es/components/select/src/select.d.ts +5 -5
  397. package/es/components/select/src/select.vue.d.ts +82 -82
  398. package/es/components/select-v2/src/defaults.d.ts +3 -3
  399. package/es/components/select-v2/src/select.vue.d.ts +61 -61
  400. package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
  401. package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
  402. package/es/components/slider/src/button.vue.d.ts +1 -1
  403. package/es/components/slider/src/slider.vue.d.ts +5 -5
  404. package/es/components/space/src/space.d.ts +1 -1
  405. package/es/components/statistic/src/statistic.vue.d.ts +2 -2
  406. package/es/components/steps/src/item.d.ts +1 -1
  407. package/es/components/steps/src/item.vue.d.ts +2 -2
  408. package/es/components/steps/src/steps.d.ts +2 -2
  409. package/es/components/steps/src/steps.vue.d.ts +1 -1
  410. package/es/components/switch/src/switch.vue.d.ts +2 -2
  411. package/es/components/table/src/table-column/index.d.ts +18 -18
  412. package/es/components/table/src/table-header/index.d.ts +13 -13
  413. package/es/components/table/src/table.vue.d.ts +37 -37
  414. package/es/components/table-v2/src/table-grid.d.ts +1 -1
  415. package/es/components/table-v2/src/table-v2.d.ts +1 -1
  416. package/es/components/tabs/src/tab-nav.d.ts +1 -1
  417. package/es/components/tabs/src/tab-pane.vue.d.ts +1 -1
  418. package/es/components/tabs/src/tabs.d.ts +6 -6
  419. package/es/components/tag/src/tag.d.ts +2 -2
  420. package/es/components/text/src/text.d.ts +1 -1
  421. package/es/components/time-picker/src/common/picker.vue.d.ts +13 -13
  422. package/es/components/time-picker/src/common/props.d.ts +2 -2
  423. package/es/components/time-picker/src/time-picker.d.ts +11 -11
  424. package/es/components/time-select/src/time-select.vue.d.ts +8 -8
  425. package/es/components/timeline/src/timeline-item.d.ts +2 -2
  426. package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
  427. package/es/components/tooltip/src/content.vue.d.ts +5 -5
  428. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  429. package/es/components/tooltip/src/tooltip.vue.d.ts +12 -12
  430. package/es/components/tour/src/content.d.ts +1 -1
  431. package/es/components/tour/src/step.d.ts +1 -1
  432. package/es/components/tour/src/tour.d.ts +1 -1
  433. package/es/components/tour/src/tour.vue.d.ts +1 -1
  434. package/es/components/transfer/src/transfer.vue.d.ts +1 -1
  435. package/es/components/tree/src/tree.vue.d.ts +13 -13
  436. package/es/components/tree-select/src/tree-select.vue.d.ts +35 -35
  437. package/es/components/upload/src/upload-content.vue.d.ts +2 -2
  438. package/es/components/upload/src/upload.vue.d.ts +3 -3
  439. package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  440. package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  441. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
  442. package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  443. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
  444. package/es/components/watermark/src/watermark.vue.d.ts +1 -1
  445. package/es/hooks/use-floating/index.d.ts +8 -8
  446. package/es/hooks/use-popper/index.d.ts +4 -4
  447. package/es/utils/vue/size.d.ts +1 -1
  448. package/lib/components/affix/src/affix.d.ts +1 -1
  449. package/lib/components/affix/src/affix.vue.d.ts +3 -3
  450. package/lib/components/alert/src/alert.d.ts +2 -2
  451. package/lib/components/alert/src/alert.vue.d.ts +2 -2
  452. package/lib/components/anchor/src/anchor.vue.d.ts +1 -1
  453. package/lib/components/autocomplete/src/autocomplete.d.ts +5 -5
  454. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +2 -2
  455. package/lib/components/avatar/src/avatar-group-props.d.ts +1 -1
  456. package/lib/components/avatar/src/avatar-group.d.ts +3 -3
  457. package/lib/components/avatar/src/avatar.d.ts +2 -2
  458. package/lib/components/avatar/src/avatar.vue.d.ts +1 -1
  459. package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
  460. package/lib/components/badge/src/badge.d.ts +1 -1
  461. package/lib/components/badge/src/badge.vue.d.ts +2 -2
  462. package/lib/components/button/src/button-group.vue.d.ts +1 -1
  463. package/lib/components/button/src/button.d.ts +1 -1
  464. package/lib/components/button/src/button.vue.d.ts +4 -4
  465. package/lib/components/card/src/card.d.ts +1 -1
  466. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -1
  467. package/lib/components/carousel/src/carousel.d.ts +1 -1
  468. package/lib/components/carousel/src/carousel.vue.d.ts +4 -4
  469. package/lib/components/cascader/src/cascader.d.ts +4 -4
  470. package/lib/components/cascader/src/cascader.vue.d.ts +16 -16
  471. package/lib/components/cascader-panel/src/index.vue.d.ts +1 -1
  472. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  473. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +4 -4
  474. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
  475. package/lib/components/checkbox/src/checkbox.d.ts +8 -8
  476. package/lib/components/checkbox/src/checkbox.vue.d.ts +4 -4
  477. package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
  478. package/lib/components/collapse/src/collapse.d.ts +1 -1
  479. package/lib/components/collapse/src/collapse.vue.d.ts +1 -1
  480. package/lib/components/color-picker/src/color-picker.vue.d.ts +7 -7
  481. package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +1 -1
  482. package/lib/components/countdown/src/countdown.vue.d.ts +1 -1
  483. package/lib/components/date-picker/src/date-picker.d.ts +11 -11
  484. package/lib/components/date-picker/src/props.d.ts +2 -2
  485. package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +5 -5
  486. package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -1
  487. package/lib/components/descriptions/src/description-item.d.ts +19 -19
  488. package/lib/components/descriptions/src/description.vue.d.ts +1 -1
  489. package/lib/components/dialog/src/dialog.vue.d.ts +2 -2
  490. package/lib/components/divider/src/divider.d.ts +1 -1
  491. package/lib/components/divider/src/divider.vue.d.ts +1 -1
  492. package/lib/components/drawer/src/drawer.vue.d.ts +3 -3
  493. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
  494. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  495. package/lib/components/dropdown/src/dropdown.d.ts +3 -3
  496. package/lib/components/dropdown/src/dropdown.vue.d.ts +68 -68
  497. package/lib/components/extend/base-table/src/index.js.map +1 -1
  498. package/lib/components/extend/base-table/src/index.vue.d.ts +4 -4
  499. package/lib/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.js +2 -2
  500. package/lib/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.js.map +1 -1
  501. package/lib/components/extend/base-table/src/utils.js +9 -14
  502. package/lib/components/extend/base-table/src/utils.js.map +1 -1
  503. package/lib/components/extend/dna-animation/src/index.vue.d.ts +1 -1
  504. package/lib/components/extend/edit-cell/src/index.vue.d.ts +7 -7
  505. package/lib/components/extend/edit-table/src/index.vue.d.ts +8 -8
  506. package/lib/components/extend/form-dialog/src/index.vue.d.ts +1 -1
  507. package/lib/components/extend/mutiline-text/src/index.vue.d.ts +1 -1
  508. package/lib/components/extend/quill-editor/src/index.vue.d.ts +4 -4
  509. package/lib/components/extend/v-button/src/index.vue.d.ts +14 -14
  510. package/lib/components/extend/v-dialog/src/index.vue.d.ts +3 -3
  511. package/lib/components/extend/v-form/src/form-item.vue.d.ts +5 -5
  512. package/lib/components/extend/v-form/src/index.js.map +1 -1
  513. package/lib/components/extend/v-form/src/index.vue.d.ts +8 -8
  514. package/lib/components/extend/v-form/src/index.vue_vue_type_script_lang.js +6 -1
  515. package/lib/components/extend/v-form/src/index.vue_vue_type_script_lang.js.map +1 -1
  516. package/lib/components/extend/v-input-number/src/input-number.d.ts +2 -2
  517. package/lib/components/extend/v-input-number/src/input-number.vue.d.ts +7 -7
  518. package/lib/components/extend/v-switch/src/index.vue.d.ts +3 -3
  519. package/lib/components/extend/v-upload/src/index.vue.d.ts +4 -4
  520. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  521. package/lib/components/form/src/form-item.d.ts +1 -1
  522. package/lib/components/form/src/form.d.ts +2 -2
  523. package/lib/components/image/src/image.vue.d.ts +4 -4
  524. package/lib/components/image-viewer/src/image-viewer.vue.d.ts +2 -2
  525. package/lib/components/input/src/input.d.ts +4 -4
  526. package/lib/components/input/src/input.vue.d.ts +5 -5
  527. package/lib/components/input-number/src/input-number.d.ts +2 -2
  528. package/lib/components/input-number/src/input-number.vue.d.ts +6 -6
  529. package/lib/components/input-tag/src/input-tag.d.ts +3 -3
  530. package/lib/components/input-tag/src/input-tag.vue.d.ts +11 -11
  531. package/lib/components/link/src/link.d.ts +2 -2
  532. package/lib/components/link/src/link.vue.d.ts +1 -1
  533. package/lib/components/mention/src/mention.d.ts +5 -5
  534. package/lib/components/mention/src/mention.vue.d.ts +2 -2
  535. package/lib/components/menu/src/menu.d.ts +2 -2
  536. package/lib/components/menu/src/sub-menu.d.ts +1 -1
  537. package/lib/components/message/src/message.d.ts +2 -2
  538. package/lib/components/message/src/message.vue.d.ts +5 -5
  539. package/lib/components/notification/src/notification.d.ts +2 -2
  540. package/lib/components/notification/src/notification.vue.d.ts +4 -4
  541. package/lib/components/pagination/src/pagination.d.ts +4 -4
  542. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  543. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
  544. package/lib/components/popover/src/popover.d.ts +1 -1
  545. package/lib/components/popover/src/popover.vue.d.ts +6 -6
  546. package/lib/components/popper/src/composables/use-content.d.ts +4 -4
  547. package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
  548. package/lib/components/popper/src/content.vue.d.ts +4 -4
  549. package/lib/components/popper/src/popper.d.ts +2 -2
  550. package/lib/components/progress/src/progress.d.ts +1 -1
  551. package/lib/components/progress/src/progress.vue.d.ts +1 -1
  552. package/lib/components/radio/src/radio-button.d.ts +3 -3
  553. package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
  554. package/lib/components/radio/src/radio-group.vue.d.ts +5 -5
  555. package/lib/components/radio/src/radio.d.ts +6 -6
  556. package/lib/components/radio/src/radio.vue.d.ts +3 -3
  557. package/lib/components/rate/src/rate.vue.d.ts +3 -3
  558. package/lib/components/result/src/result.d.ts +1 -1
  559. package/lib/components/result/src/result.vue.d.ts +1 -1
  560. package/lib/components/row/src/row.d.ts +2 -2
  561. package/lib/components/row/src/row.vue.d.ts +1 -1
  562. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  563. package/lib/components/segmented/index.d.ts +3 -3
  564. package/lib/components/segmented/src/segmented.d.ts +1 -1
  565. package/lib/components/segmented/src/segmented.vue.d.ts +1 -1
  566. package/lib/components/select/src/option.d.ts +2 -2
  567. package/lib/components/select/src/option.vue.d.ts +5 -5
  568. package/lib/components/select/src/select.d.ts +5 -5
  569. package/lib/components/select/src/select.vue.d.ts +82 -82
  570. package/lib/components/select-v2/src/defaults.d.ts +3 -3
  571. package/lib/components/select-v2/src/select.vue.d.ts +61 -61
  572. package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
  573. package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
  574. package/lib/components/slider/src/button.vue.d.ts +1 -1
  575. package/lib/components/slider/src/slider.vue.d.ts +5 -5
  576. package/lib/components/space/src/space.d.ts +1 -1
  577. package/lib/components/statistic/src/statistic.vue.d.ts +2 -2
  578. package/lib/components/steps/src/item.d.ts +1 -1
  579. package/lib/components/steps/src/item.vue.d.ts +2 -2
  580. package/lib/components/steps/src/steps.d.ts +2 -2
  581. package/lib/components/steps/src/steps.vue.d.ts +1 -1
  582. package/lib/components/switch/src/switch.vue.d.ts +2 -2
  583. package/lib/components/table/src/table-column/index.d.ts +18 -18
  584. package/lib/components/table/src/table-header/index.d.ts +13 -13
  585. package/lib/components/table/src/table.vue.d.ts +37 -37
  586. package/lib/components/table-v2/src/table-grid.d.ts +1 -1
  587. package/lib/components/table-v2/src/table-v2.d.ts +1 -1
  588. package/lib/components/tabs/src/tab-nav.d.ts +1 -1
  589. package/lib/components/tabs/src/tab-pane.vue.d.ts +1 -1
  590. package/lib/components/tabs/src/tabs.d.ts +6 -6
  591. package/lib/components/tag/src/tag.d.ts +2 -2
  592. package/lib/components/text/src/text.d.ts +1 -1
  593. package/lib/components/time-picker/src/common/picker.vue.d.ts +13 -13
  594. package/lib/components/time-picker/src/common/props.d.ts +2 -2
  595. package/lib/components/time-picker/src/time-picker.d.ts +11 -11
  596. package/lib/components/time-select/src/time-select.vue.d.ts +8 -8
  597. package/lib/components/timeline/src/timeline-item.d.ts +2 -2
  598. package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
  599. package/lib/components/tooltip/src/content.vue.d.ts +5 -5
  600. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  601. package/lib/components/tooltip/src/tooltip.vue.d.ts +12 -12
  602. package/lib/components/tour/src/content.d.ts +1 -1
  603. package/lib/components/tour/src/step.d.ts +1 -1
  604. package/lib/components/tour/src/tour.d.ts +1 -1
  605. package/lib/components/tour/src/tour.vue.d.ts +1 -1
  606. package/lib/components/transfer/src/transfer.vue.d.ts +1 -1
  607. package/lib/components/tree/src/tree.vue.d.ts +13 -13
  608. package/lib/components/tree-select/src/tree-select.vue.d.ts +35 -35
  609. package/lib/components/upload/src/upload-content.vue.d.ts +2 -2
  610. package/lib/components/upload/src/upload.vue.d.ts +3 -3
  611. package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
  612. package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
  613. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
  614. package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
  615. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
  616. package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
  617. package/lib/hooks/use-floating/index.d.ts +8 -8
  618. package/lib/hooks/use-popper/index.d.ts +4 -4
  619. package/lib/utils/vue/size.d.ts +1 -1
  620. package/package.json +1 -1
  621. package/theme-chalk/index.css +1 -1
  622. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../../packages/components/extend/base-table/src/utils.ts"],"sourcesContent":["import { h, resolveComponent } from 'vue'\nimport dayjs from 'dayjs'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useLocale } from '@element-plus/hooks'\nimport SvgIcon from '@element-plus/components/extend/svg-icon'\n\n// 把vnode转换成text\nexport const getVnodeText = (vnode: any) => {\n if (!vnode) return ''\n // const textFormat = (text) => (text ? `${text} ` : '')\n let text = ['string', 'number'].includes(typeof vnode) ? vnode : ''\n if (['string', 'number'].includes(typeof vnode.children)) {\n text += typeof vnode.children !== 'object' ? vnode.children : ''\n } else if (vnode.children instanceof Array) {\n vnode.children.forEach((cvnode: any) => {\n text += getVnodeText(cvnode)\n })\n } else if (typeof vnode.children === 'object') {\n vnode.children &&\n Object.keys(vnode.children).forEach((key) => {\n const slotFn = vnode.children[key]\n text += typeof slotFn === 'function' ? slotFn(vnode.props) : ''\n })\n }\n return text\n}\n\nexport const formtCellTime = (time: any, format?: string) => {\n if (!time) return ''\n const { lang } = useLocale()\n return dayjs(new Date(time)).format(\n format\n ? format\n : lang.value === 'en'\n ? 'DD/MM/YYYY HH:mm:ss'\n : 'YYYY-MM-DD HH:mm:ss'\n )\n}\n\n// 代理原组件render\nexport const createRenderValue = ({\n index,\n row,\n column,\n value,\n scope,\n}: {\n index: any\n row: any\n column: any\n value: any\n scope: any\n}) => {\n if (column.render) {\n return column.render({ index, row, column, value, scope })\n }\n if (column.format && column.format.startsWith('dateFormater')) {\n return formtCellTime(\n row[column.prop],\n column.format.split('dateFormater:')[1]\n )\n }\n if (column.format === 'numFormater') {\n return formatNumber(row[column.prop], { decimals: 2 })\n }\n if (column.format === 'sizeFormater') {\n return convertSize(row[column.prop])\n }\n if (column.tag) {\n if (column.options && !column.options.keyValue) {\n column.options = dealDictOptions(column.options)\n }\n return handleTag(row[column.prop], column.tag, {\n index,\n row,\n column,\n value,\n scope,\n })\n }\n if (column.svg) {\n if (!column.options || !column.options.length) return ''\n const options = column.options.filter(\n (item: any) => item.value === row[column.prop]\n )\n return handleSvgOption(options, column.svgOnly)\n }\n if (column.options) {\n if (!column.options.keyValue) {\n column.options = dealDictOptions(column.options)\n }\n return handleSelect(row[column.prop], column.options)\n }\n if (column.formatter) {\n return column.formatter({ index, row, column, value, scope })\n }\n if (column.index) {\n return column.index(Number(index))\n }\n if (column.type === 'index') {\n return Number(index) + 1\n }\n return row[column.prop]\n}\n\n/**\n * 获取单个树节点URL\n * @param {*} tree\n * @param {*} val\n * @param {*} path\n * @param {*} key\n * @returns\n */\nexport function getTreePath(\n tree: any,\n val: any,\n path: any[] = [],\n key = 'value'\n): any[] | undefined {\n tree = Array.isArray(tree) ? tree : [tree]\n if (!path) {\n path = []\n }\n if (!tree.length || !val) {\n return path\n }\n for (let i = 0, len = tree.length; i < len; i++) {\n const tempPath = [...path]\n tempPath.push(tree[i])\n if (tree[i][key] === val) {\n return tempPath\n }\n if (tree[i].children && tree[i].children.length) {\n const res: any[] | undefined = getTreePath(\n tree[i].children,\n val,\n tempPath,\n key\n )\n if (res) {\n return res\n }\n }\n }\n}\n\n// 计算input内value的物理像素长度\nexport function getTextWidth(str: string) {\n let width = 0\n const html = document.createElement('span')\n html.innerText = str\n html.className = 'getTextWidth'\n document.body.appendChild(html)\n width = html.offsetWidth\n html.remove()\n return width\n}\n\nexport function isNativeTag(tag: string) {\n const tags = [\n 'span',\n 'div',\n 'i',\n 'b',\n 'p',\n 'input',\n 'textarea',\n 'ul',\n 'li',\n 'ol',\n ]\n return tags.includes(tag)\n}\n\n/**\n * 获取dom节点指定className父节点\n */\nexport function getParentNode(node: any, className: string, num: number) {\n let parent = node.parentNode\n let i = 0\n while (\n i < num &&\n parent !== null &&\n (!parent.className || parent.className !== className)\n ) {\n i++\n parent = parent.parentNode\n if (i === num - 1) {\n // 限制一定层级内\n parent = null\n }\n }\n return parent\n}\n\n/**\n * 计算VTable自适应高度\n */\nexport function calcVTableHeight(tableDom: any, minus = 0) {\n const getOffsetHeight = (node: any) => {\n let top = node.offsetTop\n let parent = node.offsetParent\n while (parent !== null && !parent.classList.contains('app-main')) {\n top += parent.offsetTop\n parent = parent.offsetParent\n }\n return top\n }\n\n const appMainDiv = (document.querySelector('.app-main') ||\n document.querySelector('body')) as HTMLElement | null\n if (!appMainDiv) return 0\n const offsetTop = getOffsetHeight(tableDom)\n const pagination = tableDom.nextSibling as HTMLElement | null\n const height =\n appMainDiv.offsetHeight +\n (getComputedStyle(appMainDiv).position === 'static'\n ? appMainDiv.offsetTop\n : 0) -\n Number.parseFloat(getComputedStyle(appMainDiv).paddingBottom) -\n ((pagination && pagination.offsetHeight) || 0) -\n offsetTop\n return Number.isNaN(height) ? 0 : height - (minus + 1) // 部分屏幕宽度下可能会出现1像素偏差导致出现滚动条\n}\n\n/**\n * 判断对象是否为空(包括空数组,空对象)\n * @param {*} obj\n */\nexport function isNull(obj: any) {\n // 数组\n if (obj instanceof Array) {\n return !(obj.length > 0)\n }\n // 对象\n if (obj instanceof Object) {\n if (Object.keys(obj).length === 0) {\n return true\n }\n return false\n }\n // String\n if (obj instanceof String || typeof obj === 'string') {\n let flag = false\n if (obj === '') {\n flag = true\n }\n return flag\n }\n // 判断是否是null或者是undefined\n if (obj == null || obj === undefined || obj === '') {\n return true\n } else {\n return false\n }\n}\n\n/*\n * @Author: songsunny\n * @Date: 2023-01-06 10:57:21\n * @LastEditors: songsunny\n * @LastEditTime: 2023-01-18 17:39:51\n * @Description: 判断类型\n */\nconst toString = Object.prototype.toString\n\nexport function is(val: unknown, type: string) {\n return toString.call(val) === `[object ${type}]`\n}\n\nexport function isDef<T = unknown>(val?: T): val is T {\n return typeof val !== 'undefined'\n}\n\nexport function isUnDef<T = unknown>(val?: T): val is T {\n return !isDef(val)\n}\n\nexport function isObject(val: any): val is Record<any, any> {\n return val !== null && is(val, 'Object')\n}\n\nexport function isEmpty<T = unknown>(val: T): val is T {\n if (typeof val === 'undefined') {\n return true\n }\n\n if (isArray(val) || isString(val)) {\n return val.length === 0\n }\n\n if (val instanceof Map || val instanceof Set) {\n return val.size === 0\n }\n\n if (isObject(val)) {\n return Object.keys(val).length === 0\n }\n\n if (isNull(val)) {\n return true\n }\n\n return false\n}\n\nexport function isDate(val: unknown): val is Date {\n return is(val, 'Date')\n}\n\nexport function isNullAndUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) && isNull(val)\n}\n\nexport function isNullOrUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) || isNull(val)\n}\n\nexport function isPromise<T = any>(val: unknown): val is Promise<T> {\n return (\n is(val, 'Promise') &&\n isObject(val) &&\n isFunction(val.then) &&\n isFunction(val.catch)\n )\n}\n\nexport function isString(val: unknown): val is string {\n return is(val, 'String')\n}\n\nexport function isFunction(val: unknown): val is (...args: any[]) => any {\n return typeof val === 'function'\n}\n\nexport function isBoolean(val: unknown): val is boolean {\n return is(val, 'Boolean')\n}\n\nexport function isRegExp(val: unknown): val is RegExp {\n return is(val, 'RegExp')\n}\n\nexport function isArray(val: any): val is Array<any> {\n return val && Array.isArray(val)\n}\n\nexport function isWindow(val: any): val is Window {\n return typeof window !== 'undefined' && is(val, 'Window')\n}\n\nexport function isElement(val: unknown): val is Element {\n return isObject(val) && !!val.tagName\n}\n\nexport function isMap(val: unknown): val is Map<any, any> {\n return is(val, 'Map')\n}\n\nexport const isServer = typeof window === 'undefined'\n\nexport const isClient = !isServer\n\nconst urlReg =\n /^(?:(?:https?:\\/\\/)?(?:[-;:&=+$,\\w]+@)?|(?:www\\.|[-;:&=+$,\\w]+@))[A-Za-z0-9.-]+(?::\\d+)?(?:\\/[+~%/.\\w-]*)?(?:\\?[-+=&;%@.\\w_]*)?(?:#[\\w]*)?$/\n\nexport function isUrl(path: string): boolean {\n return urlReg.test(path)\n}\n\n// 处理标签\nexport const handleTag = (val: any, tag: any, scope: any) => {\n if (isNull(val)) return ''\n const type = tag(scope)\n let attrs = {}\n if (type && typeof type !== 'string') {\n attrs = type\n } else {\n attrs = { type }\n }\n return h(resolveComponent('el-tag'), attrs, () => {\n if (scope.column.options) {\n return handleSelect(val, scope.column.options)\n }\n return val\n })\n}\n\n// 处理标签\nexport const handleSvgOption = (options: any[], svgOnly: any) => {\n if (!options.length) return ''\n const option = options[0]\n let divStyle = {\n color: option.color || '',\n position: 'relative',\n paddingLeft: option.svgName ? '24px' : '',\n }\n if (option.divStyle) {\n divStyle = {\n ...divStyle,\n ...option.dStyle,\n }\n }\n let svgStyle = {\n width: '20px',\n height: '20px',\n position: 'absolute',\n left: '0',\n top: '-2px',\n display: option.svgName ? 'block' : 'none',\n }\n if (option.svgStyle) {\n svgStyle = {\n ...svgStyle,\n ...option.svgStyle,\n }\n }\n return svgOnly\n ? h(ElTooltip, { content: option.label, placement: 'top' }, [\n h('span', { style: { ...divStyle, cursor: 'pointer' } }, [\n h(SvgIcon, { name: option.svgName, style: svgStyle }),\n ]),\n ])\n : h('span', { style: divStyle }, [\n h(SvgIcon, { name: option.svgName, style: svgStyle }),\n option.label,\n ])\n}\n\n// 处理下拉框显示\nexport const handleSelect = (\n val: any,\n options: { keyValue: Record<string, any> }\n) => {\n if (isNull(val)) return ''\n const valueArr = String(val).split(',')\n return valueArr.map((code) => options.keyValue[code] || code).join(',') || val\n}\n\n// 默认保留两位小数,超出截掉\nexport const toMyFixed = (number: number, length = 2) => {\n return (Math.floor(number * 10 ** length) / 10 ** length).toFixed(length)\n}\n\n// 计算文件大小\nexport const convertSize = ($bytesize: any) => {\n if (isNull($bytesize)) $bytesize = 0\n const pre = $bytesize < 0 ? '-' : ''\n $bytesize = Math.abs($bytesize)\n let $i = 0\n // 当$bytesize 大于是1024字节时,开始循环,当循环到第4次时跳出;\n while (Number(toMyFixed($bytesize)) >= 1024) {\n $bytesize = $bytesize / 1024\n $i++\n if ($i === 6) break\n }\n // 将Bytes,KB,MB,GB,TB定义成一维数组;\n const $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']\n const $newsize = toMyFixed($bytesize, 2)\n return `${pre + $newsize} ${$units[$i]}`\n}\n\nexport function isNumber(val: any) {\n return !Number.isNaN(Number.parseFloat(val))\n}\n\n/**\n * 数字格式化\n */\nexport function formatNumber(\n num: any,\n {\n decimals = 0,\n decimal = '.',\n separator = ',',\n prefix = '',\n suffix = '',\n } = {}\n) {\n if (typeof num === 'string') {\n num = Number(num)\n }\n if (isNull(num)) num = 0\n num = num.toFixed(decimals)\n num += ''\n const x = num.split('.')\n let x1 = x[0]\n const x2 = x.length > 1 ? decimal + x[1] : ''\n const rgx = /(\\d+)(\\d{3})/\n if (separator && !isNumber(separator)) {\n while (rgx.test(x1)) {\n x1 = x1.replace(rgx, `$1${separator}$2`)\n }\n }\n return prefix + x1 + x2 + suffix\n}\n\n/**生成322位UUID */\nexport function createUuid() {\n const s: string[] = []\n const hexDigits = '0123456789abcdef'\n for (let i = 0; i < 36; i++) {\n const pos = Math.floor(Math.random() * 0x10)\n s[i] = hexDigits.slice(pos, pos + 1)\n }\n s[14] = '4' // bits 12-15 of the time_hi_and_version field to 0010\n s[19] = hexDigits.slice(\n (Number.parseInt(s[19], 16) & 0x3) | 0x8,\n ((Number.parseInt(s[19], 16) & 0x3) | 0x8) + 1\n ) // bits 6-7 of the clock_seq_hi_and_reserved to 01\n s[8] = s[13] = s[18] = s[23]\n\n const uuid = s.join('')\n return uuid\n}\n\n/**\n * 数据字典处理\n * @param options\n * @returns\n */\nexport function dealDictOptions(options: any[] | Record<string, any>) {\n const keyValue: Record<string, any> = {}\n let res: any[] = []\n if (!(options instanceof Array)) {\n for (const attr in options) {\n const value = attr.startsWith('_') ? attr.slice(1) : attr // chrome改变数字键值顺序问题修复,约定在键前面加个下划线处理\n keyValue[value] = options[attr]\n res.push({\n label: options[attr],\n value,\n })\n }\n } else if (typeof options[0] !== 'object') {\n res = options.map((value) => {\n keyValue[value] = value\n return { value, label: value }\n })\n } else {\n options.forEach((o) => {\n keyValue[o.value] = o.label\n res.push(o)\n if (o.children) {\n setOptionsKV(o.children)\n }\n })\n }\n function setOptionsKV(options: any[]) {\n options.forEach((o) => {\n keyValue[o.value] = o.label\n if (o.children) {\n setOptionsKV(o.children)\n }\n })\n }\n Reflect.defineProperty(res, 'keyValue', { value: keyValue, writable: true })\n return res\n}\n"],"mappings":";;;;;;;AAOA,MAAa,gBAAgB,UAAe;AAC1C,KAAI,CAAC,MAAO,QAAO;CAEnB,IAAI,OAAO,CAAC,UAAU,SAAS,CAAC,SAAS,OAAO,MAAM,GAAG,QAAQ;AACjE,KAAI,CAAC,UAAU,SAAS,CAAC,SAAS,OAAO,MAAM,SAAS,CACtD,SAAQ,OAAO,MAAM,aAAa,WAAW,MAAM,WAAW;UACrD,MAAM,oBAAoB,MACnC,OAAM,SAAS,SAAS,WAAgB;AACtC,UAAQ,aAAa,OAAO;GAC5B;UACO,OAAO,MAAM,aAAa,SACnC,OAAM,YACJ,OAAO,KAAK,MAAM,SAAS,CAAC,SAAS,QAAQ;EAC3C,MAAM,SAAS,MAAM,SAAS;AAC9B,UAAQ,OAAO,WAAW,aAAa,OAAO,MAAM,MAAM,GAAG;GAC7D;AAEN,QAAO;;AAGT,MAAa,iBAAiB,MAAW,WAAoB;AAC3D,KAAI,CAAC,KAAM,QAAO;CAClB,MAAM,EAAE,SAAS,WAAW;AAC5B,QAAO,MAAM,IAAI,KAAK,KAAK,CAAC,CAAC,OAC3B,SACI,SACA,KAAK,UAAU,OACb,wBACA,sBACP;;AAIH,MAAa,qBAAqB,EAChC,OACA,KACA,QACA,OACA,YAOI;AACJ,KAAI,OAAO,OACT,QAAO,OAAO,OAAO;EAAE;EAAO;EAAK;EAAQ;EAAO;EAAO,CAAC;AAE5D,KAAI,OAAO,UAAU,OAAO,OAAO,WAAW,eAAe,CAC3D,QAAO,cACL,IAAI,OAAO,OACX,OAAO,OAAO,MAAM,gBAAgB,CAAC,GACtC;AAEH,KAAI,OAAO,WAAW,cACpB,QAAO,aAAa,IAAI,OAAO,OAAO,EAAE,UAAU,GAAG,CAAC;AAExD,K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AQ;AAC1B,MAAI,KAAK;GACP,OAAO,QAAQ;GACf;GACD,CAAC;;UAEK,OAAO,QAAQ,OAAO,SAC/B,OAAM,QAAQ,KAAK,UAAU;AAC3B,WAAS,SAAS;AAClB,SAAO;GAAE;GAAO,OAAO;GAAO;GAC9B;KAEF,SAAQ,SAAS,MAAM;AACrB,WAAS,EAAE,SAAS,EAAE;AACtB,MAAI,KAAK,EAAE;AACX,MAAI,EAAE,SACJ,cAAa,EAAE,SAAS;GAE1B;CAEJ,SAAS,aAAa,SAAgB;AACpC,UAAQ,SAAS,MAAM;AACrB,YAAS,EAAE,SAAS,EAAE;AACtB,OAAI,EAAE,SACJ,cAAa,EAAE,SAAS;IAE1B;;AAEJ,SAAQ,eAAe,KAAK,YAAY;EAAE,OAAO;EAAU,UAAU;EAAM,CAAC;AAC5E,QAAO"}
1
+ {"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../../packages/components/extend/base-table/src/utils.ts"],"sourcesContent":["import { h, resolveComponent } from 'vue'\nimport dayjs from 'dayjs'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { useLocale } from '@element-plus/hooks'\nimport SvgIcon from '@element-plus/components/extend/svg-icon'\n\n// 把vnode转换成text\nexport const getVnodeText = (vnode: any) => {\n if (!vnode) return ''\n // const textFormat = (text) => (text ? `${text} ` : '')\n let text = ['string', 'number'].includes(typeof vnode) ? vnode : ''\n if (['string', 'number'].includes(typeof vnode.children)) {\n text += typeof vnode.children !== 'object' ? vnode.children : ''\n } else if (vnode.children instanceof Array) {\n vnode.children.forEach((cvnode: any) => {\n text += getVnodeText(cvnode)\n })\n } else if (typeof vnode.children === 'object') {\n vnode.children &&\n Object.keys(vnode.children).forEach((key) => {\n const slotFn = vnode.children[key]\n text += typeof slotFn === 'function' ? slotFn(vnode.props) : ''\n })\n }\n return text\n}\n\nexport const formtCellTime = (time: any, format?: string) => {\n if (!time) return ''\n const { lang } = useLocale()\n return dayjs(new Date(time)).format(\n format\n ? format\n : lang.value === 'en'\n ? 'DD/MM/YYYY HH:mm:ss'\n : 'YYYY-MM-DD HH:mm:ss'\n )\n}\n\n// 代理原组件render\nexport const createRenderValue = ({\n index,\n row,\n column,\n value,\n scope,\n}: {\n index: any\n row: any\n column: any\n value: any\n scope: any\n}) => {\n if (column.options && !column.options.keyValue) {\n column.options = dealDictOptions(column.options)\n }\n if (column.render) {\n return column.render({ index, row, column, value, scope })\n }\n if (column.format && column.format.startsWith('dateFormater')) {\n return formtCellTime(\n row[column.prop],\n column.format.split('dateFormater:')[1]\n )\n }\n if (column.format === 'numFormater') {\n return formatNumber(row[column.prop], { decimals: 2 })\n }\n if (column.format === 'sizeFormater') {\n return convertSize(row[column.prop])\n }\n if (column.tag) {\n return handleTag(row[column.prop], column.tag, {\n index,\n row,\n column,\n value,\n scope,\n })\n }\n if (column.svg) {\n if (!column.options || !column.options.length) return ''\n const options = column.options.filter(\n (item: any) => item.value === row[column.prop]\n )\n return handleSvgOption(options, column.svgOnly)\n }\n if (column.options) {\n return handleSelect(row[column.prop], column.options)\n }\n if (column.formatter) {\n return column.formatter({ index, row, column, value, scope })\n }\n if (column.index) {\n return column.index(Number(index))\n }\n if (column.type === 'index') {\n return Number(index) + 1\n }\n return row[column.prop]\n}\n\n/**\n * 获取单个树节点URL\n * @param {*} tree\n * @param {*} val\n * @param {*} path\n * @param {*} key\n * @returns\n */\nexport function getTreePath(\n tree: any,\n val: any,\n path: any[] = [],\n key = 'value'\n): any[] | undefined {\n tree = Array.isArray(tree) ? tree : [tree]\n if (!path) {\n path = []\n }\n if (!tree.length || !val) {\n return path\n }\n for (let i = 0, len = tree.length; i < len; i++) {\n const tempPath = [...path]\n tempPath.push(tree[i])\n if (tree[i][key] === val) {\n return tempPath\n }\n if (tree[i].children && tree[i].children.length) {\n const res: any[] | undefined = getTreePath(\n tree[i].children,\n val,\n tempPath,\n key\n )\n if (res) {\n return res\n }\n }\n }\n}\n\n// 计算input内value的物理像素长度\nexport function getTextWidth(str: string) {\n let width = 0\n const html = document.createElement('span')\n html.innerText = str\n html.className = 'getTextWidth'\n document.body.appendChild(html)\n width = html.offsetWidth\n html.remove()\n return width\n}\n\nexport function isNativeTag(tag: string) {\n const tags = [\n 'span',\n 'div',\n 'i',\n 'b',\n 'p',\n 'input',\n 'textarea',\n 'ul',\n 'li',\n 'ol',\n ]\n return tags.includes(tag)\n}\n\n/**\n * 获取dom节点指定className父节点\n */\nexport function getParentNode(node: any, className: string, num: number) {\n let parent = node.parentNode\n let i = 0\n while (\n i < num &&\n parent !== null &&\n (!parent.className || parent.className !== className)\n ) {\n i++\n parent = parent.parentNode\n if (i === num - 1) {\n // 限制一定层级内\n parent = null\n }\n }\n return parent\n}\n\n/**\n * 计算VTable自适应高度\n */\nexport function calcVTableHeight(tableDom: any, minus = 0) {\n const getOffsetHeight = (node: any) => {\n let top = node.offsetTop\n let parent = node.offsetParent\n while (parent !== null && !parent.classList.contains('app-main')) {\n top += parent.offsetTop\n parent = parent.offsetParent\n }\n return top\n }\n\n const appMainDiv = (document.querySelector('.app-main') ||\n document.querySelector('body')) as HTMLElement | null\n if (!appMainDiv) return 0\n const offsetTop = getOffsetHeight(tableDom)\n const pagination = tableDom.nextSibling as HTMLElement | null\n const height =\n appMainDiv.offsetHeight +\n (getComputedStyle(appMainDiv).position === 'static'\n ? appMainDiv.offsetTop\n : 0) -\n Number.parseFloat(getComputedStyle(appMainDiv).paddingBottom) -\n ((pagination && pagination.offsetHeight) || 0) -\n offsetTop\n return Number.isNaN(height) ? 0 : height - (minus + 1) // 部分屏幕宽度下可能会出现1像素偏差导致出现滚动条\n}\n\n/**\n * 判断对象是否为空(包括空数组,空对象)\n * @param {*} obj\n */\nexport function isNull(obj: any) {\n // 数组\n if (obj instanceof Array) {\n return !(obj.length > 0)\n }\n // 对象\n if (obj instanceof Object) {\n if (Object.keys(obj).length === 0) {\n return true\n }\n return false\n }\n // String\n if (obj instanceof String || typeof obj === 'string') {\n let flag = false\n if (obj === '') {\n flag = true\n }\n return flag\n }\n // 判断是否是null或者是undefined\n if (obj == null || obj === undefined || obj === '') {\n return true\n } else {\n return false\n }\n}\n\n/*\n * @Author: songsunny\n * @Date: 2023-01-06 10:57:21\n * @LastEditors: songsunny\n * @LastEditTime: 2023-01-18 17:39:51\n * @Description: 判断类型\n */\nconst toString = Object.prototype.toString\n\nexport function is(val: unknown, type: string) {\n return toString.call(val) === `[object ${type}]`\n}\n\nexport function isDef<T = unknown>(val?: T): val is T {\n return typeof val !== 'undefined'\n}\n\nexport function isUnDef<T = unknown>(val?: T): val is T {\n return !isDef(val)\n}\n\nexport function isObject(val: any): val is Record<any, any> {\n return val !== null && is(val, 'Object')\n}\n\nexport function isEmpty<T = unknown>(val: T): val is T {\n if (typeof val === 'undefined') {\n return true\n }\n\n if (isArray(val) || isString(val)) {\n return val.length === 0\n }\n\n if (val instanceof Map || val instanceof Set) {\n return val.size === 0\n }\n\n if (isObject(val)) {\n return Object.keys(val).length === 0\n }\n\n if (isNull(val)) {\n return true\n }\n\n return false\n}\n\nexport function isDate(val: unknown): val is Date {\n return is(val, 'Date')\n}\n\nexport function isNullAndUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) && isNull(val)\n}\n\nexport function isNullOrUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) || isNull(val)\n}\n\nexport function isPromise<T = any>(val: unknown): val is Promise<T> {\n return (\n is(val, 'Promise') &&\n isObject(val) &&\n isFunction(val.then) &&\n isFunction(val.catch)\n )\n}\n\nexport function isString(val: unknown): val is string {\n return is(val, 'String')\n}\n\nexport function isFunction(val: unknown): val is (...args: any[]) => any {\n return typeof val === 'function'\n}\n\nexport function isBoolean(val: unknown): val is boolean {\n return is(val, 'Boolean')\n}\n\nexport function isRegExp(val: unknown): val is RegExp {\n return is(val, 'RegExp')\n}\n\nexport function isArray(val: any): val is Array<any> {\n return val && Array.isArray(val)\n}\n\nexport function isWindow(val: any): val is Window {\n return typeof window !== 'undefined' && is(val, 'Window')\n}\n\nexport function isElement(val: unknown): val is Element {\n return isObject(val) && !!val.tagName\n}\n\nexport function isMap(val: unknown): val is Map<any, any> {\n return is(val, 'Map')\n}\n\nexport const isServer = typeof window === 'undefined'\n\nexport const isClient = !isServer\n\nconst urlReg =\n /^(?:(?:https?:\\/\\/)?(?:[-;:&=+$,\\w]+@)?|(?:www\\.|[-;:&=+$,\\w]+@))[A-Za-z0-9.-]+(?::\\d+)?(?:\\/[+~%/.\\w-]*)?(?:\\?[-+=&;%@.\\w_]*)?(?:#[\\w]*)?$/\n\nexport function isUrl(path: string): boolean {\n return urlReg.test(path)\n}\n\n// 处理标签\nexport const handleTag = (val: any, tag: any, scope: any) => {\n if (isNull(val)) return ''\n const type = tag(scope)\n let attrs = {}\n if (type && typeof type !== 'string') {\n attrs = type\n } else {\n attrs = { type }\n }\n return h(resolveComponent('el-tag'), attrs, () => {\n if (scope.column.options) {\n return handleSelect(val, scope.column.options)\n }\n return val\n })\n}\n\n// 处理标签\nexport const handleSvgOption = (options: any[], svgOnly: any) => {\n if (!options.length) return ''\n const option = options[0]\n let divStyle = {\n color: option.color || '',\n position: 'relative',\n paddingLeft: option.svgName ? '24px' : '',\n }\n if (option.divStyle) {\n divStyle = {\n ...divStyle,\n ...option.dStyle,\n }\n }\n let svgStyle = {\n width: '20px',\n height: '20px',\n position: 'absolute',\n left: '0',\n top: '-2px',\n display: option.svgName ? 'block' : 'none',\n }\n if (option.svgStyle) {\n svgStyle = {\n ...svgStyle,\n ...option.svgStyle,\n }\n }\n return svgOnly\n ? h(ElTooltip, { content: option.label, placement: 'top' }, [\n h('span', { style: { ...divStyle, cursor: 'pointer' } }, [\n h(SvgIcon, { name: option.svgName, style: svgStyle }),\n ]),\n ])\n : h('span', { style: divStyle }, [\n h(SvgIcon, { name: option.svgName, style: svgStyle }),\n option.label,\n ])\n}\n\n// 处理下拉框显示\nexport const handleSelect = (\n val: any,\n options: { keyValue: Record<string, any> }\n) => {\n if (isNull(val)) return ''\n const valueArr = String(val).split(',')\n return valueArr.map((code) => options.keyValue[code] || code).join(',') || val\n}\n\n// 默认保留两位小数,超出截掉\nexport const toMyFixed = (number: number, length = 2) => {\n return (Math.floor(number * 10 ** length) / 10 ** length).toFixed(length)\n}\n\n// 计算文件大小\nexport const convertSize = ($bytesize: any) => {\n if (isNull($bytesize)) $bytesize = 0\n const pre = $bytesize < 0 ? '-' : ''\n $bytesize = Math.abs($bytesize)\n let $i = 0\n // 当$bytesize 大于是1024字节时,开始循环,当循环到第4次时跳出;\n while (Number(toMyFixed($bytesize)) >= 1024) {\n $bytesize = $bytesize / 1024\n $i++\n if ($i === 6) break\n }\n // 将Bytes,KB,MB,GB,TB定义成一维数组;\n const $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']\n const $newsize = toMyFixed($bytesize, 2)\n return `${pre + $newsize} ${$units[$i]}`\n}\n\nexport function isNumber(val: any) {\n return !Number.isNaN(Number.parseFloat(val))\n}\n\n/**\n * 数字格式化\n */\nexport function formatNumber(\n num: any,\n {\n decimals = 0,\n decimal = '.',\n separator = ',',\n prefix = '',\n suffix = '',\n } = {}\n) {\n if (typeof num === 'string') {\n num = Number(num)\n }\n if (isNull(num)) num = 0\n num = num.toFixed(decimals)\n num += ''\n const x = num.split('.')\n let x1 = x[0]\n const x2 = x.length > 1 ? decimal + x[1] : ''\n const rgx = /(\\d+)(\\d{3})/\n if (separator && !isNumber(separator)) {\n while (rgx.test(x1)) {\n x1 = x1.replace(rgx, `$1${separator}$2`)\n }\n }\n return prefix + x1 + x2 + suffix\n}\n\n/**生成322位UUID */\nexport function createUuid() {\n const s: string[] = []\n const hexDigits = '0123456789abcdef'\n for (let i = 0; i < 36; i++) {\n const pos = Math.floor(Math.random() * 0x10)\n s[i] = hexDigits.slice(pos, pos + 1)\n }\n s[14] = '4' // bits 12-15 of the time_hi_and_version field to 0010\n s[19] = hexDigits.slice(\n (Number.parseInt(s[19], 16) & 0x3) | 0x8,\n ((Number.parseInt(s[19], 16) & 0x3) | 0x8) + 1\n ) // bits 6-7 of the clock_seq_hi_and_reserved to 01\n s[8] = s[13] = s[18] = s[23]\n\n const uuid = s.join('')\n return uuid\n}\n\n/**\n * 数据字典处理\n * @param options\n * @returns\n */\nexport function dealDictOptions(options: any[] | Record<string, any>) {\n const keyValue: Record<string, any> = {}\n let res: any[] = []\n if (!(options instanceof Array)) {\n for (const attr in options) {\n const value = attr.startsWith('_') ? attr.slice(1) : attr // chrome改变数字键值顺序问题修复,约定在键前面加个下划线处理\n keyValue[value] = options[attr]\n res.push({\n label: options[attr],\n value,\n })\n }\n } else if (typeof options[0] !== 'object') {\n res = options.map((value) => {\n keyValue[value] = value\n return { value, label: value }\n })\n } else {\n options.forEach((o) => {\n keyValue[o.value] = o.label\n res.push(o)\n if (o.children) {\n setOptionsKV(o.children)\n }\n })\n }\n function setOptionsKV(options: any[]) {\n options.forEach((o) => {\n keyValue[o.value] = o.label\n if (o.children) {\n setOptionsKV(o.children)\n }\n })\n }\n Reflect.defineProperty(res, 'keyValue', { value: keyValue, writable: true })\n return res\n}\n"],"mappings":";;;;;;;AAOA,MAAa,gBAAgB,UAAe;AAC1C,KAAI,CAAC,MAAO,QAAO;CAEnB,IAAI,OAAO,CAAC,UAAU,SAAS,CAAC,SAAS,OAAO,MAAM,GAAG,QAAQ;AACjE,KAAI,CAAC,UAAU,SAAS,CAAC,SAAS,OAAO,MAAM,SAAS,CACtD,SAAQ,OAAO,MAAM,aAAa,WAAW,MAAM,WAAW;UACrD,MAAM,oBAAoB,MACnC,OAAM,SAAS,SAAS,WAAgB;AACtC,UAAQ,aAAa,OAAO;GAC5B;UACO,OAAO,MAAM,aAAa,SACnC,OAAM,YACJ,OAAO,KAAK,MAAM,SAAS,CAAC,SAAS,QAAQ;EAC3C,MAAM,SAAS,MAAM,SAAS;AAC9B,UAAQ,OAAO,WAAW,aAAa,OAAO,MAAM,MAAM,GAAG;GAC7D;AAEN,QAAO;;AAGT,MAAa,iBAAiB,MAAW,WAAoB;AAC3D,KAAI,CAAC,KAAM,QAAO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K,GAAG,GAAG,IAAO,IACnC,OAAO,SAAS,EAAE,KAAK,GAAG,GAAG,IAAO,KAAO,EAC9C;AACD,GAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE;AAGzB,QADa,EAAE,KAAK,GAAG;;;;;;;AASzB,SAAgB,gBAAgB,SAAsC;CACpE,MAAM,WAAgC,EAAE;CACxC,IAAI,MAAa,EAAE;AACnB,KAAI,EAAE,mBAAmB,OACvB,MAAK,MAAM,QAAQ,SAAS;EAC1B,MAAM,QAAQ,KAAK,WAAW,IAAI,GAAG,KAAK,MAAM,EAAE,GAAG;AACrD,WAAS,SAAS,QAAQ;AAC1B,MAAI,KAAK;GACP,OAAO,QAAQ;GACf;GACD,CAAC;;UAEK,OAAO,QAAQ,OAAO,SAC/B,OAAM,QAAQ,KAAK,UAAU;AAC3B,WAAS,SAAS;AAClB,SAAO;GAAE;GAAO,OAAO;GAAO;GAC9B;KAEF,SAAQ,SAAS,MAAM;AACrB,WAAS,EAAE,SAAS,EAAE;AACtB,MAAI,KAAK,EAAE;AACX,MAAI,EAAE,SACJ,cAAa,EAAE,SAAS;GAE1B;CAEJ,SAAS,aAAa,SAAgB;AACpC,UAAQ,SAAS,MAAM;AACrB,YAAS,EAAE,SAAS,EAAE;AACtB,OAAI,EAAE,SACJ,cAAa,EAAE,SAAS;IAE1B;;AAEJ,SAAQ,eAAe,KAAK,YAAY;EAAE,OAAO;EAAU,UAAU;EAAM,CAAC;AAC5E,QAAO"}
@@ -28,8 +28,8 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
28
28
  default: number;
29
29
  };
30
30
  }>> & Readonly<{}>, {
31
- color: string;
32
31
  length: number;
32
+ color: string;
33
33
  opacity: number;
34
34
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
@@ -198,21 +198,21 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
198
198
  onPaste?: ((event: ClipboardEvent) => any) | undefined;
199
199
  "onUpdate:value"?: ((val: any) => any) | undefined;
200
200
  }>, {
201
- value: string | number | any[];
202
- max: number;
203
201
  size: string;
204
202
  disabled: boolean;
205
- required: boolean;
203
+ maxlength: string | number;
206
204
  placeholder: string;
205
+ readonly: boolean;
207
206
  clearable: boolean;
208
- filterable: boolean;
207
+ value: string | number | any[];
209
208
  row: Record<string, any>;
210
209
  element: string;
210
+ required: boolean;
211
+ max: number;
212
+ filterable: boolean;
211
213
  min: number;
212
- maxlength: string | number;
213
- readonly: boolean;
214
- precision: number;
215
214
  step: number;
215
+ precision: number;
216
216
  itemProps: Record<string, any>;
217
217
  alwaysEdit: boolean;
218
218
  showtips: boolean;
@@ -111,8 +111,8 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
111
111
  "onUpdate:tableData"?: ((_tableData: Record<string, any>[]) => any) | undefined;
112
112
  onAfterPaste?: ((_pastedData: string[][]) => any) | undefined;
113
113
  }>, {
114
- height: string | number;
115
114
  border: boolean;
115
+ height: string | number;
116
116
  useVirtual: boolean;
117
117
  noIndex: boolean;
118
118
  tableData: Record<string, any>[];
@@ -316,21 +316,21 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
316
316
  onPaste?: ((event: ClipboardEvent) => any) | undefined;
317
317
  "onUpdate:value"?: ((val: any) => any) | undefined;
318
318
  }>, {
319
- value: string | number | any[];
320
- max: number;
321
319
  size: string;
322
320
  disabled: boolean;
323
- required: boolean;
321
+ maxlength: string | number;
324
322
  placeholder: string;
323
+ readonly: boolean;
325
324
  clearable: boolean;
326
- filterable: boolean;
325
+ value: string | number | any[];
327
326
  row: Record<string, any>;
328
327
  element: string;
328
+ required: boolean;
329
+ max: number;
330
+ filterable: boolean;
329
331
  min: number;
330
- maxlength: string | number;
331
- readonly: boolean;
332
- precision: number;
333
332
  step: number;
333
+ precision: number;
334
334
  itemProps: Record<string, any>;
335
335
  alwaysEdit: boolean;
336
336
  showtips: boolean;
@@ -65,8 +65,8 @@ declare const __VLS_base: vue.DefineComponent<FormDialogProps, {
65
65
  "onUpdate:dialogVisible"?: ((...args: any[]) => any) | undefined;
66
66
  }>, {
67
67
  title: string;
68
- mode: ModeType;
69
68
  width: number | string;
69
+ mode: ModeType;
70
70
  showFooter: boolean;
71
71
  dialogVisible: boolean;
72
72
  disabledSureButton: boolean;
@@ -46,10 +46,10 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
46
46
  default: boolean;
47
47
  };
48
48
  }>> & Readonly<{}>, {
49
+ rows: number;
49
50
  value: string;
50
51
  placement: string;
51
52
  width: string;
52
- rows: number;
53
53
  showMark: boolean;
54
54
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
55
55
  //#endregion
@@ -15,7 +15,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
15
15
  type: BooleanConstructor;
16
16
  };
17
17
  maxlength: {
18
- type: (StringConstructor | NumberConstructor)[];
18
+ type: (NumberConstructor | StringConstructor)[];
19
19
  default: number;
20
20
  };
21
21
  placeholder: {
@@ -58,7 +58,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
58
58
  type: BooleanConstructor;
59
59
  };
60
60
  maxlength: {
61
- type: (StringConstructor | NumberConstructor)[];
61
+ type: (NumberConstructor | StringConstructor)[];
62
62
  default: number;
63
63
  };
64
64
  placeholder: {
@@ -84,9 +84,9 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
84
84
  };
85
85
  };
86
86
  }>> & Readonly<{
87
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
88
- onBlur?: ((...args: any[]) => any) | undefined;
89
87
  onChange?: ((...args: any[]) => any) | undefined;
88
+ onBlur?: ((...args: any[]) => any) | undefined;
89
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
90
90
  }>, {
91
91
  disabled: boolean;
92
92
  maxlength: string | number;
@@ -138,9 +138,9 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
138
138
  onClick?: ((done: () => void) => any) | undefined;
139
139
  onConfirm?: ((done: () => void) => any) | undefined;
140
140
  }>, {
141
- type: "" | "default" | "danger" | "primary" | "success" | "warning" | "info" | "text";
142
- loading: boolean;
141
+ type: "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger";
143
142
  debounce: number | boolean;
143
+ loading: boolean;
144
144
  autoLoading: boolean;
145
145
  asElButton: boolean;
146
146
  autoFullScreenLoading: boolean;
@@ -156,20 +156,20 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
156
156
  }>, {
157
157
  ref: vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
158
158
  size: vue.ComputedRef<"" | "default" | "small" | "large">;
159
- type: vue.ComputedRef<"default" | "" | "danger" | "primary" | "success" | "warning" | "info" | "text">;
159
+ type: vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
160
160
  disabled: vue.ComputedRef<boolean>;
161
161
  shouldAddSpace: vue.ComputedRef<boolean>;
162
162
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
163
163
  click: (evt: MouseEvent) => void;
164
164
  }, vue.PublicProps, {
165
165
  type: ButtonType;
166
+ text: boolean;
166
167
  disabled: boolean;
168
+ round: boolean;
169
+ dashed: boolean;
167
170
  nativeType: ButtonNativeType;
168
171
  loadingIcon: IconPropType;
169
172
  plain: boolean;
170
- text: boolean;
171
- round: boolean;
172
- dashed: boolean;
173
173
  autoInsertSpace: boolean;
174
174
  tag: string | vue.Component;
175
175
  }, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
@@ -184,18 +184,18 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
184
184
  }>, {
185
185
  ref: vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
186
186
  size: vue.ComputedRef<"" | "default" | "small" | "large">;
187
- type: vue.ComputedRef<"default" | "" | "danger" | "primary" | "success" | "warning" | "info" | "text">;
187
+ type: vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
188
188
  disabled: vue.ComputedRef<boolean>;
189
189
  shouldAddSpace: vue.ComputedRef<boolean>;
190
190
  }, {}, {}, {}, {
191
191
  type: ButtonType;
192
+ text: boolean;
192
193
  disabled: boolean;
194
+ round: boolean;
195
+ dashed: boolean;
193
196
  nativeType: ButtonNativeType;
194
197
  loadingIcon: IconPropType;
195
198
  plain: boolean;
196
- text: boolean;
197
- round: boolean;
198
- dashed: boolean;
199
199
  autoInsertSpace: boolean;
200
200
  tag: string | vue.Component;
201
201
  }>;
@@ -207,20 +207,20 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
207
207
  }>, {
208
208
  ref: vue.Ref<HTMLButtonElement | undefined, HTMLButtonElement | undefined>;
209
209
  size: vue.ComputedRef<"" | "default" | "small" | "large">;
210
- type: vue.ComputedRef<"default" | "" | "danger" | "primary" | "success" | "warning" | "info" | "text">;
210
+ type: vue.ComputedRef<"default" | "" | "info" | "primary" | "success" | "warning" | "text" | "danger">;
211
211
  disabled: vue.ComputedRef<boolean>;
212
212
  shouldAddSpace: vue.ComputedRef<boolean>;
213
213
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
214
214
  click: (evt: MouseEvent) => void;
215
215
  }, string, {
216
216
  type: ButtonType;
217
+ text: boolean;
217
218
  disabled: boolean;
219
+ round: boolean;
220
+ dashed: boolean;
218
221
  nativeType: ButtonNativeType;
219
222
  loadingIcon: IconPropType;
220
223
  plain: boolean;
221
- text: boolean;
222
- round: boolean;
223
- dashed: boolean;
224
224
  autoInsertSpace: boolean;
225
225
  tag: string | vue.Component;
226
226
  }, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
@@ -13,7 +13,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
13
13
  default: string;
14
14
  };
15
15
  width: {
16
- type: (StringConstructor | NumberConstructor)[];
16
+ type: (NumberConstructor | StringConstructor)[];
17
17
  default: string;
18
18
  };
19
19
  class: {
@@ -38,7 +38,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
38
38
  default: string;
39
39
  };
40
40
  width: {
41
- type: (StringConstructor | NumberConstructor)[];
41
+ type: (NumberConstructor | StringConstructor)[];
42
42
  default: string;
43
43
  };
44
44
  class: {
@@ -57,8 +57,8 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
57
57
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
58
58
  onCloseCallBack?: ((...args: any[]) => any) | undefined;
59
59
  }>, {
60
- modelValue: boolean;
61
60
  title: string;
61
+ modelValue: boolean;
62
62
  width: string | number;
63
63
  destroyOnClose: boolean;
64
64
  closeOnClickModal: boolean;
@@ -144,13 +144,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
144
144
  })>;
145
145
  ElOption: SFCWithInstall<vue.DefineComponent<vue.ExtractPropTypes<{
146
146
  value: {
147
- readonly type: PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
147
+ readonly type: PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>>;
148
148
  readonly required: true;
149
149
  readonly validator: ((val: unknown) => boolean) | undefined;
150
150
  __epPropKey: true;
151
151
  };
152
152
  label: {
153
- readonly type: PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
153
+ readonly type: PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
154
154
  readonly required: false;
155
155
  readonly validator: ((val: unknown) => boolean) | undefined;
156
156
  __epPropKey: true;
@@ -178,7 +178,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
178
178
  };
179
179
  id: vue.Ref<string, string>;
180
180
  containerKls: vue.ComputedRef<string[]>;
181
- currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
181
+ currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
182
182
  itemSelected: vue.ComputedRef<boolean>;
183
183
  isDisabled: vue.ComputedRef<boolean>;
184
184
  select: SelectContext;
@@ -196,13 +196,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
196
196
  selectOptionClick: () => void;
197
197
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
198
198
  value: {
199
- readonly type: PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
199
+ readonly type: PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>>;
200
200
  readonly required: true;
201
201
  readonly validator: ((val: unknown) => boolean) | undefined;
202
202
  __epPropKey: true;
203
203
  };
204
204
  label: {
205
- readonly type: PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
205
+ readonly type: PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
206
206
  readonly required: false;
207
207
  readonly validator: ((val: unknown) => boolean) | undefined;
208
208
  __epPropKey: true;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../packages/components/extend/v-form/src/index.vue"],"sourcesContent":["<template>\n <el-form\n ref=\"formElRef\"\n :model=\"formModel\"\n :inline=\"inline\"\n :size=\"size\"\n :label-width=\"labelWidth\"\n :class=\"'v-form ' + className\"\n :label-position=\"labelPosition\"\n :rules=\"rules\"\n @keypress.enter=\"handleEnterPress\"\n >\n <slot name=\"formHeader\" :form-model=\"formModel\" />\n <template\n v-for=\"item in dealedFormItems\"\n :key=\"`${item.prop}${itemsUpdateCounter}`\"\n >\n <FormItem\n v-if=\"!item.hide\"\n :form-props=\"getProps\"\n :item-props=\"item\"\n :form-model=\"formModel\"\n @value-change=\"formValueChange\"\n />\n </template>\n <slot />\n <slot name=\"formFooter\" :form-model=\"formModel\" />\n </el-form>\n <!-- <div class=\"form-button-wrap\" v-if=\"showButton\">\n <slot name=\"buttonArea\" :formModel=\"formModel\">\n <el-button type=\"primary\" v-if=\"showSubmitButton\" @click=\"handleSubmit\">确定</el-button>\n <el-button type=\"primary\" plain v-if=\"showResetButton\" @click=\"doReset\">重置</el-button>\n </slot>\n </div> -->\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n onMounted,\n reactive,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { ElForm } from '@element-plus/components/form'\nimport { useLocale } from '@element-plus/hooks'\nimport FormItemComp from './form-item.vue'\nimport { useForm } from './hooks/useForm'\nimport {\n type FormItem,\n type FormValueChangeAction,\n type FormValueChangeContext,\n type Recordable,\n type VFormProps,\n vFormProps,\n} from './props'\n\nexport default defineComponent({\n name: 'VForm',\n components: { FormItem: FormItemComp, ElForm },\n props: vFormProps,\n emits: [\n 'value-change',\n 'submit',\n 'reset',\n 'update:modelValue',\n 'throwFormElRef',\n ],\n setup(props, { emit }) {\n const { t } = useLocale()\n const formElRef: any = ref(null)\n\n const getProps = computed((): VFormProps => {\n return { ...props } as VFormProps\n })\n\n const formModel = reactive<Recordable>(unref(props.modelValue))\n\n // const formModel = computed({\n // get() {\n // return reactive<Recordable>(unref(props.modelValue))\n // },\n // set(value) {\n // emit('update:modelValue', value)\n // }\n // })\n const dealedFormItems = ref<FormItem[]>(unref(props.formItems))\n\n const { setFormValue, handleSubmit, doReset, initDefaultValue } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initDefaultValue()\n\n onMounted(() => {\n emit('throwFormElRef', formElRef.value)\n })\n\n watch(\n () => unref(getProps).modelValue,\n () => {\n const { modelValue } = unref(getProps)\n if (!modelValue) return\n setFormValue(modelValue)\n },\n {\n immediate: true,\n }\n )\n\n function formValueChange(\n prop: string,\n val: any,\n action: FormValueChangeAction,\n others: FormValueChangeContext\n ) {\n // console.log('formValueChange', prop, val, action, others)\n emit('update:modelValue', others.formData)\n emit('value-change', prop, val, action, others)\n }\n\n function handleEnterPress(e: KeyboardEvent) {\n // 这里不能使用preventDefault,否则会阻止输入换行符以及数字框格式化\n const { autoSubmitOnEnter } = unref(getProps)\n if (!autoSubmitOnEnter) return\n if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {\n const target: HTMLElement = e.target as HTMLElement\n if (\n target &&\n target.tagName &&\n target.tagName.toUpperCase() == 'INPUT'\n ) {\n handleSubmit()\n }\n }\n }\n function clearValidate(field?: string | string[]) {\n formElRef.value?.clearValidate(field)\n }\n function validate() {\n return new Promise((resolve, reject) => {\n formElRef.value?.validate((valid: boolean) => {\n if (valid) {\n resolve(true)\n } else {\n reject(false)\n }\n })\n })\n }\n const itemsUpdateCounter = ref(0)\n watch(\n () => unref(getProps).formItems,\n (v) => {\n itemsUpdateCounter.value++\n dealedFormItems.value = unref(v)\n const { initForm } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initForm()\n },\n {\n immediate: true,\n }\n )\n\n return {\n formElRef,\n itemsUpdateCounter,\n dealedFormItems,\n formModel,\n getProps,\n handleEnterPress,\n handleSubmit,\n doReset,\n formValueChange,\n validate,\n clearValidate,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;yDACE,YA0BU,oBAAA;EAzBR,KAAI;EACH,OAAO,KAAA;EACP,QAAQ,KAAA;EACR,MAAM,KAAA;EACN,eAAa,KAAA;EACb,OAAK,eAAA,YAAc,KAAA,UAAS;EAC5B,kBAAgB,KAAA;EAChB,OAAO,KAAA;EACP,YAAQ,SAAQ,KAAA,kBAAgB,CAAA,QAAA,CAAA;EAAA,EAAA;yBAEiB;GAAlD,WAAkD,KAAA,QAAA,cAAA,EAAzB,WAAY,KAAA,WAAS,CAAA;IAAA,UAAA,KAAA,EAC9C,mBAWW,UAAA,MAAA,WAVM,KAAA,kBAAR,SAAI;+DACF,KAAK,OAAO,KAAA,sBAAkB,IAG9B,KAAK,QAAA,WAAA,EADd,YAME,qBAAA;KAAA,KAAA;KAJC,cAAY,KAAA;KACZ,cAAY;KACZ,cAAY,KAAA;KACZ,eAAc,KAAA;KAAA,EAAA,MAAA,GAAA;KAAA;KAAA;KAAA;KAAA;KAAA,CAAA,IAAA,mBAAA,QAAA,KAAA;;GAGnB,WAAQ,KAAA,QAAA,UAAA;GACR,WAAkD,KAAA,QAAA,cAAA,EAAzB,WAAY,KAAA,WAAS,CAAA;GAAA,CAAA;;;;;;;;;;;KAEhD,mBAAA,iVAAA,CAAA"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../packages/components/extend/v-form/src/index.vue"],"sourcesContent":["<template>\n <el-form\n ref=\"formElRef\"\n :model=\"formModel\"\n :inline=\"inline\"\n :size=\"size\"\n :label-width=\"labelWidth\"\n :class=\"'v-form ' + className\"\n :label-position=\"labelPosition\"\n :rules=\"rules\"\n @keypress.enter=\"handleEnterPress\"\n >\n <slot name=\"formHeader\" :form-model=\"formModel\" />\n <template\n v-for=\"item in dealedFormItems\"\n :key=\"`${item.prop}${itemsUpdateCounter}`\"\n >\n <FormItem\n v-if=\"!item.hide\"\n :form-props=\"getProps\"\n :item-props=\"item\"\n :form-model=\"formModel\"\n @value-change=\"formValueChange\"\n />\n </template>\n <slot />\n <slot name=\"formFooter\" :form-model=\"formModel\" />\n </el-form>\n <!-- <div class=\"form-button-wrap\" v-if=\"showButton\">\n <slot name=\"buttonArea\" :formModel=\"formModel\">\n <el-button type=\"primary\" v-if=\"showSubmitButton\" @click=\"handleSubmit\">确定</el-button>\n <el-button type=\"primary\" plain v-if=\"showResetButton\" @click=\"doReset\">重置</el-button>\n </slot>\n </div> -->\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n onMounted,\n reactive,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { ElForm } from '@element-plus/components/form'\nimport { useLocale } from '@element-plus/hooks'\nimport FormItemComp from './form-item.vue'\nimport { useForm } from './hooks/useForm'\nimport {\n type FormItem,\n type FormValueChangeAction,\n type FormValueChangeContext,\n type Recordable,\n type VFormProps,\n vFormProps,\n} from './props'\n\nexport default defineComponent({\n name: 'VForm',\n components: { FormItem: FormItemComp, ElForm },\n props: vFormProps,\n emits: [\n 'value-change',\n 'submit',\n 'reset',\n 'update:modelValue',\n 'throwFormElRef',\n ],\n setup(props, { emit }) {\n const { t } = useLocale()\n const formElRef: any = ref(null)\n\n const getProps = computed((): VFormProps => {\n return { ...props } as VFormProps\n })\n\n const formModel = reactive<Recordable>(\n unref(\n Object.keys(props.modelValue).length ? props.modelValue : props.model\n )\n )\n\n // const formModel = computed({\n // get() {\n // return reactive<Recordable>(unref(props.modelValue))\n // },\n // set(value) {\n // emit('update:modelValue', value)\n // }\n // })\n const dealedFormItems = ref<FormItem[]>(unref(props.formItems))\n\n const { setFormValue, handleSubmit, doReset, initDefaultValue } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initDefaultValue()\n\n onMounted(() => {\n emit('throwFormElRef', formElRef.value)\n })\n\n watch(\n () => unref(getProps).modelValue,\n () => {\n const { modelValue } = unref(getProps)\n if (!modelValue) return\n setFormValue(modelValue)\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => unref(getProps).model,\n () => {\n const { model } = unref(getProps)\n if (!model) return\n setFormValue(model)\n },\n {\n immediate: true,\n }\n )\n\n function formValueChange(\n prop: string,\n val: any,\n action: FormValueChangeAction,\n others: FormValueChangeContext\n ) {\n // console.log('formValueChange', prop, val, action, others)\n emit('update:modelValue', others.formData)\n emit('value-change', prop, val, action, others)\n }\n\n function handleEnterPress(e: KeyboardEvent) {\n // 这里不能使用preventDefault,否则会阻止输入换行符以及数字框格式化\n const { autoSubmitOnEnter } = unref(getProps)\n if (!autoSubmitOnEnter) return\n if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {\n const target: HTMLElement = e.target as HTMLElement\n if (\n target &&\n target.tagName &&\n target.tagName.toUpperCase() == 'INPUT'\n ) {\n handleSubmit()\n }\n }\n }\n function clearValidate(field?: string | string[]) {\n formElRef.value?.clearValidate(field)\n }\n function validate() {\n return new Promise((resolve, reject) => {\n formElRef.value?.validate((valid: boolean) => {\n if (valid) {\n resolve(true)\n } else {\n reject(false)\n }\n })\n })\n }\n const itemsUpdateCounter = ref(0)\n watch(\n () => unref(getProps).formItems,\n (v) => {\n itemsUpdateCounter.value++\n dealedFormItems.value = unref(v)\n const { initForm } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initForm()\n },\n {\n immediate: true,\n }\n )\n\n return {\n formElRef,\n itemsUpdateCounter,\n dealedFormItems,\n formModel,\n getProps,\n handleEnterPress,\n handleSubmit,\n doReset,\n formValueChange,\n validate,\n clearValidate,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;yDACE,YA0BU,oBAAA;EAzBR,KAAI;EACH,OAAO,KAAA;EACP,QAAQ,KAAA;EACR,MAAM,KAAA;EACN,eAAa,KAAA;EACb,OAAK,eAAA,YAAc,KAAA,UAAS;EAC5B,kBAAgB,KAAA;EAChB,OAAO,KAAA;EACP,YAAQ,SAAQ,KAAA,kBAAgB,CAAA,QAAA,CAAA;EAAA,EAAA;yBAEiB;GAAlD,WAAkD,KAAA,QAAA,cAAA,EAAzB,WAAY,KAAA,WAAS,CAAA;IAAA,UAAA,KAAA,EAC9C,mBAWW,UAAA,MAAA,WAVM,KAAA,kBAAR,SAAI;+DACF,KAAK,OAAO,KAAA,sBAAkB,IAG9B,KAAK,QAAA,WAAA,EADd,YAME,qBAAA;KAAA,KAAA;KAJC,cAAY,KAAA;KACZ,cAAY;KACZ,cAAY,KAAA;KACZ,eAAc,KAAA;KAAA,EAAA,MAAA,GAAA;KAAA;KAAA;KAAA;KAAA;KAAA,CAAA,IAAA,mBAAA,QAAA,KAAA;;GAGnB,WAAQ,KAAA,QAAA,UAAA;GACR,WAAkD,KAAA,QAAA,cAAA,EAAzB,WAAY,KAAA,WAAS,CAAA;GAAA,CAAA;;;;;;;;;;;KAEhD,mBAAA,iVAAA,CAAA"}
@@ -226,13 +226,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
226
226
  size: "" | "default" | "small" | "large";
227
227
  disabled: boolean;
228
228
  modelValue: Recordable<any>;
229
- className: string;
230
229
  inline: boolean;
230
+ className: string;
231
231
  labelWidth: string | number;
232
- formItems: FormItem[];
233
- labelPosition: "top" | "right" | "left";
234
232
  model: Recordable<any>;
235
233
  rules: Recordable<any>;
234
+ labelPosition: "top" | "left" | "right";
235
+ formItems: FormItem[];
236
236
  inputWidth: string | number;
237
237
  autoSubmitOnEnter: boolean;
238
238
  showButton: boolean;
@@ -370,13 +370,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
370
370
  })>;
371
371
  ElOption: SFCWithInstall<vue.DefineComponent<vue.ExtractPropTypes<{
372
372
  value: {
373
- readonly type: vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
373
+ readonly type: vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>>;
374
374
  readonly required: true;
375
375
  readonly validator: ((val: unknown) => boolean) | undefined;
376
376
  __epPropKey: true;
377
377
  };
378
378
  label: {
379
- readonly type: vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
379
+ readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
380
380
  readonly required: false;
381
381
  readonly validator: ((val: unknown) => boolean) | undefined;
382
382
  __epPropKey: true;
@@ -404,7 +404,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
404
404
  };
405
405
  id: vue.Ref<string, string>;
406
406
  containerKls: vue.ComputedRef<string[]>;
407
- currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
407
+ currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
408
408
  itemSelected: vue.ComputedRef<boolean>;
409
409
  isDisabled: vue.ComputedRef<boolean>;
410
410
  select: SelectContext;
@@ -422,13 +422,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
422
422
  selectOptionClick: () => void;
423
423
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
424
424
  value: {
425
- readonly type: vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
425
+ readonly type: vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[], unknown, unknown>>;
426
426
  readonly required: true;
427
427
  readonly validator: ((val: unknown) => boolean) | undefined;
428
428
  __epPropKey: true;
429
429
  };
430
430
  label: {
431
- readonly type: vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
431
+ readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
432
432
  readonly required: false;
433
433
  readonly validator: ((val: unknown) => boolean) | undefined;
434
434
  __epPropKey: true;
@@ -26,7 +26,7 @@ var index_vue_vue_type_script_lang_default = defineComponent({
26
26
  const getProps = computed(() => {
27
27
  return { ...props };
28
28
  });
29
- const formModel = reactive(unref(props.modelValue));
29
+ const formModel = reactive(unref(Object.keys(props.modelValue).length ? props.modelValue : props.model));
30
30
  const dealedFormItems = ref(unref(props.formItems));
31
31
  const { setFormValue, handleSubmit, doReset, initDefaultValue } = useForm({
32
32
  emit,
@@ -44,6 +44,11 @@ var index_vue_vue_type_script_lang_default = defineComponent({
44
44
  if (!modelValue) return;
45
45
  setFormValue(modelValue);
46
46
  }, { immediate: true });
47
+ watch(() => unref(getProps).model, () => {
48
+ const { model } = unref(getProps);
49
+ if (!model) return;
50
+ setFormValue(model);
51
+ }, { immediate: true });
47
52
  function formValueChange(prop, val, action, others) {
48
53
  emit("update:modelValue", others.formData);
49
54
  emit("value-change", prop, val, action, others);
@@ -1 +1 @@
1
- {"version":3,"file":"index.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../../packages/components/extend/v-form/src/index.vue"],"sourcesContent":["<template>\n <el-form\n ref=\"formElRef\"\n :model=\"formModel\"\n :inline=\"inline\"\n :size=\"size\"\n :label-width=\"labelWidth\"\n :class=\"'v-form ' + className\"\n :label-position=\"labelPosition\"\n :rules=\"rules\"\n @keypress.enter=\"handleEnterPress\"\n >\n <slot name=\"formHeader\" :form-model=\"formModel\" />\n <template\n v-for=\"item in dealedFormItems\"\n :key=\"`${item.prop}${itemsUpdateCounter}`\"\n >\n <FormItem\n v-if=\"!item.hide\"\n :form-props=\"getProps\"\n :item-props=\"item\"\n :form-model=\"formModel\"\n @value-change=\"formValueChange\"\n />\n </template>\n <slot />\n <slot name=\"formFooter\" :form-model=\"formModel\" />\n </el-form>\n <!-- <div class=\"form-button-wrap\" v-if=\"showButton\">\n <slot name=\"buttonArea\" :formModel=\"formModel\">\n <el-button type=\"primary\" v-if=\"showSubmitButton\" @click=\"handleSubmit\">确定</el-button>\n <el-button type=\"primary\" plain v-if=\"showResetButton\" @click=\"doReset\">重置</el-button>\n </slot>\n </div> -->\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n onMounted,\n reactive,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { ElForm } from '@element-plus/components/form'\nimport { useLocale } from '@element-plus/hooks'\nimport FormItemComp from './form-item.vue'\nimport { useForm } from './hooks/useForm'\nimport {\n type FormItem,\n type FormValueChangeAction,\n type FormValueChangeContext,\n type Recordable,\n type VFormProps,\n vFormProps,\n} from './props'\n\nexport default defineComponent({\n name: 'VForm',\n components: { FormItem: FormItemComp, ElForm },\n props: vFormProps,\n emits: [\n 'value-change',\n 'submit',\n 'reset',\n 'update:modelValue',\n 'throwFormElRef',\n ],\n setup(props, { emit }) {\n const { t } = useLocale()\n const formElRef: any = ref(null)\n\n const getProps = computed((): VFormProps => {\n return { ...props } as VFormProps\n })\n\n const formModel = reactive<Recordable>(unref(props.modelValue))\n\n // const formModel = computed({\n // get() {\n // return reactive<Recordable>(unref(props.modelValue))\n // },\n // set(value) {\n // emit('update:modelValue', value)\n // }\n // })\n const dealedFormItems = ref<FormItem[]>(unref(props.formItems))\n\n const { setFormValue, handleSubmit, doReset, initDefaultValue } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initDefaultValue()\n\n onMounted(() => {\n emit('throwFormElRef', formElRef.value)\n })\n\n watch(\n () => unref(getProps).modelValue,\n () => {\n const { modelValue } = unref(getProps)\n if (!modelValue) return\n setFormValue(modelValue)\n },\n {\n immediate: true,\n }\n )\n\n function formValueChange(\n prop: string,\n val: any,\n action: FormValueChangeAction,\n others: FormValueChangeContext\n ) {\n // console.log('formValueChange', prop, val, action, others)\n emit('update:modelValue', others.formData)\n emit('value-change', prop, val, action, others)\n }\n\n function handleEnterPress(e: KeyboardEvent) {\n // 这里不能使用preventDefault,否则会阻止输入换行符以及数字框格式化\n const { autoSubmitOnEnter } = unref(getProps)\n if (!autoSubmitOnEnter) return\n if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {\n const target: HTMLElement = e.target as HTMLElement\n if (\n target &&\n target.tagName &&\n target.tagName.toUpperCase() == 'INPUT'\n ) {\n handleSubmit()\n }\n }\n }\n function clearValidate(field?: string | string[]) {\n formElRef.value?.clearValidate(field)\n }\n function validate() {\n return new Promise((resolve, reject) => {\n formElRef.value?.validate((valid: boolean) => {\n if (valid) {\n resolve(true)\n } else {\n reject(false)\n }\n })\n })\n }\n const itemsUpdateCounter = ref(0)\n watch(\n () => unref(getProps).formItems,\n (v) => {\n itemsUpdateCounter.value++\n dealedFormItems.value = unref(v)\n const { initForm } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initForm()\n },\n {\n immediate: true,\n }\n )\n\n return {\n formElRef,\n itemsUpdateCounter,\n dealedFormItems,\n formModel,\n getProps,\n handleEnterPress,\n handleSubmit,\n doReset,\n formValueChange,\n validate,\n clearValidate,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;AA2DA,6CAAe,gBAAgB;CAC7B,MAAM;CACN,YAAY;EAAE,UAAU;EAAc;EAAQ;CAC9C,OAAO;CACP,OAAO;EACL;EACA;EACA;EACA;EACA;EACD;CACD,MAAM,OAAO,EAAE,QAAQ;EACrB,MAAM,EAAE,MAAM,WAAU;EACxB,MAAM,YAAiB,IAAI,KAAI;EAE/B,MAAM,WAAW,eAA2B;AAC1C,UAAO,EAAE,GAAG,OAAM;IACnB;EAED,MAAM,YAAY,SAAqB,MAAM,MAAM,WAAW,CAAA;EAU9D,MAAM,kBAAkB,IAAgB,MAAM,MAAM,UAAU,CAAA;EAE9D,MAAM,EAAE,cAAc,cAAc,SAAS,qBAAqB,QAAQ;GACxE;GACA;GACA;GACA,WAAW,gBAAgB;GAC3B;GACD,CAAA;AACD,oBAAiB;AAEjB,kBAAgB;AACd,QAAK,kBAAkB,UAAU,MAAK;IACvC;AAED,cACQ,MAAM,SAAS,CAAC,kBAChB;GACJ,MAAM,EAAE,eAAe,MAAM,SAAQ;AACrC,OAAI,CAAC,WAAY;AACjB,gBAAa,WAAU;KAEzB,EACE,WAAW,MACb,CACF;EAEA,SAAS,gBACP,MACA,KACA,QACA,QACA;AAEA,QAAK,qBAAqB,OAAO,SAAQ;AACzC,QAAK,gBAAgB,MAAM,KAAK,QAAQ,OAAM;;EAGhD,SAAS,iBAAiB,GAAkB;GAE1C,MAAM,EAAE,sBAAsB,MAAM,SAAQ;AAC5C,OAAI,CAAC,kBAAmB;AACxB,OAAI,EAAE,QAAQ,WAAW,EAAE,UAAU,EAAE,kBAAkB,aAAa;IACpE,MAAM,SAAsB,EAAE;AAC9B,QACE,UACA,OAAO,WACP,OAAO,QAAQ,aAAY,IAAK,QAEhC,eAAa;;;EAInB,SAAS,cAAc,OAA2B;AAChD,aAAU,OAAO,cAAc,MAAK;;EAEtC,SAAS,WAAW;AAClB,UAAO,IAAI,SAAS,SAAS,WAAW;AACtC,cAAU,OAAO,UAAU,UAAmB;AAC5C,SAAI,MACF,SAAQ,KAAI;SAEZ,QAAO,MAAK;MAEf;KACF;;EAEH,MAAM,qBAAqB,IAAI,EAAC;AAChC,cACQ,MAAM,SAAS,CAAC,YACrB,MAAM;AACL,sBAAmB;AACnB,mBAAgB,QAAQ,MAAM,EAAC;GAC/B,MAAM,EAAE,aAAa,QAAQ;IAC3B;IACA;IACA;IACA,WAAW,gBAAgB;IAC3B;IACD,CAAA;AACD,aAAS;KAEX,EACE,WAAW,MACb,CACF;AAEA,SAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
1
+ {"version":3,"file":"index.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../../packages/components/extend/v-form/src/index.vue"],"sourcesContent":["<template>\n <el-form\n ref=\"formElRef\"\n :model=\"formModel\"\n :inline=\"inline\"\n :size=\"size\"\n :label-width=\"labelWidth\"\n :class=\"'v-form ' + className\"\n :label-position=\"labelPosition\"\n :rules=\"rules\"\n @keypress.enter=\"handleEnterPress\"\n >\n <slot name=\"formHeader\" :form-model=\"formModel\" />\n <template\n v-for=\"item in dealedFormItems\"\n :key=\"`${item.prop}${itemsUpdateCounter}`\"\n >\n <FormItem\n v-if=\"!item.hide\"\n :form-props=\"getProps\"\n :item-props=\"item\"\n :form-model=\"formModel\"\n @value-change=\"formValueChange\"\n />\n </template>\n <slot />\n <slot name=\"formFooter\" :form-model=\"formModel\" />\n </el-form>\n <!-- <div class=\"form-button-wrap\" v-if=\"showButton\">\n <slot name=\"buttonArea\" :formModel=\"formModel\">\n <el-button type=\"primary\" v-if=\"showSubmitButton\" @click=\"handleSubmit\">确定</el-button>\n <el-button type=\"primary\" plain v-if=\"showResetButton\" @click=\"doReset\">重置</el-button>\n </slot>\n </div> -->\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n onMounted,\n reactive,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { ElForm } from '@element-plus/components/form'\nimport { useLocale } from '@element-plus/hooks'\nimport FormItemComp from './form-item.vue'\nimport { useForm } from './hooks/useForm'\nimport {\n type FormItem,\n type FormValueChangeAction,\n type FormValueChangeContext,\n type Recordable,\n type VFormProps,\n vFormProps,\n} from './props'\n\nexport default defineComponent({\n name: 'VForm',\n components: { FormItem: FormItemComp, ElForm },\n props: vFormProps,\n emits: [\n 'value-change',\n 'submit',\n 'reset',\n 'update:modelValue',\n 'throwFormElRef',\n ],\n setup(props, { emit }) {\n const { t } = useLocale()\n const formElRef: any = ref(null)\n\n const getProps = computed((): VFormProps => {\n return { ...props } as VFormProps\n })\n\n const formModel = reactive<Recordable>(\n unref(\n Object.keys(props.modelValue).length ? props.modelValue : props.model\n )\n )\n\n // const formModel = computed({\n // get() {\n // return reactive<Recordable>(unref(props.modelValue))\n // },\n // set(value) {\n // emit('update:modelValue', value)\n // }\n // })\n const dealedFormItems = ref<FormItem[]>(unref(props.formItems))\n\n const { setFormValue, handleSubmit, doReset, initDefaultValue } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initDefaultValue()\n\n onMounted(() => {\n emit('throwFormElRef', formElRef.value)\n })\n\n watch(\n () => unref(getProps).modelValue,\n () => {\n const { modelValue } = unref(getProps)\n if (!modelValue) return\n setFormValue(modelValue)\n },\n {\n immediate: true,\n }\n )\n\n watch(\n () => unref(getProps).model,\n () => {\n const { model } = unref(getProps)\n if (!model) return\n setFormValue(model)\n },\n {\n immediate: true,\n }\n )\n\n function formValueChange(\n prop: string,\n val: any,\n action: FormValueChangeAction,\n others: FormValueChangeContext\n ) {\n // console.log('formValueChange', prop, val, action, others)\n emit('update:modelValue', others.formData)\n emit('value-change', prop, val, action, others)\n }\n\n function handleEnterPress(e: KeyboardEvent) {\n // 这里不能使用preventDefault,否则会阻止输入换行符以及数字框格式化\n const { autoSubmitOnEnter } = unref(getProps)\n if (!autoSubmitOnEnter) return\n if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {\n const target: HTMLElement = e.target as HTMLElement\n if (\n target &&\n target.tagName &&\n target.tagName.toUpperCase() == 'INPUT'\n ) {\n handleSubmit()\n }\n }\n }\n function clearValidate(field?: string | string[]) {\n formElRef.value?.clearValidate(field)\n }\n function validate() {\n return new Promise((resolve, reject) => {\n formElRef.value?.validate((valid: boolean) => {\n if (valid) {\n resolve(true)\n } else {\n reject(false)\n }\n })\n })\n }\n const itemsUpdateCounter = ref(0)\n watch(\n () => unref(getProps).formItems,\n (v) => {\n itemsUpdateCounter.value++\n dealedFormItems.value = unref(v)\n const { initForm } = useForm({\n emit,\n formModel,\n formElRef,\n formItems: dealedFormItems.value,\n t,\n })\n initForm()\n },\n {\n immediate: true,\n }\n )\n\n return {\n formElRef,\n itemsUpdateCounter,\n dealedFormItems,\n formModel,\n getProps,\n handleEnterPress,\n handleSubmit,\n doReset,\n formValueChange,\n validate,\n clearValidate,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;;AA2DA,6CAAe,gBAAgB;CAC7B,MAAM;CACN,YAAY;EAAE,UAAU;EAAc;EAAQ;CAC9C,OAAO;CACP,OAAO;EACL;EACA;EACA;EACA;EACA;EACD;CACD,MAAM,OAAO,EAAE,QAAQ;EACrB,MAAM,EAAE,MAAM,WAAU;EACxB,MAAM,YAAiB,IAAI,KAAI;EAE/B,MA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KACF;;EAEH,MAAM,qBAAqB,IAAI,EAAC;AAChC,cACQ,MAAM,SAAS,CAAC,YACrB,MAAM;AACL,sBAAmB;AACnB,mBAAgB,QAAQ,MAAM,EAAC;GAC/B,MAAM,EAAE,aAAa,QAAQ;IAC3B;IACA;IACA;IACA,WAAW,gBAAgB;IAC3B;IACD,CAAA;AACD,aAAS;KAEX,EACE,WAAW,MACb,CACF;AAEA,SAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
@@ -107,8 +107,8 @@ interface VInputNumberProps {
107
107
  unit?: string;
108
108
  }
109
109
  declare const vInputNumberProps: {
110
- readonly inputmode: EpPropFinalized<(new (...args: any[]) => "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal") | (() => "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
111
- readonly align: EpPropFinalized<(new (...args: any[]) => "right" | "left" | "center") | (() => "right" | "left" | "center") | (((new (...args: any[]) => "right" | "left" | "center") | (() => "right" | "left" | "center")) | null)[], unknown, unknown, "center", boolean>;
110
+ readonly inputmode: EpPropFinalized<(new (...args: any[]) => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined) | (((new (...args: any[]) => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal") | (() => "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined)) | null)[], unknown, unknown, undefined, boolean>;
111
+ readonly align: EpPropFinalized<(new (...args: any[]) => "center" | "left" | "right") | (() => "center" | "left" | "right") | (((new (...args: any[]) => "center" | "left" | "right") | (() => "center" | "left" | "right")) | null)[], unknown, unknown, "center", boolean>;
112
112
  readonly disabledScientific: BooleanConstructor;
113
113
  readonly unit: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
114
114
  readonly ariaLabel: StringConstructor;
@@ -18,9 +18,9 @@ declare const __VLS_base: vue.DefineComponent<VInputNumberProps, {
18
18
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
19
19
  blur: (e: FocusEvent) => void;
20
20
  focus: (e: FocusEvent) => void;
21
+ change: (cur: number | null | undefined, prev: number | null | undefined) => void;
21
22
  "update:modelValue": (val: number | null | undefined) => void;
22
23
  input: (val: number | null | undefined) => void;
23
- change: (cur: number | null | undefined, prev: number | null | undefined) => void;
24
24
  }, string, vue.PublicProps, Readonly<VInputNumberProps> & Readonly<{
25
25
  onBlur?: ((e: FocusEvent) => any) | undefined;
26
26
  onChange?: ((cur: number | null | undefined, prev: number | null | undefined) => any) | undefined;
@@ -28,20 +28,20 @@ declare const __VLS_base: vue.DefineComponent<VInputNumberProps, {
28
28
  onInput?: ((val: number | null | undefined) => any) | undefined;
29
29
  "onUpdate:modelValue"?: ((val: number | null | undefined) => any) | undefined;
30
30
  }>, {
31
- max: number;
31
+ id: string;
32
32
  disabled: boolean;
33
- valueOnClear: "min" | "max" | number | null;
33
+ readonly: boolean;
34
34
  validateEvent: boolean;
35
- id: string;
35
+ inputmode: "text" | "email" | "search" | "tel" | "url" | "none" | "numeric" | "decimal";
36
+ max: number;
37
+ valueOnClear: "min" | "max" | number | null;
36
38
  min: number;
37
- readonly: boolean;
38
- inputmode: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal";
39
- unit: string;
40
39
  align: "left" | "right" | "center";
41
40
  step: number;
42
41
  stepStrictly: boolean;
43
42
  controls: boolean;
44
43
  controlsPosition: "" | "right";
44
+ unit: string;
45
45
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
46
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
47
47
  declare const _default: typeof __VLS_export;