element-plus 2.2.27 → 2.2.28

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 (386) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +622 -539
  3. package/dist/index.full.min.js +14 -14
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +17 -17
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +621 -541
  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.js +1 -1
  13. package/dist/locale/ar.min.js +1 -1
  14. package/dist/locale/ar.min.mjs +1 -1
  15. package/dist/locale/ar.mjs +1 -1
  16. package/dist/locale/az.js +1 -1
  17. package/dist/locale/az.min.js +1 -1
  18. package/dist/locale/az.min.mjs +1 -1
  19. package/dist/locale/az.mjs +1 -1
  20. package/dist/locale/bg.js +1 -1
  21. package/dist/locale/bg.min.js +1 -1
  22. package/dist/locale/bg.min.mjs +1 -1
  23. package/dist/locale/bg.mjs +1 -1
  24. package/dist/locale/bn.js +1 -1
  25. package/dist/locale/bn.min.js +1 -1
  26. package/dist/locale/bn.min.mjs +1 -1
  27. package/dist/locale/bn.mjs +1 -1
  28. package/dist/locale/ca.js +1 -1
  29. package/dist/locale/ca.min.js +1 -1
  30. package/dist/locale/ca.min.mjs +1 -1
  31. package/dist/locale/ca.mjs +1 -1
  32. package/dist/locale/ckb.js +1 -1
  33. package/dist/locale/ckb.min.js +1 -1
  34. package/dist/locale/ckb.min.mjs +1 -1
  35. package/dist/locale/ckb.mjs +1 -1
  36. package/dist/locale/cs.js +1 -1
  37. package/dist/locale/cs.min.js +1 -1
  38. package/dist/locale/cs.min.mjs +1 -1
  39. package/dist/locale/cs.mjs +1 -1
  40. package/dist/locale/da.js +1 -1
  41. package/dist/locale/da.min.js +1 -1
  42. package/dist/locale/da.min.mjs +1 -1
  43. package/dist/locale/da.mjs +1 -1
  44. package/dist/locale/de.js +1 -1
  45. package/dist/locale/de.min.js +1 -1
  46. package/dist/locale/de.min.mjs +1 -1
  47. package/dist/locale/de.mjs +1 -1
  48. package/dist/locale/el.js +1 -1
  49. package/dist/locale/el.min.js +1 -1
  50. package/dist/locale/el.min.mjs +1 -1
  51. package/dist/locale/el.mjs +1 -1
  52. package/dist/locale/en.js +1 -1
  53. package/dist/locale/en.min.js +1 -1
  54. package/dist/locale/en.min.mjs +1 -1
  55. package/dist/locale/en.mjs +1 -1
  56. package/dist/locale/eo.js +1 -1
  57. package/dist/locale/eo.min.js +1 -1
  58. package/dist/locale/eo.min.mjs +1 -1
  59. package/dist/locale/eo.mjs +1 -1
  60. package/dist/locale/es.js +1 -1
  61. package/dist/locale/es.min.js +1 -1
  62. package/dist/locale/es.min.mjs +1 -1
  63. package/dist/locale/es.mjs +1 -1
  64. package/dist/locale/et.js +1 -1
  65. package/dist/locale/et.min.js +1 -1
  66. package/dist/locale/et.min.mjs +1 -1
  67. package/dist/locale/et.mjs +1 -1
  68. package/dist/locale/eu.js +1 -1
  69. package/dist/locale/eu.min.js +1 -1
  70. package/dist/locale/eu.min.mjs +1 -1
  71. package/dist/locale/eu.mjs +1 -1
  72. package/dist/locale/fa.js +1 -1
  73. package/dist/locale/fa.min.js +1 -1
  74. package/dist/locale/fa.min.mjs +1 -1
  75. package/dist/locale/fa.mjs +1 -1
  76. package/dist/locale/fi.js +1 -1
  77. package/dist/locale/fi.min.js +1 -1
  78. package/dist/locale/fi.min.mjs +1 -1
  79. package/dist/locale/fi.mjs +1 -1
  80. package/dist/locale/fr.js +1 -1
  81. package/dist/locale/fr.min.js +1 -1
  82. package/dist/locale/fr.min.mjs +1 -1
  83. package/dist/locale/fr.mjs +1 -1
  84. package/dist/locale/he.js +1 -1
  85. package/dist/locale/he.min.js +1 -1
  86. package/dist/locale/he.min.mjs +1 -1
  87. package/dist/locale/he.mjs +1 -1
  88. package/dist/locale/hr.js +1 -1
  89. package/dist/locale/hr.min.js +1 -1
  90. package/dist/locale/hr.min.mjs +1 -1
  91. package/dist/locale/hr.mjs +1 -1
  92. package/dist/locale/hu.js +1 -1
  93. package/dist/locale/hu.min.js +1 -1
  94. package/dist/locale/hu.min.mjs +1 -1
  95. package/dist/locale/hu.mjs +1 -1
  96. package/dist/locale/hy-am.js +1 -1
  97. package/dist/locale/hy-am.min.js +1 -1
  98. package/dist/locale/hy-am.min.mjs +1 -1
  99. package/dist/locale/hy-am.mjs +1 -1
  100. package/dist/locale/id.js +1 -1
  101. package/dist/locale/id.min.js +1 -1
  102. package/dist/locale/id.min.mjs +1 -1
  103. package/dist/locale/id.mjs +1 -1
  104. package/dist/locale/it.js +1 -1
  105. package/dist/locale/it.min.js +1 -1
  106. package/dist/locale/it.min.mjs +1 -1
  107. package/dist/locale/it.mjs +1 -1
  108. package/dist/locale/ja.js +1 -1
  109. package/dist/locale/ja.min.js +1 -1
  110. package/dist/locale/ja.min.mjs +1 -1
  111. package/dist/locale/ja.mjs +1 -1
  112. package/dist/locale/kk.js +1 -1
  113. package/dist/locale/kk.min.js +1 -1
  114. package/dist/locale/kk.min.mjs +1 -1
  115. package/dist/locale/kk.mjs +1 -1
  116. package/dist/locale/km.js +1 -1
  117. package/dist/locale/km.min.js +1 -1
  118. package/dist/locale/km.min.mjs +1 -1
  119. package/dist/locale/km.mjs +1 -1
  120. package/dist/locale/ko.js +1 -1
  121. package/dist/locale/ko.min.js +1 -1
  122. package/dist/locale/ko.min.mjs +1 -1
  123. package/dist/locale/ko.mjs +1 -1
  124. package/dist/locale/ku.js +1 -1
  125. package/dist/locale/ku.min.js +1 -1
  126. package/dist/locale/ku.min.mjs +1 -1
  127. package/dist/locale/ku.mjs +1 -1
  128. package/dist/locale/ky.js +1 -1
  129. package/dist/locale/ky.min.js +1 -1
  130. package/dist/locale/ky.min.mjs +1 -1
  131. package/dist/locale/ky.mjs +1 -1
  132. package/dist/locale/lt.js +1 -1
  133. package/dist/locale/lt.min.js +1 -1
  134. package/dist/locale/lt.min.mjs +1 -1
  135. package/dist/locale/lt.mjs +1 -1
  136. package/dist/locale/lv.js +1 -1
  137. package/dist/locale/lv.min.js +1 -1
  138. package/dist/locale/lv.min.mjs +1 -1
  139. package/dist/locale/lv.mjs +1 -1
  140. package/dist/locale/mg.js +1 -1
  141. package/dist/locale/mg.min.js +1 -1
  142. package/dist/locale/mg.min.mjs +1 -1
  143. package/dist/locale/mg.mjs +1 -1
  144. package/dist/locale/mn.js +1 -1
  145. package/dist/locale/mn.min.js +1 -1
  146. package/dist/locale/mn.min.mjs +1 -1
  147. package/dist/locale/mn.mjs +1 -1
  148. package/dist/locale/nb-no.js +1 -1
  149. package/dist/locale/nb-no.min.js +1 -1
  150. package/dist/locale/nb-no.min.mjs +1 -1
  151. package/dist/locale/nb-no.mjs +1 -1
  152. package/dist/locale/nl.js +1 -1
  153. package/dist/locale/nl.min.js +1 -1
  154. package/dist/locale/nl.min.mjs +1 -1
  155. package/dist/locale/nl.mjs +1 -1
  156. package/dist/locale/pa.js +1 -1
  157. package/dist/locale/pa.min.js +1 -1
  158. package/dist/locale/pa.min.mjs +1 -1
  159. package/dist/locale/pa.mjs +1 -1
  160. package/dist/locale/pl.js +1 -1
  161. package/dist/locale/pl.min.js +1 -1
  162. package/dist/locale/pl.min.mjs +1 -1
  163. package/dist/locale/pl.mjs +1 -1
  164. package/dist/locale/pt-br.js +1 -1
  165. package/dist/locale/pt-br.min.js +1 -1
  166. package/dist/locale/pt-br.min.mjs +1 -1
  167. package/dist/locale/pt-br.mjs +1 -1
  168. package/dist/locale/pt.js +1 -1
  169. package/dist/locale/pt.min.js +1 -1
  170. package/dist/locale/pt.min.mjs +1 -1
  171. package/dist/locale/pt.mjs +1 -1
  172. package/dist/locale/ro.js +1 -1
  173. package/dist/locale/ro.min.js +1 -1
  174. package/dist/locale/ro.min.mjs +1 -1
  175. package/dist/locale/ro.mjs +1 -1
  176. package/dist/locale/ru.js +1 -1
  177. package/dist/locale/ru.min.js +1 -1
  178. package/dist/locale/ru.min.mjs +1 -1
  179. package/dist/locale/ru.mjs +1 -1
  180. package/dist/locale/sk.js +1 -1
  181. package/dist/locale/sk.min.js +1 -1
  182. package/dist/locale/sk.min.mjs +1 -1
  183. package/dist/locale/sk.mjs +1 -1
  184. package/dist/locale/sl.js +1 -1
  185. package/dist/locale/sl.min.js +1 -1
  186. package/dist/locale/sl.min.mjs +1 -1
  187. package/dist/locale/sl.mjs +1 -1
  188. package/dist/locale/sr.js +1 -1
  189. package/dist/locale/sr.min.js +1 -1
  190. package/dist/locale/sr.min.mjs +1 -1
  191. package/dist/locale/sr.mjs +1 -1
  192. package/dist/locale/sv.js +1 -1
  193. package/dist/locale/sv.min.js +1 -1
  194. package/dist/locale/sv.min.mjs +1 -1
  195. package/dist/locale/sv.mjs +1 -1
  196. package/dist/locale/ta.js +1 -1
  197. package/dist/locale/ta.min.js +1 -1
  198. package/dist/locale/ta.min.mjs +1 -1
  199. package/dist/locale/ta.mjs +1 -1
  200. package/dist/locale/th.js +1 -1
  201. package/dist/locale/th.min.js +1 -1
  202. package/dist/locale/th.min.mjs +1 -1
  203. package/dist/locale/th.mjs +1 -1
  204. package/dist/locale/tk.js +1 -1
  205. package/dist/locale/tk.min.js +1 -1
  206. package/dist/locale/tk.min.mjs +1 -1
  207. package/dist/locale/tk.mjs +1 -1
  208. package/dist/locale/tr.js +1 -1
  209. package/dist/locale/tr.min.js +1 -1
  210. package/dist/locale/tr.min.mjs +1 -1
  211. package/dist/locale/tr.mjs +1 -1
  212. package/dist/locale/ug-cn.js +1 -1
  213. package/dist/locale/ug-cn.min.js +1 -1
  214. package/dist/locale/ug-cn.min.mjs +1 -1
  215. package/dist/locale/ug-cn.mjs +1 -1
  216. package/dist/locale/uk.js +1 -1
  217. package/dist/locale/uk.min.js +1 -1
  218. package/dist/locale/uk.min.mjs +1 -1
  219. package/dist/locale/uk.mjs +1 -1
  220. package/dist/locale/uz-uz.js +1 -1
  221. package/dist/locale/uz-uz.min.js +1 -1
  222. package/dist/locale/uz-uz.min.mjs +1 -1
  223. package/dist/locale/uz-uz.mjs +1 -1
  224. package/dist/locale/vi.js +1 -1
  225. package/dist/locale/vi.min.js +1 -1
  226. package/dist/locale/vi.min.mjs +1 -1
  227. package/dist/locale/vi.mjs +1 -1
  228. package/dist/locale/zh-cn.js +1 -1
  229. package/dist/locale/zh-cn.min.js +1 -1
  230. package/dist/locale/zh-cn.min.mjs +1 -1
  231. package/dist/locale/zh-cn.mjs +1 -1
  232. package/dist/locale/zh-tw.js +1 -1
  233. package/dist/locale/zh-tw.min.js +1 -1
  234. package/dist/locale/zh-tw.min.mjs +1 -1
  235. package/dist/locale/zh-tw.mjs +1 -1
  236. package/es/component.mjs +2 -1
  237. package/es/component.mjs.map +1 -1
  238. package/es/components/cascader/index.d.ts +12039 -2895
  239. package/es/components/cascader/index.mjs +3 -1
  240. package/es/components/cascader/index.mjs.map +1 -1
  241. package/es/components/cascader/src/cascader.d.ts +64 -0
  242. package/es/components/cascader/src/cascader.mjs +69 -0
  243. package/es/components/cascader/src/cascader.mjs.map +1 -0
  244. package/{lib/components/cascader/src/index.vue.d.ts → es/components/cascader/src/cascader.vue.d.ts} +5121 -550
  245. package/es/components/cascader/src/cascader2.mjs +611 -0
  246. package/es/components/cascader/src/cascader2.mjs.map +1 -0
  247. package/es/components/cascader/src/instances.d.ts +2 -0
  248. package/es/components/cascader/src/instances.mjs +2 -0
  249. package/es/components/cascader/src/instances.mjs.map +1 -0
  250. package/es/components/cascader-panel/index.d.ts +28 -32
  251. package/es/components/cascader-panel/src/config.d.ts +7 -9
  252. package/es/components/cascader-panel/src/config.mjs +9 -5
  253. package/es/components/cascader-panel/src/config.mjs.map +1 -1
  254. package/es/components/cascader-panel/src/index.vue.d.ts +14 -16
  255. package/es/components/index.mjs +1 -0
  256. package/es/components/index.mjs.map +1 -1
  257. package/es/components/input-number/index.d.ts +4 -4
  258. package/es/components/input-number/src/input-number.d.ts +1 -1
  259. package/es/components/input-number/src/input-number.mjs +1 -1
  260. package/es/components/input-number/src/input-number.mjs.map +1 -1
  261. package/es/components/input-number/src/input-number.vue.d.ts +4 -4
  262. package/es/components/pagination/src/components/sizes.vue.d.ts +1 -1
  263. package/es/components/select/index.d.ts +1 -1
  264. package/es/components/select/src/select.vue.d.ts +1 -1
  265. package/es/components/select-v2/index.d.ts +2 -2
  266. package/es/components/select-v2/src/select.vue.d.ts +1 -1
  267. package/es/components/slider/index.d.ts +4 -4
  268. package/es/components/slider/src/slider.vue.d.ts +4 -4
  269. package/es/components/table/index.d.ts +6 -12
  270. package/es/components/table/src/table/defaults.d.ts +3 -0
  271. package/es/components/table/src/table/defaults.mjs +1 -0
  272. package/es/components/table/src/table/defaults.mjs.map +1 -1
  273. package/es/components/table/src/table-body/defaults.d.ts +6 -1
  274. package/es/components/table/src/table-body/defaults.mjs +3 -0
  275. package/es/components/table/src/table-body/defaults.mjs.map +1 -1
  276. package/es/components/table/src/table-body/events-helper.d.ts +2 -1
  277. package/es/components/table/src/table-body/events-helper.mjs +5 -5
  278. package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
  279. package/es/components/table/src/table-body/index.d.ts +6 -0
  280. package/es/components/table/src/table-body/render-helper.mjs +6 -2
  281. package/es/components/table/src/table-body/render-helper.mjs.map +1 -1
  282. package/es/components/table/src/table-column/defaults.d.ts +3 -4
  283. package/es/components/table/src/table-column/defaults.mjs +1 -2
  284. package/es/components/table/src/table-column/defaults.mjs.map +1 -1
  285. package/es/components/table/src/table-column/index.d.ts +2 -6
  286. package/es/components/table/src/table-column/index.mjs +1 -1
  287. package/es/components/table/src/table-column/index.mjs.map +1 -1
  288. package/es/components/table/src/table.mjs +2 -1
  289. package/es/components/table/src/table.mjs.map +1 -1
  290. package/es/components/table/src/table.vue.d.ts +2 -0
  291. package/es/components/table/src/util.d.ts +3 -2
  292. package/es/components/table/src/util.mjs +58 -34
  293. package/es/components/table/src/util.mjs.map +1 -1
  294. package/es/components/time-picker/src/common/picker.vue.d.ts +2 -2
  295. package/es/components/time-select/index.d.ts +4 -4
  296. package/es/components/time-select/src/time-select.vue.d.ts +2 -2
  297. package/es/hooks/index.d.ts +1 -0
  298. package/es/hooks/index.mjs +1 -0
  299. package/es/hooks/index.mjs.map +1 -1
  300. package/es/hooks/use-popper/index.d.ts +20 -0
  301. package/es/hooks/use-popper/index.mjs +95 -0
  302. package/es/hooks/use-popper/index.mjs.map +1 -0
  303. package/es/index.mjs +2 -0
  304. package/es/index.mjs.map +1 -1
  305. package/es/version.d.ts +1 -1
  306. package/es/version.mjs +1 -1
  307. package/es/version.mjs.map +1 -1
  308. package/lib/component.js +1 -0
  309. package/lib/component.js.map +1 -1
  310. package/lib/components/cascader/index.d.ts +12039 -2895
  311. package/lib/components/cascader/index.js +8 -4
  312. package/lib/components/cascader/index.js.map +1 -1
  313. package/lib/components/cascader/src/cascader.d.ts +64 -0
  314. package/lib/components/cascader/src/cascader.js +74 -0
  315. package/lib/components/cascader/src/cascader.js.map +1 -0
  316. package/{es/components/cascader/src/index.vue.d.ts → lib/components/cascader/src/cascader.vue.d.ts} +5121 -550
  317. package/lib/components/cascader/src/cascader2.js +615 -0
  318. package/lib/components/cascader/src/cascader2.js.map +1 -0
  319. package/lib/components/cascader/src/instances.d.ts +2 -0
  320. package/lib/components/cascader/src/instances.js +3 -0
  321. package/lib/components/cascader/src/instances.js.map +1 -0
  322. package/lib/components/cascader-panel/index.d.ts +28 -32
  323. package/lib/components/cascader-panel/src/config.d.ts +7 -9
  324. package/lib/components/cascader-panel/src/config.js +9 -5
  325. package/lib/components/cascader-panel/src/config.js.map +1 -1
  326. package/lib/components/cascader-panel/src/index.vue.d.ts +14 -16
  327. package/lib/components/index.js +3 -0
  328. package/lib/components/index.js.map +1 -1
  329. package/lib/components/input-number/index.d.ts +4 -4
  330. package/lib/components/input-number/src/input-number.d.ts +1 -1
  331. package/lib/components/input-number/src/input-number.js +1 -1
  332. package/lib/components/input-number/src/input-number.js.map +1 -1
  333. package/lib/components/input-number/src/input-number.vue.d.ts +4 -4
  334. package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -1
  335. package/lib/components/select/index.d.ts +1 -1
  336. package/lib/components/select/src/select.vue.d.ts +1 -1
  337. package/lib/components/select-v2/index.d.ts +2 -2
  338. package/lib/components/select-v2/src/select.vue.d.ts +1 -1
  339. package/lib/components/slider/index.d.ts +4 -4
  340. package/lib/components/slider/src/slider.vue.d.ts +4 -4
  341. package/lib/components/table/index.d.ts +6 -12
  342. package/lib/components/table/src/table/defaults.d.ts +3 -0
  343. package/lib/components/table/src/table/defaults.js +1 -0
  344. package/lib/components/table/src/table/defaults.js.map +1 -1
  345. package/lib/components/table/src/table-body/defaults.d.ts +6 -1
  346. package/lib/components/table/src/table-body/defaults.js +3 -0
  347. package/lib/components/table/src/table-body/defaults.js.map +1 -1
  348. package/lib/components/table/src/table-body/events-helper.d.ts +2 -1
  349. package/lib/components/table/src/table-body/events-helper.js +5 -5
  350. package/lib/components/table/src/table-body/events-helper.js.map +1 -1
  351. package/lib/components/table/src/table-body/index.d.ts +6 -0
  352. package/lib/components/table/src/table-body/render-helper.js +6 -2
  353. package/lib/components/table/src/table-body/render-helper.js.map +1 -1
  354. package/lib/components/table/src/table-column/defaults.d.ts +3 -4
  355. package/lib/components/table/src/table-column/defaults.js +1 -2
  356. package/lib/components/table/src/table-column/defaults.js.map +1 -1
  357. package/lib/components/table/src/table-column/index.d.ts +2 -6
  358. package/lib/components/table/src/table-column/index.js +1 -1
  359. package/lib/components/table/src/table-column/index.js.map +1 -1
  360. package/lib/components/table/src/table.js +2 -1
  361. package/lib/components/table/src/table.js.map +1 -1
  362. package/lib/components/table/src/table.vue.d.ts +2 -0
  363. package/lib/components/table/src/util.d.ts +3 -2
  364. package/lib/components/table/src/util.js +59 -35
  365. package/lib/components/table/src/util.js.map +1 -1
  366. package/lib/components/time-picker/src/common/picker.vue.d.ts +2 -2
  367. package/lib/components/time-select/index.d.ts +4 -4
  368. package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
  369. package/lib/hooks/index.d.ts +1 -0
  370. package/lib/hooks/index.js +47 -45
  371. package/lib/hooks/index.js.map +1 -1
  372. package/lib/hooks/use-popper/index.d.ts +20 -0
  373. package/lib/hooks/use-popper/index.js +99 -0
  374. package/lib/hooks/use-popper/index.js.map +1 -0
  375. package/lib/index.js +50 -45
  376. package/lib/index.js.map +1 -1
  377. package/lib/version.d.ts +1 -1
  378. package/lib/version.js +1 -1
  379. package/lib/version.js.map +1 -1
  380. package/package.json +2 -2
  381. package/tags.json +1 -1
  382. package/web-types.json +1 -1
  383. package/es/components/cascader/src/index.mjs +0 -708
  384. package/es/components/cascader/src/index.mjs.map +0 -1
  385. package/lib/components/cascader/src/index.js +0 -712
  386. package/lib/components/cascader/src/index.js.map +0 -1
@@ -1,708 +0,0 @@
1
- import { defineComponent, ref, computed, nextTick, watch, onMounted, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, createVNode, withModifiers, Fragment, renderList, toDisplayString, createElementVNode, withKeys, vModelText, createCommentVNode, vShow, renderSlot } from 'vue';
2
- import { isPromise } from '@vue/shared';
3
- import { cloneDeep, debounce } from 'lodash-unified';
4
- import { isClient, useCssVar, useResizeObserver } from '@vueuse/core';
5
- import _CascaderPanel from '../../cascader-panel/index.mjs';
6
- import { ElInput } from '../../input/index.mjs';
7
- import { ElTooltip } from '../../tooltip/index.mjs';
8
- import { ElScrollbar } from '../../scrollbar/index.mjs';
9
- import { ElTag } from '../../tag/index.mjs';
10
- import { ElIcon } from '../../icon/index.mjs';
11
- import '../../../directives/index.mjs';
12
- import '../../../hooks/index.mjs';
13
- import '../../../utils/index.mjs';
14
- import '../../../constants/index.mjs';
15
- import { CircleClose, Check, ArrowDown } from '@element-plus/icons-vue';
16
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
17
- import ClickOutside from '../../../directives/click-outside/index.mjs';
18
- import { CommonProps } from '../../cascader-panel/src/config.mjs';
19
- import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
20
- import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
21
- import { tagProps } from '../../tag/src/tag.mjs';
22
- import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
23
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
24
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
25
- import { useFormItem } from '../../../hooks/use-form-item/index.mjs';
26
- import { useSize } from '../../../hooks/use-common-props/index.mjs';
27
- import { debugWarn } from '../../../utils/error.mjs';
28
- import { isKorean } from '../../../utils/i18n.mjs';
29
- import { EVENT_CODE } from '../../../constants/aria.mjs';
30
- import { focusNode, getSibling } from '../../../utils/dom/aria.mjs';
31
-
32
- const popperOptions = {
33
- modifiers: [
34
- {
35
- name: "arrowPosition",
36
- enabled: true,
37
- phase: "main",
38
- fn: ({ state }) => {
39
- const { modifiersData, placement } = state;
40
- if (["right", "left", "bottom", "top"].includes(placement))
41
- return;
42
- modifiersData.arrow.x = 35;
43
- },
44
- requires: ["arrow"]
45
- }
46
- ]
47
- };
48
- const COMPONENT_NAME = "ElCascader";
49
- const _sfc_main = defineComponent({
50
- name: COMPONENT_NAME,
51
- components: {
52
- ElCascaderPanel: _CascaderPanel,
53
- ElInput,
54
- ElTooltip,
55
- ElScrollbar,
56
- ElTag,
57
- ElIcon,
58
- CircleClose,
59
- Check,
60
- ArrowDown
61
- },
62
- directives: {
63
- Clickoutside: ClickOutside
64
- },
65
- props: {
66
- ...CommonProps,
67
- size: {
68
- type: String,
69
- validator: isValidComponentSize
70
- },
71
- placeholder: {
72
- type: String
73
- },
74
- disabled: Boolean,
75
- clearable: Boolean,
76
- filterable: Boolean,
77
- filterMethod: {
78
- type: Function,
79
- default: (node, keyword) => node.text.includes(keyword)
80
- },
81
- separator: {
82
- type: String,
83
- default: " / "
84
- },
85
- showAllLevels: {
86
- type: Boolean,
87
- default: true
88
- },
89
- collapseTags: Boolean,
90
- collapseTagsTooltip: {
91
- type: Boolean,
92
- default: false
93
- },
94
- debounce: {
95
- type: Number,
96
- default: 300
97
- },
98
- beforeFilter: {
99
- type: Function,
100
- default: () => true
101
- },
102
- popperClass: {
103
- type: String,
104
- default: ""
105
- },
106
- teleported: useTooltipContentProps.teleported,
107
- tagType: { ...tagProps.type, default: "info" },
108
- validateEvent: {
109
- type: Boolean,
110
- default: true
111
- }
112
- },
113
- emits: [
114
- UPDATE_MODEL_EVENT,
115
- CHANGE_EVENT,
116
- "focus",
117
- "blur",
118
- "visible-change",
119
- "expand-change",
120
- "remove-tag"
121
- ],
122
- setup(props, { emit }) {
123
- let inputInitialHeight = 0;
124
- let pressDeleteCount = 0;
125
- const nsCascader = useNamespace("cascader");
126
- const nsInput = useNamespace("input");
127
- const { t } = useLocale();
128
- const { form, formItem } = useFormItem();
129
- const tooltipRef = ref(null);
130
- const input = ref(null);
131
- const tagWrapper = ref(null);
132
- const panel = ref(null);
133
- const suggestionPanel = ref(null);
134
- const popperVisible = ref(false);
135
- const inputHover = ref(false);
136
- const filtering = ref(false);
137
- const inputValue = ref("");
138
- const searchInputValue = ref("");
139
- const presentTags = ref([]);
140
- const allPresentTags = ref([]);
141
- const suggestions = ref([]);
142
- const isOnComposition = ref(false);
143
- const isDisabled = computed(() => props.disabled || (form == null ? void 0 : form.disabled));
144
- const inputPlaceholder = computed(() => props.placeholder || t("el.cascader.placeholder"));
145
- const currentPlaceholder = computed(() => searchInputValue.value || presentTags.value.length > 0 ? "" : inputPlaceholder.value);
146
- const realSize = useSize();
147
- const tagSize = computed(() => ["small"].includes(realSize.value) ? "small" : "default");
148
- const multiple = computed(() => !!props.props.multiple);
149
- const readonly = computed(() => !props.filterable || multiple.value);
150
- const searchKeyword = computed(() => multiple.value ? searchInputValue.value : inputValue.value);
151
- const checkedNodes = computed(() => {
152
- var _a;
153
- return ((_a = panel.value) == null ? void 0 : _a.checkedNodes) || [];
154
- });
155
- const clearBtnVisible = computed(() => {
156
- if (!props.clearable || isDisabled.value || filtering.value || !inputHover.value)
157
- return false;
158
- return !!checkedNodes.value.length;
159
- });
160
- const presentText = computed(() => {
161
- const { showAllLevels, separator } = props;
162
- const nodes = checkedNodes.value;
163
- return nodes.length ? multiple.value ? "" : nodes[0].calcText(showAllLevels, separator) : "";
164
- });
165
- const checkedValue = computed({
166
- get() {
167
- return cloneDeep(props.modelValue);
168
- },
169
- set(val) {
170
- emit(UPDATE_MODEL_EVENT, val);
171
- emit(CHANGE_EVENT, val);
172
- if (props.validateEvent) {
173
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
174
- }
175
- }
176
- });
177
- const popperPaneRef = computed(() => {
178
- var _a, _b;
179
- return (_b = (_a = tooltipRef.value) == null ? void 0 : _a.popperRef) == null ? void 0 : _b.contentRef;
180
- });
181
- const togglePopperVisible = (visible) => {
182
- var _a, _b, _c;
183
- if (isDisabled.value)
184
- return;
185
- visible = visible != null ? visible : !popperVisible.value;
186
- if (visible !== popperVisible.value) {
187
- popperVisible.value = visible;
188
- (_b = (_a = input.value) == null ? void 0 : _a.input) == null ? void 0 : _b.setAttribute("aria-expanded", `${visible}`);
189
- if (visible) {
190
- updatePopperPosition();
191
- nextTick((_c = panel.value) == null ? void 0 : _c.scrollToExpandingNode);
192
- } else if (props.filterable) {
193
- syncPresentTextValue();
194
- }
195
- emit("visible-change", visible);
196
- }
197
- };
198
- const updatePopperPosition = () => {
199
- nextTick(() => {
200
- var _a;
201
- (_a = tooltipRef.value) == null ? void 0 : _a.updatePopper();
202
- });
203
- };
204
- const hideSuggestionPanel = () => {
205
- filtering.value = false;
206
- };
207
- const genTag = (node) => {
208
- const { showAllLevels, separator } = props;
209
- return {
210
- node,
211
- key: node.uid,
212
- text: node.calcText(showAllLevels, separator),
213
- hitState: false,
214
- closable: !isDisabled.value && !node.isDisabled,
215
- isCollapseTag: false
216
- };
217
- };
218
- const deleteTag = (tag) => {
219
- var _a;
220
- const node = tag.node;
221
- node.doCheck(false);
222
- (_a = panel.value) == null ? void 0 : _a.calculateCheckedValue();
223
- emit("remove-tag", node.valueByOption);
224
- };
225
- const calculatePresentTags = () => {
226
- if (!multiple.value)
227
- return;
228
- const nodes = checkedNodes.value;
229
- const tags = [];
230
- const allTags = [];
231
- nodes.forEach((node) => allTags.push(genTag(node)));
232
- allPresentTags.value = allTags;
233
- if (nodes.length) {
234
- const [first, ...rest] = nodes;
235
- const restCount = rest.length;
236
- tags.push(genTag(first));
237
- if (restCount) {
238
- if (props.collapseTags) {
239
- tags.push({
240
- key: -1,
241
- text: `+ ${restCount}`,
242
- closable: false,
243
- isCollapseTag: true
244
- });
245
- } else {
246
- rest.forEach((node) => tags.push(genTag(node)));
247
- }
248
- }
249
- }
250
- presentTags.value = tags;
251
- };
252
- const calculateSuggestions = () => {
253
- var _a, _b;
254
- const { filterMethod, showAllLevels, separator } = props;
255
- const res = (_b = (_a = panel.value) == null ? void 0 : _a.getFlattedNodes(!props.props.checkStrictly)) == null ? void 0 : _b.filter((node) => {
256
- if (node.isDisabled)
257
- return false;
258
- node.calcText(showAllLevels, separator);
259
- return filterMethod(node, searchKeyword.value);
260
- });
261
- if (multiple.value) {
262
- presentTags.value.forEach((tag) => {
263
- tag.hitState = false;
264
- });
265
- allPresentTags.value.forEach((tag) => {
266
- tag.hitState = false;
267
- });
268
- }
269
- filtering.value = true;
270
- suggestions.value = res;
271
- updatePopperPosition();
272
- };
273
- const focusFirstNode = () => {
274
- var _a;
275
- let firstNode;
276
- if (filtering.value && suggestionPanel.value) {
277
- firstNode = suggestionPanel.value.$el.querySelector(`.${nsCascader.e("suggestion-item")}`);
278
- } else {
279
- firstNode = (_a = panel.value) == null ? void 0 : _a.$el.querySelector(`.${nsCascader.b("node")}[tabindex="-1"]`);
280
- }
281
- if (firstNode) {
282
- firstNode.focus();
283
- !filtering.value && firstNode.click();
284
- }
285
- };
286
- const updateStyle = () => {
287
- var _a, _b;
288
- const inputInner = (_a = input.value) == null ? void 0 : _a.input;
289
- const tagWrapperEl = tagWrapper.value;
290
- const suggestionPanelEl = (_b = suggestionPanel.value) == null ? void 0 : _b.$el;
291
- if (!isClient || !inputInner)
292
- return;
293
- if (suggestionPanelEl) {
294
- const suggestionList = suggestionPanelEl.querySelector(`.${nsCascader.e("suggestion-list")}`);
295
- suggestionList.style.minWidth = `${inputInner.offsetWidth}px`;
296
- }
297
- if (tagWrapperEl) {
298
- const { offsetHeight } = tagWrapperEl;
299
- const height = presentTags.value.length > 0 ? `${Math.max(offsetHeight + 6, inputInitialHeight)}px` : `${inputInitialHeight}px`;
300
- inputInner.style.height = height;
301
- updatePopperPosition();
302
- }
303
- };
304
- const getCheckedNodes = (leafOnly) => {
305
- var _a;
306
- return (_a = panel.value) == null ? void 0 : _a.getCheckedNodes(leafOnly);
307
- };
308
- const handleExpandChange = (value) => {
309
- updatePopperPosition();
310
- emit("expand-change", value);
311
- };
312
- const handleComposition = (event) => {
313
- var _a;
314
- const text = (_a = event.target) == null ? void 0 : _a.value;
315
- if (event.type === "compositionend") {
316
- isOnComposition.value = false;
317
- nextTick(() => handleInput(text));
318
- } else {
319
- const lastCharacter = text[text.length - 1] || "";
320
- isOnComposition.value = !isKorean(lastCharacter);
321
- }
322
- };
323
- const handleKeyDown = (e) => {
324
- if (isOnComposition.value)
325
- return;
326
- switch (e.code) {
327
- case EVENT_CODE.enter:
328
- togglePopperVisible();
329
- break;
330
- case EVENT_CODE.down:
331
- togglePopperVisible(true);
332
- nextTick(focusFirstNode);
333
- e.preventDefault();
334
- break;
335
- case EVENT_CODE.esc:
336
- if (popperVisible.value === true) {
337
- e.preventDefault();
338
- e.stopPropagation();
339
- togglePopperVisible(false);
340
- }
341
- break;
342
- case EVENT_CODE.tab:
343
- togglePopperVisible(false);
344
- break;
345
- }
346
- };
347
- const handleClear = () => {
348
- var _a;
349
- (_a = panel.value) == null ? void 0 : _a.clearCheckedNodes();
350
- if (!popperVisible.value && props.filterable) {
351
- syncPresentTextValue();
352
- }
353
- togglePopperVisible(false);
354
- };
355
- const syncPresentTextValue = () => {
356
- const { value } = presentText;
357
- inputValue.value = value;
358
- searchInputValue.value = value;
359
- };
360
- const handleSuggestionClick = (node) => {
361
- var _a, _b;
362
- const { checked } = node;
363
- if (multiple.value) {
364
- (_a = panel.value) == null ? void 0 : _a.handleCheckChange(node, !checked, false);
365
- } else {
366
- !checked && ((_b = panel.value) == null ? void 0 : _b.handleCheckChange(node, true, false));
367
- togglePopperVisible(false);
368
- }
369
- };
370
- const handleSuggestionKeyDown = (e) => {
371
- const target = e.target;
372
- const { code } = e;
373
- switch (code) {
374
- case EVENT_CODE.up:
375
- case EVENT_CODE.down: {
376
- const distance = code === EVENT_CODE.up ? -1 : 1;
377
- focusNode(getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
378
- break;
379
- }
380
- case EVENT_CODE.enter:
381
- target.click();
382
- break;
383
- }
384
- };
385
- const handleDelete = () => {
386
- const tags = presentTags.value;
387
- const lastTag = tags[tags.length - 1];
388
- pressDeleteCount = searchInputValue.value ? 0 : pressDeleteCount + 1;
389
- if (!lastTag || !pressDeleteCount || props.collapseTags && tags.length > 1)
390
- return;
391
- if (lastTag.hitState) {
392
- deleteTag(lastTag);
393
- } else {
394
- lastTag.hitState = true;
395
- }
396
- };
397
- const handleFilter = debounce(() => {
398
- const { value } = searchKeyword;
399
- if (!value)
400
- return;
401
- const passed = props.beforeFilter(value);
402
- if (isPromise(passed)) {
403
- passed.then(calculateSuggestions).catch(() => {
404
- });
405
- } else if (passed !== false) {
406
- calculateSuggestions();
407
- } else {
408
- hideSuggestionPanel();
409
- }
410
- }, props.debounce);
411
- const handleInput = (val, e) => {
412
- !popperVisible.value && togglePopperVisible(true);
413
- if (e == null ? void 0 : e.isComposing)
414
- return;
415
- val ? handleFilter() : hideSuggestionPanel();
416
- };
417
- watch(filtering, updatePopperPosition);
418
- watch([checkedNodes, isDisabled], calculatePresentTags);
419
- watch(presentTags, () => {
420
- nextTick(() => updateStyle());
421
- });
422
- watch(presentText, syncPresentTextValue, { immediate: true });
423
- onMounted(() => {
424
- const inputInner = input.value.input;
425
- const inputInnerHeight = Number.parseFloat(useCssVar(nsInput.cssVarName("input-height"), inputInner).value) - 2;
426
- inputInitialHeight = inputInner.offsetHeight || inputInnerHeight;
427
- useResizeObserver(inputInner, updateStyle);
428
- });
429
- return {
430
- popperOptions,
431
- tooltipRef,
432
- popperPaneRef,
433
- input,
434
- tagWrapper,
435
- panel,
436
- suggestionPanel,
437
- popperVisible,
438
- inputHover,
439
- inputPlaceholder,
440
- currentPlaceholder,
441
- filtering,
442
- presentText,
443
- checkedValue,
444
- inputValue,
445
- searchInputValue,
446
- presentTags,
447
- allPresentTags,
448
- suggestions,
449
- isDisabled,
450
- isOnComposition,
451
- realSize,
452
- tagSize,
453
- multiple,
454
- readonly,
455
- clearBtnVisible,
456
- nsCascader,
457
- nsInput,
458
- t,
459
- togglePopperVisible,
460
- hideSuggestionPanel,
461
- deleteTag,
462
- focusFirstNode,
463
- getCheckedNodes,
464
- handleExpandChange,
465
- handleKeyDown,
466
- handleComposition,
467
- handleClear,
468
- handleSuggestionClick,
469
- handleSuggestionKeyDown,
470
- handleDelete,
471
- handleInput
472
- };
473
- }
474
- });
475
- const _hoisted_1 = { key: 0 };
476
- const _hoisted_2 = ["placeholder"];
477
- const _hoisted_3 = ["onClick"];
478
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
479
- const _component_circle_close = resolveComponent("circle-close");
480
- const _component_el_icon = resolveComponent("el-icon");
481
- const _component_arrow_down = resolveComponent("arrow-down");
482
- const _component_el_input = resolveComponent("el-input");
483
- const _component_el_tag = resolveComponent("el-tag");
484
- const _component_el_tooltip = resolveComponent("el-tooltip");
485
- const _component_el_cascader_panel = resolveComponent("el-cascader-panel");
486
- const _component_check = resolveComponent("check");
487
- const _component_el_scrollbar = resolveComponent("el-scrollbar");
488
- const _directive_clickoutside = resolveDirective("clickoutside");
489
- return openBlock(), createBlock(_component_el_tooltip, {
490
- ref: "tooltipRef",
491
- visible: _ctx.popperVisible,
492
- teleported: _ctx.teleported,
493
- "popper-class": [_ctx.nsCascader.e("dropdown"), _ctx.popperClass],
494
- "popper-options": _ctx.popperOptions,
495
- "fallback-placements": [
496
- "bottom-start",
497
- "bottom",
498
- "top-start",
499
- "top",
500
- "right",
501
- "left"
502
- ],
503
- "stop-popper-mouse-event": false,
504
- "gpu-acceleration": false,
505
- placement: "bottom-start",
506
- transition: `${_ctx.nsCascader.namespace.value}-zoom-in-top`,
507
- effect: "light",
508
- pure: "",
509
- persistent: "",
510
- onHide: _ctx.hideSuggestionPanel
511
- }, {
512
- default: withCtx(() => [
513
- withDirectives((openBlock(), createElementBlock("div", {
514
- class: normalizeClass([
515
- _ctx.nsCascader.b(),
516
- _ctx.nsCascader.m(_ctx.realSize),
517
- _ctx.nsCascader.is("disabled", _ctx.isDisabled),
518
- _ctx.$attrs.class
519
- ]),
520
- style: normalizeStyle(_ctx.$attrs.style),
521
- onClick: _cache[11] || (_cache[11] = () => _ctx.togglePopperVisible(_ctx.readonly ? void 0 : true)),
522
- onKeydown: _cache[12] || (_cache[12] = (...args) => _ctx.handleKeyDown && _ctx.handleKeyDown(...args)),
523
- onMouseenter: _cache[13] || (_cache[13] = ($event) => _ctx.inputHover = true),
524
- onMouseleave: _cache[14] || (_cache[14] = ($event) => _ctx.inputHover = false)
525
- }, [
526
- createVNode(_component_el_input, {
527
- ref: "input",
528
- modelValue: _ctx.inputValue,
529
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.inputValue = $event),
530
- placeholder: _ctx.currentPlaceholder,
531
- readonly: _ctx.readonly,
532
- disabled: _ctx.isDisabled,
533
- "validate-event": false,
534
- size: _ctx.realSize,
535
- class: normalizeClass(_ctx.nsCascader.is("focus", _ctx.popperVisible)),
536
- onCompositionstart: _ctx.handleComposition,
537
- onCompositionupdate: _ctx.handleComposition,
538
- onCompositionend: _ctx.handleComposition,
539
- onFocus: _cache[2] || (_cache[2] = (e) => _ctx.$emit("focus", e)),
540
- onBlur: _cache[3] || (_cache[3] = (e) => _ctx.$emit("blur", e)),
541
- onInput: _ctx.handleInput
542
- }, {
543
- suffix: withCtx(() => [
544
- _ctx.clearBtnVisible ? (openBlock(), createBlock(_component_el_icon, {
545
- key: "clear",
546
- class: normalizeClass([_ctx.nsInput.e("icon"), "icon-circle-close"]),
547
- onClick: withModifiers(_ctx.handleClear, ["stop"])
548
- }, {
549
- default: withCtx(() => [
550
- createVNode(_component_circle_close)
551
- ]),
552
- _: 1
553
- }, 8, ["class", "onClick"])) : (openBlock(), createBlock(_component_el_icon, {
554
- key: "arrow-down",
555
- class: normalizeClass([
556
- _ctx.nsInput.e("icon"),
557
- "icon-arrow-down",
558
- _ctx.nsCascader.is("reverse", _ctx.popperVisible)
559
- ]),
560
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.togglePopperVisible(), ["stop"]))
561
- }, {
562
- default: withCtx(() => [
563
- createVNode(_component_arrow_down)
564
- ]),
565
- _: 1
566
- }, 8, ["class"]))
567
- ]),
568
- _: 1
569
- }, 8, ["modelValue", "placeholder", "readonly", "disabled", "size", "class", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput"]),
570
- _ctx.multiple ? (openBlock(), createElementBlock("div", {
571
- key: 0,
572
- ref: "tagWrapper",
573
- class: normalizeClass(_ctx.nsCascader.e("tags"))
574
- }, [
575
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.presentTags, (tag) => {
576
- return openBlock(), createBlock(_component_el_tag, {
577
- key: tag.key,
578
- type: _ctx.tagType,
579
- size: _ctx.tagSize,
580
- hit: tag.hitState,
581
- closable: tag.closable,
582
- "disable-transitions": "",
583
- onClose: ($event) => _ctx.deleteTag(tag)
584
- }, {
585
- default: withCtx(() => [
586
- tag.isCollapseTag === false ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(tag.text), 1)) : (openBlock(), createBlock(_component_el_tooltip, {
587
- key: 1,
588
- disabled: _ctx.popperVisible || !_ctx.collapseTagsTooltip,
589
- "fallback-placements": ["bottom", "top", "right", "left"],
590
- placement: "bottom",
591
- effect: "light"
592
- }, {
593
- default: withCtx(() => [
594
- createElementVNode("span", null, toDisplayString(tag.text), 1)
595
- ]),
596
- content: withCtx(() => [
597
- createElementVNode("div", {
598
- class: normalizeClass(_ctx.nsCascader.e("collapse-tags"))
599
- }, [
600
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.allPresentTags.slice(1), (tag2, idx) => {
601
- return openBlock(), createElementBlock("div", {
602
- key: idx,
603
- class: normalizeClass(_ctx.nsCascader.e("collapse-tag"))
604
- }, [
605
- (openBlock(), createBlock(_component_el_tag, {
606
- key: tag2.key,
607
- class: "in-tooltip",
608
- type: _ctx.tagType,
609
- size: _ctx.tagSize,
610
- hit: tag2.hitState,
611
- closable: tag2.closable,
612
- "disable-transitions": "",
613
- onClose: ($event) => _ctx.deleteTag(tag2)
614
- }, {
615
- default: withCtx(() => [
616
- createElementVNode("span", null, toDisplayString(tag2.text), 1)
617
- ]),
618
- _: 2
619
- }, 1032, ["type", "size", "hit", "closable", "onClose"]))
620
- ], 2);
621
- }), 128))
622
- ], 2)
623
- ]),
624
- _: 2
625
- }, 1032, ["disabled"]))
626
- ]),
627
- _: 2
628
- }, 1032, ["type", "size", "hit", "closable", "onClose"]);
629
- }), 128)),
630
- _ctx.filterable && !_ctx.isDisabled ? withDirectives((openBlock(), createElementBlock("input", {
631
- key: 0,
632
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.searchInputValue = $event),
633
- type: "text",
634
- class: normalizeClass(_ctx.nsCascader.e("search-input")),
635
- placeholder: _ctx.presentText ? "" : _ctx.inputPlaceholder,
636
- onInput: _cache[5] || (_cache[5] = (e) => _ctx.handleInput(_ctx.searchInputValue, e)),
637
- onClick: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.togglePopperVisible(true), ["stop"])),
638
- onKeydown: _cache[7] || (_cache[7] = withKeys((...args) => _ctx.handleDelete && _ctx.handleDelete(...args), ["delete"])),
639
- onCompositionstart: _cache[8] || (_cache[8] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
640
- onCompositionupdate: _cache[9] || (_cache[9] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args)),
641
- onCompositionend: _cache[10] || (_cache[10] = (...args) => _ctx.handleComposition && _ctx.handleComposition(...args))
642
- }, null, 42, _hoisted_2)), [
643
- [vModelText, _ctx.searchInputValue]
644
- ]) : createCommentVNode("v-if", true)
645
- ], 2)) : createCommentVNode("v-if", true)
646
- ], 38)), [
647
- [_directive_clickoutside, () => _ctx.togglePopperVisible(false), _ctx.popperPaneRef]
648
- ])
649
- ]),
650
- content: withCtx(() => [
651
- withDirectives(createVNode(_component_el_cascader_panel, {
652
- ref: "panel",
653
- modelValue: _ctx.checkedValue,
654
- "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => _ctx.checkedValue = $event),
655
- options: _ctx.options,
656
- props: _ctx.props,
657
- border: false,
658
- "render-label": _ctx.$slots.default,
659
- onExpandChange: _ctx.handleExpandChange,
660
- onClose: _cache[16] || (_cache[16] = ($event) => _ctx.$nextTick(() => _ctx.togglePopperVisible(false)))
661
- }, null, 8, ["modelValue", "options", "props", "render-label", "onExpandChange"]), [
662
- [vShow, !_ctx.filtering]
663
- ]),
664
- _ctx.filterable ? withDirectives((openBlock(), createBlock(_component_el_scrollbar, {
665
- key: 0,
666
- ref: "suggestionPanel",
667
- tag: "ul",
668
- class: normalizeClass(_ctx.nsCascader.e("suggestion-panel")),
669
- "view-class": _ctx.nsCascader.e("suggestion-list"),
670
- onKeydown: _ctx.handleSuggestionKeyDown
671
- }, {
672
- default: withCtx(() => [
673
- _ctx.suggestions.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.suggestions, (item) => {
674
- return openBlock(), createElementBlock("li", {
675
- key: item.uid,
676
- class: normalizeClass([
677
- _ctx.nsCascader.e("suggestion-item"),
678
- _ctx.nsCascader.is("checked", item.checked)
679
- ]),
680
- tabindex: -1,
681
- onClick: ($event) => _ctx.handleSuggestionClick(item)
682
- }, [
683
- createElementVNode("span", null, toDisplayString(item.text), 1),
684
- item.checked ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
685
- default: withCtx(() => [
686
- createVNode(_component_check)
687
- ]),
688
- _: 1
689
- })) : createCommentVNode("v-if", true)
690
- ], 10, _hoisted_3);
691
- }), 128)) : renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
692
- createElementVNode("li", {
693
- class: normalizeClass(_ctx.nsCascader.e("empty-text"))
694
- }, toDisplayString(_ctx.t("el.cascader.noMatch")), 3)
695
- ])
696
- ]),
697
- _: 3
698
- }, 8, ["class", "view-class", "onKeydown"])), [
699
- [vShow, _ctx.filtering]
700
- ]) : createCommentVNode("v-if", true)
701
- ]),
702
- _: 3
703
- }, 8, ["visible", "teleported", "popper-class", "popper-options", "transition", "onHide"]);
704
- }
705
- var Cascader = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/cascader/src/index.vue"]]);
706
-
707
- export { Cascader as default };
708
- //# sourceMappingURL=index.mjs.map