@element-plus/nightly 0.0.20230216 → 0.0.20230218

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 (276) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.full.js +44 -7
  3. package/dist/index.full.min.js +12 -12
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +15 -15
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +44 -7
  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/components/cascader/index.d.ts +4 -0
  237. package/es/components/cascader/src/cascader.mjs.map +1 -1
  238. package/es/components/cascader/src/cascader.vue.d.ts +2 -0
  239. package/es/components/cascader/src/cascader2.mjs +16 -3
  240. package/es/components/cascader/src/cascader2.mjs.map +1 -1
  241. package/es/components/cascader-panel/src/config.mjs.map +1 -1
  242. package/es/components/cascader-panel/src/index.mjs.map +1 -1
  243. package/es/components/cascader-panel/src/index.vue.d.ts +6 -0
  244. package/es/components/cascader-panel/src/node.d.ts +15 -0
  245. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  246. package/es/components/dropdown/src/dropdown2.mjs +26 -1
  247. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  248. package/es/components/focus-trap/src/focus-trap.mjs +1 -1
  249. package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
  250. package/es/components/table/src/table-layout.mjs +1 -1
  251. package/es/components/table/src/table-layout.mjs.map +1 -1
  252. package/es/version.d.ts +1 -1
  253. package/es/version.mjs +1 -1
  254. package/es/version.mjs.map +1 -1
  255. package/lib/components/cascader/index.d.ts +4 -0
  256. package/lib/components/cascader/src/cascader.js.map +1 -1
  257. package/lib/components/cascader/src/cascader.vue.d.ts +2 -0
  258. package/lib/components/cascader/src/cascader2.js +16 -3
  259. package/lib/components/cascader/src/cascader2.js.map +1 -1
  260. package/lib/components/cascader-panel/src/config.js.map +1 -1
  261. package/lib/components/cascader-panel/src/index.js.map +1 -1
  262. package/lib/components/cascader-panel/src/index.vue.d.ts +6 -0
  263. package/lib/components/cascader-panel/src/node.d.ts +15 -0
  264. package/lib/components/cascader-panel/src/node.js.map +1 -1
  265. package/lib/components/dropdown/src/dropdown2.js +25 -0
  266. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  267. package/lib/components/focus-trap/src/focus-trap.js +1 -1
  268. package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
  269. package/lib/components/table/src/table-layout.js +1 -1
  270. package/lib/components/table/src/table-layout.js.map +1 -1
  271. package/lib/version.d.ts +1 -1
  272. package/lib/version.js +1 -1
  273. package/lib/version.js.map +1 -1
  274. package/package.json +2 -2
  275. package/tags.json +1 -1
  276. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown2.js","sources":["../../../../../../packages/components/dropdown/src/dropdown.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is('disabled', disabled)]\">\n <el-tooltip\n ref=\"popperRef\"\n :role=\"role\"\n :effect=\"effect\"\n :fallback-placements=\"['bottom', 'top']\"\n :popper-options=\"popperOptions\"\n :gpu-acceleration=\"false\"\n :hide-after=\"trigger === 'hover' ? hideTimeout : 0\"\n :manual-mode=\"true\"\n :placement=\"placement\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :reference-element=\"referenceElementRef?.$el\"\n :trigger=\"trigger\"\n :trigger-keys=\"triggerKeys\"\n :trigger-target-el=\"contentRef\"\n :show-after=\"trigger === 'hover' ? showTimeout : 0\"\n :stop-popper-mouse-event=\"false\"\n :virtual-ref=\"triggeringElementRef\"\n :virtual-triggering=\"splitButton\"\n :disabled=\"disabled\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :teleported=\"teleported\"\n pure\n persistent\n @before-show=\"handleBeforeShowTooltip\"\n @show=\"handleShowTooltip\"\n @before-hide=\"handleBeforeHideTooltip\"\n >\n <template #content>\n <el-scrollbar\n ref=\"scrollbar\"\n :wrap-style=\"wrapStyle\"\n tag=\"div\"\n :view-class=\"ns.e('list')\"\n >\n <el-roving-focus-group\n :loop=\"loop\"\n :current-tab-id=\"currentTabId\"\n orientation=\"horizontal\"\n @current-tab-id-change=\"handleCurrentTabIdChange\"\n @entry-focus=\"handleEntryFocus\"\n >\n <el-dropdown-collection>\n <slot name=\"dropdown\" />\n </el-dropdown-collection>\n </el-roving-focus-group>\n </el-scrollbar>\n </template>\n <template v-if=\"!splitButton\" #default>\n <el-only-child :id=\"triggerId\" role=\"button\" :tabindex=\"tabindex\">\n <slot name=\"default\" />\n </el-only-child>\n </template>\n </el-tooltip>\n <template v-if=\"splitButton\">\n <el-button-group>\n <el-button\n ref=\"referenceElementRef\"\n v-bind=\"buttonProps\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n @click=\"handlerMainButtonClick\"\n >\n <slot name=\"default\" />\n </el-button>\n <el-button\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n v-bind=\"buttonProps\"\n role=\"button\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :class=\"ns.e('caret-button')\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.dropdown.toggleDropdown')\"\n >\n <el-icon :class=\"ns.e('icon')\"><arrow-down /></el-icon>\n </el-button>\n </el-button-group>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n provide,\n ref,\n toRef,\n unref,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport ElRovingFocusGroup from '@element-plus/components/roving-focus-group'\nimport { ElOnlyChild } from '@element-plus/components/slot'\nimport { addUnit } from '@element-plus/utils'\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useId, useLocale, useNamespace, useSize } from '@element-plus/hooks'\nimport { ElCollection as ElDropdownCollection, dropdownProps } from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nimport type { CSSProperties } from 'vue'\n\nconst { ButtonGroup: ElButtonGroup } = ElButton\n\nexport default defineComponent({\n name: 'ElDropdown',\n components: {\n ElButton,\n ElButtonGroup,\n ElScrollbar,\n ElDropdownCollection,\n ElTooltip,\n ElRovingFocusGroup,\n ElOnlyChild,\n ElIcon,\n ArrowDown,\n },\n props: dropdownProps,\n emits: ['visible-change', 'click', 'command'],\n setup(props, { emit }) {\n const _instance = getCurrentInstance()\n const ns = useNamespace('dropdown')\n const { t } = useLocale()\n\n const triggeringElementRef = ref()\n const referenceElementRef = ref()\n const popperRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const contentRef = ref<HTMLElement | null>(null)\n const scrollbar = ref(null)\n const currentTabId = ref<string | null>(null)\n const isUsingKeyboard = ref(false)\n const triggerKeys = [EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.down]\n\n const wrapStyle = computed<CSSProperties>(() => ({\n maxHeight: addUnit(props.maxHeight),\n }))\n const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)])\n\n const defaultTriggerId = useId().value\n const triggerId = computed<string>(() => {\n return props.id || defaultTriggerId\n })\n\n function handleClick() {\n handleClose()\n }\n\n function handleClose() {\n popperRef.value?.onClose()\n }\n\n function handleOpen() {\n popperRef.value?.onOpen()\n }\n\n const dropdownSize = useSize()\n\n function commandHandler(...args: any[]) {\n emit('command', ...args)\n }\n\n function onItemEnter() {\n // NOOP for now\n }\n\n function onItemLeave() {\n const contentEl = unref(contentRef)\n\n contentEl?.focus()\n currentTabId.value = null\n }\n\n function handleCurrentTabIdChange(id: string) {\n currentTabId.value = id\n }\n\n function handleEntryFocus(e: Event) {\n if (!isUsingKeyboard.value) {\n e.preventDefault()\n e.stopImmediatePropagation()\n }\n }\n\n function handleBeforeShowTooltip() {\n emit('visible-change', true)\n }\n\n function handleShowTooltip(event?: Event) {\n if (event?.type === 'keydown') {\n contentRef.value.focus()\n }\n }\n\n function handleBeforeHideTooltip() {\n emit('visible-change', false)\n }\n\n provide(DROPDOWN_INJECTION_KEY, {\n contentRef,\n role: computed(() => props.role),\n triggerId,\n isUsingKeyboard,\n onItemEnter,\n onItemLeave,\n })\n\n provide('elDropdown', {\n instance: _instance,\n dropdownSize,\n handleClick,\n commandHandler,\n trigger: toRef(props, 'trigger'),\n hideOnClick: toRef(props, 'hideOnClick'),\n })\n\n const onFocusAfterTrapped = (e: Event) => {\n e.preventDefault()\n contentRef.value?.focus?.({\n preventScroll: true,\n })\n }\n\n const handlerMainButtonClick = (event: MouseEvent) => {\n emit('click', event)\n }\n\n return {\n t,\n ns,\n scrollbar,\n wrapStyle,\n dropdownTriggerKls,\n dropdownSize,\n triggerId,\n triggerKeys,\n currentTabId,\n handleCurrentTabIdChange,\n handlerMainButtonClick,\n handleEntryFocus,\n handleClose,\n handleOpen,\n handleBeforeShowTooltip,\n handleShowTooltip,\n handleBeforeHideTooltip,\n onFocusAfterTrapped,\n popperRef,\n contentRef,\n triggeringElementRef,\n referenceElementRef,\n }\n },\n})\n</script>\n"],"names":["ElButton","defineComponent","ElScrollbar","ElDropdownCollection","ElTooltip","ElRovingFocusGroup","ElOnlyChild","ElIcon","ArrowDown","dropdownProps","getCurrentInstance","useNamespace","useLocale","ref","EVENT_CODE","computed","addUnit","useId","useSize","unref","provide","DROPDOWN_INJECTION_KEY","toRef","_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_createVNode","_createSlots","_withCtx","_createBlock","_mergeProps","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,MAAM,EAAE,aAAa,aAAk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UAAA,KAAA,EAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,cAAA,CAAA;iCAEyC;AAAA,UAAA,QAAA,EAAA,IAAA,CAAA,QAAA;AAAA,UAA7C,YAAO,EAAA,IAAA,CAAA,CAAA,CAAA,4BAAI,CAAA;AAAA,SAAA,CAAA,EAAA;qCAAwB;AAAA,YAAAJ,eAAA,CAAA,kBAAA,EAAA;AAAA,cAAA,KAAA,EAAAD,kBAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dropdown2.js","sources":["../../../../../../packages/components/dropdown/src/dropdown.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is('disabled', disabled)]\">\n <el-tooltip\n ref=\"popperRef\"\n :role=\"role\"\n :effect=\"effect\"\n :fallback-placements=\"['bottom', 'top']\"\n :popper-options=\"popperOptions\"\n :gpu-acceleration=\"false\"\n :hide-after=\"trigger === 'hover' ? hideTimeout : 0\"\n :manual-mode=\"true\"\n :placement=\"placement\"\n :popper-class=\"[ns.e('popper'), popperClass]\"\n :reference-element=\"referenceElementRef?.$el\"\n :trigger=\"trigger\"\n :trigger-keys=\"triggerKeys\"\n :trigger-target-el=\"contentRef\"\n :show-after=\"trigger === 'hover' ? showTimeout : 0\"\n :stop-popper-mouse-event=\"false\"\n :virtual-ref=\"triggeringElementRef\"\n :virtual-triggering=\"splitButton\"\n :disabled=\"disabled\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n :teleported=\"teleported\"\n pure\n persistent\n @before-show=\"handleBeforeShowTooltip\"\n @show=\"handleShowTooltip\"\n @before-hide=\"handleBeforeHideTooltip\"\n >\n <template #content>\n <el-scrollbar\n ref=\"scrollbar\"\n :wrap-style=\"wrapStyle\"\n tag=\"div\"\n :view-class=\"ns.e('list')\"\n >\n <el-roving-focus-group\n :loop=\"loop\"\n :current-tab-id=\"currentTabId\"\n orientation=\"horizontal\"\n @current-tab-id-change=\"handleCurrentTabIdChange\"\n @entry-focus=\"handleEntryFocus\"\n >\n <el-dropdown-collection>\n <slot name=\"dropdown\" />\n </el-dropdown-collection>\n </el-roving-focus-group>\n </el-scrollbar>\n </template>\n <template v-if=\"!splitButton\" #default>\n <el-only-child\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n role=\"button\"\n :tabindex=\"tabindex\"\n >\n <slot name=\"default\" />\n </el-only-child>\n </template>\n </el-tooltip>\n <template v-if=\"splitButton\">\n <el-button-group>\n <el-button\n ref=\"referenceElementRef\"\n v-bind=\"buttonProps\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n @click=\"handlerMainButtonClick\"\n >\n <slot name=\"default\" />\n </el-button>\n <el-button\n :id=\"triggerId\"\n ref=\"triggeringElementRef\"\n v-bind=\"buttonProps\"\n role=\"button\"\n :size=\"dropdownSize\"\n :type=\"type\"\n :class=\"ns.e('caret-button')\"\n :disabled=\"disabled\"\n :tabindex=\"tabindex\"\n :aria-label=\"t('el.dropdown.toggleDropdown')\"\n >\n <el-icon :class=\"ns.e('icon')\"><arrow-down /></el-icon>\n </el-button>\n </el-button-group>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n onUnmounted,\n provide,\n ref,\n toRef,\n unref,\n watch,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport ElScrollbar from '@element-plus/components/scrollbar'\nimport ElIcon from '@element-plus/components/icon'\nimport ElRovingFocusGroup from '@element-plus/components/roving-focus-group'\nimport { ElOnlyChild } from '@element-plus/components/slot'\nimport { addUnit, isArray } from '@element-plus/utils'\nimport { ArrowDown } from '@element-plus/icons-vue'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useId, useLocale, useNamespace, useSize } from '@element-plus/hooks'\nimport { ElCollection as ElDropdownCollection, dropdownProps } from './dropdown'\nimport { DROPDOWN_INJECTION_KEY } from './tokens'\n\nimport type { CSSProperties } from 'vue'\n\nconst { ButtonGroup: ElButtonGroup } = ElButton\n\nexport default defineComponent({\n name: 'ElDropdown',\n components: {\n ElButton,\n ElButtonGroup,\n ElScrollbar,\n ElDropdownCollection,\n ElTooltip,\n ElRovingFocusGroup,\n ElOnlyChild,\n ElIcon,\n ArrowDown,\n },\n props: dropdownProps,\n emits: ['visible-change', 'click', 'command'],\n setup(props, { emit }) {\n const _instance = getCurrentInstance()\n const ns = useNamespace('dropdown')\n const { t } = useLocale()\n\n const triggeringElementRef = ref()\n const referenceElementRef = ref()\n const popperRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const contentRef = ref<HTMLElement | null>(null)\n const scrollbar = ref(null)\n const currentTabId = ref<string | null>(null)\n const isUsingKeyboard = ref(false)\n const triggerKeys = [EVENT_CODE.enter, EVENT_CODE.space, EVENT_CODE.down]\n\n const wrapStyle = computed<CSSProperties>(() => ({\n maxHeight: addUnit(props.maxHeight),\n }))\n const dropdownTriggerKls = computed(() => [ns.m(dropdownSize.value)])\n\n const defaultTriggerId = useId().value\n const triggerId = computed<string>(() => {\n return props.id || defaultTriggerId\n })\n\n // The goal of this code is to focus on the tooltip triggering element when it is hovered.\n // This is a temporary fix for where closing the dropdown through pointerleave event focuses on a\n // completely different element. For a permanent solution, remove all calls to any \"element.focus()\"\n // that are triggered through pointer enter/leave events.\n watch(\n [triggeringElementRef, toRef(props, 'trigger')],\n ([triggeringElement, trigger], [prevTriggeringElement]) => {\n const triggerArray = isArray(trigger) ? trigger : [trigger]\n if (prevTriggeringElement?.$el?.removeEventListener) {\n prevTriggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (triggeringElement?.$el?.removeEventListener) {\n triggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n if (\n triggeringElement?.$el?.addEventListener &&\n triggerArray.includes('hover')\n ) {\n triggeringElement.$el.addEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n },\n { immediate: true }\n )\n\n onUnmounted(() => {\n if (triggeringElement?.$el?.removeEventListener) {\n triggeringElement.$el.removeEventListener(\n 'pointerenter',\n onAutofocusTriggerEnter\n )\n }\n })\n\n function handleClick() {\n handleClose()\n }\n\n function handleClose() {\n popperRef.value?.onClose()\n }\n\n function handleOpen() {\n popperRef.value?.onOpen()\n }\n\n const dropdownSize = useSize()\n\n function commandHandler(...args: any[]) {\n emit('command', ...args)\n }\n\n function onAutofocusTriggerEnter() {\n triggeringElementRef.value?.$el?.focus()\n }\n\n function onItemEnter() {\n // NOOP for now\n }\n\n function onItemLeave() {\n const contentEl = unref(contentRef)\n\n contentEl?.focus()\n currentTabId.value = null\n }\n\n function handleCurrentTabIdChange(id: string) {\n currentTabId.value = id\n }\n\n function handleEntryFocus(e: Event) {\n if (!isUsingKeyboard.value) {\n e.preventDefault()\n e.stopImmediatePropagation()\n }\n }\n\n function handleBeforeShowTooltip() {\n emit('visible-change', true)\n }\n\n function handleShowTooltip(event?: Event) {\n if (event?.type === 'keydown') {\n contentRef.value.focus()\n }\n }\n\n function handleBeforeHideTooltip() {\n emit('visible-change', false)\n }\n\n provide(DROPDOWN_INJECTION_KEY, {\n contentRef,\n role: computed(() => props.role),\n triggerId,\n isUsingKeyboard,\n onItemEnter,\n onItemLeave,\n })\n\n provide('elDropdown', {\n instance: _instance,\n dropdownSize,\n handleClick,\n commandHandler,\n trigger: toRef(props, 'trigger'),\n hideOnClick: toRef(props, 'hideOnClick'),\n })\n\n const onFocusAfterTrapped = (e: Event) => {\n e.preventDefault()\n contentRef.value?.focus?.({\n preventScroll: true,\n })\n }\n\n const handlerMainButtonClick = (event: MouseEvent) => {\n emit('click', event)\n }\n\n return {\n t,\n ns,\n scrollbar,\n wrapStyle,\n dropdownTriggerKls,\n dropdownSize,\n triggerId,\n triggerKeys,\n currentTabId,\n handleCurrentTabIdChange,\n handlerMainButtonClick,\n handleEntryFocus,\n handleClose,\n handleOpen,\n handleBeforeShowTooltip,\n handleShowTooltip,\n handleBeforeHideTooltip,\n onFocusAfterTrapped,\n popperRef,\n contentRef,\n triggeringElementRef,\n referenceElementRef,\n }\n },\n})\n</script>\n"],"names":["ElButton","defineComponent","ElScrollbar","ElDropdownCollection","ElTooltip","ElRovingFocusGroup","ElOnlyChild","ElIcon","ArrowDown","dropdownProps","getCurrentInstance","useNamespace","useLocale","ref","EVENT_CODE","computed","addUnit","useId","watch","toRef","isArray","onUnmounted","useSize","unref","provide","DROPDOWN_INJECTION_KEY","_resolveComponent","_openBlock","_createElementBlock","_normalizeClass","_createVNode","_createSlots","_withCtx","_renderSlot","_createBlock","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,MAAM,EAAE,aAAa,aAAkB,EAAA,GAAAA,cAAA,CAAA;AAEvC,MAAK,YAAaC,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,YAAA;AAAA,EACN,UAAY,EAAA;AAAA,cACVD,cAAA;AAAA,IACA,aAAA;AAAA,iBACAE,mBAAA;AAAA,0BACAC,qBAAA;AAAA,eACAC,iBAAA;AAAA,wBACAC,2BAAA;AAAA,iBACAC,mBAAA;AAAA,YACAC,cAAA;AAAA,eACAC,kBAAA;AAAA,GACF;AAAA,EACA,KAAO,EAAAC,sBAAA;AAAA,EACP,KAAO,EAAA,CAAC,gBAAkB,EAAA,OAAA,EAAS,SAAS,CAAA;AAAA,EAC5C,KAAA,CAAM,KAAO,EAAA,EAAE,IAAQ,EAAA,EAAA;AACrB,IAAA,MAAM,YAAYC,sBAAmB,EAAA,CAAA;AACrC,IAAM,MAAA,EAAA,GAAKC,qBAAa,UAAU,CAAA,CAAA;AAClC,IAAM,MAAA,EAAE,MAAMC,iBAAU,EAAA,CAAA;AAExB,IAAA,MAAM,uBAAuBC,OAAI,EAAA,CAAA;AACjC,IAAA,MAAM,sBAAsBA,OAAI,EA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,EAAA,IAAA,CAAA,QAAA;iCAAwB;AAAA,UAAA,YAAA,EAAA,IAAA,CAAA,CAAA,CAAA,4BAAA,CAAA;AAAA,SAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -221,7 +221,7 @@ const _sfc_main = vue.defineComponent({
221
221
  });
222
222
  trapContainer.addEventListener(tokens.FOCUS_AFTER_RELEASED, releaseOnFocus);
223
223
  trapContainer.dispatchEvent(releasedEvent);
224
- if (!releasedEvent.defaultPrevented && (focusReason.value == "keyboard" || !utils.isFocusCausedByUserEvent())) {
224
+ if (!releasedEvent.defaultPrevented && (focusReason.value == "keyboard" || !utils.isFocusCausedByUserEvent() || trapContainer.contains(document.activeElement))) {
225
225
  utils.tryFocus(lastFocusBeforeTrapped != null ? lastFocusBeforeTrapped : document.body);
226
226
  }
227
227
  trapContainer.removeEventListener(tokens.FOCUS_AFTER_RELEASED, trapOnFocus);
@@ -1 +1 @@
1
- {"version":3,"file":"focus-trap.js","sources":["../../../../../../packages/components/focus-trap/src/focus-trap.vue"],"sourcesContent":["<template>\n <slot :handle-keydown=\"onKeydown\" />\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useEscapeKeydown } from '@element-plus/hooks'\nimport { isString } from '@element-plus/utils'\nimport {\n createFocusOutPreventedEvent,\n focusFirstDescendant,\n focusableStack,\n getEdges,\n isFocusCausedByUserEvent,\n obtainAllFocusableElements,\n tryFocus,\n useFocusReason,\n} from './utils'\nimport {\n FOCUS_AFTER_RELEASED,\n FOCUS_AFTER_TRAPPED,\n FOCUS_AFTER_TRAPPED_OPTS,\n FOCUS_TRAP_INJECTION_KEY,\n ON_RELEASE_FOCUS_EVT,\n ON_TRAP_FOCUS_EVT,\n} from './tokens'\n\nimport type { PropType } from 'vue'\nimport type { FocusLayer } from './utils'\n\nexport default defineComponent({\n name: 'ElFocusTrap',\n inheritAttrs: false,\n props: {\n loop: Boolean,\n trapped: Boolean,\n focusTrapEl: Object as PropType<HTMLElement>,\n focusStartEl: {\n type: [Object, String] as PropType<'container' | 'first' | HTMLElement>,\n default: 'first',\n },\n },\n emits: [\n ON_TRAP_FOCUS_EVT,\n ON_RELEASE_FOCUS_EVT,\n 'focusin',\n 'focusout',\n 'focusout-prevented',\n 'release-requested',\n ],\n setup(props, { emit }) {\n const forwardRef = ref<HTMLElement | undefined>()\n let lastFocusBeforeTrapped: HTMLElement | null\n let lastFocusAfterTrapped: HTMLElement | null\n\n const { focusReason } = useFocusReason()\n\n useEscapeKeydown((event) => {\n if (props.trapped && !focusLayer.paused) {\n emit('release-requested', event)\n }\n })\n\n const focusLayer: FocusLayer = {\n paused: false,\n pause() {\n this.paused = true\n },\n resume() {\n this.paused = false\n },\n }\n\n const onKeydown = (e: KeyboardEvent) => {\n if (!props.loop && !props.trapped) return\n if (focusLayer.paused) return\n\n const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e\n const { loop } = props\n const isTabbing =\n key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey\n\n const currentFocusingEl = document.activeElement\n if (isTabbing && currentFocusingEl) {\n const container = currentTarget as HTMLElement\n const [first, last] = getEdges(container)\n const isTabbable = first && last\n if (!isTabbable) {\n if (currentFocusingEl === container) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n }\n }\n } else {\n if (!shiftKey && currentFocusingEl === last) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n if (loop) tryFocus(first, true)\n }\n } else if (\n shiftKey &&\n [first, container].includes(currentFocusingEl as HTMLElement)\n ) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n if (loop) tryFocus(last, true)\n }\n }\n }\n }\n }\n\n provide(FOCUS_TRAP_INJECTION_KEY, {\n focusTrapRef: forwardRef,\n onKeydown,\n })\n\n watch(\n () => props.focusTrapEl,\n (focusTrapEl) => {\n if (focusTrapEl) {\n forwardRef.value = focusTrapEl\n }\n },\n { immediate: true }\n )\n\n watch([forwardRef], ([forwardRef], [oldForwardRef]) => {\n if (forwardRef) {\n forwardRef.addEventListener('keydown', onKeydown)\n forwardRef.addEventListener('focusin', onFocusIn)\n forwardRef.addEventListener('focusout', onFocusOut)\n }\n if (oldForwardRef) {\n oldForwardRef.removeEventListener('keydown', onKeydown)\n oldForwardRef.removeEventListener('focusin', onFocusIn)\n oldForwardRef.removeEventListener('focusout', onFocusOut)\n }\n })\n\n const trapOnFocus = (e: Event) => {\n emit(ON_TRAP_FOCUS_EVT, e)\n }\n const releaseOnFocus = (e: Event) => emit(ON_RELEASE_FOCUS_EVT, e)\n\n const onFocusIn = (e: FocusEvent) => {\n const trapContainer = unref(forwardRef)\n if (!trapContainer) return\n\n const target = e.target as HTMLElement | null\n const relatedTarget = e.relatedTarget as HTMLElement | null\n const isFocusedInTrap = target && trapContainer.contains(target)\n\n if (!props.trapped) {\n const isPrevFocusedInTrap =\n relatedTarget && trapContainer.contains(relatedTarget)\n if (!isPrevFocusedInTrap) {\n lastFocusBeforeTrapped = relatedTarget\n }\n }\n\n if (isFocusedInTrap) emit('focusin', e)\n\n if (focusLayer.paused) return\n\n if (props.trapped) {\n if (isFocusedInTrap) {\n lastFocusAfterTrapped = target\n } else {\n tryFocus(lastFocusAfterTrapped, true)\n }\n }\n }\n\n const onFocusOut = (e: Event) => {\n const trapContainer = unref(forwardRef)\n if (focusLayer.paused || !trapContainer) return\n\n if (props.trapped) {\n const relatedTarget = (e as FocusEvent)\n .relatedTarget as HTMLElement | null\n if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) {\n // Give embedded focus layer time to pause this layer before reclaiming focus\n // And only reclaim focus if it should currently be trapping\n setTimeout(() => {\n if (!focusLayer.paused && props.trapped) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n tryFocus(lastFocusAfterTrapped, true)\n }\n }\n }, 0)\n }\n } else {\n const target = e.target as HTMLElement | null\n const isFocusedInTrap = target && trapContainer.contains(target)\n if (!isFocusedInTrap) emit('focusout', e)\n }\n }\n\n async function startTrap() {\n // Wait for forwardRef to resolve\n await nextTick()\n const trapContainer = unref(forwardRef)\n if (trapContainer) {\n focusableStack.push(focusLayer)\n const prevFocusedElement = trapContainer.contains(\n document.activeElement\n )\n ? lastFocusBeforeTrapped\n : document.activeElement\n lastFocusBeforeTrapped = prevFocusedElement as HTMLElement | null\n const isPrevFocusContained = trapContainer.contains(prevFocusedElement)\n if (!isPrevFocusContained) {\n const focusEvent = new Event(\n FOCUS_AFTER_TRAPPED,\n FOCUS_AFTER_TRAPPED_OPTS\n )\n trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus)\n trapContainer.dispatchEvent(focusEvent)\n if (!focusEvent.defaultPrevented) {\n nextTick(() => {\n let focusStartEl = props.focusStartEl\n if (!isString(focusStartEl)) {\n tryFocus(focusStartEl)\n if (document.activeElement !== focusStartEl) {\n focusStartEl = 'first'\n }\n }\n if (focusStartEl === 'first') {\n focusFirstDescendant(\n obtainAllFocusableElements(trapContainer),\n true\n )\n }\n if (\n document.activeElement === prevFocusedElement ||\n focusStartEl === 'container'\n ) {\n tryFocus(trapContainer)\n }\n })\n }\n }\n }\n }\n\n function stopTrap() {\n const trapContainer = unref(forwardRef)\n\n if (trapContainer) {\n trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus)\n\n const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {\n ...FOCUS_AFTER_TRAPPED_OPTS,\n detail: {\n focusReason: focusReason.value,\n },\n })\n trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus)\n trapContainer.dispatchEvent(releasedEvent)\n\n if (\n !releasedEvent.defaultPrevented &&\n (focusReason.value == 'keyboard' || !isFocusCausedByUserEvent())\n ) {\n tryFocus(lastFocusBeforeTrapped ?? document.body)\n }\n\n trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, trapOnFocus)\n focusableStack.remove(focusLayer)\n }\n }\n\n onMounted(() => {\n if (props.trapped) {\n startTrap()\n }\n\n watch(\n () => props.trapped,\n (trapped) => {\n if (trapped) {\n startTrap()\n } else {\n stopTrap()\n }\n }\n )\n })\n\n onBeforeUnmount(() => {\n if (props.trapped) {\n stopTrap()\n }\n })\n\n return {\n onKeydown,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ON_TRAP_FOCUS_EVT","ON_RELEASE_FOCUS_EVT","ref","useFocusReason","useEscapeKeydown","EVENT_CODE","getEdges","createFocusOutPreventedEvent","tryFocus","provide","FOCUS_TRAP_INJECTION_KEY","watch","unref","isNil","nextTick","focusableStack","FOCUS_AFTER_TRAPPED","FOCUS_AFTER_TRAPPED_OPTS","isString","focusFirstDescendant","obtainAllFocusableElements","FOCUS_AFTER_RELEASED","isFocusCausedByUserEvent","onMounted","onBeforeUnmount","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;AAwCA,MAAK,YAAaA,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,aAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,IACT,WAAa,EAAA,MAAA;AAAA,IACb,YAAc,EAAA;AAAA,MACZ,IAAA,EAAM,CAAC,MAAA,EAAQ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CAAA,CAAA;;SArUCC,cAAoC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAA7B,eAAgB,IAAS,CAAA,SAAA,EAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"focus-trap.js","sources":["../../../../../../packages/components/focus-trap/src/focus-trap.vue"],"sourcesContent":["<template>\n <slot :handle-keydown=\"onKeydown\" />\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { useEscapeKeydown } from '@element-plus/hooks'\nimport { isString } from '@element-plus/utils'\nimport {\n createFocusOutPreventedEvent,\n focusFirstDescendant,\n focusableStack,\n getEdges,\n isFocusCausedByUserEvent,\n obtainAllFocusableElements,\n tryFocus,\n useFocusReason,\n} from './utils'\nimport {\n FOCUS_AFTER_RELEASED,\n FOCUS_AFTER_TRAPPED,\n FOCUS_AFTER_TRAPPED_OPTS,\n FOCUS_TRAP_INJECTION_KEY,\n ON_RELEASE_FOCUS_EVT,\n ON_TRAP_FOCUS_EVT,\n} from './tokens'\n\nimport type { PropType } from 'vue'\nimport type { FocusLayer } from './utils'\n\nexport default defineComponent({\n name: 'ElFocusTrap',\n inheritAttrs: false,\n props: {\n loop: Boolean,\n trapped: Boolean,\n focusTrapEl: Object as PropType<HTMLElement>,\n focusStartEl: {\n type: [Object, String] as PropType<'container' | 'first' | HTMLElement>,\n default: 'first',\n },\n },\n emits: [\n ON_TRAP_FOCUS_EVT,\n ON_RELEASE_FOCUS_EVT,\n 'focusin',\n 'focusout',\n 'focusout-prevented',\n 'release-requested',\n ],\n setup(props, { emit }) {\n const forwardRef = ref<HTMLElement | undefined>()\n let lastFocusBeforeTrapped: HTMLElement | null\n let lastFocusAfterTrapped: HTMLElement | null\n\n const { focusReason } = useFocusReason()\n\n useEscapeKeydown((event) => {\n if (props.trapped && !focusLayer.paused) {\n emit('release-requested', event)\n }\n })\n\n const focusLayer: FocusLayer = {\n paused: false,\n pause() {\n this.paused = true\n },\n resume() {\n this.paused = false\n },\n }\n\n const onKeydown = (e: KeyboardEvent) => {\n if (!props.loop && !props.trapped) return\n if (focusLayer.paused) return\n\n const { key, altKey, ctrlKey, metaKey, currentTarget, shiftKey } = e\n const { loop } = props\n const isTabbing =\n key === EVENT_CODE.tab && !altKey && !ctrlKey && !metaKey\n\n const currentFocusingEl = document.activeElement\n if (isTabbing && currentFocusingEl) {\n const container = currentTarget as HTMLElement\n const [first, last] = getEdges(container)\n const isTabbable = first && last\n if (!isTabbable) {\n if (currentFocusingEl === container) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n }\n }\n } else {\n if (!shiftKey && currentFocusingEl === last) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n if (loop) tryFocus(first, true)\n }\n } else if (\n shiftKey &&\n [first, container].includes(currentFocusingEl as HTMLElement)\n ) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n e.preventDefault()\n if (loop) tryFocus(last, true)\n }\n }\n }\n }\n }\n\n provide(FOCUS_TRAP_INJECTION_KEY, {\n focusTrapRef: forwardRef,\n onKeydown,\n })\n\n watch(\n () => props.focusTrapEl,\n (focusTrapEl) => {\n if (focusTrapEl) {\n forwardRef.value = focusTrapEl\n }\n },\n { immediate: true }\n )\n\n watch([forwardRef], ([forwardRef], [oldForwardRef]) => {\n if (forwardRef) {\n forwardRef.addEventListener('keydown', onKeydown)\n forwardRef.addEventListener('focusin', onFocusIn)\n forwardRef.addEventListener('focusout', onFocusOut)\n }\n if (oldForwardRef) {\n oldForwardRef.removeEventListener('keydown', onKeydown)\n oldForwardRef.removeEventListener('focusin', onFocusIn)\n oldForwardRef.removeEventListener('focusout', onFocusOut)\n }\n })\n\n const trapOnFocus = (e: Event) => {\n emit(ON_TRAP_FOCUS_EVT, e)\n }\n const releaseOnFocus = (e: Event) => emit(ON_RELEASE_FOCUS_EVT, e)\n\n const onFocusIn = (e: FocusEvent) => {\n const trapContainer = unref(forwardRef)\n if (!trapContainer) return\n\n const target = e.target as HTMLElement | null\n const relatedTarget = e.relatedTarget as HTMLElement | null\n const isFocusedInTrap = target && trapContainer.contains(target)\n\n if (!props.trapped) {\n const isPrevFocusedInTrap =\n relatedTarget && trapContainer.contains(relatedTarget)\n if (!isPrevFocusedInTrap) {\n lastFocusBeforeTrapped = relatedTarget\n }\n }\n\n if (isFocusedInTrap) emit('focusin', e)\n\n if (focusLayer.paused) return\n\n if (props.trapped) {\n if (isFocusedInTrap) {\n lastFocusAfterTrapped = target\n } else {\n tryFocus(lastFocusAfterTrapped, true)\n }\n }\n }\n\n const onFocusOut = (e: Event) => {\n const trapContainer = unref(forwardRef)\n if (focusLayer.paused || !trapContainer) return\n\n if (props.trapped) {\n const relatedTarget = (e as FocusEvent)\n .relatedTarget as HTMLElement | null\n if (!isNil(relatedTarget) && !trapContainer.contains(relatedTarget)) {\n // Give embedded focus layer time to pause this layer before reclaiming focus\n // And only reclaim focus if it should currently be trapping\n setTimeout(() => {\n if (!focusLayer.paused && props.trapped) {\n const focusoutPreventedEvent = createFocusOutPreventedEvent({\n focusReason: focusReason.value,\n })\n emit('focusout-prevented', focusoutPreventedEvent)\n if (!focusoutPreventedEvent.defaultPrevented) {\n tryFocus(lastFocusAfterTrapped, true)\n }\n }\n }, 0)\n }\n } else {\n const target = e.target as HTMLElement | null\n const isFocusedInTrap = target && trapContainer.contains(target)\n if (!isFocusedInTrap) emit('focusout', e)\n }\n }\n\n async function startTrap() {\n // Wait for forwardRef to resolve\n await nextTick()\n const trapContainer = unref(forwardRef)\n if (trapContainer) {\n focusableStack.push(focusLayer)\n const prevFocusedElement = trapContainer.contains(\n document.activeElement\n )\n ? lastFocusBeforeTrapped\n : document.activeElement\n lastFocusBeforeTrapped = prevFocusedElement as HTMLElement | null\n const isPrevFocusContained = trapContainer.contains(prevFocusedElement)\n if (!isPrevFocusContained) {\n const focusEvent = new Event(\n FOCUS_AFTER_TRAPPED,\n FOCUS_AFTER_TRAPPED_OPTS\n )\n trapContainer.addEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus)\n trapContainer.dispatchEvent(focusEvent)\n if (!focusEvent.defaultPrevented) {\n nextTick(() => {\n let focusStartEl = props.focusStartEl\n if (!isString(focusStartEl)) {\n tryFocus(focusStartEl)\n if (document.activeElement !== focusStartEl) {\n focusStartEl = 'first'\n }\n }\n if (focusStartEl === 'first') {\n focusFirstDescendant(\n obtainAllFocusableElements(trapContainer),\n true\n )\n }\n if (\n document.activeElement === prevFocusedElement ||\n focusStartEl === 'container'\n ) {\n tryFocus(trapContainer)\n }\n })\n }\n }\n }\n }\n\n function stopTrap() {\n const trapContainer = unref(forwardRef)\n\n if (trapContainer) {\n trapContainer.removeEventListener(FOCUS_AFTER_TRAPPED, trapOnFocus)\n\n const releasedEvent = new CustomEvent(FOCUS_AFTER_RELEASED, {\n ...FOCUS_AFTER_TRAPPED_OPTS,\n detail: {\n focusReason: focusReason.value,\n },\n })\n trapContainer.addEventListener(FOCUS_AFTER_RELEASED, releaseOnFocus)\n trapContainer.dispatchEvent(releasedEvent)\n if (\n !releasedEvent.defaultPrevented &&\n (focusReason.value == 'keyboard' ||\n !isFocusCausedByUserEvent() ||\n trapContainer.contains(document.activeElement))\n ) {\n tryFocus(lastFocusBeforeTrapped ?? document.body)\n }\n\n trapContainer.removeEventListener(FOCUS_AFTER_RELEASED, trapOnFocus)\n focusableStack.remove(focusLayer)\n }\n }\n\n onMounted(() => {\n if (props.trapped) {\n startTrap()\n }\n\n watch(\n () => props.trapped,\n (trapped) => {\n if (trapped) {\n startTrap()\n } else {\n stopTrap()\n }\n }\n )\n })\n\n onBeforeUnmount(() => {\n if (props.trapped) {\n stopTrap()\n }\n })\n\n return {\n onKeydown,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ON_TRAP_FOCUS_EVT","ON_RELEASE_FOCUS_EVT","ref","useFocusReason","useEscapeKeydown","EVENT_CODE","getEdges","createFocusOutPreventedEvent","tryFocus","provide","FOCUS_TRAP_INJECTION_KEY","watch","unref","isNil","nextTick","focusableStack","FOCUS_AFTER_TRAPPED","FOCUS_AFTER_TRAPPED_OPTS","isString","focusFirstDescendant","obtainAllFocusableElements","FOCUS_AFTER_RELEASED","isFocusCausedByUserEvent","onMounted","onBeforeUnmount","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;AAwCA,MAAK,YAAaA,mBAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,aAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAAA,EACd,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,IACT,WAAa,EAAA,MAAA;AAAA,IACb,YAAc,EAAA;AAAA,MACZ,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,MACrB,OAAS,EAAA,OAAA;AAAA,KACX;AAAA,GACF;AAAA,EACA,KAAO,EAAA;AAAA,IACLC,wBAAA;AAAA,IACAC,2BAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,oBAAA;AAAA,IACA,mBAAA;AAAA,GACF;AAAA,EACA,KAAA,CAAM,KAAO,EAAA,EAAE,IAAQ,EAAA,EAAA;AACrB,IAAA,MAAM,aAAaC,OAA6B,EAAA,CAAA;AAChD,IAAI,IAAA,sBAAA,CAAA;AACJ,IAAI,IAAA,qBAAA,CAAA;AAEJ,IAAM,MAAA,EAAE,gBAAgBC,oBAAe,EAAA,CAAA;AA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ACpB,CAACC,8BAAA,EACD,IAAA,aAAA,CAAc,QAAS,CAAA,QAAA,CAAS,aAAa,CAC/C,CAAA,EAAA;AACA,UAASd,cAAA,CAAA,sBAAA,IAA0B,6BAAa,GAAA,QAAA,CAAA,IAAA,CAAA,CAAA;AAAA,SAClD;AAEA,QAAc,aAAA,CAAA,mBAAA,CAAoBa,6BAAsB,WAAW,CAAA,CAAA;AACnE,QAAAN,oBAAA,CAAe,OAAO,UAAU,CAAA,CAAA;AAAA,OAClC;AAAA,KACF;AAEA,IAAAQ,aAAA,CAAU,MAAM;AACd,MAAA,IAAI,MAAM,OAAS,EAAA;AACjB,QAAU,SAAA,EAAA,CAAA;AAAA,OACZ;AAEA,MAAAZ,SAAA,CACE,MAAM,KAAA,CAAM,OACZ,EAAA,CAAC,OAAY,KAAA;AACX,QAAA,IAAI,OAAS,EAAA;AACX,UAAU,SAAA,EAAA,CAAA;AAAA,SACL,MAAA;AACL,UAAS,QAAA,EAAA,CAAA;AAAA,SACX;AAAA,OAEJ,CAAA,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAAa,mBAAA,CAAgB,MAAM;AACpB,MAAA,IAAI,MAAM,OAAS,EAAA;AACjB,QAAS,QAAA,EAAA,CAAA;AAAA,OACX;AAAA,KACD,CAAA,CAAA;AAED,IAAO,OAAA;AAAA,MACL,SAAA;AAAA,KACF,CAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;SAtUCC,cAAoC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAAA,EAA7B,eAAgB,IAAS,CAAA,SAAA,EAAA,CAAA,CAAA;;;;;;"}
@@ -44,7 +44,7 @@ class TableLayout {
44
44
  if (height === null)
45
45
  return false;
46
46
  const scrollBarRef = this.table.refs.scrollBarRef;
47
- if (this.table.vnode.el && scrollBarRef) {
47
+ if (this.table.vnode.el && (scrollBarRef == null ? void 0 : scrollBarRef.wrapRef)) {
48
48
  let scrollY = true;
49
49
  const prevScrollY = this.scrollY.value;
50
50
  scrollY = scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight;
@@ -1 +1 @@
1
- {"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["// @ts-nocheck\nimport { isRef, nextTick, ref } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { hasOwn } from '@element-plus/utils'\nimport { parseHeight } from './util'\nimport type { Ref } from 'vue'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.gutterWidth = 0\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (height === null) return false\n const scrollBarRef = this.table.refs.scrollBarRef\n if (this.table.vnode.el && scrollBarRef) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n scrollY =\n scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (typeof value === 'number') {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (typeof value === 'string') {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => typeof column.width !== 'number'\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (typeof column.width === 'number' && column.realWidth)\n column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n if (bodyMinWidth <= bodyWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach((column) => {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach((column) => {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach((column) => {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","hasOwn","isRef","isClient","parseHeight","nextTick"],"mappings":";;;;;;;;;;AAIA,MAAM,WAAW,CAAC;AAClB,EAAE,WAAW,CAAC,OAAO,EAAE;AACvB,IAAI,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACxB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACtB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AACtB,IAAI,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AACtB,IAAI,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC;AACpB,IAAI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;AAC3B,IAAI,IAAI,CAAC,MAAM,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AAC5B,IAAI,IAAI,CAAC,OAAO,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,IAAI,IAAI,CAAC,OAAO,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,IAAI,IAAI,CAAC,SAAS,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,UAAU,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AAChC,IAAI,IAAI,CAAC,eAAe,GAAGA,OAAG,CAAC,IAAI,CAAC,CAAC;AACrC,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;AACzB,IAAI,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;AAChC,MAAM,IAAIC,aAAM,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;AACjC,QAAQ,IAAIC,SAAK,CAAC,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ACH,EAAE,cAAc,CAAC,QAAQ,EAAE;AAC3B,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACnD,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;AACtB,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACtC,KAAK;AACL,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;AACpC,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"table-layout.js","sources":["../../../../../../packages/components/table/src/table-layout.ts"],"sourcesContent":["// @ts-nocheck\nimport { isRef, nextTick, ref } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { hasOwn } from '@element-plus/utils'\nimport { parseHeight } from './util'\nimport type { Ref } from 'vue'\n\nimport type { TableColumnCtx } from './table-column/defaults'\nimport type { TableHeader } from './table-header'\nimport type { Table } from './table/defaults'\nimport type { Store } from './store'\nclass TableLayout<T> {\n observers: TableHeader[]\n table: Table<T>\n store: Store<T>\n columns: TableColumnCtx<T>[]\n fit: boolean\n showHeader: boolean\n\n height: Ref<null | number>\n scrollX: Ref<boolean>\n scrollY: Ref<boolean>\n bodyWidth: Ref<null | number>\n fixedWidth: Ref<null | number>\n rightFixedWidth: Ref<null | number>\n tableHeight: Ref<null | number>\n headerHeight: Ref<null | number> // Table Header Height\n appendHeight: Ref<null | number> // Append Slot Height\n footerHeight: Ref<null | number> // Table Footer Height\n gutterWidth: number\n constructor(options: Record<string, any>) {\n this.observers = []\n this.table = null\n this.store = null\n this.columns = []\n this.fit = true\n this.showHeader = true\n this.height = ref(null)\n this.scrollX = ref(false)\n this.scrollY = ref(false)\n this.bodyWidth = ref(null)\n this.fixedWidth = ref(null)\n this.rightFixedWidth = ref(null)\n this.gutterWidth = 0\n for (const name in options) {\n if (hasOwn(options, name)) {\n if (isRef(this[name])) {\n this[name as string].value = options[name]\n } else {\n this[name as string] = options[name]\n }\n }\n }\n if (!this.table) {\n throw new Error('Table is required for Table Layout')\n }\n if (!this.store) {\n throw new Error('Store is required for Table Layout')\n }\n }\n\n updateScrollY() {\n const height = this.height.value\n /**\n * When the height is not initialized, it is null.\n * After the table is initialized, when the height is not configured, the height is 0.\n */\n if (height === null) return false\n const scrollBarRef = this.table.refs.scrollBarRef\n if (this.table.vnode.el && scrollBarRef?.wrapRef) {\n let scrollY = true\n const prevScrollY = this.scrollY.value\n scrollY =\n scrollBarRef.wrapRef.scrollHeight > scrollBarRef.wrapRef.clientHeight\n this.scrollY.value = scrollY\n return prevScrollY !== scrollY\n }\n return false\n }\n\n setHeight(value: string | number, prop = 'height') {\n if (!isClient) return\n const el = this.table.vnode.el\n value = parseHeight(value)\n this.height.value = Number(value)\n\n if (!el && (value || value === 0))\n return nextTick(() => this.setHeight(value, prop))\n\n if (typeof value === 'number') {\n el.style[prop] = `${value}px`\n this.updateElsHeight()\n } else if (typeof value === 'string') {\n el.style[prop] = value\n this.updateElsHeight()\n }\n }\n\n setMaxHeight(value: string | number) {\n this.setHeight(value, 'max-height')\n }\n\n getFlattenColumns(): TableColumnCtx<T>[] {\n const flattenColumns = []\n const columns = this.table.store.states.columns.value\n columns.forEach((column) => {\n if (column.isColumnGroup) {\n // eslint-disable-next-line prefer-spread\n flattenColumns.push.apply(flattenColumns, column.columns)\n } else {\n flattenColumns.push(column)\n }\n })\n\n return flattenColumns\n }\n\n updateElsHeight() {\n this.updateScrollY()\n this.notifyObservers('scrollable')\n }\n\n headerDisplayNone(elm: HTMLElement) {\n if (!elm) return true\n let headerChild = elm\n while (headerChild.tagName !== 'DIV') {\n if (getComputedStyle(headerChild).display === 'none') {\n return true\n }\n headerChild = headerChild.parentElement\n }\n return false\n }\n\n updateColumnsWidth() {\n if (!isClient) return\n const fit = this.fit\n const bodyWidth = this.table.vnode.el.clientWidth\n let bodyMinWidth = 0\n\n const flattenColumns = this.getFlattenColumns()\n const flexColumns = flattenColumns.filter(\n (column) => typeof column.width !== 'number'\n )\n flattenColumns.forEach((column) => {\n // Clean those columns whose width changed from flex to unflex\n if (typeof column.width === 'number' && column.realWidth)\n column.realWidth = null\n })\n if (flexColumns.length > 0 && fit) {\n flattenColumns.forEach((column) => {\n bodyMinWidth += Number(column.width || column.minWidth || 80)\n })\n if (bodyMinWidth <= bodyWidth) {\n // DON'T HAVE SCROLL BAR\n this.scrollX.value = false\n\n const totalFlexWidth = bodyWidth - bodyMinWidth\n\n if (flexColumns.length === 1) {\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) + totalFlexWidth\n } else {\n const allColumnsWidth = flexColumns.reduce(\n (prev, column) => prev + Number(column.minWidth || 80),\n 0\n )\n const flexWidthPerPixel = totalFlexWidth / allColumnsWidth\n let noneFirstWidth = 0\n\n flexColumns.forEach((column, index) => {\n if (index === 0) return\n const flexWidth = Math.floor(\n Number(column.minWidth || 80) * flexWidthPerPixel\n )\n noneFirstWidth += flexWidth\n column.realWidth = Number(column.minWidth || 80) + flexWidth\n })\n\n flexColumns[0].realWidth =\n Number(flexColumns[0].minWidth || 80) +\n totalFlexWidth -\n noneFirstWidth\n }\n } else {\n // HAVE HORIZONTAL SCROLL BAR\n this.scrollX.value = true\n flexColumns.forEach((column) => {\n column.realWidth = Number(column.minWidth)\n })\n }\n\n this.bodyWidth.value = Math.max(bodyMinWidth, bodyWidth)\n this.table.state.resizeState.value.width = this.bodyWidth.value\n } else {\n flattenColumns.forEach((column) => {\n if (!column.width && !column.minWidth) {\n column.realWidth = 80\n } else {\n column.realWidth = Number(column.width || column.minWidth)\n }\n bodyMinWidth += column.realWidth\n })\n this.scrollX.value = bodyMinWidth > bodyWidth\n\n this.bodyWidth.value = bodyMinWidth\n }\n\n const fixedColumns = this.store.states.fixedColumns.value\n\n if (fixedColumns.length > 0) {\n let fixedWidth = 0\n fixedColumns.forEach((column) => {\n fixedWidth += Number(column.realWidth || column.width)\n })\n\n this.fixedWidth.value = fixedWidth\n }\n\n const rightFixedColumns = this.store.states.rightFixedColumns.value\n if (rightFixedColumns.length > 0) {\n let rightFixedWidth = 0\n rightFixedColumns.forEach((column) => {\n rightFixedWidth += Number(column.realWidth || column.width)\n })\n\n this.rightFixedWidth.value = rightFixedWidth\n }\n this.notifyObservers('columns')\n }\n\n addObserver(observer: TableHeader) {\n this.observers.push(observer)\n }\n\n removeObserver(observer: TableHeader) {\n const index = this.observers.indexOf(observer)\n if (index !== -1) {\n this.observers.splice(index, 1)\n }\n }\n\n notifyObservers(event: string) {\n const observers = this.observers\n observers.forEach((observer) => {\n switch (event) {\n case 'columns':\n observer.state?.onColumnsChange(this)\n break\n case 'scrollable':\n observer.state?.onScrollableChange(this)\n break\n default:\n throw new Error(`Table Layout don't have event ${event}.`)\n }\n })\n }\n}\n\nexport default TableLayout\n"],"names":["ref","hasOwn","isRef","isClient","parseHeight","nextTick"],"mappings":";;;;;;;;;;AAIA,MAAM,WAAW,CAA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C;AACtC,KAAK;AACL,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACrC,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAK;AACpC,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;AACjB,MAAM,QAAQ,KAAK;AACnB,QAAQ,KAAK,SAAS;AACtB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC5E,UAAU,MAAM;AAChB,QAAQ,KAAK,YAAY;AACzB,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC/E,UAAU,MAAM;AAChB,QAAQ;AACR,UAAU,MAAM,IAAI,KAAK,CAAC,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20230216";
1
+ export declare const version = "0.0.20230218";
package/lib/version.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const version = "0.0.20230216";
5
+ const version = "0.0.20230218";
6
6
 
7
7
  exports.version = version;
8
8
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20230216'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.js","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20230218'\n"],"names":[],"mappings":";;;;AAAY,MAAC,OAAO,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@element-plus/nightly",
3
- "version": "0.0.20230216",
3
+ "version": "0.0.20230218",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "element-plus",
@@ -85,5 +85,5 @@
85
85
  "not ie 11",
86
86
  "not op_mini all"
87
87
  ],
88
- "gitHead": "8055220c844abf5d4d7f0ec7339d6b15f250af3d"
88
+ "gitHead": "8dfbddb0da7771f727c4eaca05d7032e715f89c2"
89
89
  }
package/tags.json CHANGED
@@ -1 +1 @@
1
- {"el-affix":{"attributes":["offset","position","target","z-index","change","scroll"],"description":"Fix the element to a specific visible area.\n\n[Docs](https://element-plus.org/en-US/component/affix.html#affix)"},"el-alert":{"attributes":["title","type","description","closable","center","close-text","show-icon","effect","close"],"description":"Displays important alert messages.\n\n[Docs](https://element-plus.org/en-US/component/alert.html#alert)"},"el-autocomplete":{"attributes":["model-value","placeholder","clearable","disabled","value-key","debounce","placement","fetch-suggestions","trigger-on-focus","select-when-unmatched","name","label","hide-loading","popper-class","popper-append-to-body","teleported","highlight-first-item","fit-input-width","select","change"],"description":"Get some recommended tips based on the current input.\n\n[Docs](https://element-plus.org/en-US/component/autocomplete.html#autocomplete)"},"el-avatar":{"attributes":["icon","size","shape","src","src-set","alt","fit","error"],"description":"Avatars can be used to represent people or objects. It supports images, Icons, or characters.\n\n[Docs](https://element-plus.org/en-US/component/avatar.html#avatar)"},"el-backtop":{"attributes":["target","visibility-height","right","bottom","click"],"description":"A button to back to top.\n\n[Docs](https://element-plus.org/en-US/component/backtop.html#backtop)"},"el-badge":{"attributes":["value","max","is-dot","hidden","type"],"description":"A number or status mark on buttons and icons.\n\n[Docs](https://element-plus.org/en-US/component/badge.html#badge)"},"el-breadcrumb":{"attributes":["separator","separator-icon"],"subtags":["el-breadcrumb-item"],"description":"Displays the location of the current page, making it easier to browser back.\n\n[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumb)"},"el-breadcrumb-item":{"attributes":["to","replace"],"description":"[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumbitem)"},"el-button":{"attributes":["size","type","plain","text","bg","link","round","circle","loading","loading-icon","disabled","icon","autofocus","native-type","auto-insert-space","color","dark"],"description":"Commonly used button.\n\n[Docs](https://element-plus.org/en-US/component/button.html#button)"},"el-button-group":{"attributes":["size","type"],"subtags":["el-button"],"description":"[Docs](https://element-plus.org/en-US/component/button.html#buttongroup)"},"el-calendar":{"attributes":["model-value","range"],"description":"Display date.\n\n[Docs](https://element-plus.org/en-US/component/calendar.html#calendar)"},"el-card":{"attributes":["header","body-style","shadow"],"description":"Integrate information in a card container.\n\n[Docs](https://element-plus.org/en-US/component/card.html#card)"},"el-carousel":{"attributes":["height","initial-index","trigger","autoplay","interval","indicator-position","arrow","type","loop","direction","pause-on-hover","change"],"subtags":["el-carousel-item"],"description":"Loop a series of images or texts in a limited space\n\n[Docs](https://element-plus.org/en-US/component/carousel.html#carousel)"},"el-carousel-item":{"attributes":["name","label"],"description":"[Docs](https://element-plus.org/en-US/component/carousel.html#carousel-item)"},"el-cascader":{"attributes":["model-value","options","props","size","placeholder","disabled","clearable","show-all-levels","collapse-tags","collapse-tags-tooltip","separator","filterable","filter-method","debounce","before-filter","popper-class","teleported","popper-append-to-body","tag-type","validate-event","change","expand-change","blur","focus","visible-change","remove-tag"],"description":"If the options have a clear hierarchical structure, Cascader can be used to view and select them.\n\n[Docs](https://element-plus.org/en-US/component/cascader.html#cascader)"},"el-cascader-panel":{"attributes":["model-value","options","props","change","expand-change"],"description":"[Docs](https://element-plus.org/en-US/component/cascader.html#cascaderpanel)"},"el-checkbox":{"attributes":["model-value","label","true-label","false-label","disabled","border","size","name","checked","indeterminate","validate-event","tabindex","id","controls","change"],"description":"A group of options for multiple choices.\n\n[Docs](https://element-plus.org/en-US/component/checkbox.html#checkbox)"},"el-checkbox-group":{"attributes":["model-value","size","disabled","min","max","label","text-color","fill","tag","validate-event","change"],"subtags":["el-checkbox","el-checkbox-button"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxgroup)"},"el-checkbox-button":{"attributes":["label","true-label","false-label","disabled","name","checked"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxbutton)"},"el-collapse":{"attributes":["model-value","accordion","change"],"subtags":["el-collapse-item"],"description":"Use Collapse to store contents.\n\n[Docs](https://element-plus.org/en-US/component/collapse.html#collapse)"},"el-collapse-item":{"attributes":["name","title","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/collapse.html#collapse-item)"},"el-color-picker":{"attributes":["model-value","disabled","size","show-alpha","color-format","popper-class","predefine","validate-event","tabindex","label","id","change","active-change"],"description":"ColorPicker is a color selector supporting multiple color formats.\n\n[Docs](https://element-plus.org/en-US/component/color-picker.html#colorpicker)"},"el-config-provider":{"attributes":["locale","size","z-index","namespace","button","message","experimental-features"],"description":"Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.\n\n[Docs](https://element-plus.org/en-US/component/config-provider.html#config-provider)"},"el-container":{"attributes":["direction"],"subtags":["el-container","el-header","el-aside","el-main","el-footer"],"description":"Container components for scaffolding basic structure of the page:\n\n[Docs](https://element-plus.org/en-US/component/container.html#container)"},"el-header":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#header)"},"el-aside":{"attributes":["width"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#aside)"},"el-main":{"description":"[Docs](https://element-plus.org/en-US/component/container.html#main)"},"el-footer":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#footer)"},"el-date-picker":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","type","format","popper-class","range-separator","default-value","default-time","value-format","id","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","cell-class-name","teleported","change","blur","focus","calendar-change","panel-change","visible-change"],"description":"Use Date Picker for date input.\n\n[Docs](https://element-plus.org/en-US/component/date-picker.html#datepicker)"},"el-descriptions":{"attributes":["border","column","direction","size","title","extra"],"subtags":["el-descriptions-item"],"description":"Display multiple fields in list form.\n\n[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions)"},"el-descriptions-item":{"attributes":["label","span","width","min-width","align","label-align","class-name","label-class-name"],"description":"[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions-item)"},"el-dialog":{"attributes":["model-value","title","width","fullscreen","top","modal","append-to-body","lock-scroll","custom-class","open-delay","close-delay","close-on-click-modal","close-on-press-escape","show-close","before-close","draggable","center","align-center","destroy-on-close","open","opened","close","closed","open-auto-focus","close-auto-focus"],"description":"Informs users while preserving the current page state.\n\n[Docs](https://element-plus.org/en-US/component/dialog.html#dialog)"},"el-divider":{"attributes":["direction","border-style","content-position"],"description":"The dividing line that separates the content.\n\n[Docs](https://element-plus.org/en-US/component/divider.html#divider)"},"el-drawer":{"attributes":["model-value","append-to-body","lock-scroll","before-close","close-on-click-modal","close-on-press-escape","open-delay","close-delay","custom-class","destroy-on-close","modal","direction","show-close","size","title","with-header","modal-class","z-index","open","opened","close","closed"],"description":"Sometimes, `Dialog` does not always satisfy our requirements, let's say you have a massive form, or you need space to display something like `terms & conditions`, `Drawer` has almost identical API with `Dialog`, but it introduces different user experience.\n\n[Docs](https://element-plus.org/en-US/component/drawer.html#drawer)"},"el-dropdown":{"attributes":["type","size","max-height","split-button","disabled","placement","trigger","hide-on-click","show-timeout","hide-timeout","role","tabindex","popper-class","popper-options","teleported","click","command","visible-change"],"subtags":["el-dropdown-menu"],"description":"Toggleable menu for displaying lists of links and actions.\n\n[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown)"},"el-dropdown-menu":{"subtags":["el-dropdown-item"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-menu)"},"el-dropdown-item":{"attributes":["command","disabled","divided","icon"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-item)"},"el-empty":{"attributes":["image","image-size","description"],"description":"Placeholder hints for empty states.\n\n[Docs](https://element-plus.org/en-US/component/empty.html#empty)"},"el-form":{"attributes":["model","rules","inline","label-position","label-width","label-suffix","hide-required-asterisk","require-asterisk-position","show-message","inline-message","status-icon","validate-on-rule-change","size","disabled","scroll-to-error","validate"],"subtags":["el-form-item"],"description":"Form consists of `input`, `radio`, `select`, `checkbox` and so on. With form, you can collect, verify and submit data.\n\n[Docs](https://element-plus.org/en-US/component/form.html#form)"},"el-form-item":{"attributes":["prop","label","label-width","required","rules","error","show-message","inline-message","size","for","validate-status"],"description":"[Docs](https://element-plus.org/en-US/component/form.html#formitem)"},"el-icon":{"attributes":["color","size"],"description":"Element Plus provides a set of common icons.\n\n[Docs](https://element-plus.org/en-US/component/icon.html#icon)"},"el-image":{"attributes":["src","fit","hide-on-click-modal","`loading`","lazy","scroll-container","alt","referrer-policy","preview-src-list","z-index","initial-index","close-on-press-escape","preview-teleported","load","error","switch","close"],"description":"Besides the native features of img, support lazy load, custom placeholder and load failure, etc.\n\n[Docs](https://element-plus.org/en-US/component/image.html#image)"},"el-image-viewer":{"attributes":["url-list","z-index","initial-index","infinite","hide-on-click-modal","teleported","zoom-rate","close","switch"],"description":"[Docs](https://element-plus.org/en-US/component/image.html#image-viewer)"},"el-input-number":{"attributes":["model-value","min","max","step","step-strictly","precision","size","readonly","disabled","controls","controls-position","name","label","placeholder","id","value-on-clear","validate-event","change","blur","focus"],"description":"Input numerical values with a customizable range.\n\n[Docs](https://element-plus.org/en-US/component/input-number.html#input-number)"},"el-input":{"attributes":["type","model-value","maxlength","minlength","show-word-limit","placeholder","clearable","formatter","parser","show-password","disabled","size","prefix-icon","suffix-icon","rows","autosize","autocomplete","name","readonly","max","min","step","resize","autofocus","form","label","tabindex","validate-event","input-style","blur","focus","change","input","clear"],"description":"Input data using mouse or keyboard.\n\n[Docs](https://element-plus.org/en-US/component/input.html#input)"},"el-row":{"attributes":["gutter","justify","align","tag"],"subtags":["el-col"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#row)"},"el-col":{"attributes":["span","offset","push","pull","xs","sm","md","lg","xl","tag"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#col)"},"el-link":{"attributes":["type","underline","disabled","href","icon"],"description":"Text hyperlink\n\n[Docs](https://element-plus.org/en-US/component/link.html#link)"},"el-menu":{"attributes":["mode","collapse","ellipsis","background-color","text-color","active-text-color","default-active","default-openeds","unique-opened","menu-trigger","router","collapse-transition","popper-effect","select","open","close"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"Menu that provides navigation for your website.\n\n[Docs](https://element-plus.org/en-US/component/menu.html#menu)"},"el-sub-menu":{"attributes":["index","popper-class","show-timeout","hide-timeout","disabled","popper-append-to-body","teleported","popper-offset","expand-close-icon","expand-open-icon","collapse-close-icon","collapse-open-icon"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#submenu)"},"el-menu-item":{"attributes":["index","route","disabled","click"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item)"},"el-menu-item-group":{"attributes":["title"],"subtags":["el-menu-item"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item-group)"},"el-page-header":{"attributes":["icon","title","content","back"],"description":"If path of the page is simple, it is recommended to use PageHeader instead of the Breadcrumb.\n\n[Docs](https://element-plus.org/en-US/component/page-header.html#page-header)"},"el-pagination":{"attributes":["small","background","page-size","default-page-size","total","page-count","pager-count","current-page","default-current-page","layout","page-sizes","popper-class","prev-text","prev-icon","next-text","next-icon","disabled","hide-on-single-page","size-change","current-change","prev-click","next-click"],"description":"If you have too much data to display in one page, use pagination.\n\n[Docs](https://element-plus.org/en-US/component/pagination.html#pagination)"},"el-popconfirm":{"attributes":["title","confirm-button-text","cancel-button-text","confirm-button-type","cancel-button-type","icon","icon-color","hide-icon","teleported","persistent","width","confirm","cancel"],"description":"A simple confirmation dialog of an element click action.\n\n[Docs](https://element-plus.org/en-US/component/popconfirm.html#popconfirm)"},"el-popover":{"attributes":["trigger","title","effect","content","width","placement","disabled","visible","offset","transition","show-arrow","popper-options","popper-class","popper-style","show-after","hide-after","auto-close","tabindex","teleported","persistent","show","before-enter","after-enter","hide","before-leave","after-leave"],"description":":::tip\n\n[Docs](https://element-plus.org/en-US/component/popover.html#popover)"},"el-progress":{"attributes":["percentage","type","stroke-width","text-inside","status","indeterminate","duration","color","width","show-text","stroke-linecap","format"],"description":"Progress is used to show the progress of current operation, and inform the user the current status.\n\n[Docs](https://element-plus.org/en-US/component/progress.html#progress)"},"el-radio":{"attributes":["model-value","label","disabled","border","size","name","change"],"description":"Single selection among multiple options.\n\n[Docs](https://element-plus.org/en-US/component/radio.html#radio)"},"el-radio-group":{"attributes":["model-value","size","disabled","text-color","fill","validate-event","label","name","id","change"],"subtags":["el-radio","el-radio-button"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiogroup)"},"el-radio-button":{"attributes":["label","disabled","name"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiobutton)"},"el-rate":{"attributes":["model-value","max","size","disabled","allow-half","low-threshold","high-threshold","colors","void-color","disabled-void-color","icons","void-icon","disabled-void-icon","show-text","show-score","text-color","texts","score-template","clearable","id","label","change"],"description":"Used for rating\n\n[Docs](https://element-plus.org/en-US/component/rate.html#rate)"},"el-result":{"attributes":["title","sub-title","icon"],"description":"Used to give feedback on the result of user's operation or access exception.\n\n[Docs](https://element-plus.org/en-US/component/result.html#result)"},"el-scrollbar":{"attributes":["height","max-height","native","wrap-style","wrap-class","view-style","view-class","noresize","tag","always","min-size","scroll"],"description":"Used to replace the browser's native scrollbar.\n\n[Docs](https://element-plus.org/en-US/component/scrollbar.html#scrollbar)"},"el-select-v2":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","clear-icon","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","reserve-keyword","no-data-text","popper-class","popper-append-to-body","teleported","persistent","popper-options","automatic-dropdown","height","scrollbar-always-on","remote","remote-method","validate-event","placement","change","visible-change","remove-tag","clear","blur","focus"],"description":"[Docs](https://element-plus.org/en-US/component/select-v2.html#selectv2)"},"el-select":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","filter-method","remote","remote-method","remote-show-suffix","loading","loading-text","no-match-text","no-data-text","popper-class","reserve-keyword","default-first-option","popper-append-to-body","teleported","persistent","automatic-dropdown","clear-icon","fit-input-width","suffix-icon","suffix-transition","tag-type","validate-event","placement","change","visible-change","remove-tag","clear","blur","focus"],"subtags":["el-option-group","el-option"],"description":"When there are plenty of options, use a drop-down menu to display and select desired ones.\n\n[Docs](https://element-plus.org/en-US/component/select.html#select)"},"el-option-group":{"attributes":["label","disabled"],"subtags":["el-option"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option-group)"},"el-option":{"attributes":["value","label","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option)"},"el-skeleton":{"attributes":["animated","count","loading","rows","throttle"],"description":"When loading data, and you need a rich experience for visual and interactions for your end users, you can choose `skeleton`.\n\n[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton)"},"el-skeleton-item":{"attributes":["variant"],"description":"[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton-item)"},"el-slider":{"attributes":["model-value","min","max","disabled","step","show-input","show-input-controls","size","input-size","show-stops","show-tooltip","format-tooltip","range","vertical","height","label","range-start-label","range-end-label","format-value-text","debounce","tooltip-class","placement","marks","validate-event","change","input"],"description":"Drag the slider within a fixed range.\n\n[Docs](https://element-plus.org/en-US/component/slider.html#slider)"},"el-space":{"attributes":["alignment","class","direction","prefix-cls","style","spacer","size","wrap","fill","fill-ratio"],"description":"Even though we have [Divider]\n\n[Docs](https://element-plus.org/en-US/component/space.html#space)"},"el-statistic":{"description":"Display statistics.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#statistic)"},"el-countdown":{"description":":::demo Countdown component, support to add other components control countdown.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#countdown)"},"el-steps":{"attributes":["space","direction","active","process-status","finish-status","align-center","simple"],"subtags":["el-step"],"description":"Guide the user to complete tasks in accordance with the process. Its steps can be set according to the actual application scenario and the number of the steps can't be less than 2.\n\n[Docs](https://element-plus.org/en-US/component/steps.html#steps)"},"el-step":{"attributes":["title","description","icon","status"],"description":"[Docs](https://element-plus.org/en-US/component/steps.html#step)"},"el-switch":{"attributes":["model-value","disabled","loading","size","width","inline-prompt","active-icon","inactive-icon","active-text","inactive-text","active-value","inactive-value","active-color","inactive-color","border-color","name","validate-event","before-change","change"],"description":"Switch is used for switching between two opposing states.\n\n[Docs](https://element-plus.org/en-US/component/switch.html#switch)"},"el-table-v2":{"attributes":["cache","estimated-row-height","header-class","header-props","header-cell-props","header-height","footer-height","row-class","row-key","row-props","row-height","cell-props","columns","data","data-getter","fixed-data","expand-column-key","expanded-row-keys","default-expanded-row-keys","class","fixed","width","height","max-height","h-scrollbar-size","v-scrollbar-size","scrollbar-always-on","sort-by","sort-state","column-sort","expanded-rows-change","end-reached","scroll","rows-rendered","row-expand","row-event-handlers"],"description":"[Docs](https://element-plus.org/en-US/component/table-v2.html#tablev2)"},"el-table":{"attributes":["data","height","max-height","stripe","border","size","fit","show-header","highlight-current-row","current-row-key","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","row-key","empty-text","default-expand-all","expand-row-keys","default-sort","tooltip-effect","tooltip-options","show-summary","sum-text","summary-method","span-method","select-on-indeterminate","indent","lazy","load","tree-props","table-layout","scrollbar-always-on","flexible","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],"subtags":["el-table-column"],"description":"Display multiple data with similar format. You can sort, filter, compare your data in a table.\n\n[Docs](https://element-plus.org/en-US/component/table.html#table)"},"el-table-column":{"attributes":["type","index","label","column-key","prop","width","min-width","fixed","render-header","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","selectable","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"],"description":"[Docs](https://element-plus.org/en-US/component/table.html#table-column)"},"el-tabs":{"attributes":["model-value","type","closable","addable","editable","tab-position","stretch","before-leave","tab-click","tab-change","tab-remove","tab-add","edit"],"subtags":["el-tab-pane"],"description":"Divide data collections which are related yet belong to different types.\n\n[Docs](https://element-plus.org/en-US/component/tabs.html#tabs)"},"el-tab-pane":{"attributes":["label","disabled","name","closable","lazy"],"description":"[Docs](https://element-plus.org/en-US/component/tabs.html#tab-pane)"},"el-check-tag":{"attributes":["checked","change"],"description":"[Docs](https://element-plus.org/en-US/component/tag.html#checktag)"},"el-tag":{"attributes":["type","closable","disable-transitions","hit","color","size","effect","round","click","close"],"description":"Used for marking and selection.\n\n[Docs](https://element-plus.org/en-US/component/tag.html#tag)"},"el-time-picker":{"attributes":["model-value","readonly","disabled","editable","clearable","size","placeholder","start-placeholder","end-placeholder","is-range","arrow-control","popper-class","range-separator","format","default-value","id","name","prefix-icon","clear-icon","disabled-hours","disabled-minutes","disabled-seconds","teleported","change","blur","focus","visible-change"],"description":"Use Time Picker for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-picker.html#timepicker)"},"el-time-select":{"attributes":["model-value","disabled","editable","clearable","size","placeholder","name","effect","prefix-icon","clear-icon","start","end","step","min-time","max-time","format","change","blur","focus"],"description":"Use Time Select for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-select.html#timeselect)"},"el-timeline":{"subtags":["el-timeline-item"],"description":"Visually display timeline.\n\n[Docs](https://element-plus.org/en-US/component/timeline.html#timeline)"},"el-timeline-item":{"attributes":["timestamp","hide-timestamp","center","placement","type","color","size","icon","hollow"],"description":"[Docs](https://element-plus.org/en-US/component/timeline.html#timeline-item)"},"el-tooltip":{"attributes":["append-to","effect","content","raw-content","placement","visible","disabled","offset","transition","popper-options","show-after","show-arrow","hide-after","auto-close","manual","popper-class","enterable","tabindex","teleported","trigger","virtual-triggering","virtual-ref","trigger-keys"],"description":"Display prompt information for mouse hover.\n\n[Docs](https://element-plus.org/en-US/component/tooltip.html#tooltip)"},"el-transfer":{"attributes":["model-value","data","filterable","filter-placeholder","filter-method","target-order","titles","button-texts","render-content","format","props","left-default-checked","right-default-checked","validate-event","change","left-check-change","right-check-change"],"description":"[Docs](https://element-plus.org/en-US/component/transfer.html#transfer)"},"el-own":{"attributes":["cache-data"],"description":"[Docs](https://element-plus.org/en-US/component/tree-select.html#own)"},"el-tree-v2":{"attributes":["data","empty-text","props","highlight-current","expand-on-click-node","check-on-click-node","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-method","indent","icon","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse"],"description":"[Docs](https://element-plus.org/en-US/component/tree-v2.html#treev2)"},"el-tree":{"attributes":["data","empty-text","node-key","props","render-after-expand","load","render-content","highlight-current","default-expand-all","expand-on-click-node","check-on-click-node","auto-expand-parent","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-node-method","accordion","indent","icon","lazy","draggable","allow-drag","allow-drop","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],"description":"Display a set of data with hierarchies.\n\n[Docs](https://element-plus.org/en-US/component/tree.html#tree)"},"el-upload":{"attributes":["action","headers","method","multiple","data","name","with-credentials","show-file-list","drag","accept","on-preview","on-remove","on-success","on-error","on-progress","on-change","on-exceed","before-upload","before-remove","file-list","list-type","auto-upload","http-request","disabled","limit"],"description":"Upload files by clicking or drag-and-drop.\n\n[Docs](https://element-plus.org/en-US/component/upload.html#upload)"}}
1
+ {"el-affix":{"attributes":["offset","position","target","z-index","change","scroll"],"description":"Fix the element to a specific visible area.\n\n[Docs](https://element-plus.org/en-US/component/affix.html#affix)"},"el-alert":{"attributes":["title","type","description","closable","center","close-text","show-icon","effect","close"],"description":"Displays important alert messages.\n\n[Docs](https://element-plus.org/en-US/component/alert.html#alert)"},"el-autocomplete":{"attributes":["model-value","placeholder","clearable","disabled","value-key","debounce","placement","fetch-suggestions","trigger-on-focus","select-when-unmatched","name","label","hide-loading","popper-class","popper-append-to-body","teleported","highlight-first-item","fit-input-width","select","change"],"description":"Get some recommended tips based on the current input.\n\n[Docs](https://element-plus.org/en-US/component/autocomplete.html#autocomplete)"},"el-avatar":{"attributes":["icon","size","shape","src","src-set","alt","fit","error"],"description":"Avatars can be used to represent people or objects. It supports images, Icons, or characters.\n\n[Docs](https://element-plus.org/en-US/component/avatar.html#avatar)"},"el-backtop":{"attributes":["target","visibility-height","right","bottom","click"],"description":"A button to back to top.\n\n[Docs](https://element-plus.org/en-US/component/backtop.html#backtop)"},"el-badge":{"attributes":["value","max","is-dot","hidden","type"],"description":"A number or status mark on buttons and icons.\n\n[Docs](https://element-plus.org/en-US/component/badge.html#badge)"},"el-breadcrumb":{"attributes":["separator","separator-icon"],"subtags":["el-breadcrumb-item"],"description":"Displays the location of the current page, making it easier to browser back.\n\n[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumb)"},"el-breadcrumb-item":{"attributes":["to","replace"],"description":"[Docs](https://element-plus.org/en-US/component/breadcrumb.html#breadcrumbitem)"},"el-button":{"attributes":["size","type","plain","text","bg","link","round","circle","loading","loading-icon","disabled","icon","autofocus","native-type","auto-insert-space","color","dark"],"description":"Commonly used button.\n\n[Docs](https://element-plus.org/en-US/component/button.html#button)"},"el-button-group":{"attributes":["size","type"],"subtags":["el-button"],"description":"[Docs](https://element-plus.org/en-US/component/button.html#buttongroup)"},"el-calendar":{"attributes":["model-value","range"],"description":"Display date.\n\n[Docs](https://element-plus.org/en-US/component/calendar.html#calendar)"},"el-card":{"attributes":["header","body-style","shadow"],"description":"Integrate information in a card container.\n\n[Docs](https://element-plus.org/en-US/component/card.html#card)"},"el-carousel":{"attributes":["height","initial-index","trigger","autoplay","interval","indicator-position","arrow","type","loop","direction","pause-on-hover","change"],"subtags":["el-carousel-item"],"description":"Loop a series of images or texts in a limited space\n\n[Docs](https://element-plus.org/en-US/component/carousel.html#carousel)"},"el-carousel-item":{"attributes":["name","label"],"description":"[Docs](https://element-plus.org/en-US/component/carousel.html#carousel-item)"},"el-cascader":{"attributes":["model-value","options","props","size","placeholder","disabled","clearable","show-all-levels","collapse-tags","collapse-tags-tooltip","separator","filterable","filter-method","debounce","before-filter","popper-class","teleported","popper-append-to-body ^","tag-type","validate-event","change","expand-change","blur","focus","visible-change","remove-tag"],"description":"If the options have a clear hierarchical structure, Cascader can be used to view and select them.\n\n[Docs](https://element-plus.org/en-US/component/cascader.html#cascader)"},"el-cascader-panel":{"attributes":["model-value","options","props","change","expand-change","close"],"description":"[Docs](https://element-plus.org/en-US/component/cascader.html#cascaderpanel)"},"el-checkbox":{"attributes":["model-value","label","true-label","false-label","disabled","border","size","name","checked","indeterminate","validate-event","tabindex","id","controls","change"],"description":"A group of options for multiple choices.\n\n[Docs](https://element-plus.org/en-US/component/checkbox.html#checkbox)"},"el-checkbox-group":{"attributes":["model-value","size","disabled","min","max","label","text-color","fill","tag","validate-event","change"],"subtags":["el-checkbox","el-checkbox-button"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxgroup)"},"el-checkbox-button":{"attributes":["label","true-label","false-label","disabled","name","checked"],"description":"[Docs](https://element-plus.org/en-US/component/checkbox.html#checkboxbutton)"},"el-collapse":{"attributes":["model-value","accordion","change"],"subtags":["el-collapse-item"],"description":"Use Collapse to store contents.\n\n[Docs](https://element-plus.org/en-US/component/collapse.html#collapse)"},"el-collapse-item":{"attributes":["name","title","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/collapse.html#collapse-item)"},"el-color-picker":{"attributes":["model-value","disabled","size","show-alpha","color-format","popper-class","predefine","validate-event","tabindex","label","id","change","active-change"],"description":"ColorPicker is a color selector supporting multiple color formats.\n\n[Docs](https://element-plus.org/en-US/component/color-picker.html#colorpicker)"},"el-config-provider":{"attributes":["locale","size","z-index","namespace","button","message","experimental-features"],"description":"Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere.\n\n[Docs](https://element-plus.org/en-US/component/config-provider.html#config-provider)"},"el-container":{"attributes":["direction"],"subtags":["el-container","el-header","el-aside","el-main","el-footer"],"description":"Container components for scaffolding basic structure of the page:\n\n[Docs](https://element-plus.org/en-US/component/container.html#container)"},"el-header":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#header)"},"el-aside":{"attributes":["width"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#aside)"},"el-main":{"description":"[Docs](https://element-plus.org/en-US/component/container.html#main)"},"el-footer":{"attributes":["height"],"description":"[Docs](https://element-plus.org/en-US/component/container.html#footer)"},"el-date-picker":{"attributes":["model-value","readonly","disabled","size","editable","clearable","placeholder","start-placeholder","end-placeholder","type","format","popper-class","range-separator","default-value","default-time","value-format","id","name","unlink-panels","prefix-icon","clear-icon","validate-event","disabled-date","shortcuts","cell-class-name","teleported","change","blur","focus","calendar-change","panel-change","visible-change"],"description":"Use Date Picker for date input.\n\n[Docs](https://element-plus.org/en-US/component/date-picker.html#datepicker)"},"el-descriptions":{"attributes":["border","column","direction","size","title","extra"],"subtags":["el-descriptions-item"],"description":"Display multiple fields in list form.\n\n[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions)"},"el-descriptions-item":{"attributes":["label","span","width","min-width","align","label-align","class-name","label-class-name"],"description":"[Docs](https://element-plus.org/en-US/component/descriptions.html#descriptions-item)"},"el-dialog":{"attributes":["model-value","title","width","fullscreen","top","modal","append-to-body","lock-scroll","custom-class","open-delay","close-delay","close-on-click-modal","close-on-press-escape","show-close","before-close","draggable","center","align-center","destroy-on-close","open","opened","close","closed","open-auto-focus","close-auto-focus"],"description":"Informs users while preserving the current page state.\n\n[Docs](https://element-plus.org/en-US/component/dialog.html#dialog)"},"el-divider":{"attributes":["direction","border-style","content-position"],"description":"The dividing line that separates the content.\n\n[Docs](https://element-plus.org/en-US/component/divider.html#divider)"},"el-drawer":{"attributes":["model-value","append-to-body","lock-scroll","before-close","close-on-click-modal","close-on-press-escape","open-delay","close-delay","custom-class","destroy-on-close","modal","direction","show-close","size","title","with-header","modal-class","z-index","open","opened","close","closed"],"description":"Sometimes, `Dialog` does not always satisfy our requirements, let's say you have a massive form, or you need space to display something like `terms & conditions`, `Drawer` has almost identical API with `Dialog`, but it introduces different user experience.\n\n[Docs](https://element-plus.org/en-US/component/drawer.html#drawer)"},"el-dropdown":{"attributes":["type","size","max-height","split-button","disabled","placement","trigger","hide-on-click","show-timeout","hide-timeout","role","tabindex","popper-class","popper-options","teleported","click","command","visible-change"],"subtags":["el-dropdown-menu"],"description":"Toggleable menu for displaying lists of links and actions.\n\n[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown)"},"el-dropdown-menu":{"subtags":["el-dropdown-item"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-menu)"},"el-dropdown-item":{"attributes":["command","disabled","divided","icon"],"description":"[Docs](https://element-plus.org/en-US/component/dropdown.html#dropdown-item)"},"el-empty":{"attributes":["image","image-size","description"],"description":"Placeholder hints for empty states.\n\n[Docs](https://element-plus.org/en-US/component/empty.html#empty)"},"el-form":{"attributes":["model","rules","inline","label-position","label-width","label-suffix","hide-required-asterisk","require-asterisk-position","show-message","inline-message","status-icon","validate-on-rule-change","size","disabled","scroll-to-error","validate"],"subtags":["el-form-item"],"description":"Form consists of `input`, `radio`, `select`, `checkbox` and so on. With form, you can collect, verify and submit data.\n\n[Docs](https://element-plus.org/en-US/component/form.html#form)"},"el-form-item":{"attributes":["prop","label","label-width","required","rules","error","show-message","inline-message","size","for","validate-status"],"description":"[Docs](https://element-plus.org/en-US/component/form.html#formitem)"},"el-icon":{"attributes":["color","size"],"description":"Element Plus provides a set of common icons.\n\n[Docs](https://element-plus.org/en-US/component/icon.html#icon)"},"el-image":{"attributes":["src","fit","hide-on-click-modal","`loading`","lazy","scroll-container","alt","referrer-policy","preview-src-list","z-index","initial-index","close-on-press-escape","preview-teleported","load","error","switch","close"],"description":"Besides the native features of img, support lazy load, custom placeholder and load failure, etc.\n\n[Docs](https://element-plus.org/en-US/component/image.html#image)"},"el-image-viewer":{"attributes":["url-list","z-index","initial-index","infinite","hide-on-click-modal","teleported","zoom-rate","close","switch"],"description":"[Docs](https://element-plus.org/en-US/component/image.html#image-viewer)"},"el-input-number":{"attributes":["model-value","min","max","step","step-strictly","precision","size","readonly","disabled","controls","controls-position","name","label","placeholder","id","value-on-clear","validate-event","change","blur","focus"],"description":"Input numerical values with a customizable range.\n\n[Docs](https://element-plus.org/en-US/component/input-number.html#input-number)"},"el-input":{"attributes":["type","model-value","maxlength","minlength","show-word-limit","placeholder","clearable","formatter","parser","show-password","disabled","size","prefix-icon","suffix-icon","rows","autosize","autocomplete","name","readonly","max","min","step","resize","autofocus","form","label","tabindex","validate-event","input-style","blur","focus","change","input","clear"],"description":"Input data using mouse or keyboard.\n\n[Docs](https://element-plus.org/en-US/component/input.html#input)"},"el-row":{"attributes":["gutter","justify","align","tag"],"subtags":["el-col"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#row)"},"el-col":{"attributes":["span","offset","push","pull","xs","sm","md","lg","xl","tag"],"description":"[Docs](https://element-plus.org/en-US/component/layout.html#col)"},"el-link":{"attributes":["type","underline","disabled","href","icon"],"description":"Text hyperlink\n\n[Docs](https://element-plus.org/en-US/component/link.html#link)"},"el-menu":{"attributes":["mode","collapse","ellipsis","background-color","text-color","active-text-color","default-active","default-openeds","unique-opened","menu-trigger","router","collapse-transition","popper-effect","select","open","close"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"Menu that provides navigation for your website.\n\n[Docs](https://element-plus.org/en-US/component/menu.html#menu)"},"el-sub-menu":{"attributes":["index","popper-class","show-timeout","hide-timeout","disabled","popper-append-to-body","teleported","popper-offset","expand-close-icon","expand-open-icon","collapse-close-icon","collapse-open-icon"],"subtags":["el-sub-menu","el-menu-item","el-menu-item-group"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#submenu)"},"el-menu-item":{"attributes":["index","route","disabled","click"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item)"},"el-menu-item-group":{"attributes":["title"],"subtags":["el-menu-item"],"description":"[Docs](https://element-plus.org/en-US/component/menu.html#menu-item-group)"},"el-page-header":{"attributes":["icon","title","content","back"],"description":"If path of the page is simple, it is recommended to use PageHeader instead of the Breadcrumb.\n\n[Docs](https://element-plus.org/en-US/component/page-header.html#page-header)"},"el-pagination":{"attributes":["small","background","page-size","default-page-size","total","page-count","pager-count","current-page","default-current-page","layout","page-sizes","popper-class","prev-text","prev-icon","next-text","next-icon","disabled","hide-on-single-page","size-change","current-change","prev-click","next-click"],"description":"If you have too much data to display in one page, use pagination.\n\n[Docs](https://element-plus.org/en-US/component/pagination.html#pagination)"},"el-popconfirm":{"attributes":["title","confirm-button-text","cancel-button-text","confirm-button-type","cancel-button-type","icon","icon-color","hide-icon","teleported","persistent","width","confirm","cancel"],"description":"A simple confirmation dialog of an element click action.\n\n[Docs](https://element-plus.org/en-US/component/popconfirm.html#popconfirm)"},"el-popover":{"attributes":["trigger","title","effect","content","width","placement","disabled","visible","offset","transition","show-arrow","popper-options","popper-class","popper-style","show-after","hide-after","auto-close","tabindex","teleported","persistent","show","before-enter","after-enter","hide","before-leave","after-leave"],"description":":::tip\n\n[Docs](https://element-plus.org/en-US/component/popover.html#popover)"},"el-progress":{"attributes":["percentage","type","stroke-width","text-inside","status","indeterminate","duration","color","width","show-text","stroke-linecap","format"],"description":"Progress is used to show the progress of current operation, and inform the user the current status.\n\n[Docs](https://element-plus.org/en-US/component/progress.html#progress)"},"el-radio":{"attributes":["model-value","label","disabled","border","size","name","change"],"description":"Single selection among multiple options.\n\n[Docs](https://element-plus.org/en-US/component/radio.html#radio)"},"el-radio-group":{"attributes":["model-value","size","disabled","text-color","fill","validate-event","label","name","id","change"],"subtags":["el-radio","el-radio-button"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiogroup)"},"el-radio-button":{"attributes":["label","disabled","name"],"description":"[Docs](https://element-plus.org/en-US/component/radio.html#radiobutton)"},"el-rate":{"attributes":["model-value","max","size","disabled","allow-half","low-threshold","high-threshold","colors","void-color","disabled-void-color","icons","void-icon","disabled-void-icon","show-text","show-score","text-color","texts","score-template","clearable","id","label","change"],"description":"Used for rating\n\n[Docs](https://element-plus.org/en-US/component/rate.html#rate)"},"el-result":{"attributes":["title","sub-title","icon"],"description":"Used to give feedback on the result of user's operation or access exception.\n\n[Docs](https://element-plus.org/en-US/component/result.html#result)"},"el-scrollbar":{"attributes":["height","max-height","native","wrap-style","wrap-class","view-style","view-class","noresize","tag","always","min-size","scroll"],"description":"Used to replace the browser's native scrollbar.\n\n[Docs](https://element-plus.org/en-US/component/scrollbar.html#scrollbar)"},"el-select-v2":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","clear-icon","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","reserve-keyword","no-data-text","popper-class","popper-append-to-body","teleported","persistent","popper-options","automatic-dropdown","height","scrollbar-always-on","remote","remote-method","validate-event","placement","change","visible-change","remove-tag","clear","blur","focus"],"description":"[Docs](https://element-plus.org/en-US/component/select-v2.html#selectv2)"},"el-select":{"attributes":["model-value","multiple","disabled","value-key","size","clearable","collapse-tags","collapse-tags-tooltip","multiple-limit","name","effect","autocomplete","placeholder","filterable","allow-create","filter-method","remote","remote-method","remote-show-suffix","loading","loading-text","no-match-text","no-data-text","popper-class","reserve-keyword","default-first-option","popper-append-to-body","teleported","persistent","automatic-dropdown","clear-icon","fit-input-width","suffix-icon","suffix-transition","tag-type","validate-event","placement","change","visible-change","remove-tag","clear","blur","focus"],"subtags":["el-option-group","el-option"],"description":"When there are plenty of options, use a drop-down menu to display and select desired ones.\n\n[Docs](https://element-plus.org/en-US/component/select.html#select)"},"el-option-group":{"attributes":["label","disabled"],"subtags":["el-option"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option-group)"},"el-option":{"attributes":["value","label","disabled"],"description":"[Docs](https://element-plus.org/en-US/component/select.html#option)"},"el-skeleton":{"attributes":["animated","count","loading","rows","throttle"],"description":"When loading data, and you need a rich experience for visual and interactions for your end users, you can choose `skeleton`.\n\n[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton)"},"el-skeleton-item":{"attributes":["variant"],"description":"[Docs](https://element-plus.org/en-US/component/skeleton.html#skeleton-item)"},"el-slider":{"attributes":["model-value","min","max","disabled","step","show-input","show-input-controls","size","input-size","show-stops","show-tooltip","format-tooltip","range","vertical","height","label","range-start-label","range-end-label","format-value-text","debounce","tooltip-class","placement","marks","validate-event","change","input"],"description":"Drag the slider within a fixed range.\n\n[Docs](https://element-plus.org/en-US/component/slider.html#slider)"},"el-space":{"attributes":["alignment","class","direction","prefix-cls","style","spacer","size","wrap","fill","fill-ratio"],"description":"Even though we have [Divider]\n\n[Docs](https://element-plus.org/en-US/component/space.html#space)"},"el-statistic":{"description":"Display statistics.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#statistic)"},"el-countdown":{"description":":::demo Countdown component, support to add other components control countdown.\n\n[Docs](https://element-plus.org/en-US/component/statistic.html#countdown)"},"el-steps":{"attributes":["space","direction","active","process-status","finish-status","align-center","simple"],"subtags":["el-step"],"description":"Guide the user to complete tasks in accordance with the process. Its steps can be set according to the actual application scenario and the number of the steps can't be less than 2.\n\n[Docs](https://element-plus.org/en-US/component/steps.html#steps)"},"el-step":{"attributes":["title","description","icon","status"],"description":"[Docs](https://element-plus.org/en-US/component/steps.html#step)"},"el-switch":{"attributes":["model-value","disabled","loading","size","width","inline-prompt","active-icon","inactive-icon","active-text","inactive-text","active-value","inactive-value","active-color","inactive-color","border-color","name","validate-event","before-change","change"],"description":"Switch is used for switching between two opposing states.\n\n[Docs](https://element-plus.org/en-US/component/switch.html#switch)"},"el-table-v2":{"attributes":["cache","estimated-row-height","header-class","header-props","header-cell-props","header-height","footer-height","row-class","row-key","row-props","row-height","cell-props","columns","data","data-getter","fixed-data","expand-column-key","expanded-row-keys","default-expanded-row-keys","class","fixed","width","height","max-height","h-scrollbar-size","v-scrollbar-size","scrollbar-always-on","sort-by","sort-state","column-sort","expanded-rows-change","end-reached","scroll","rows-rendered","row-expand","row-event-handlers"],"description":"[Docs](https://element-plus.org/en-US/component/table-v2.html#tablev2)"},"el-table":{"attributes":["data","height","max-height","stripe","border","size","fit","show-header","highlight-current-row","current-row-key","row-class-name","row-style","cell-class-name","cell-style","header-row-class-name","header-row-style","header-cell-class-name","header-cell-style","row-key","empty-text","default-expand-all","expand-row-keys","default-sort","tooltip-effect","tooltip-options","show-summary","sum-text","summary-method","span-method","select-on-indeterminate","indent","lazy","load","tree-props","table-layout","scrollbar-always-on","flexible","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","cell-contextmenu","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],"subtags":["el-table-column"],"description":"Display multiple data with similar format. You can sort, filter, compare your data in a table.\n\n[Docs](https://element-plus.org/en-US/component/table.html#table)"},"el-table-column":{"attributes":["type","index","label","column-key","prop","width","min-width","fixed","render-header","sortable","sort-method","sort-by","sort-orders","resizable","formatter","show-overflow-tooltip","align","header-align","class-name","label-class-name","selectable","reserve-selection","filters","filter-placement","filter-multiple","filter-method","filtered-value"],"description":"[Docs](https://element-plus.org/en-US/component/table.html#table-column)"},"el-tabs":{"attributes":["model-value","type","closable","addable","editable","tab-position","stretch","before-leave","tab-click","tab-change","tab-remove","tab-add","edit"],"subtags":["el-tab-pane"],"description":"Divide data collections which are related yet belong to different types.\n\n[Docs](https://element-plus.org/en-US/component/tabs.html#tabs)"},"el-tab-pane":{"attributes":["label","disabled","name","closable","lazy"],"description":"[Docs](https://element-plus.org/en-US/component/tabs.html#tab-pane)"},"el-check-tag":{"attributes":["checked","change"],"description":"[Docs](https://element-plus.org/en-US/component/tag.html#checktag)"},"el-tag":{"attributes":["type","closable","disable-transitions","hit","color","size","effect","round","click","close"],"description":"Used for marking and selection.\n\n[Docs](https://element-plus.org/en-US/component/tag.html#tag)"},"el-time-picker":{"attributes":["model-value","readonly","disabled","editable","clearable","size","placeholder","start-placeholder","end-placeholder","is-range","arrow-control","popper-class","range-separator","format","default-value","id","name","prefix-icon","clear-icon","disabled-hours","disabled-minutes","disabled-seconds","teleported","change","blur","focus","visible-change"],"description":"Use Time Picker for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-picker.html#timepicker)"},"el-time-select":{"attributes":["model-value","disabled","editable","clearable","size","placeholder","name","effect","prefix-icon","clear-icon","start","end","step","min-time","max-time","format","change","blur","focus"],"description":"Use Time Select for time input.\n\n[Docs](https://element-plus.org/en-US/component/time-select.html#timeselect)"},"el-timeline":{"subtags":["el-timeline-item"],"description":"Visually display timeline.\n\n[Docs](https://element-plus.org/en-US/component/timeline.html#timeline)"},"el-timeline-item":{"attributes":["timestamp","hide-timestamp","center","placement","type","color","size","icon","hollow"],"description":"[Docs](https://element-plus.org/en-US/component/timeline.html#timeline-item)"},"el-tooltip":{"attributes":["append-to","effect","content","raw-content","placement","visible","disabled","offset","transition","popper-options","show-after","show-arrow","hide-after","auto-close","manual","popper-class","enterable","tabindex","teleported","trigger","virtual-triggering","virtual-ref","trigger-keys"],"description":"Display prompt information for mouse hover.\n\n[Docs](https://element-plus.org/en-US/component/tooltip.html#tooltip)"},"el-transfer":{"attributes":["model-value","data","filterable","filter-placeholder","filter-method","target-order","titles","button-texts","render-content","format","props","left-default-checked","right-default-checked","validate-event","change","left-check-change","right-check-change"],"description":"[Docs](https://element-plus.org/en-US/component/transfer.html#transfer)"},"el-own":{"attributes":["cache-data"],"description":"[Docs](https://element-plus.org/en-US/component/tree-select.html#own)"},"el-tree-v2":{"attributes":["data","empty-text","props","highlight-current","expand-on-click-node","check-on-click-node","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-method","indent","icon","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse"],"description":"[Docs](https://element-plus.org/en-US/component/tree-v2.html#treev2)"},"el-tree":{"attributes":["data","empty-text","node-key","props","render-after-expand","load","render-content","highlight-current","default-expand-all","expand-on-click-node","check-on-click-node","auto-expand-parent","default-expanded-keys","show-checkbox","check-strictly","default-checked-keys","current-node-key","filter-node-method","accordion","indent","icon","lazy","draggable","allow-drag","allow-drop","node-click","node-contextmenu","check-change","check","current-change","node-expand","node-collapse","node-drag-start","node-drag-enter","node-drag-leave","node-drag-over","node-drag-end","node-drop"],"description":"Display a set of data with hierarchies.\n\n[Docs](https://element-plus.org/en-US/component/tree.html#tree)"},"el-upload":{"attributes":["action","headers","method","multiple","data","name","with-credentials","show-file-list","drag","accept","on-preview","on-remove","on-success","on-error","on-progress","on-change","on-exceed","before-upload","before-remove","file-list","list-type","auto-upload","http-request","disabled","limit"],"description":"Upload files by clicking or drag-and-drop.\n\n[Docs](https://element-plus.org/en-US/component/upload.html#upload)"}}