@element-plus/nightly 0.0.20250630 → 0.0.20250701

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 (734) hide show
  1. package/dist/index.full.js +152 -118
  2. package/dist/index.full.min.js +16 -16
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +16 -16
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +152 -118
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hi.js +1 -1
  92. package/dist/locale/hi.min.js +1 -1
  93. package/dist/locale/hi.min.mjs +1 -1
  94. package/dist/locale/hi.mjs +1 -1
  95. package/dist/locale/hr.js +1 -1
  96. package/dist/locale/hr.min.js +1 -1
  97. package/dist/locale/hr.min.mjs +1 -1
  98. package/dist/locale/hr.mjs +1 -1
  99. package/dist/locale/hu.js +1 -1
  100. package/dist/locale/hu.min.js +1 -1
  101. package/dist/locale/hu.min.mjs +1 -1
  102. package/dist/locale/hu.mjs +1 -1
  103. package/dist/locale/hy-am.js +1 -1
  104. package/dist/locale/hy-am.min.js +1 -1
  105. package/dist/locale/hy-am.min.mjs +1 -1
  106. package/dist/locale/hy-am.mjs +1 -1
  107. package/dist/locale/id.js +1 -1
  108. package/dist/locale/id.min.js +1 -1
  109. package/dist/locale/id.min.mjs +1 -1
  110. package/dist/locale/id.mjs +1 -1
  111. package/dist/locale/it.js +1 -1
  112. package/dist/locale/it.min.js +1 -1
  113. package/dist/locale/it.min.mjs +1 -1
  114. package/dist/locale/it.mjs +1 -1
  115. package/dist/locale/ja.js +1 -1
  116. package/dist/locale/ja.min.js +1 -1
  117. package/dist/locale/ja.min.mjs +1 -1
  118. package/dist/locale/ja.mjs +1 -1
  119. package/dist/locale/kk.js +1 -1
  120. package/dist/locale/kk.min.js +1 -1
  121. package/dist/locale/kk.min.mjs +1 -1
  122. package/dist/locale/kk.mjs +1 -1
  123. package/dist/locale/km.js +1 -1
  124. package/dist/locale/km.min.js +1 -1
  125. package/dist/locale/km.min.mjs +1 -1
  126. package/dist/locale/km.mjs +1 -1
  127. package/dist/locale/ko.js +1 -1
  128. package/dist/locale/ko.min.js +1 -1
  129. package/dist/locale/ko.min.mjs +1 -1
  130. package/dist/locale/ko.mjs +1 -1
  131. package/dist/locale/ku.js +1 -1
  132. package/dist/locale/ku.min.js +1 -1
  133. package/dist/locale/ku.min.mjs +1 -1
  134. package/dist/locale/ku.mjs +1 -1
  135. package/dist/locale/ky.js +1 -1
  136. package/dist/locale/ky.min.js +1 -1
  137. package/dist/locale/ky.min.mjs +1 -1
  138. package/dist/locale/ky.mjs +1 -1
  139. package/dist/locale/lo.js +1 -1
  140. package/dist/locale/lo.min.js +1 -1
  141. package/dist/locale/lo.min.mjs +1 -1
  142. package/dist/locale/lo.mjs +1 -1
  143. package/dist/locale/lt.js +1 -1
  144. package/dist/locale/lt.min.js +1 -1
  145. package/dist/locale/lt.min.mjs +1 -1
  146. package/dist/locale/lt.mjs +1 -1
  147. package/dist/locale/lv.js +1 -1
  148. package/dist/locale/lv.min.js +1 -1
  149. package/dist/locale/lv.min.mjs +1 -1
  150. package/dist/locale/lv.mjs +1 -1
  151. package/dist/locale/mg.js +1 -1
  152. package/dist/locale/mg.min.js +1 -1
  153. package/dist/locale/mg.min.mjs +1 -1
  154. package/dist/locale/mg.mjs +1 -1
  155. package/dist/locale/mn.js +1 -1
  156. package/dist/locale/mn.min.js +1 -1
  157. package/dist/locale/mn.min.mjs +1 -1
  158. package/dist/locale/mn.mjs +1 -1
  159. package/dist/locale/ms.js +1 -1
  160. package/dist/locale/ms.min.js +1 -1
  161. package/dist/locale/ms.min.mjs +1 -1
  162. package/dist/locale/ms.mjs +1 -1
  163. package/dist/locale/my.js +1 -1
  164. package/dist/locale/my.min.js +1 -1
  165. package/dist/locale/my.min.mjs +1 -1
  166. package/dist/locale/my.mjs +1 -1
  167. package/dist/locale/nb-no.js +1 -1
  168. package/dist/locale/nb-no.min.js +1 -1
  169. package/dist/locale/nb-no.min.mjs +1 -1
  170. package/dist/locale/nb-no.mjs +1 -1
  171. package/dist/locale/nl.js +1 -1
  172. package/dist/locale/nl.min.js +1 -1
  173. package/dist/locale/nl.min.mjs +1 -1
  174. package/dist/locale/nl.mjs +1 -1
  175. package/dist/locale/no.js +1 -1
  176. package/dist/locale/no.min.js +1 -1
  177. package/dist/locale/no.min.mjs +1 -1
  178. package/dist/locale/no.mjs +1 -1
  179. package/dist/locale/pa.js +1 -1
  180. package/dist/locale/pa.min.js +1 -1
  181. package/dist/locale/pa.min.mjs +1 -1
  182. package/dist/locale/pa.mjs +1 -1
  183. package/dist/locale/pl.js +1 -1
  184. package/dist/locale/pl.min.js +1 -1
  185. package/dist/locale/pl.min.mjs +1 -1
  186. package/dist/locale/pl.mjs +1 -1
  187. package/dist/locale/pt-br.js +1 -1
  188. package/dist/locale/pt-br.min.js +1 -1
  189. package/dist/locale/pt-br.min.mjs +1 -1
  190. package/dist/locale/pt-br.mjs +1 -1
  191. package/dist/locale/pt.js +1 -1
  192. package/dist/locale/pt.min.js +1 -1
  193. package/dist/locale/pt.min.mjs +1 -1
  194. package/dist/locale/pt.mjs +1 -1
  195. package/dist/locale/ro.js +1 -1
  196. package/dist/locale/ro.min.js +1 -1
  197. package/dist/locale/ro.min.mjs +1 -1
  198. package/dist/locale/ro.mjs +1 -1
  199. package/dist/locale/ru.js +1 -1
  200. package/dist/locale/ru.min.js +1 -1
  201. package/dist/locale/ru.min.mjs +1 -1
  202. package/dist/locale/ru.mjs +1 -1
  203. package/dist/locale/sk.js +1 -1
  204. package/dist/locale/sk.min.js +1 -1
  205. package/dist/locale/sk.min.mjs +1 -1
  206. package/dist/locale/sk.mjs +1 -1
  207. package/dist/locale/sl.js +1 -1
  208. package/dist/locale/sl.min.js +1 -1
  209. package/dist/locale/sl.min.mjs +1 -1
  210. package/dist/locale/sl.mjs +1 -1
  211. package/dist/locale/sr.js +1 -1
  212. package/dist/locale/sr.min.js +1 -1
  213. package/dist/locale/sr.min.mjs +1 -1
  214. package/dist/locale/sr.mjs +1 -1
  215. package/dist/locale/sv.js +1 -1
  216. package/dist/locale/sv.min.js +1 -1
  217. package/dist/locale/sv.min.mjs +1 -1
  218. package/dist/locale/sv.mjs +1 -1
  219. package/dist/locale/sw.js +1 -1
  220. package/dist/locale/sw.min.js +1 -1
  221. package/dist/locale/sw.min.mjs +1 -1
  222. package/dist/locale/sw.mjs +1 -1
  223. package/dist/locale/ta.js +1 -1
  224. package/dist/locale/ta.min.js +1 -1
  225. package/dist/locale/ta.min.mjs +1 -1
  226. package/dist/locale/ta.mjs +1 -1
  227. package/dist/locale/te.js +1 -1
  228. package/dist/locale/te.min.js +1 -1
  229. package/dist/locale/te.min.mjs +1 -1
  230. package/dist/locale/te.mjs +1 -1
  231. package/dist/locale/th.js +1 -1
  232. package/dist/locale/th.min.js +1 -1
  233. package/dist/locale/th.min.mjs +1 -1
  234. package/dist/locale/th.mjs +1 -1
  235. package/dist/locale/tk.js +1 -1
  236. package/dist/locale/tk.min.js +1 -1
  237. package/dist/locale/tk.min.mjs +1 -1
  238. package/dist/locale/tk.mjs +1 -1
  239. package/dist/locale/tr.js +1 -1
  240. package/dist/locale/tr.min.js +1 -1
  241. package/dist/locale/tr.min.mjs +1 -1
  242. package/dist/locale/tr.mjs +1 -1
  243. package/dist/locale/ug-cn.js +1 -1
  244. package/dist/locale/ug-cn.min.js +1 -1
  245. package/dist/locale/ug-cn.min.mjs +1 -1
  246. package/dist/locale/ug-cn.mjs +1 -1
  247. package/dist/locale/uk.js +1 -1
  248. package/dist/locale/uk.min.js +1 -1
  249. package/dist/locale/uk.min.mjs +1 -1
  250. package/dist/locale/uk.mjs +1 -1
  251. package/dist/locale/uz-uz.js +1 -1
  252. package/dist/locale/uz-uz.min.js +1 -1
  253. package/dist/locale/uz-uz.min.mjs +1 -1
  254. package/dist/locale/uz-uz.mjs +1 -1
  255. package/dist/locale/vi.js +1 -1
  256. package/dist/locale/vi.min.js +1 -1
  257. package/dist/locale/vi.min.mjs +1 -1
  258. package/dist/locale/vi.mjs +1 -1
  259. package/dist/locale/zh-cn.js +1 -1
  260. package/dist/locale/zh-cn.min.js +1 -1
  261. package/dist/locale/zh-cn.min.mjs +1 -1
  262. package/dist/locale/zh-cn.mjs +1 -1
  263. package/dist/locale/zh-hk.js +1 -1
  264. package/dist/locale/zh-hk.min.js +1 -1
  265. package/dist/locale/zh-hk.min.mjs +1 -1
  266. package/dist/locale/zh-hk.mjs +1 -1
  267. package/dist/locale/zh-mo.js +1 -1
  268. package/dist/locale/zh-mo.min.js +1 -1
  269. package/dist/locale/zh-mo.min.mjs +1 -1
  270. package/dist/locale/zh-mo.mjs +1 -1
  271. package/dist/locale/zh-tw.js +1 -1
  272. package/dist/locale/zh-tw.min.js +1 -1
  273. package/dist/locale/zh-tw.min.mjs +1 -1
  274. package/dist/locale/zh-tw.mjs +1 -1
  275. package/es/components/alert/src/alert.d.ts +1 -1
  276. package/es/components/alert/src/alert.vue.d.ts +3 -3
  277. package/es/components/badge/src/badge.d.ts +1 -1
  278. package/es/components/badge/src/badge.vue.d.ts +3 -3
  279. package/es/components/button/index.mjs +2 -2
  280. package/es/components/button/src/button-group.d.ts +1 -1
  281. package/es/components/button/src/button-group.mjs +1 -1
  282. package/es/components/button/src/button-group.vue.d.ts +3 -3
  283. package/es/components/button/src/button.d.ts +1 -1
  284. package/es/components/button/src/button.mjs +62 -87
  285. package/es/components/button/src/button.mjs.map +1 -1
  286. package/es/components/button/src/button.vue.d.ts +3 -3
  287. package/es/components/button/src/button2.mjs +87 -62
  288. package/es/components/button/src/button2.mjs.map +1 -1
  289. package/es/components/calendar/src/calendar2.mjs +1 -1
  290. package/es/components/calendar/src/date-table.mjs +89 -31
  291. package/es/components/calendar/src/date-table.mjs.map +1 -1
  292. package/es/components/calendar/src/date-table2.mjs +31 -89
  293. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  294. package/es/components/calendar/src/use-date-table.mjs +1 -1
  295. package/es/components/cascader/src/cascader.d.ts +1 -1
  296. package/es/components/cascader/src/cascader.vue.d.ts +3 -3
  297. package/es/components/check-tag/src/check-tag.d.ts +1 -1
  298. package/es/components/check-tag/src/check-tag.vue.d.ts +3 -3
  299. package/es/components/collapse/index.mjs +2 -2
  300. package/es/components/collapse/src/collapse.mjs +28 -23
  301. package/es/components/collapse/src/collapse.mjs.map +1 -1
  302. package/es/components/collapse/src/collapse2.mjs +23 -28
  303. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  304. package/es/components/color-picker/src/color-picker2.mjs +1 -3
  305. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  306. package/es/components/descriptions/src/description-item.d.ts +1 -1
  307. package/es/components/dialog/src/dialog.mjs +1 -1
  308. package/es/components/drawer/index.mjs +2 -2
  309. package/es/components/drawer/src/drawer.mjs +178 -26
  310. package/es/components/drawer/src/drawer.mjs.map +1 -1
  311. package/es/components/drawer/src/drawer2.mjs +26 -178
  312. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  313. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  314. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  315. package/es/components/dropdown/src/dropdown.d.ts +1 -1
  316. package/es/components/dropdown/src/dropdown.mjs +1 -1
  317. package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
  318. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  319. package/es/components/empty/index.mjs +2 -2
  320. package/es/components/empty/src/empty.mjs +52 -11
  321. package/es/components/empty/src/empty.mjs.map +1 -1
  322. package/es/components/empty/src/empty2.mjs +11 -52
  323. package/es/components/empty/src/empty2.mjs.map +1 -1
  324. package/es/components/form/src/form-item.d.ts +1 -1
  325. package/es/components/form/src/form-item.vue.d.ts +3 -3
  326. package/es/components/form/src/form.vue.d.ts +1 -1
  327. package/es/components/index.mjs +17 -17
  328. package/es/components/input/index.mjs +2 -2
  329. package/es/components/input/src/input.mjs +106 -437
  330. package/es/components/input/src/input.mjs.map +1 -1
  331. package/es/components/input/src/input2.mjs +435 -106
  332. package/es/components/input/src/input2.mjs.map +1 -1
  333. package/es/components/input-number/index.mjs +2 -2
  334. package/es/components/input-number/src/input-number.mjs +65 -348
  335. package/es/components/input-number/src/input-number.mjs.map +1 -1
  336. package/es/components/input-number/src/input-number2.mjs +348 -65
  337. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  338. package/es/components/input-tag/index.mjs +2 -2
  339. package/es/components/input-tag/src/composables/use-input-tag.mjs +1 -3
  340. package/es/components/input-tag/src/composables/use-input-tag.mjs.map +1 -1
  341. package/es/components/input-tag/src/input-tag.d.ts +1 -1
  342. package/es/components/input-tag/src/input-tag.mjs +73 -215
  343. package/es/components/input-tag/src/input-tag.mjs.map +1 -1
  344. package/es/components/input-tag/src/input-tag.vue.d.ts +4 -4
  345. package/es/components/input-tag/src/input-tag2.mjs +215 -73
  346. package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
  347. package/es/components/link/src/link.d.ts +1 -1
  348. package/es/components/link/src/link.vue.d.ts +3 -3
  349. package/es/components/loading/src/directive.mjs +23 -16
  350. package/es/components/loading/src/directive.mjs.map +1 -1
  351. package/es/components/mention/index.mjs +2 -2
  352. package/es/components/mention/src/mention.mjs +65 -287
  353. package/es/components/mention/src/mention.mjs.map +1 -1
  354. package/es/components/mention/src/mention2.mjs +285 -65
  355. package/es/components/mention/src/mention2.mjs.map +1 -1
  356. package/es/components/message/src/message.d.ts +1 -1
  357. package/es/components/message/src/message.vue.d.ts +3 -3
  358. package/es/components/message-box/src/index.vue.d.ts +1 -1
  359. package/es/components/notification/src/notification.d.ts +1 -1
  360. package/es/components/notification/src/notification.vue.d.ts +3 -3
  361. package/es/components/page-header/index.mjs +2 -2
  362. package/es/components/page-header/src/page-header.mjs +16 -97
  363. package/es/components/page-header/src/page-header.mjs.map +1 -1
  364. package/es/components/page-header/src/page-header2.mjs +97 -16
  365. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  366. package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
  367. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  368. package/es/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
  369. package/es/components/popover/src/popover.vue.d.ts +1 -1
  370. package/es/components/popper/index.mjs +2 -2
  371. package/es/components/popper/src/popper.mjs +32 -22
  372. package/es/components/popper/src/popper.mjs.map +1 -1
  373. package/es/components/popper/src/popper2.mjs +22 -32
  374. package/es/components/popper/src/popper2.mjs.map +1 -1
  375. package/es/components/radio/index.mjs +2 -2
  376. package/es/components/radio/src/radio-button.mjs +1 -1
  377. package/es/components/radio/src/radio-group.mjs +1 -1
  378. package/es/components/radio/src/radio.mjs +74 -32
  379. package/es/components/radio/src/radio.mjs.map +1 -1
  380. package/es/components/radio/src/radio2.mjs +32 -74
  381. package/es/components/radio/src/radio2.mjs.map +1 -1
  382. package/es/components/rate/index.mjs +2 -2
  383. package/es/components/rate/src/rate.mjs +258 -83
  384. package/es/components/rate/src/rate.mjs.map +1 -1
  385. package/es/components/rate/src/rate2.mjs +83 -258
  386. package/es/components/rate/src/rate2.mjs.map +1 -1
  387. package/es/components/result/index.mjs +2 -2
  388. package/es/components/result/src/result.d.ts +1 -1
  389. package/es/components/result/src/result.mjs +62 -30
  390. package/es/components/result/src/result.mjs.map +1 -1
  391. package/es/components/result/src/result.vue.d.ts +3 -3
  392. package/es/components/result/src/result2.mjs +30 -62
  393. package/es/components/result/src/result2.mjs.map +1 -1
  394. package/es/components/roving-focus-group/index.mjs +3 -3
  395. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  396. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
  397. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  398. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
  399. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  400. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  401. package/es/components/select/src/select.d.ts +1 -1
  402. package/es/components/select/src/select.vue.d.ts +5 -5
  403. package/es/components/select/src/useSelect.d.ts +2 -2
  404. package/es/components/select/src/useSelect.mjs +11 -13
  405. package/es/components/select/src/useSelect.mjs.map +1 -1
  406. package/es/components/select-v2/src/defaults.d.ts +1 -1
  407. package/es/components/select-v2/src/select.vue.d.ts +5 -5
  408. package/es/components/select-v2/src/useSelect.d.ts +2 -2
  409. package/es/components/select-v2/src/useSelect.mjs +2 -4
  410. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  411. package/es/components/skeleton/index.mjs +4 -4
  412. package/es/components/skeleton/src/skeleton-item.mjs +22 -17
  413. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  414. package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
  415. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  416. package/es/components/skeleton/src/skeleton.mjs +48 -21
  417. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  418. package/es/components/skeleton/src/skeleton2.mjs +21 -48
  419. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  420. package/es/components/slider/src/button.mjs +91 -19
  421. package/es/components/slider/src/button.mjs.map +1 -1
  422. package/es/components/slider/src/button2.mjs +19 -91
  423. package/es/components/slider/src/button2.mjs.map +1 -1
  424. package/es/components/slider/src/slider2.mjs +1 -1
  425. package/es/components/splitter/index.mjs +2 -2
  426. package/es/components/splitter/src/split-panel.mjs +19 -150
  427. package/es/components/splitter/src/split-panel.mjs.map +1 -1
  428. package/es/components/splitter/src/split-panel2.mjs +150 -19
  429. package/es/components/splitter/src/split-panel2.mjs.map +1 -1
  430. package/es/components/switch/index.mjs +2 -2
  431. package/es/components/switch/src/switch.mjs +72 -228
  432. package/es/components/switch/src/switch.mjs.map +1 -1
  433. package/es/components/switch/src/switch2.mjs +228 -72
  434. package/es/components/switch/src/switch2.mjs.map +1 -1
  435. package/es/components/table/src/config.d.ts +12 -11
  436. package/es/components/table/src/config.mjs +12 -4
  437. package/es/components/table/src/config.mjs.map +1 -1
  438. package/es/components/table/src/filter-panel.mjs +15 -9
  439. package/es/components/table/src/filter-panel.mjs.map +1 -1
  440. package/es/components/table/src/filter-panel.vue.d.ts +11 -7
  441. package/es/components/table/src/h-helper.d.ts +8 -1
  442. package/es/components/table/src/h-helper.mjs.map +1 -1
  443. package/es/components/table/src/layout-observer.d.ts +2 -2
  444. package/es/components/table/src/layout-observer.mjs.map +1 -1
  445. package/es/components/table/src/store/current.d.ts +4 -3
  446. package/es/components/table/src/store/current.mjs +4 -3
  447. package/es/components/table/src/store/current.mjs.map +1 -1
  448. package/es/components/table/src/store/helper.d.ts +24 -24
  449. package/es/components/table/src/store/helper.mjs +8 -8
  450. package/es/components/table/src/store/helper.mjs.map +1 -1
  451. package/es/components/table/src/store/index.d.ts +44 -44
  452. package/es/components/table/src/store/watcher.d.ts +2 -2
  453. package/es/components/table/src/table/utils-helper.d.ts +3 -2
  454. package/es/components/table/src/table/utils-helper.mjs.map +1 -1
  455. package/es/components/table/src/table-body/defaults.d.ts +6 -6
  456. package/es/components/table/src/table-body/defaults.mjs.map +1 -1
  457. package/es/components/table/src/table-body/index.d.ts +12 -12
  458. package/es/components/table/src/table-header/index.d.ts +1 -1
  459. package/es/components/table/src/table-header/index.mjs.map +1 -1
  460. package/es/components/table/src/table.vue.d.ts +16 -16
  461. package/es/components/tabs/src/constants.d.ts +4 -2
  462. package/es/components/tabs/src/constants.mjs.map +1 -1
  463. package/es/components/tabs/src/tab-bar.d.ts +22 -4
  464. package/es/components/tabs/src/tab-bar.mjs +4 -0
  465. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  466. package/es/components/tabs/src/tab-bar.vue.d.ts +48 -9
  467. package/es/components/tabs/src/tab-bar2.mjs +8 -16
  468. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  469. package/es/components/tabs/src/tab-nav.d.ts +33 -18
  470. package/es/components/tabs/src/tab-nav.mjs +16 -3
  471. package/es/components/tabs/src/tab-nav.mjs.map +1 -1
  472. package/es/components/tabs/src/tab-pane2.mjs +9 -1
  473. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  474. package/es/components/tabs/src/tabs.d.ts +3 -3
  475. package/es/components/tabs/src/tabs.mjs +6 -2
  476. package/es/components/tabs/src/tabs.mjs.map +1 -1
  477. package/es/components/tag/src/tag.d.ts +1 -1
  478. package/es/components/tag/src/tag.vue.d.ts +3 -3
  479. package/es/components/teleport/index.mjs +2 -2
  480. package/es/components/teleport/src/teleport.mjs +8 -18
  481. package/es/components/teleport/src/teleport.mjs.map +1 -1
  482. package/es/components/teleport/src/teleport2.mjs +18 -8
  483. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  484. package/es/components/text/src/text.d.ts +1 -1
  485. package/es/components/text/src/text.vue.d.ts +3 -3
  486. package/es/components/time-picker/src/common/picker-range-trigger.mjs +5 -2
  487. package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
  488. package/es/components/time-picker/src/common/picker.mjs +5 -4
  489. package/es/components/time-picker/src/common/picker.mjs.map +1 -1
  490. package/es/components/timeline/src/timeline-item.d.ts +1 -1
  491. package/es/components/timeline/src/timeline-item.vue.d.ts +3 -3
  492. package/es/components/tooltip/src/content.mjs +1 -1
  493. package/es/components/tooltip/src/tooltip.mjs +1 -1
  494. package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
  495. package/es/components/tour/src/tour.mjs +1 -1
  496. package/es/hooks/use-focus-controller/index.d.ts +3 -1
  497. package/es/hooks/use-focus-controller/index.mjs +6 -7
  498. package/es/hooks/use-focus-controller/index.mjs.map +1 -1
  499. package/es/index.d.ts +234 -159
  500. package/es/index.mjs +17 -17
  501. package/es/version.d.ts +1 -1
  502. package/es/version.mjs +1 -1
  503. package/es/version.mjs.map +1 -1
  504. package/lib/components/alert/src/alert.d.ts +1 -1
  505. package/lib/components/alert/src/alert.vue.d.ts +3 -3
  506. package/lib/components/badge/src/badge.d.ts +1 -1
  507. package/lib/components/badge/src/badge.vue.d.ts +3 -3
  508. package/lib/components/button/index.js +2 -2
  509. package/lib/components/button/src/button-group.d.ts +1 -1
  510. package/lib/components/button/src/button-group.js +1 -1
  511. package/lib/components/button/src/button-group.vue.d.ts +3 -3
  512. package/lib/components/button/src/button.d.ts +1 -1
  513. package/lib/components/button/src/button.js +65 -87
  514. package/lib/components/button/src/button.js.map +1 -1
  515. package/lib/components/button/src/button.vue.d.ts +3 -3
  516. package/lib/components/button/src/button2.js +87 -65
  517. package/lib/components/button/src/button2.js.map +1 -1
  518. package/lib/components/calendar/src/calendar2.js +1 -1
  519. package/lib/components/calendar/src/date-table.js +89 -35
  520. package/lib/components/calendar/src/date-table.js.map +1 -1
  521. package/lib/components/calendar/src/date-table2.js +35 -89
  522. package/lib/components/calendar/src/date-table2.js.map +1 -1
  523. package/lib/components/calendar/src/use-date-table.js +1 -1
  524. package/lib/components/cascader/src/cascader.d.ts +1 -1
  525. package/lib/components/cascader/src/cascader.vue.d.ts +3 -3
  526. package/lib/components/check-tag/src/check-tag.d.ts +1 -1
  527. package/lib/components/check-tag/src/check-tag.vue.d.ts +3 -3
  528. package/lib/components/collapse/index.js +2 -2
  529. package/lib/components/collapse/src/collapse.js +28 -25
  530. package/lib/components/collapse/src/collapse.js.map +1 -1
  531. package/lib/components/collapse/src/collapse2.js +25 -28
  532. package/lib/components/collapse/src/collapse2.js.map +1 -1
  533. package/lib/components/color-picker/src/color-picker2.js +1 -3
  534. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  535. package/lib/components/descriptions/src/description-item.d.ts +1 -1
  536. package/lib/components/dialog/src/dialog.js +1 -1
  537. package/lib/components/drawer/index.js +2 -2
  538. package/lib/components/drawer/src/drawer.js +178 -27
  539. package/lib/components/drawer/src/drawer.js.map +1 -1
  540. package/lib/components/drawer/src/drawer2.js +27 -178
  541. package/lib/components/drawer/src/drawer2.js.map +1 -1
  542. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  543. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  544. package/lib/components/dropdown/src/dropdown.d.ts +1 -1
  545. package/lib/components/dropdown/src/dropdown.js +1 -1
  546. package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
  547. package/lib/components/dropdown/src/dropdown2.js +1 -1
  548. package/lib/components/empty/index.js +2 -2
  549. package/lib/components/empty/src/empty.js +52 -11
  550. package/lib/components/empty/src/empty.js.map +1 -1
  551. package/lib/components/empty/src/empty2.js +11 -52
  552. package/lib/components/empty/src/empty2.js.map +1 -1
  553. package/lib/components/form/src/form-item.d.ts +1 -1
  554. package/lib/components/form/src/form-item.vue.d.ts +3 -3
  555. package/lib/components/form/src/form.vue.d.ts +1 -1
  556. package/lib/components/index.js +17 -17
  557. package/lib/components/input/index.js +2 -2
  558. package/lib/components/input/src/input.js +104 -434
  559. package/lib/components/input/src/input.js.map +1 -1
  560. package/lib/components/input/src/input2.js +432 -104
  561. package/lib/components/input/src/input2.js.map +1 -1
  562. package/lib/components/input-number/index.js +2 -2
  563. package/lib/components/input-number/src/input-number.js +64 -346
  564. package/lib/components/input-number/src/input-number.js.map +1 -1
  565. package/lib/components/input-number/src/input-number2.js +346 -64
  566. package/lib/components/input-number/src/input-number2.js.map +1 -1
  567. package/lib/components/input-tag/index.js +2 -2
  568. package/lib/components/input-tag/src/composables/use-input-tag.js +1 -3
  569. package/lib/components/input-tag/src/composables/use-input-tag.js.map +1 -1
  570. package/lib/components/input-tag/src/input-tag.d.ts +1 -1
  571. package/lib/components/input-tag/src/input-tag.js +73 -214
  572. package/lib/components/input-tag/src/input-tag.js.map +1 -1
  573. package/lib/components/input-tag/src/input-tag.vue.d.ts +4 -4
  574. package/lib/components/input-tag/src/input-tag2.js +214 -73
  575. package/lib/components/input-tag/src/input-tag2.js.map +1 -1
  576. package/lib/components/link/src/link.d.ts +1 -1
  577. package/lib/components/link/src/link.vue.d.ts +3 -3
  578. package/lib/components/loading/src/directive.js +22 -15
  579. package/lib/components/loading/src/directive.js.map +1 -1
  580. package/lib/components/mention/index.js +2 -2
  581. package/lib/components/mention/src/mention.js +64 -285
  582. package/lib/components/mention/src/mention.js.map +1 -1
  583. package/lib/components/mention/src/mention2.js +283 -64
  584. package/lib/components/mention/src/mention2.js.map +1 -1
  585. package/lib/components/message/src/message.d.ts +1 -1
  586. package/lib/components/message/src/message.vue.d.ts +3 -3
  587. package/lib/components/message-box/src/index.vue.d.ts +1 -1
  588. package/lib/components/notification/src/notification.d.ts +1 -1
  589. package/lib/components/notification/src/notification.vue.d.ts +3 -3
  590. package/lib/components/page-header/index.js +2 -2
  591. package/lib/components/page-header/src/page-header.js +17 -97
  592. package/lib/components/page-header/src/page-header.js.map +1 -1
  593. package/lib/components/page-header/src/page-header2.js +97 -17
  594. package/lib/components/page-header/src/page-header2.js.map +1 -1
  595. package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
  596. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  597. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +6 -6
  598. package/lib/components/popover/src/popover.vue.d.ts +1 -1
  599. package/lib/components/popper/index.js +2 -2
  600. package/lib/components/popper/src/popper.js +32 -25
  601. package/lib/components/popper/src/popper.js.map +1 -1
  602. package/lib/components/popper/src/popper2.js +25 -32
  603. package/lib/components/popper/src/popper2.js.map +1 -1
  604. package/lib/components/radio/index.js +2 -2
  605. package/lib/components/radio/src/radio-button.js +1 -1
  606. package/lib/components/radio/src/radio-group.js +1 -1
  607. package/lib/components/radio/src/radio.js +73 -33
  608. package/lib/components/radio/src/radio.js.map +1 -1
  609. package/lib/components/radio/src/radio2.js +33 -73
  610. package/lib/components/radio/src/radio2.js.map +1 -1
  611. package/lib/components/rate/index.js +2 -2
  612. package/lib/components/rate/src/rate.js +257 -83
  613. package/lib/components/rate/src/rate.js.map +1 -1
  614. package/lib/components/rate/src/rate2.js +83 -257
  615. package/lib/components/rate/src/rate2.js.map +1 -1
  616. package/lib/components/result/index.js +2 -2
  617. package/lib/components/result/src/result.d.ts +1 -1
  618. package/lib/components/result/src/result.js +62 -32
  619. package/lib/components/result/src/result.js.map +1 -1
  620. package/lib/components/result/src/result.vue.d.ts +3 -3
  621. package/lib/components/result/src/result2.js +32 -62
  622. package/lib/components/result/src/result2.js.map +1 -1
  623. package/lib/components/roving-focus-group/index.js +2 -2
  624. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  625. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
  626. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  627. package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
  628. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  629. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  630. package/lib/components/select/src/select.d.ts +1 -1
  631. package/lib/components/select/src/select.vue.d.ts +5 -5
  632. package/lib/components/select/src/useSelect.d.ts +2 -2
  633. package/lib/components/select/src/useSelect.js +15 -17
  634. package/lib/components/select/src/useSelect.js.map +1 -1
  635. package/lib/components/select-v2/src/defaults.d.ts +1 -1
  636. package/lib/components/select-v2/src/select.vue.d.ts +5 -5
  637. package/lib/components/select-v2/src/useSelect.d.ts +2 -2
  638. package/lib/components/select-v2/src/useSelect.js +2 -4
  639. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  640. package/lib/components/skeleton/index.js +4 -4
  641. package/lib/components/skeleton/src/skeleton-item.js +22 -17
  642. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  643. package/lib/components/skeleton/src/skeleton-item2.js +17 -22
  644. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  645. package/lib/components/skeleton/src/skeleton.js +48 -21
  646. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  647. package/lib/components/skeleton/src/skeleton2.js +21 -48
  648. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  649. package/lib/components/slider/src/button.js +91 -20
  650. package/lib/components/slider/src/button.js.map +1 -1
  651. package/lib/components/slider/src/button2.js +20 -91
  652. package/lib/components/slider/src/button2.js.map +1 -1
  653. package/lib/components/slider/src/slider2.js +1 -1
  654. package/lib/components/splitter/index.js +2 -2
  655. package/lib/components/splitter/src/split-panel.js +19 -150
  656. package/lib/components/splitter/src/split-panel.js.map +1 -1
  657. package/lib/components/splitter/src/split-panel2.js +150 -19
  658. package/lib/components/splitter/src/split-panel2.js.map +1 -1
  659. package/lib/components/switch/index.js +2 -2
  660. package/lib/components/switch/src/switch.js +72 -227
  661. package/lib/components/switch/src/switch.js.map +1 -1
  662. package/lib/components/switch/src/switch2.js +227 -72
  663. package/lib/components/switch/src/switch2.js.map +1 -1
  664. package/lib/components/table/src/config.d.ts +12 -11
  665. package/lib/components/table/src/config.js +12 -4
  666. package/lib/components/table/src/config.js.map +1 -1
  667. package/lib/components/table/src/filter-panel.js +15 -9
  668. package/lib/components/table/src/filter-panel.js.map +1 -1
  669. package/lib/components/table/src/filter-panel.vue.d.ts +11 -7
  670. package/lib/components/table/src/h-helper.d.ts +8 -1
  671. package/lib/components/table/src/h-helper.js.map +1 -1
  672. package/lib/components/table/src/layout-observer.d.ts +2 -2
  673. package/lib/components/table/src/layout-observer.js.map +1 -1
  674. package/lib/components/table/src/store/current.d.ts +4 -3
  675. package/lib/components/table/src/store/current.js +4 -3
  676. package/lib/components/table/src/store/current.js.map +1 -1
  677. package/lib/components/table/src/store/helper.d.ts +24 -24
  678. package/lib/components/table/src/store/helper.js +8 -8
  679. package/lib/components/table/src/store/helper.js.map +1 -1
  680. package/lib/components/table/src/store/index.d.ts +44 -44
  681. package/lib/components/table/src/store/watcher.d.ts +2 -2
  682. package/lib/components/table/src/table/utils-helper.d.ts +3 -2
  683. package/lib/components/table/src/table/utils-helper.js.map +1 -1
  684. package/lib/components/table/src/table-body/defaults.d.ts +6 -6
  685. package/lib/components/table/src/table-body/defaults.js.map +1 -1
  686. package/lib/components/table/src/table-body/index.d.ts +12 -12
  687. package/lib/components/table/src/table-header/index.d.ts +1 -1
  688. package/lib/components/table/src/table-header/index.js.map +1 -1
  689. package/lib/components/table/src/table.vue.d.ts +16 -16
  690. package/lib/components/tabs/src/constants.d.ts +4 -2
  691. package/lib/components/tabs/src/constants.js.map +1 -1
  692. package/lib/components/tabs/src/tab-bar.d.ts +22 -4
  693. package/lib/components/tabs/src/tab-bar.js +4 -0
  694. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  695. package/lib/components/tabs/src/tab-bar.vue.d.ts +48 -9
  696. package/lib/components/tabs/src/tab-bar2.js +7 -15
  697. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  698. package/lib/components/tabs/src/tab-nav.d.ts +33 -18
  699. package/lib/components/tabs/src/tab-nav.js +16 -3
  700. package/lib/components/tabs/src/tab-nav.js.map +1 -1
  701. package/lib/components/tabs/src/tab-pane2.js +9 -1
  702. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  703. package/lib/components/tabs/src/tabs.d.ts +3 -3
  704. package/lib/components/tabs/src/tabs.js +6 -2
  705. package/lib/components/tabs/src/tabs.js.map +1 -1
  706. package/lib/components/tag/src/tag.d.ts +1 -1
  707. package/lib/components/tag/src/tag.vue.d.ts +3 -3
  708. package/lib/components/teleport/index.js +2 -2
  709. package/lib/components/teleport/src/teleport.js +8 -18
  710. package/lib/components/teleport/src/teleport.js.map +1 -1
  711. package/lib/components/teleport/src/teleport2.js +18 -8
  712. package/lib/components/teleport/src/teleport2.js.map +1 -1
  713. package/lib/components/text/src/text.d.ts +1 -1
  714. package/lib/components/text/src/text.vue.d.ts +3 -3
  715. package/lib/components/time-picker/src/common/picker-range-trigger.js +4 -1
  716. package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
  717. package/lib/components/time-picker/src/common/picker.js +5 -4
  718. package/lib/components/time-picker/src/common/picker.js.map +1 -1
  719. package/lib/components/timeline/src/timeline-item.d.ts +1 -1
  720. package/lib/components/timeline/src/timeline-item.vue.d.ts +3 -3
  721. package/lib/components/tooltip/src/content.js +1 -1
  722. package/lib/components/tooltip/src/tooltip.js +1 -1
  723. package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
  724. package/lib/components/tour/src/tour.js +1 -1
  725. package/lib/hooks/use-focus-controller/index.d.ts +3 -1
  726. package/lib/hooks/use-focus-controller/index.js +5 -6
  727. package/lib/hooks/use-focus-controller/index.js.map +1 -1
  728. package/lib/index.d.ts +234 -159
  729. package/lib/index.js +17 -17
  730. package/lib/version.d.ts +1 -1
  731. package/lib/version.js +1 -1
  732. package/lib/version.js.map +1 -1
  733. package/package.json +2 -2
  734. package/web-types.json +1 -1
@@ -2,81 +2,236 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var validator = require('../../../utils/vue/validator.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
7
- var icon = require('../../../utils/vue/icon.js');
8
- var index = require('../../../hooks/use-aria/index.js');
5
+ var vue = require('vue');
6
+ var index$1 = require('../../icon/index.js');
7
+ var iconsVue = require('@element-plus/icons-vue');
8
+ var _switch = require('./switch.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var useFormItem = require('../../form/src/hooks/use-form-item.js');
11
+ var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
12
+ var index = require('../../../hooks/use-namespace/index.js');
13
+ var style = require('../../../utils/dom/style.js');
9
14
  var event = require('../../../constants/event.js');
10
- var types = require('../../../utils/types.js');
15
+ var error = require('../../../utils/error.js');
11
16
  var shared = require('@vue/shared');
17
+ var types = require('../../../utils/types.js');
12
18
 
13
- const switchProps = runtime.buildProps({
14
- modelValue: {
15
- type: [Boolean, String, Number],
16
- default: false
17
- },
18
- disabled: Boolean,
19
- loading: Boolean,
20
- size: {
21
- type: String,
22
- validator: validator.isValidComponentSize
23
- },
24
- width: {
25
- type: [String, Number],
26
- default: ""
27
- },
28
- inlinePrompt: Boolean,
29
- inactiveActionIcon: {
30
- type: icon.iconPropType
31
- },
32
- activeActionIcon: {
33
- type: icon.iconPropType
34
- },
35
- activeIcon: {
36
- type: icon.iconPropType
37
- },
38
- inactiveIcon: {
39
- type: icon.iconPropType
40
- },
41
- activeText: {
42
- type: String,
43
- default: ""
44
- },
45
- inactiveText: {
46
- type: String,
47
- default: ""
48
- },
49
- activeValue: {
50
- type: [Boolean, String, Number],
51
- default: true
52
- },
53
- inactiveValue: {
54
- type: [Boolean, String, Number],
55
- default: false
56
- },
57
- name: {
58
- type: String,
59
- default: ""
60
- },
61
- validateEvent: {
62
- type: Boolean,
63
- default: true
64
- },
65
- beforeChange: {
66
- type: runtime.definePropType(Function)
67
- },
68
- id: String,
69
- tabindex: {
70
- type: [String, Number]
71
- },
72
- ...index.useAriaProps(["ariaLabel"])
19
+ const COMPONENT_NAME = "ElSwitch";
20
+ const __default__ = vue.defineComponent({
21
+ name: COMPONENT_NAME
22
+ });
23
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
24
+ ...__default__,
25
+ props: _switch.switchProps,
26
+ emits: _switch.switchEmits,
27
+ setup(__props, { expose, emit }) {
28
+ const props = __props;
29
+ const { formItem } = useFormItem.useFormItem();
30
+ const switchSize = useFormCommonProps.useFormSize();
31
+ const ns = index.useNamespace("switch");
32
+ const { inputId } = useFormItem.useFormItemInputId(props, {
33
+ formItemContext: formItem
34
+ });
35
+ const switchDisabled = useFormCommonProps.useFormDisabled(vue.computed(() => props.loading));
36
+ const isControlled = vue.ref(props.modelValue !== false);
37
+ const input = vue.ref();
38
+ const core = vue.ref();
39
+ const switchKls = vue.computed(() => [
40
+ ns.b(),
41
+ ns.m(switchSize.value),
42
+ ns.is("disabled", switchDisabled.value),
43
+ ns.is("checked", checked.value)
44
+ ]);
45
+ const labelLeftKls = vue.computed(() => [
46
+ ns.e("label"),
47
+ ns.em("label", "left"),
48
+ ns.is("active", !checked.value)
49
+ ]);
50
+ const labelRightKls = vue.computed(() => [
51
+ ns.e("label"),
52
+ ns.em("label", "right"),
53
+ ns.is("active", checked.value)
54
+ ]);
55
+ const coreStyle = vue.computed(() => ({
56
+ width: style.addUnit(props.width)
57
+ }));
58
+ vue.watch(() => props.modelValue, () => {
59
+ isControlled.value = true;
60
+ });
61
+ const actualValue = vue.computed(() => {
62
+ return isControlled.value ? props.modelValue : false;
63
+ });
64
+ const checked = vue.computed(() => actualValue.value === props.activeValue);
65
+ if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
66
+ emit(event.UPDATE_MODEL_EVENT, props.inactiveValue);
67
+ emit(event.CHANGE_EVENT, props.inactiveValue);
68
+ emit(event.INPUT_EVENT, props.inactiveValue);
69
+ }
70
+ vue.watch(checked, (val) => {
71
+ var _a;
72
+ input.value.checked = val;
73
+ if (props.validateEvent) {
74
+ (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => error.debugWarn(err));
75
+ }
76
+ });
77
+ const handleChange = () => {
78
+ const val = checked.value ? props.inactiveValue : props.activeValue;
79
+ emit(event.UPDATE_MODEL_EVENT, val);
80
+ emit(event.CHANGE_EVENT, val);
81
+ emit(event.INPUT_EVENT, val);
82
+ vue.nextTick(() => {
83
+ input.value.checked = checked.value;
84
+ });
85
+ };
86
+ const switchValue = () => {
87
+ if (switchDisabled.value)
88
+ return;
89
+ const { beforeChange } = props;
90
+ if (!beforeChange) {
91
+ handleChange();
92
+ return;
93
+ }
94
+ const shouldChange = beforeChange();
95
+ const isPromiseOrBool = [
96
+ shared.isPromise(shouldChange),
97
+ types.isBoolean(shouldChange)
98
+ ].includes(true);
99
+ if (!isPromiseOrBool) {
100
+ error.throwError(COMPONENT_NAME, "beforeChange must return type `Promise<boolean>` or `boolean`");
101
+ }
102
+ if (shared.isPromise(shouldChange)) {
103
+ shouldChange.then((result) => {
104
+ if (result) {
105
+ handleChange();
106
+ }
107
+ }).catch((e) => {
108
+ error.debugWarn(COMPONENT_NAME, `some error occurred: ${e}`);
109
+ });
110
+ } else if (shouldChange) {
111
+ handleChange();
112
+ }
113
+ };
114
+ const focus = () => {
115
+ var _a, _b;
116
+ (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
117
+ };
118
+ vue.onMounted(() => {
119
+ input.value.checked = checked.value;
120
+ });
121
+ expose({
122
+ focus,
123
+ checked
124
+ });
125
+ return (_ctx, _cache) => {
126
+ return vue.openBlock(), vue.createElementBlock("div", {
127
+ class: vue.normalizeClass(vue.unref(switchKls)),
128
+ onClick: vue.withModifiers(switchValue, ["prevent"])
129
+ }, [
130
+ vue.createElementVNode("input", {
131
+ id: vue.unref(inputId),
132
+ ref_key: "input",
133
+ ref: input,
134
+ class: vue.normalizeClass(vue.unref(ns).e("input")),
135
+ type: "checkbox",
136
+ role: "switch",
137
+ "aria-checked": vue.unref(checked),
138
+ "aria-disabled": vue.unref(switchDisabled),
139
+ "aria-label": _ctx.ariaLabel,
140
+ name: _ctx.name,
141
+ "true-value": _ctx.activeValue,
142
+ "false-value": _ctx.inactiveValue,
143
+ disabled: vue.unref(switchDisabled),
144
+ tabindex: _ctx.tabindex,
145
+ onChange: handleChange,
146
+ onKeydown: vue.withKeys(switchValue, ["enter"])
147
+ }, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]),
148
+ !_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (vue.openBlock(), vue.createElementBlock("span", {
149
+ key: 0,
150
+ class: vue.normalizeClass(vue.unref(labelLeftKls))
151
+ }, [
152
+ _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
153
+ default: vue.withCtx(() => [
154
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveIcon)))
155
+ ]),
156
+ _: 1
157
+ })) : vue.createCommentVNode("v-if", true),
158
+ !_ctx.inactiveIcon && _ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
159
+ key: 1,
160
+ "aria-hidden": vue.unref(checked)
161
+ }, vue.toDisplayString(_ctx.inactiveText), 9, ["aria-hidden"])) : vue.createCommentVNode("v-if", true)
162
+ ], 2)) : vue.createCommentVNode("v-if", true),
163
+ vue.createElementVNode("span", {
164
+ ref_key: "core",
165
+ ref: core,
166
+ class: vue.normalizeClass(vue.unref(ns).e("core")),
167
+ style: vue.normalizeStyle(vue.unref(coreStyle))
168
+ }, [
169
+ _ctx.inlinePrompt ? (vue.openBlock(), vue.createElementBlock("div", {
170
+ key: 0,
171
+ class: vue.normalizeClass(vue.unref(ns).e("inner"))
172
+ }, [
173
+ _ctx.activeIcon || _ctx.inactiveIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
174
+ key: 0,
175
+ class: vue.normalizeClass(vue.unref(ns).is("icon"))
176
+ }, {
177
+ default: vue.withCtx(() => [
178
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
179
+ ]),
180
+ _: 1
181
+ }, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (vue.openBlock(), vue.createElementBlock("span", {
182
+ key: 1,
183
+ class: vue.normalizeClass(vue.unref(ns).is("text")),
184
+ "aria-hidden": !vue.unref(checked)
185
+ }, vue.toDisplayString(vue.unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, ["aria-hidden"])) : vue.createCommentVNode("v-if", true)
186
+ ], 2)) : vue.createCommentVNode("v-if", true),
187
+ vue.createElementVNode("div", {
188
+ class: vue.normalizeClass(vue.unref(ns).e("action"))
189
+ }, [
190
+ _ctx.loading ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), {
191
+ key: 0,
192
+ class: vue.normalizeClass(vue.unref(ns).is("loading"))
193
+ }, {
194
+ default: vue.withCtx(() => [
195
+ vue.createVNode(vue.unref(iconsVue.Loading))
196
+ ]),
197
+ _: 1
198
+ }, 8, ["class"])) : vue.unref(checked) ? vue.renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [
199
+ _ctx.activeActionIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
200
+ default: vue.withCtx(() => [
201
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeActionIcon)))
202
+ ]),
203
+ _: 1
204
+ })) : vue.createCommentVNode("v-if", true)
205
+ ]) : !vue.unref(checked) ? vue.renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [
206
+ _ctx.inactiveActionIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
207
+ default: vue.withCtx(() => [
208
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.inactiveActionIcon)))
209
+ ]),
210
+ _: 1
211
+ })) : vue.createCommentVNode("v-if", true)
212
+ ]) : vue.createCommentVNode("v-if", true)
213
+ ], 2)
214
+ ], 6),
215
+ !_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (vue.openBlock(), vue.createElementBlock("span", {
216
+ key: 1,
217
+ class: vue.normalizeClass(vue.unref(labelRightKls))
218
+ }, [
219
+ _ctx.activeIcon ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElIcon), { key: 0 }, {
220
+ default: vue.withCtx(() => [
221
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.activeIcon)))
222
+ ]),
223
+ _: 1
224
+ })) : vue.createCommentVNode("v-if", true),
225
+ !_ctx.activeIcon && _ctx.activeText ? (vue.openBlock(), vue.createElementBlock("span", {
226
+ key: 1,
227
+ "aria-hidden": !vue.unref(checked)
228
+ }, vue.toDisplayString(_ctx.activeText), 9, ["aria-hidden"])) : vue.createCommentVNode("v-if", true)
229
+ ], 2)) : vue.createCommentVNode("v-if", true)
230
+ ], 10, ["onClick"]);
231
+ };
232
+ }
73
233
  });
74
- const switchEmits = {
75
- [event.UPDATE_MODEL_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val),
76
- [event.CHANGE_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val),
77
- [event.INPUT_EVENT]: (val) => types.isBoolean(val) || shared.isString(val) || types.isNumber(val)
78
- };
234
+ var Switch = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "switch.vue"]]);
79
235
 
80
- exports.switchEmits = switchEmits;
81
- exports.switchProps = switchProps;
236
+ exports["default"] = Switch;
82
237
  //# sourceMappingURL=switch2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n isString,\n isValidComponentSize,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport const switchProps = buildProps({\n /**\n * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type\n */\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description whether Switch is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Switch is in loading state\n */\n loading: Boolean,\n /**\n * @description size of Switch\n */\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n /**\n * @description width of Switch\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether icon or text is displayed inside dot, only the first character will be rendered for text\n */\n inlinePrompt: Boolean,\n /**\n * @description component of the icon displayed in action when in `off` state\n */\n inactiveActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed in action when in `on` state\n */\n activeActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `on` state, overrides `active-text`\n */\n activeIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `off` state, overrides `inactive-text`\n */\n inactiveIcon: {\n type: iconPropType,\n },\n /**\n * @description text displayed when in `on` state\n */\n activeText: {\n type: String,\n default: '',\n },\n /**\n * @description text displayed when in `off` state\n */\n inactiveText: {\n type: String,\n default: '',\n },\n /**\n * @description switch value when in `on` state\n */\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n /**\n * @description switch value when in `off` state\n */\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description input name of Switch\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching\n */\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n /**\n * @description id for input\n */\n id: String,\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\n\nexport const switchEmits = {\n [UPDATE_MODEL_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [CHANGE_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [INPUT_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n}\nexport type SwitchEmits = typeof switchEmits\n\nexport type SwitchInstance = InstanceType<typeof Switch> & unknown\n"],"names":["buildProps","isValidComponentSize","iconPropType","definePropType","useAriaProps","UPDATE_MODEL_EVENT","isBoolean","isString","isNumber","CHANGE_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;;;AAeY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAEC,8BAAoB;AACnC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI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AAChC,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC3E,EAAE,CAACE,iBAAW,GAAG,CAAC,GAAG,KAAKJ,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC1E;;;;;"}
1
+ {"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" @click.prevent=\"switchValue\">\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n :aria-label=\"ariaLabel\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @keydown.enter=\"switchValue\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"labelLeftKls\"\n >\n <el-icon v-if=\"inactiveIcon\">\n <component :is=\"inactiveIcon\" />\n </el-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span ref=\"core\" :class=\"ns.e('core')\" :style=\"coreStyle\">\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <el-icon :class=\"ns.is('icon')\">\n <component :is=\"checked ? activeIcon : inactiveIcon\" />\n </el-icon>\n </template>\n <template v-else-if=\"activeText || inactiveText\">\n <span :class=\"ns.is('text')\" :aria-hidden=\"!checked\">\n {{ checked ? activeText : inactiveText }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <el-icon v-if=\"loading\" :class=\"ns.is('loading')\">\n <loading />\n </el-icon>\n <slot v-else-if=\"checked\" name=\"active-action\">\n <el-icon v-if=\"activeActionIcon\">\n <component :is=\"activeActionIcon\" />\n </el-icon>\n </slot>\n <slot v-else-if=\"!checked\" name=\"inactive-action\">\n <el-icon v-if=\"inactiveActionIcon\">\n <component :is=\"inactiveActionIcon\" />\n </el-icon>\n </slot>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"labelRightKls\"\n >\n <el-icon v-if=\"activeIcon\">\n <component :is=\"activeIcon\" />\n </el-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport {\n addUnit,\n debugWarn,\n isBoolean,\n isPromise,\n throwError,\n} from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { switchEmits, switchProps } from './switch'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElSwitch'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(switchProps)\nconst emit = defineEmits(switchEmits)\n\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst switchDisabled = useFormDisabled(computed(() => props.loading))\nconst isControlled = ref(props.modelValue !== false)\nconst input = ref<HTMLInputElement>()\nconst core = ref<HTMLSpanElement>()\n\nconst switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('checked', checked.value),\n])\n\nconst labelLeftKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked.value),\n])\n\nconst labelRightKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked.value),\n])\n\nconst coreStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.width),\n}))\n\nwatch(\n () => props.modelValue,\n () => {\n isControlled.value = true\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : false\n})\n\nconst checked = computed(() => actualValue.value === props.activeValue)\n\nif (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {\n emit(UPDATE_MODEL_EVENT, props.inactiveValue)\n emit(CHANGE_EVENT, props.inactiveValue)\n emit(INPUT_EVENT, props.inactiveValue)\n}\n\nwatch(checked, (val) => {\n input.value!.checked = val\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n})\n\nconst handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n emit(INPUT_EVENT, val)\n nextTick(() => {\n input.value!.checked = checked.value\n })\n}\n\nconst switchValue = () => {\n if (switchDisabled.value) return\n\n const { beforeChange } = props\n if (!beforeChange) {\n handleChange()\n return\n }\n\n const shouldChange = beforeChange()\n\n const isPromiseOrBool = [\n isPromise(shouldChange),\n isBoolean(shouldChange),\n ].includes(true)\n if (!isPromiseOrBool) {\n throwError(\n COMPONENT_NAME,\n 'beforeChange must return type `Promise<boolean>` or `boolean`'\n )\n }\n\n if (isPromise(shouldChange)) {\n shouldChange\n .then((result) => {\n if (result) {\n handleChange()\n }\n })\n .catch((e) => {\n debugWarn(COMPONENT_NAME, `some error occurred: ${e}`)\n })\n } else if (shouldChange) {\n handleChange()\n }\n}\n\nconst focus = (): void => {\n input.value?.focus?.()\n}\n\nonMounted(() => {\n input.value!.checked = checked.value\n})\n\ndefineExpose({\n /**\n * @description manual focus to the switch component\n **/\n focus,\n /**\n * @description whether Switch is checked\n */\n checked,\n})\n</script>\n"],"names":["useFormItem","useFormSize","useNamespace","useFormItemInputId","useFormDisabled","computed","ref","addUnit","watch","UPDATE_MODEL_EVENT","INPUT_EVENT","debugWarn","CHANGE_EVENT","nextTick","isPromise","isBoolean","throwError","onMounted","_openBlock","_createElementBlock","_normalizeClass","_unref","_withModifiers","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;uCAqGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAE,QAAS,EAAA,GAAIA,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,aAAaC,8BAAY,EAAA,CAAA;AAC/B,IAAM,MAAA,EAAA,GAAKC,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,EAAE,OAAA,EAAY,GAAAC,8BAAA,CAAmB,KAAO,EAAA;AAAA,MAC5C,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAiBC,kCAAgB,CAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AACpE,IAAA,MAAM,YAAe,GAAAC,OAAA,CAAI,KAAM,CAAA,UAAA,KAAe,KAAK,CAAA,CAAA;AACnD,IAAA,MAAM,QAAQA,OAAsB,EAAA,CAAA;AACpC,IAAA,MAAM,OAAOA,OAAqB,EAAA,CAAA;AAElC,IAAM,MAAA,SAAA,GAAYD,aAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,UAAA,CAAW,KAAK,CAAA;AAAA,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ED,KAAa,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAAA,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;AAAA,QAAA,KAAA,EAAAC,kBAAA,CAAAC,SAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QAIX,OAAA,EAAAC,iBAAA,CAAA,WAAA,EAAA,CAAA,SAAA,CAAA,CAAA;AAAA,OAAA,EAAA;AAAA,QAAAC,sBAAA,CAAA,OAAA,EAAA;AAAA,UAAA,EAAA,EAAAF,SAAA,CAAA,OAAA,CAAA;AAAA,UAIA,OAAA,EAAA,OAAA;AAAA,UACD,GAAA,EAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import type { VNode } from 'vue';
2
2
  import type { TableColumnCtx } from './table-column/defaults';
3
3
  import type { Store } from './store';
4
- import type { TreeNode } from './table/defaults';
4
+ import type { DefaultRow, TreeNode } from './table/defaults';
5
5
  export declare const cellStarts: {
6
6
  default: {
7
7
  order: string;
@@ -25,19 +25,20 @@ export declare const cellStarts: {
25
25
  order: string;
26
26
  };
27
27
  };
28
- export declare const getDefaultClassName: (type: any) => any;
28
+ export declare const getDefaultClassName: (type: string) => "table-column--selection" | "table__expand-column";
29
29
  export declare const cellForced: {
30
30
  selection: {
31
- renderHeader<T>({ store, column }: {
31
+ renderHeader<T extends DefaultRow>({ store, column, }: {
32
32
  store: Store<T>;
33
+ column: TableColumnCtx<T>;
33
34
  }): VNode<import("vue").RendererNode, import("vue").RendererElement, {
34
35
  [key: string]: any;
35
36
  }>;
36
- renderCell<T>({ row, column, store, $index, }: {
37
+ renderCell<T extends DefaultRow>({ row, column, store, $index, }: {
37
38
  row: T;
38
39
  column: TableColumnCtx<T>;
39
40
  store: Store<T>;
40
- $index: string;
41
+ $index: number;
41
42
  }): VNode<import("vue").RendererNode, import("vue").RendererElement, {
42
43
  [key: string]: any;
43
44
  }>;
@@ -45,10 +46,10 @@ export declare const cellForced: {
45
46
  resizable: boolean;
46
47
  };
47
48
  index: {
48
- renderHeader<T>({ column }: {
49
+ renderHeader<T extends DefaultRow>({ column, }: {
49
50
  column: TableColumnCtx<T>;
50
51
  }): string;
51
- renderCell<T>({ column, $index, }: {
52
+ renderCell<T extends DefaultRow>({ column, $index, }: {
52
53
  column: TableColumnCtx<T>;
53
54
  $index: number;
54
55
  }): VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -57,10 +58,10 @@ export declare const cellForced: {
57
58
  sortable: boolean;
58
59
  };
59
60
  expand: {
60
- renderHeader<T>({ column }: {
61
+ renderHeader<T extends DefaultRow>({ column, }: {
61
62
  column: TableColumnCtx<T>;
62
63
  }): string;
63
- renderCell<T>({ column, row, store, expanded, }: {
64
+ renderCell<T extends DefaultRow>({ column, row, store, expanded, }: {
64
65
  column: TableColumnCtx<T>;
65
66
  row: T;
66
67
  store: Store<T>;
@@ -72,12 +73,12 @@ export declare const cellForced: {
72
73
  resizable: boolean;
73
74
  };
74
75
  };
75
- export declare function defaultRenderCell<T>({ row, column, $index, }: {
76
+ export declare function defaultRenderCell<T extends DefaultRow>({ row, column, $index, }: {
76
77
  row: T;
77
78
  column: TableColumnCtx<T>;
78
79
  $index: number;
79
80
  }): any;
80
- export declare function treeCellPrefix<T>({ row, treeNode, store, }: {
81
+ export declare function treeCellPrefix<T extends DefaultRow>({ row, treeNode, store, }: {
81
82
  row: T;
82
83
  treeNode: TreeNode;
83
84
  store: Store<T>;
@@ -42,7 +42,11 @@ const getDefaultClassName = (type) => {
42
42
  };
43
43
  const cellForced = {
44
44
  selection: {
45
- renderHeader({ store, column }) {
45
+ renderHeader({
46
+ store,
47
+ column
48
+ }) {
49
+ var _a;
46
50
  function isDisabled() {
47
51
  return store.states.data.value && store.states.data.value.length === 0;
48
52
  }
@@ -50,7 +54,7 @@ const cellForced = {
50
54
  disabled: isDisabled(),
51
55
  size: store.states.tableSize.value,
52
56
  indeterminate: store.states.selection.value.length > 0 && !store.states.isAllSelected.value,
53
- "onUpdate:modelValue": store.toggleAllSelection,
57
+ "onUpdate:modelValue": (_a = store.toggleAllSelection) != null ? _a : void 0,
54
58
  modelValue: store.states.isAllSelected.value,
55
59
  ariaLabel: column.label
56
60
  });
@@ -76,7 +80,9 @@ const cellForced = {
76
80
  resizable: false
77
81
  },
78
82
  index: {
79
- renderHeader({ column }) {
83
+ renderHeader({
84
+ column
85
+ }) {
80
86
  return column.label || "#";
81
87
  },
82
88
  renderCell({
@@ -95,7 +101,9 @@ const cellForced = {
95
101
  sortable: false
96
102
  },
97
103
  expand: {
98
- renderHeader({ column }) {
104
+ renderHeader({
105
+ column
106
+ }) {
99
107
  return column.label || "";
100
108
  },
101
109
  renderCell({
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sources":["../../../../../../packages/components/table/src/config.ts"],"sourcesContent":["// @ts-nocheck\nimport { h } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowRight, Loading } from '@element-plus/icons-vue'\nimport { getProp, isBoolean, isFunction, isNumber } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { Store } from './store'\nimport type { TreeNode } from './table/defaults'\n\nconst defaultClassNames = {\n selection: 'table-column--selection',\n expand: 'table__expand-column',\n}\n\nexport const cellStarts = {\n default: {\n order: '',\n },\n selection: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n expand: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n index: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n}\n\nexport const getDefaultClassName = (type) => {\n return defaultClassNames[type] || ''\n}\n\n// 这些选项不应该被覆盖\nexport const cellForced = {\n selection: {\n renderHeader<T>({ store, column }: { store: Store<T> }) {\n function isDisabled() {\n return store.states.data.value && store.states.data.value.length === 0\n }\n return h(ElCheckbox, {\n disabled: isDisabled(),\n size: store.states.tableSize.value,\n indeterminate:\n store.states.selection.value.length > 0 &&\n !store.states.isAllSelected.value,\n 'onUpdate:modelValue': store.toggleAllSelection,\n modelValue: store.states.isAllSelected.value,\n ariaLabel: column.label,\n })\n },\n renderCell<T>({\n row,\n column,\n store,\n $index,\n }: {\n row: T\n column: TableColumnCtx<T>\n store: Store<T>\n $index: string\n }) {\n return h(ElCheckbox, {\n disabled: column.selectable\n ? !column.selectable.call(null, row, $index)\n : false,\n size: store.states.tableSize.value,\n onChange: () => {\n store.commit('rowSelectedChanged', row)\n },\n onClick: (event: Event) => event.stopPropagation(),\n modelValue: store.isSelected(row),\n ariaLabel: column.label,\n })\n },\n sortable: false,\n resizable: false,\n },\n index: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || '#'\n },\n renderCell<T>({\n column,\n $index,\n }: {\n column: TableColumnCtx<T>\n $index: number\n }) {\n let i = $index + 1\n const index = column.index\n\n if (isNumber(index)) {\n i = $index + index\n } else if (isFunction(index)) {\n i = index($index)\n }\n return h('div', {}, [i])\n },\n sortable: false,\n },\n expand: {\n renderHeader<T>({ column }: { column: TableColumnCtx<T> }) {\n return column.label || ''\n },\n renderCell<T>({\n column,\n row,\n store,\n expanded,\n }: {\n column: TableColumnCtx<T>\n row: T\n store: Store<T>\n expanded: boolean\n }) {\n const { ns } = store\n const classes = [ns.e('expand-icon')]\n\n if (!column.renderExpand && expanded) {\n classes.push(ns.em('expand-icon', 'expanded'))\n }\n const callback = function (e: Event) {\n e.stopPropagation()\n store.toggleRowExpansion(row)\n }\n return h(\n 'div',\n {\n class: classes,\n onClick: callback,\n },\n {\n default: () => {\n if (column.renderExpand) {\n return [\n column.renderExpand({\n expanded,\n }),\n ]\n }\n\n return [\n h(ElIcon, null, {\n default: () => {\n return [h(ArrowRight)]\n },\n }),\n ]\n },\n }\n )\n },\n sortable: false,\n resizable: false,\n },\n}\n\nexport function defaultRenderCell<T>({\n row,\n column,\n $index,\n}: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n}) {\n const property = column.property\n const value = property && getProp(row, property).value\n if (column && column.formatter) {\n return column.formatter(row, column, value, $index)\n }\n return value?.toString?.() || ''\n}\n\nexport function treeCellPrefix<T>(\n {\n row,\n treeNode,\n store,\n }: {\n row: T\n treeNode: TreeNode\n store: Store<T>\n },\n createPlaceholder = false\n) {\n const { ns } = store\n if (!treeNode) {\n if (createPlaceholder) {\n return [\n h('span', {\n class: ns.e('placeholder'),\n }),\n ]\n }\n return null\n }\n const ele: VNode[] = []\n const callback = function (e) {\n e.stopPropagation()\n if (treeNode.loading) {\n return\n }\n store.loadOrToggle(row)\n }\n if (treeNode.indent) {\n ele.push(\n h('span', {\n class: ns.e('indent'),\n style: { 'padding-left': `${treeNode.indent}px` },\n })\n )\n }\n if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {\n const expandClasses = [\n ns.e('expand-icon'),\n treeNode.expanded ? ns.em('expand-icon', 'expanded') : '',\n ]\n let icon = ArrowRight\n if (treeNode.loading) {\n icon = Loading\n }\n\n ele.push(\n h(\n 'div',\n {\n class: expandClasses,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(\n ElIcon,\n { class: { [ns.is('loading')]: treeNode.loading } },\n {\n default: () => [h(icon)],\n }\n ),\n ]\n },\n }\n )\n )\n } else {\n ele.push(\n h('span', {\n class: ns.e('placeholder'),\n })\n )\n }\n return ele\n}\n"],"names":["h","ElCheckbox","isNumber","isFunction","ElIcon","ArrowRight","getProp","isBoolean","Loading"],"mappings":";;;;;;;;;;;;AAKA,MAAM,iBAAiB,GAAG;AAC1B,EAAE,SAAS,EAAE,yBAAyB;AACtC,EAAE,MAAM,EAAE,sBAAsB;AAChC,CAAC,CAAC;AACU,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO,EAAE;AACX,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AU,CAAC,GAAG,EAAE;AAC/D,KAAK,CAAC;AACN,IAAI,IAAI,IAAI,GAAGF,mBAAU,CAAC;AAC1B,IAAI,IAAI,QAAQ,CAAC,OAAO,EAAE;AAC1B,MAAM,IAAI,GAAGG,gBAAO,CAAC;AACrB,KAAK;AACL,IAAI,GAAG,CAAC,IAAI,CAACR,KAAC,CAAC,KAAK,EAAE;AACtB,MAAM,KAAK,EAAE,aAAa;AAC1B,MAAM,OAAO,EAAE,QAAQ;AACvB,KAAK,EAAE;AACP,MAAM,OAAO,EAAE,MAAM;AACrB,QAAQ,OAAO;AACf,UAAUA,KAAC,CAACI,cAAM,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE;AACzE,YAAY,OAAO,EAAE,MAAM,CAACJ,KAAC,CAAC,IAAI,CAAC,CAAC;AACpC,WAAW,CAAC;AACZ,SAAS,CAAC;AACV,OAAO;AACP,KAAK,CAAC,CAAC,CAAC;AACR,GAAG,MAAM;AACT,IAAI,GAAG,CAAC,IAAI,CAACA,KAAC,CAAC,MAAM,EAAE;AACvB,MAAM,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AAChC,KAAK,CAAC,CAAC,CAAC;AACR,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;;;;;;;;"}
1
+ {"version":3,"file":"config.js","sources":["../../../../../../packages/components/table/src/config.ts"],"sourcesContent":["import { h } from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ArrowRight, Loading } from '@element-plus/icons-vue'\nimport { getProp, isBoolean, isFunction, isNumber } from '@element-plus/utils'\n\nimport type { VNode } from 'vue'\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { Store } from './store'\nimport type { DefaultRow, TreeNode } from './table/defaults'\n\nconst defaultClassNames = {\n selection: 'table-column--selection',\n expand: 'table__expand-column',\n} as const\n\nexport const cellStarts = {\n default: {\n order: '',\n },\n selection: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n expand: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n index: {\n width: 48,\n minWidth: 48,\n realWidth: 48,\n order: '',\n },\n}\n\nexport const getDefaultClassName = (type: string) => {\n return defaultClassNames[type as keyof typeof defaultClassNames] || ''\n}\n\n// 这些选项不应该被覆盖\nexport const cellForced = {\n selection: {\n renderHeader<T extends DefaultRow>({\n store,\n column,\n }: {\n store: Store<T>\n column: TableColumnCtx<T>\n }) {\n function isDisabled() {\n return store.states.data.value && store.states.data.value.length === 0\n }\n return h(ElCheckbox, {\n disabled: isDisabled(),\n size: store.states.tableSize.value,\n indeterminate:\n store.states.selection.value.length > 0 &&\n !store.states.isAllSelected.value,\n 'onUpdate:modelValue': store.toggleAllSelection ?? undefined,\n modelValue: store.states.isAllSelected.value,\n ariaLabel: column.label,\n })\n },\n renderCell<T extends DefaultRow>({\n row,\n column,\n store,\n $index,\n }: {\n row: T\n column: TableColumnCtx<T>\n store: Store<T>\n $index: number\n }) {\n return h(ElCheckbox, {\n disabled: column.selectable\n ? !column.selectable.call(null, row, $index)\n : false,\n size: store.states.tableSize.value,\n onChange: () => {\n store.commit('rowSelectedChanged', row)\n },\n onClick: (event: Event) => event.stopPropagation(),\n modelValue: store.isSelected(row),\n ariaLabel: column.label,\n })\n },\n sortable: false,\n resizable: false,\n },\n index: {\n renderHeader<T extends DefaultRow>({\n column,\n }: {\n column: TableColumnCtx<T>\n }) {\n return column.label || '#'\n },\n renderCell<T extends DefaultRow>({\n column,\n $index,\n }: {\n column: TableColumnCtx<T>\n $index: number\n }) {\n let i = $index + 1\n const index = column.index\n\n if (isNumber(index)) {\n i = $index + index\n } else if (isFunction(index)) {\n i = index($index)\n }\n return h('div', {}, [i])\n },\n sortable: false,\n },\n expand: {\n renderHeader<T extends DefaultRow>({\n column,\n }: {\n column: TableColumnCtx<T>\n }) {\n return column.label || ''\n },\n renderCell<T extends DefaultRow>({\n column,\n row,\n store,\n expanded,\n }: {\n column: TableColumnCtx<T>\n row: T\n store: Store<T>\n expanded: boolean\n }) {\n const { ns } = store\n const classes = [ns.e('expand-icon')]\n\n if (!column.renderExpand && expanded) {\n classes.push(ns.em('expand-icon', 'expanded'))\n }\n const callback = function (e: Event) {\n e.stopPropagation()\n store.toggleRowExpansion(row)\n }\n return h(\n 'div',\n {\n class: classes,\n onClick: callback,\n },\n {\n default: () => {\n if (column.renderExpand) {\n return [\n column.renderExpand({\n expanded,\n }),\n ]\n }\n\n return [\n h(ElIcon, null, {\n default: () => {\n return [h(ArrowRight)]\n },\n }),\n ]\n },\n }\n )\n },\n sortable: false,\n resizable: false,\n },\n}\n\nexport function defaultRenderCell<T extends DefaultRow>({\n row,\n column,\n $index,\n}: {\n row: T\n column: TableColumnCtx<T>\n $index: number\n}) {\n const property = column.property\n const value = property && getProp(row, property).value\n if (column && column.formatter) {\n return column.formatter(row, column, value, $index)\n }\n return value?.toString?.() || ''\n}\n\nexport function treeCellPrefix<T extends DefaultRow>(\n {\n row,\n treeNode,\n store,\n }: {\n row: T\n treeNode: TreeNode\n store: Store<T>\n },\n createPlaceholder = false\n) {\n const { ns } = store\n if (!treeNode) {\n if (createPlaceholder) {\n return [\n h('span', {\n class: ns.e('placeholder'),\n }),\n ]\n }\n return null\n }\n const ele: VNode[] = []\n const callback = function (e: Event) {\n e.stopPropagation()\n if (treeNode.loading) {\n return\n }\n store.loadOrToggle(row)\n }\n if (treeNode.indent) {\n ele.push(\n h('span', {\n class: ns.e('indent'),\n style: { 'padding-left': `${treeNode.indent}px` },\n })\n )\n }\n if (isBoolean(treeNode.expanded) && !treeNode.noLazyChildren) {\n const expandClasses = [\n ns.e('expand-icon'),\n treeNode.expanded ? ns.em('expand-icon', 'expanded') : '',\n ]\n let icon = ArrowRight\n if (treeNode.loading) {\n icon = Loading\n }\n\n ele.push(\n h(\n 'div',\n {\n class: expandClasses,\n onClick: callback,\n },\n {\n default: () => {\n return [\n h(\n ElIcon,\n { class: { [ns.is('loading')]: treeNode.loading } },\n {\n default: () => [h(icon)],\n }\n ),\n ]\n },\n }\n )\n )\n } else {\n ele.push(\n h('span', {\n class: ns.e('placeholder'),\n })\n )\n }\n return ele\n}\n"],"names":["h","ElCheckbox","isNumber","isFunction","ElIcon","ArrowRight","getProp","isBoolean","Loading"],"mappings":";;;;;;;;;;;;AAKA,MAAM,iBAAiB,GAAG;AAC1B,EAAE,SAAS,EAAE,yBAAyB;AACtC,EAAE,MAAM,EAAE,sBAAsB;AAChC,CAAC,CAAC;AACU,MAAC,UAAU,GAAG;AAC1B,EAAE,OAAO,EAAE;AACX,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,KAAK,EAAE,EAAE;AACb,IAAI,QAAQ,EAAE,EAAE;AAChB,IAAI,SAAS,EAAE,EAAE;AACjB,IAAI,KAAK,EAAE,EAAE;AACb,GAAG;AACH,EAAE;AACU,MAAC,mBAAmB,GAAG,CAAC,IAAI,KAAK;AAC7C,EAAE,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACvC,EAAE;AACU,MAAC,UAAU,GAAG;AAC1B,EAAE,SAAS,EAAE;AACb,IAAI,YAAY,CAAC;AACjB,MAAM,KAAK;AACX,MAAM,MAAM;AACZ,KAAK,EAAE;AACP,MAAM,IAAI,EAAE,CAAC;AACb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;AACR,GAAG,MAAM;AACT,IAAI,GAAG,CAAC,IAAI,CAACA,KAAC,CAAC,MAAM,EAAE;AACvB,MAAM,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;AAChC,KAAK,CAAC,CAAC,CAAC;AACR,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb;;;;;;;;"}
@@ -49,7 +49,7 @@ const _sfc_main = vue.defineComponent({
49
49
  const { t } = index$5.useLocale();
50
50
  const ns = index$6.useNamespace("table-filter");
51
51
  const parent = instance == null ? void 0 : instance.parent;
52
- if (!parent.filterPanels.value[props.column.id]) {
52
+ if (props.column && !parent.filterPanels.value[props.column.id]) {
53
53
  parent.filterPanels.value[props.column.id] = instance;
54
54
  }
55
55
  const tooltipVisible = vue.ref(false);
@@ -58,7 +58,7 @@ const _sfc_main = vue.defineComponent({
58
58
  return props.column && props.column.filters;
59
59
  });
60
60
  const filterClassName = vue.computed(() => {
61
- if (props.column.filterClassName) {
61
+ if (props.column && props.column.filterClassName) {
62
62
  return `${ns.b()} ${props.column.filterClassName}`;
63
63
  }
64
64
  return ns.b();
@@ -86,8 +86,9 @@ const _sfc_main = vue.defineComponent({
86
86
  return [];
87
87
  },
88
88
  set(value) {
89
+ var _a;
89
90
  if (props.column) {
90
- props.upDataColumn("filteredValue", value);
91
+ (_a = props.upDataColumn) == null ? void 0 : _a.call(props, "filteredValue", value);
91
92
  }
92
93
  }
93
94
  });
@@ -129,15 +130,17 @@ const _sfc_main = vue.defineComponent({
129
130
  hidden();
130
131
  };
131
132
  const confirmFilter = (filteredValue2) => {
132
- props.store.commit("filterChange", {
133
+ var _a, _b;
134
+ (_a = props.store) == null ? void 0 : _a.commit("filterChange", {
133
135
  column: props.column,
134
136
  values: filteredValue2
135
137
  });
136
- props.store.updateAllSelected();
138
+ (_b = props.store) == null ? void 0 : _b.updateAllSelected();
137
139
  };
138
140
  vue.watch(tooltipVisible, (value) => {
141
+ var _a;
139
142
  if (props.column) {
140
- props.upDataColumn("filterOpened", value);
143
+ (_a = props.upDataColumn) == null ? void 0 : _a.call(props, "filterOpened", value);
141
144
  }
142
145
  }, {
143
146
  immediate: true
@@ -270,9 +273,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
270
273
  }, [
271
274
  vue.createVNode(_component_el_icon, null, {
272
275
  default: vue.withCtx(() => [
273
- vue.renderSlot(_ctx.$slots, "filter-icon", {}, () => [
274
- _ctx.column.filterOpened ? (vue.openBlock(), vue.createBlock(_component_arrow_up, { key: 0 })) : (vue.openBlock(), vue.createBlock(_component_arrow_down, { key: 1 }))
275
- ])
276
+ vue.renderSlot(_ctx.$slots, "filter-icon", {}, () => {
277
+ var _a;
278
+ return [
279
+ ((_a = _ctx.column) == null ? void 0 : _a.filterOpened) ? (vue.openBlock(), vue.createBlock(_component_arrow_up, { key: 0 })) : (vue.openBlock(), vue.createBlock(_component_arrow_down, { key: 1 }))
280
+ ];
281
+ })
276
282
  ]),
277
283
  _: 3
278
284
  })