@element-plus/nightly 0.0.20220708 → 0.0.20220711

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 (300) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +122 -203
  3. package/dist/index.full.min.js +14 -14
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +14 -14
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +122 -203
  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/cs.js +1 -1
  33. package/dist/locale/cs.min.js +1 -1
  34. package/dist/locale/cs.min.mjs +1 -1
  35. package/dist/locale/cs.mjs +1 -1
  36. package/dist/locale/da.js +1 -1
  37. package/dist/locale/da.min.js +1 -1
  38. package/dist/locale/da.min.mjs +1 -1
  39. package/dist/locale/da.mjs +1 -1
  40. package/dist/locale/de.js +1 -1
  41. package/dist/locale/de.min.js +1 -1
  42. package/dist/locale/de.min.mjs +1 -1
  43. package/dist/locale/de.mjs +1 -1
  44. package/dist/locale/el.js +1 -1
  45. package/dist/locale/el.min.js +1 -1
  46. package/dist/locale/el.min.mjs +1 -1
  47. package/dist/locale/el.mjs +1 -1
  48. package/dist/locale/en.js +1 -1
  49. package/dist/locale/en.min.js +1 -1
  50. package/dist/locale/en.min.mjs +1 -1
  51. package/dist/locale/en.mjs +1 -1
  52. package/dist/locale/eo.js +1 -1
  53. package/dist/locale/eo.min.js +1 -1
  54. package/dist/locale/eo.min.mjs +1 -1
  55. package/dist/locale/eo.mjs +1 -1
  56. package/dist/locale/es.js +1 -1
  57. package/dist/locale/es.min.js +1 -1
  58. package/dist/locale/es.min.mjs +1 -1
  59. package/dist/locale/es.mjs +1 -1
  60. package/dist/locale/et.js +1 -1
  61. package/dist/locale/et.min.js +1 -1
  62. package/dist/locale/et.min.mjs +1 -1
  63. package/dist/locale/et.mjs +1 -1
  64. package/dist/locale/eu.js +1 -1
  65. package/dist/locale/eu.min.js +1 -1
  66. package/dist/locale/eu.min.mjs +1 -1
  67. package/dist/locale/eu.mjs +1 -1
  68. package/dist/locale/fa.js +1 -1
  69. package/dist/locale/fa.min.js +1 -1
  70. package/dist/locale/fa.min.mjs +1 -1
  71. package/dist/locale/fa.mjs +1 -1
  72. package/dist/locale/fi.js +1 -1
  73. package/dist/locale/fi.min.js +1 -1
  74. package/dist/locale/fi.min.mjs +1 -1
  75. package/dist/locale/fi.mjs +1 -1
  76. package/dist/locale/fr.js +1 -1
  77. package/dist/locale/fr.min.js +1 -1
  78. package/dist/locale/fr.min.mjs +1 -1
  79. package/dist/locale/fr.mjs +1 -1
  80. package/dist/locale/he.js +1 -1
  81. package/dist/locale/he.min.js +1 -1
  82. package/dist/locale/he.min.mjs +1 -1
  83. package/dist/locale/he.mjs +1 -1
  84. package/dist/locale/hr.js +1 -1
  85. package/dist/locale/hr.min.js +1 -1
  86. package/dist/locale/hr.min.mjs +1 -1
  87. package/dist/locale/hr.mjs +1 -1
  88. package/dist/locale/hu.js +1 -1
  89. package/dist/locale/hu.min.js +1 -1
  90. package/dist/locale/hu.min.mjs +1 -1
  91. package/dist/locale/hu.mjs +1 -1
  92. package/dist/locale/hy-am.js +1 -1
  93. package/dist/locale/hy-am.min.js +1 -1
  94. package/dist/locale/hy-am.min.mjs +1 -1
  95. package/dist/locale/hy-am.mjs +1 -1
  96. package/dist/locale/id.js +1 -1
  97. package/dist/locale/id.min.js +1 -1
  98. package/dist/locale/id.min.mjs +1 -1
  99. package/dist/locale/id.mjs +1 -1
  100. package/dist/locale/it.js +1 -1
  101. package/dist/locale/it.min.js +1 -1
  102. package/dist/locale/it.min.mjs +1 -1
  103. package/dist/locale/it.mjs +1 -1
  104. package/dist/locale/ja.js +1 -1
  105. package/dist/locale/ja.min.js +1 -1
  106. package/dist/locale/ja.min.mjs +1 -1
  107. package/dist/locale/ja.mjs +1 -1
  108. package/dist/locale/kk.js +1 -1
  109. package/dist/locale/kk.min.js +1 -1
  110. package/dist/locale/kk.min.mjs +1 -1
  111. package/dist/locale/kk.mjs +1 -1
  112. package/dist/locale/km.js +1 -1
  113. package/dist/locale/km.min.js +1 -1
  114. package/dist/locale/km.min.mjs +1 -1
  115. package/dist/locale/km.mjs +1 -1
  116. package/dist/locale/ko.js +1 -1
  117. package/dist/locale/ko.min.js +1 -1
  118. package/dist/locale/ko.min.mjs +1 -1
  119. package/dist/locale/ko.mjs +1 -1
  120. package/dist/locale/ku.js +1 -1
  121. package/dist/locale/ku.min.js +1 -1
  122. package/dist/locale/ku.min.mjs +1 -1
  123. package/dist/locale/ku.mjs +1 -1
  124. package/dist/locale/ky.js +1 -1
  125. package/dist/locale/ky.min.js +1 -1
  126. package/dist/locale/ky.min.mjs +1 -1
  127. package/dist/locale/ky.mjs +1 -1
  128. package/dist/locale/lt.js +1 -1
  129. package/dist/locale/lt.min.js +1 -1
  130. package/dist/locale/lt.min.mjs +1 -1
  131. package/dist/locale/lt.mjs +1 -1
  132. package/dist/locale/lv.js +1 -1
  133. package/dist/locale/lv.min.js +1 -1
  134. package/dist/locale/lv.min.mjs +1 -1
  135. package/dist/locale/lv.mjs +1 -1
  136. package/dist/locale/mg.js +1 -1
  137. package/dist/locale/mg.min.js +1 -1
  138. package/dist/locale/mg.min.mjs +1 -1
  139. package/dist/locale/mg.mjs +1 -1
  140. package/dist/locale/mn.js +1 -1
  141. package/dist/locale/mn.min.js +1 -1
  142. package/dist/locale/mn.min.mjs +1 -1
  143. package/dist/locale/mn.mjs +1 -1
  144. package/dist/locale/nb-no.js +1 -1
  145. package/dist/locale/nb-no.min.js +1 -1
  146. package/dist/locale/nb-no.min.mjs +1 -1
  147. package/dist/locale/nb-no.mjs +1 -1
  148. package/dist/locale/nl.js +1 -1
  149. package/dist/locale/nl.min.js +1 -1
  150. package/dist/locale/nl.min.mjs +1 -1
  151. package/dist/locale/nl.mjs +1 -1
  152. package/dist/locale/pa.js +1 -1
  153. package/dist/locale/pa.min.js +1 -1
  154. package/dist/locale/pa.min.mjs +1 -1
  155. package/dist/locale/pa.mjs +1 -1
  156. package/dist/locale/pl.js +1 -1
  157. package/dist/locale/pl.min.js +1 -1
  158. package/dist/locale/pl.min.mjs +1 -1
  159. package/dist/locale/pl.mjs +1 -1
  160. package/dist/locale/pt-br.js +1 -1
  161. package/dist/locale/pt-br.min.js +1 -1
  162. package/dist/locale/pt-br.min.mjs +1 -1
  163. package/dist/locale/pt-br.mjs +1 -1
  164. package/dist/locale/pt.js +1 -1
  165. package/dist/locale/pt.min.js +1 -1
  166. package/dist/locale/pt.min.mjs +1 -1
  167. package/dist/locale/pt.mjs +1 -1
  168. package/dist/locale/ro.js +1 -1
  169. package/dist/locale/ro.min.js +1 -1
  170. package/dist/locale/ro.min.mjs +1 -1
  171. package/dist/locale/ro.mjs +1 -1
  172. package/dist/locale/ru.js +1 -1
  173. package/dist/locale/ru.min.js +1 -1
  174. package/dist/locale/ru.min.mjs +1 -1
  175. package/dist/locale/ru.mjs +1 -1
  176. package/dist/locale/sk.js +1 -1
  177. package/dist/locale/sk.min.js +1 -1
  178. package/dist/locale/sk.min.mjs +1 -1
  179. package/dist/locale/sk.mjs +1 -1
  180. package/dist/locale/sl.js +1 -1
  181. package/dist/locale/sl.min.js +1 -1
  182. package/dist/locale/sl.min.mjs +1 -1
  183. package/dist/locale/sl.mjs +1 -1
  184. package/dist/locale/sr.js +1 -1
  185. package/dist/locale/sr.min.js +1 -1
  186. package/dist/locale/sr.min.mjs +1 -1
  187. package/dist/locale/sr.mjs +1 -1
  188. package/dist/locale/sv.js +1 -1
  189. package/dist/locale/sv.min.js +1 -1
  190. package/dist/locale/sv.min.mjs +1 -1
  191. package/dist/locale/sv.mjs +1 -1
  192. package/dist/locale/ta.js +1 -1
  193. package/dist/locale/ta.min.js +1 -1
  194. package/dist/locale/ta.min.mjs +1 -1
  195. package/dist/locale/ta.mjs +1 -1
  196. package/dist/locale/th.js +1 -1
  197. package/dist/locale/th.min.js +1 -1
  198. package/dist/locale/th.min.mjs +1 -1
  199. package/dist/locale/th.mjs +1 -1
  200. package/dist/locale/tk.js +1 -1
  201. package/dist/locale/tk.min.js +1 -1
  202. package/dist/locale/tk.min.mjs +1 -1
  203. package/dist/locale/tk.mjs +1 -1
  204. package/dist/locale/tr.js +1 -1
  205. package/dist/locale/tr.min.js +1 -1
  206. package/dist/locale/tr.min.mjs +1 -1
  207. package/dist/locale/tr.mjs +1 -1
  208. package/dist/locale/ug-cn.js +1 -1
  209. package/dist/locale/ug-cn.min.js +1 -1
  210. package/dist/locale/ug-cn.min.mjs +1 -1
  211. package/dist/locale/ug-cn.mjs +1 -1
  212. package/dist/locale/uk.js +1 -1
  213. package/dist/locale/uk.min.js +1 -1
  214. package/dist/locale/uk.min.mjs +1 -1
  215. package/dist/locale/uk.mjs +1 -1
  216. package/dist/locale/uz-uz.js +1 -1
  217. package/dist/locale/uz-uz.min.js +1 -1
  218. package/dist/locale/uz-uz.min.mjs +1 -1
  219. package/dist/locale/uz-uz.mjs +1 -1
  220. package/dist/locale/vi.js +1 -1
  221. package/dist/locale/vi.min.js +1 -1
  222. package/dist/locale/vi.min.mjs +1 -1
  223. package/dist/locale/vi.mjs +1 -1
  224. package/dist/locale/zh-cn.js +1 -1
  225. package/dist/locale/zh-cn.min.js +1 -1
  226. package/dist/locale/zh-cn.min.mjs +1 -1
  227. package/dist/locale/zh-cn.mjs +1 -1
  228. package/dist/locale/zh-tw.js +1 -1
  229. package/dist/locale/zh-tw.min.js +1 -1
  230. package/dist/locale/zh-tw.min.mjs +1 -1
  231. package/dist/locale/zh-tw.mjs +1 -1
  232. package/es/components/cascader/src/index.mjs +10 -9
  233. package/es/components/cascader/src/index.mjs.map +1 -1
  234. package/es/components/scrollbar/src/scrollbar2.mjs +3 -1
  235. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  236. package/es/components/select/src/useSelect.mjs +0 -2
  237. package/es/components/select/src/useSelect.mjs.map +1 -1
  238. package/es/components/slider/src/marker.mjs +1 -1
  239. package/es/components/slider/src/marker.mjs.map +1 -1
  240. package/es/components/steps/src/item2.mjs +1 -1
  241. package/es/components/steps/src/item2.mjs.map +1 -1
  242. package/es/components/table/index.d.ts +21 -31
  243. package/es/components/table/src/table/style-helper.d.ts +21 -31
  244. package/es/components/table/src/table/style-helper.mjs +68 -95
  245. package/es/components/table/src/table/style-helper.mjs.map +1 -1
  246. package/es/components/table/src/table-layout.d.ts +1 -5
  247. package/es/components/table/src/table-layout.mjs +3 -52
  248. package/es/components/table/src/table-layout.mjs.map +1 -1
  249. package/es/components/table/src/table.mjs +29 -34
  250. package/es/components/table/src/table.mjs.map +1 -1
  251. package/es/components/table/src/table.vue.d.ts +21 -31
  252. package/es/components/table/src/util.mjs +6 -11
  253. package/es/components/table/src/util.mjs.map +1 -1
  254. package/es/components/table-v2/index.d.ts +1 -1
  255. package/es/components/table-v2/src/components/header.d.ts +1 -1
  256. package/es/components/table-v2/src/table-grid.d.ts +1 -1
  257. package/es/components/table-v2/src/table-v2.d.ts +1 -1
  258. package/es/hooks/use-floating/index.d.ts +1 -1
  259. package/es/hooks/use-floating/index.mjs.map +1 -1
  260. package/es/version.d.ts +1 -1
  261. package/es/version.mjs +1 -1
  262. package/es/version.mjs.map +1 -1
  263. package/lib/components/cascader/src/index.js +10 -9
  264. package/lib/components/cascader/src/index.js.map +1 -1
  265. package/lib/components/scrollbar/src/scrollbar2.js +3 -1
  266. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  267. package/lib/components/select/src/useSelect.js +0 -2
  268. package/lib/components/select/src/useSelect.js.map +1 -1
  269. package/lib/components/slider/src/marker.js +1 -1
  270. package/lib/components/slider/src/marker.js.map +1 -1
  271. package/lib/components/steps/src/item2.js +1 -1
  272. package/lib/components/steps/src/item2.js.map +1 -1
  273. package/lib/components/table/index.d.ts +21 -31
  274. package/lib/components/table/src/table/style-helper.d.ts +21 -31
  275. package/lib/components/table/src/table/style-helper.js +67 -94
  276. package/lib/components/table/src/table/style-helper.js.map +1 -1
  277. package/lib/components/table/src/table-layout.d.ts +1 -5
  278. package/lib/components/table/src/table-layout.js +3 -52
  279. package/lib/components/table/src/table-layout.js.map +1 -1
  280. package/lib/components/table/src/table.js +29 -34
  281. package/lib/components/table/src/table.js.map +1 -1
  282. package/lib/components/table/src/table.vue.d.ts +21 -31
  283. package/lib/components/table/src/util.js +6 -11
  284. package/lib/components/table/src/util.js.map +1 -1
  285. package/lib/components/table-v2/index.d.ts +1 -1
  286. package/lib/components/table-v2/src/components/header.d.ts +1 -1
  287. package/lib/components/table-v2/src/table-grid.d.ts +1 -1
  288. package/lib/components/table-v2/src/table-v2.d.ts +1 -1
  289. package/lib/hooks/use-floating/index.d.ts +1 -1
  290. package/lib/hooks/use-floating/index.js.map +1 -1
  291. package/lib/version.d.ts +1 -1
  292. package/lib/version.js +1 -1
  293. package/lib/version.js.map +1 -1
  294. package/package.json +2 -2
  295. package/theme-chalk/el-slider.css +1 -1
  296. package/theme-chalk/el-table.css +1 -1
  297. package/theme-chalk/index.css +1 -1
  298. package/theme-chalk/src/slider.scss +2 -0
  299. package/theme-chalk/src/table.scss +7 -1
  300. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div\n :style=\"style\"\n :class=\"[\n ns.b(),\n ns.is(isSimple ? 'simple' : parent.props.direction),\n ns.is('flex', isLast && !space && !isCenter),\n ns.is('center', isCenter && !isVertical && !isSimple),\n ]\"\n >\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div :class=\"[ns.e('icon'), ns.is(icon ? 'icon' : 'text')]\">\n <slot\n v-if=\"currentStatus !== 'success' && currentStatus !== 'error'\"\n name=\"icon\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <div v-if=\"!icon && !isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n <el-icon v-else :class=\"[ns.e('icon-inner'), ns.is('status')]\">\n <Check v-if=\"currentStatus === 'success'\" />\n <Close v-else />\n </el-icon>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number | undefined\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.steps.value = parent.steps.value.filter(\n (instance) => instance.uid !== currentInstance?.uid\n )\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis:\n typeof space.value === 'number'\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n let step = 100\n const style: CSSProperties = {}\n style.transitionDelay = `${150 * index.value}ms`\n if (status === parent.props.processStatus) {\n step = 0\n } else if (status === 'wait') {\n step = 0\n style.transitionDelay = `${-150 * index.value}ms`\n }\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[stepsCount.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: computed(() => currentInstance?.uid),\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.steps.value = [...parent.steps.value, stepItemState]\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA4FA,IAAA,MAAA,EAAA,GAAA,aAAA,MAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAA,GAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAA,GAAA,CAAA,EAAA,CAAA,CAAA;AACA,IAAA,MAAA,cAAA,GAAA,IAAA,EAAA,CAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,OAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,kBAAA,kBAAA,EAAA,CAAA;AAEA,IAAA,SAAA,CAAA,MAAA;AACA,MACA,KAAA,CAAA;AAAA,QACA,MAAA,OAAA,KAAA,CAAA,MAAA;AAAA,QACA,MAAA,OAAA,KAAA,CAAA,aAAA;AAAA,QACA,MAAA,OAAA,KAAA,CAAA,YAAA;AAAA,OACA,EACA,CAAA,CAAA,MAAA,CAAA,K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A,KAAA,CAAA,KAAA,CAAA,UAAA,CAAA,KAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAAA,IAAA,SAAA;AAAA,QACA,SAAA,CAAA,YAAA,CAAA,cAAA,CAAA,KAAA,CAAA,CAAA;AAEA,KAAA,CAAA;AAAA,IAAA,MACA,aAAA,GAAA,QAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,MAAA,eAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,GAAA,CAAA;AAAA,MACA,aAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAEA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"item2.mjs","sources":["../../../../../../packages/components/steps/src/item.vue"],"sourcesContent":["<template>\n <div\n :style=\"style\"\n :class=\"[\n ns.b(),\n ns.is(isSimple ? 'simple' : parent.props.direction),\n ns.is('flex', isLast && !space && !isCenter),\n ns.is('center', isCenter && !isVertical && !isSimple),\n ]\"\n >\n <!-- icon & line -->\n <div :class=\"[ns.e('head'), ns.is(currentStatus)]\">\n <div v-if=\"!isSimple\" :class=\"ns.e('line')\">\n <i :class=\"ns.e('line-inner')\" :style=\"lineStyle\" />\n </div>\n\n <div\n :class=\"[ns.e('icon'), ns.is(icon || $slots.icon ? 'icon' : 'text')]\"\n >\n <slot\n v-if=\"currentStatus !== 'success' && currentStatus !== 'error'\"\n name=\"icon\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon-inner')\">\n <component :is=\"icon\" />\n </el-icon>\n <div v-if=\"!icon && !isSimple\" :class=\"ns.e('icon-inner')\">\n {{ index + 1 }}\n </div>\n </slot>\n <el-icon v-else :class=\"[ns.e('icon-inner'), ns.is('status')]\">\n <Check v-if=\"currentStatus === 'success'\" />\n <Close v-else />\n </el-icon>\n </div>\n </div>\n <!-- title & description -->\n <div :class=\"ns.e('main')\">\n <div :class=\"[ns.e('title'), ns.is(currentStatus)]\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div v-if=\"isSimple\" :class=\"ns.e('arrow')\" />\n <div v-else :class=\"[ns.e('description'), ns.is(currentStatus)]\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { Check, Close } from '@element-plus/icons-vue'\nimport { stepProps } from './item'\n\nimport type { CSSProperties, Ref } from 'vue'\n\nexport interface IStepsProps {\n space: number | string\n active: number\n direction: string\n alignCenter: boolean\n simple: boolean\n finishStatus: string\n processStatus: string\n}\n\nexport interface StepItemState {\n uid: number | undefined\n currentStatus: string\n setIndex: (val: number) => void\n calcProgress: (status: string) => void\n}\n\nexport interface IStepsInject {\n props: IStepsProps\n steps: Ref<StepItemState[]>\n}\n\ndefineOptions({\n name: 'ElStep',\n})\n\nconst props = defineProps(stepProps)\nconst ns = useNamespace('step')\nconst index = ref(-1)\nconst lineStyle = ref({})\nconst internalStatus = ref('')\nconst parent = inject('ElSteps') as IStepsInject\nconst currentInstance = getCurrentInstance()\n\nonMounted(() => {\n watch(\n [\n () => parent.props.active,\n () => parent.props.processStatus,\n () => parent.props.finishStatus,\n ],\n ([active]) => {\n updateStatus(active)\n },\n { immediate: true }\n )\n})\n\nonBeforeUnmount(() => {\n parent.steps.value = parent.steps.value.filter(\n (instance) => instance.uid !== currentInstance?.uid\n )\n})\n\nconst currentStatus = computed(() => {\n return props.status || internalStatus.value\n})\n\nconst prevStatus = computed(() => {\n const prevStep = parent.steps.value[index.value - 1]\n return prevStep ? prevStep.currentStatus : 'wait'\n})\n\nconst isCenter = computed(() => {\n return parent.props.alignCenter\n})\n\nconst isVertical = computed(() => {\n return parent.props.direction === 'vertical'\n})\n\nconst isSimple = computed(() => {\n return parent.props.simple\n})\n\nconst stepsCount = computed(() => {\n return parent.steps.value.length\n})\n\nconst isLast = computed(() => {\n return parent.steps.value[stepsCount.value - 1]?.uid === currentInstance?.uid\n})\n\nconst space = computed(() => {\n return isSimple.value ? '' : parent.props.space\n})\n\nconst style = computed(() => {\n const style: CSSProperties = {\n flexBasis:\n typeof space.value === 'number'\n ? `${space.value}px`\n : space.value\n ? space.value\n : `${100 / (stepsCount.value - (isCenter.value ? 0 : 1))}%`,\n }\n if (isVertical.value) return style\n if (isLast.value) {\n style.maxWidth = `${100 / stepsCount.value}%`\n }\n return style\n})\n\nconst setIndex = (val: number) => {\n index.value = val\n}\n\nconst calcProgress = (status: string) => {\n let step = 100\n const style: CSSProperties = {}\n style.transitionDelay = `${150 * index.value}ms`\n if (status === parent.props.processStatus) {\n step = 0\n } else if (status === 'wait') {\n step = 0\n style.transitionDelay = `${-150 * index.value}ms`\n }\n style.borderWidth = step && !isSimple.value ? '1px' : 0\n style[parent.props.direction === 'vertical' ? 'height' : 'width'] = `${step}%`\n lineStyle.value = style\n}\n\nconst updateStatus = (activeIndex: number) => {\n if (activeIndex > index.value) {\n internalStatus.value = parent.props.finishStatus\n } else if (activeIndex === index.value && prevStatus.value !== 'error') {\n internalStatus.value = parent.props.processStatus\n } else {\n internalStatus.value = 'wait'\n }\n const prevChild = parent.steps.value[stepsCount.value - 1]\n if (prevChild) prevChild.calcProgress(internalStatus.value)\n}\n\nconst stepItemState = reactive({\n uid: computed(() => currentInstance?.uid),\n currentStatus,\n setIndex,\n calcProgress,\n})\n\nparent.steps.value = [...parent.steps.value, stepItemState]\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA8FA,IAAA,MAAA,EAAA,GAAA,aAAA,MAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAA,GAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAA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AAA,YAAA,eAAA,KAAA;AACA,MAAA,IAAA,WAAA,GAAA,KAAA,CAAA;AAAA,sBACA,CAAA,KAAA,GAAA,MAAA,CAAA,KAAA,CAAA,YAAA,CAAA;AACA,OAAA,MAAA,IAAA,WAAA,UAAA,CAAA,KAAA,IAAA,UAAA,CAAA,KAAA,KAAA,OAAA,EAAA;AAAA,QACA,cAAA,CAAA,KAAA,GAAA,MAAA,CAAA,KAAA,CAAA,aAAA,CAAA;AACA,OAAA,MAAA;AAAA,QACA,cAAA,CAAA,KAAA,GAAA,MAAA,CAAA;AACA,OAAA;AACA,MAAA,MAAA,SAAA,GAAA,MAAA,CAAA,KAAA,CAAA,KAAA,CAAA,UAAA,CAAA,KAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAAA,IAAA,SAAA;AAAA,QACA,SAAA,CAAA,YAAA,CAAA,cAAA,CAAA,KAAA,CAAA,CAAA;AAEA,KAAA,CAAA;AAAA,IAAA,MACA,aAAA,GAAA,QAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,MAAA,eAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,eAAA,CAAA,GAAA,CAAA;AAAA,MACA,aAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAEA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -134,20 +134,10 @@ export declare const ElTable: import("element-plus/es/utils").SFCWithInstall<imp
134
134
  resizeState: import("vue").Ref<{
135
135
  width: number | null;
136
136
  height: number | null;
137
+ headerHeight: number | null;
137
138
  }>;
138
139
  isGroup: import("vue").Ref<boolean>;
139
140
  bodyWidth: import("vue").ComputedRef<string>;
140
- bodyHeight: import("vue").ComputedRef<{
141
- height: string;
142
- 'max-height'?: undefined;
143
- } | {
144
- 'max-height': string;
145
- height?: undefined;
146
- } | {
147
- height?: undefined;
148
- 'max-height'?: undefined;
149
- }>;
150
- height: import("vue").ComputedRef<string | number | undefined>;
151
141
  tableBodyStyles: import("vue").ComputedRef<{
152
142
  width: string;
153
143
  }>;
@@ -157,26 +147,6 @@ export declare const ElTable: import("element-plus/es/utils").SFCWithInstall<imp
157
147
  } | null>;
158
148
  debouncedUpdateLayout: import("lodash").DebouncedFunc<() => void>;
159
149
  handleFixedMousewheel: (event: any, data: any) => void;
160
- fixedHeight: import("vue").ComputedRef<{
161
- bottom: number;
162
- height?: undefined;
163
- } | {
164
- bottom: string;
165
- height?: undefined;
166
- } | {
167
- height: string;
168
- bottom?: undefined;
169
- }>;
170
- fixedBodyHeight: import("vue").ComputedRef<{
171
- height: string;
172
- 'max-height'?: undefined;
173
- } | {
174
- 'max-height': string;
175
- height?: undefined;
176
- } | {
177
- height?: undefined;
178
- 'max-height'?: undefined;
179
- }>;
180
150
  setCurrentRow: (row: any) => void;
181
151
  getSelectionRows: () => any;
182
152
  toggleRowSelection: (row: any, selected: boolean) => void;
@@ -197,6 +167,26 @@ export declare const ElTable: import("element-plus/es/utils").SFCWithInstall<imp
197
167
  display: string;
198
168
  verticalAlign: string;
199
169
  };
170
+ tableInnerStyle: import("vue").ComputedRef<{
171
+ height: string | number;
172
+ maxHeight?: undefined;
173
+ } | {
174
+ maxHeight: string | number;
175
+ height?: undefined;
176
+ } | {
177
+ height?: undefined;
178
+ maxHeight?: undefined;
179
+ }>;
180
+ scrollbarStyle: import("vue").ComputedRef<{
181
+ height: string;
182
+ maxHeight?: undefined;
183
+ } | {
184
+ maxHeight: string;
185
+ height?: undefined;
186
+ } | {
187
+ height?: undefined;
188
+ maxHeight?: undefined;
189
+ }>;
200
190
  scrollBarRef: import("vue").Ref<any>;
201
191
  scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
202
192
  setScrollLeft: (left?: number | undefined) => void;
@@ -9,47 +9,17 @@ declare function useStyle<T>(props: TableProps<T>, layout: TableLayout<T>, store
9
9
  handleMouseLeave: () => void;
10
10
  handleHeaderFooterMousewheel: (event: any, data: any) => void;
11
11
  tableSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
12
- bodyHeight: import("vue").ComputedRef<{
13
- height: string;
14
- 'max-height'?: undefined;
15
- } | {
16
- 'max-height': string;
17
- height?: undefined;
18
- } | {
19
- height?: undefined;
20
- 'max-height'?: undefined;
21
- }>;
22
- height: import("vue").ComputedRef<string | number | undefined>;
23
12
  emptyBlockStyle: import("vue").ComputedRef<{
24
13
  width: string;
25
14
  height: string;
26
15
  } | null>;
27
16
  handleFixedMousewheel: (event: any, data: any) => void;
28
- fixedHeight: import("vue").ComputedRef<{
29
- bottom: number;
30
- height?: undefined;
31
- } | {
32
- bottom: string;
33
- height?: undefined;
34
- } | {
35
- height: string;
36
- bottom?: undefined;
37
- }>;
38
- fixedBodyHeight: import("vue").ComputedRef<{
39
- height: string;
40
- 'max-height'?: undefined;
41
- } | {
42
- 'max-height': string;
43
- height?: undefined;
44
- } | {
45
- height?: undefined;
46
- 'max-height'?: undefined;
47
- }>;
48
17
  resizeProxyVisible: import("vue").Ref<boolean>;
49
18
  bodyWidth: import("vue").ComputedRef<string>;
50
19
  resizeState: import("vue").Ref<{
51
20
  width: null | number;
52
21
  height: null | number;
22
+ headerHeight: null | number;
53
23
  }>;
54
24
  doLayout: () => void;
55
25
  tableBodyStyles: import("vue").ComputedRef<{
@@ -60,5 +30,25 @@ declare function useStyle<T>(props: TableProps<T>, layout: TableLayout<T>, store
60
30
  display: string;
61
31
  verticalAlign: string;
62
32
  };
33
+ tableInnerStyle: import("vue").ComputedRef<{
34
+ height: string | number;
35
+ maxHeight?: undefined;
36
+ } | {
37
+ maxHeight: string | number;
38
+ height?: undefined;
39
+ } | {
40
+ height?: undefined;
41
+ maxHeight?: undefined;
42
+ }>;
43
+ scrollbarStyle: import("vue").ComputedRef<{
44
+ height: string;
45
+ maxHeight?: undefined;
46
+ } | {
47
+ maxHeight: string;
48
+ height?: undefined;
49
+ } | {
50
+ height?: undefined;
51
+ maxHeight?: undefined;
52
+ }>;
63
53
  };
64
54
  export default useStyle;
@@ -1,10 +1,7 @@
1
1
  import { ref, watchEffect, watch, unref, computed, onMounted, nextTick } from 'vue';
2
- import { useEventListener, useResizeObserver, isNumber } from '@vueuse/core';
3
- import '../../../../utils/index.mjs';
2
+ import { useEventListener, useResizeObserver } from '@vueuse/core';
4
3
  import '../../../../hooks/index.mjs';
5
- import { parseHeight } from '../util.mjs';
6
4
  import { useSize } from '../../../../hooks/use-common-props/index.mjs';
7
- import { isString } from '@vue/shared';
8
5
 
9
6
  function useStyle(props, layout, store, table) {
10
7
  const isHidden = ref(false);
@@ -15,14 +12,18 @@ function useStyle(props, layout, store, table) {
15
12
  };
16
13
  const resizeState = ref({
17
14
  width: null,
18
- height: null
15
+ height: null,
16
+ headerHeight: null
19
17
  });
20
18
  const isGroup = ref(false);
21
19
  const scrollbarViewStyle = {
22
- display: "block",
20
+ display: "inline-block",
23
21
  verticalAlign: "middle"
24
22
  };
25
23
  const tableWidth = ref();
24
+ const tableScrollHeight = ref(0);
25
+ const bodyScrollHeight = ref(0);
26
+ const headerScrollHeight = ref(0);
26
27
  watchEffect(() => {
27
28
  layout.setHeight(props.height);
28
29
  });
@@ -79,12 +80,14 @@ function useStyle(props, layout, store, table) {
79
80
  bindEvents();
80
81
  requestAnimationFrame(doLayout);
81
82
  const el = table.vnode.el;
83
+ const tableHeader = table.refs.headerWrapper;
82
84
  if (props.flexible && el && el.parentElement) {
83
85
  el.parentElement.style.minWidth = "0";
84
86
  }
85
87
  resizeState.value = {
86
88
  width: tableWidth.value = el.offsetWidth,
87
- height: el.offsetHeight
89
+ height: el.offsetHeight,
90
+ headerHeight: props.showHeader && tableHeader ? tableHeader.offsetHeight : null
88
91
  };
89
92
  store.states.columns.value.forEach((column) => {
90
93
  if (column.filteredValue && column.filteredValue.length) {
@@ -155,23 +158,36 @@ function useStyle(props, layout, store, table) {
155
158
  }
156
159
  };
157
160
  const resizeListener = () => {
161
+ var _a;
158
162
  if (!table.$ready)
159
163
  return;
160
164
  let shouldUpdateLayout = false;
161
165
  const el = table.vnode.el;
162
- const { width: oldWidth, height: oldHeight } = resizeState.value;
166
+ const {
167
+ width: oldWidth,
168
+ height: oldHeight,
169
+ headerHeight: oldHeaderHeight
170
+ } = resizeState.value;
163
171
  const width = tableWidth.value = el.offsetWidth;
164
172
  if (oldWidth !== width) {
165
173
  shouldUpdateLayout = true;
166
174
  }
167
- const height2 = el.offsetHeight;
168
- if ((props.height || shouldUpdateHeight.value) && oldHeight !== height2) {
175
+ const height = el.offsetHeight;
176
+ if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {
169
177
  shouldUpdateLayout = true;
170
178
  }
179
+ const tableHeader = table.refs.headerWrapper;
180
+ if (props.showHeader && tableHeader.offsetHeight !== oldHeaderHeight) {
181
+ shouldUpdateLayout = true;
182
+ }
183
+ tableScrollHeight.value = table.refs.tableWrapper.scrollHeight;
184
+ headerScrollHeight.value = ((_a = table.refs.headerWrapper) == null ? void 0 : _a.scrollHeight) || 0;
185
+ bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value;
171
186
  if (shouldUpdateLayout) {
172
187
  resizeState.value = {
173
188
  width,
174
- height: height2
189
+ height,
190
+ headerHeight: props.showHeader ? tableHeader.offsetHeight : null
175
191
  };
176
192
  doLayout();
177
193
  }
@@ -186,57 +202,57 @@ function useStyle(props, layout, store, table) {
186
202
  return "fixed";
187
203
  return props.tableLayout;
188
204
  });
189
- function calcMaxHeight(maxHeight, footerHeight, headerHeight) {
190
- const parsedMaxHeight = parseHeight(maxHeight);
191
- const tableHeaderHeight = props.showHeader ? headerHeight : 0;
192
- if (parsedMaxHeight === null)
193
- return;
194
- if (isString(parsedMaxHeight)) {
195
- return `calc(${parsedMaxHeight} - ${footerHeight}px - ${tableHeaderHeight}px)`;
205
+ const emptyBlockStyle = computed(() => {
206
+ if (props.data && props.data.length)
207
+ return null;
208
+ let height = "100%";
209
+ if (bodyScrollHeight.value) {
210
+ height = `${bodyScrollHeight.value}px`;
196
211
  }
197
- return parsedMaxHeight - footerHeight - tableHeaderHeight;
198
- }
199
- const height = computed(() => {
200
- const headerHeight = layout.headerHeight.value || 0;
201
- const bodyHeight2 = layout.bodyHeight.value;
202
- const footerHeight = layout.footerHeight.value || 0;
212
+ const width = tableWidth.value;
213
+ return {
214
+ width: width ? `${width}px` : "",
215
+ height
216
+ };
217
+ });
218
+ const tableInnerStyle = computed(() => {
203
219
  if (props.height) {
204
- return bodyHeight2 ? bodyHeight2 : void 0;
205
- } else if (props.maxHeight) {
206
- return calcMaxHeight(props.maxHeight, footerHeight, headerHeight);
220
+ return {
221
+ height: !Number.isNaN(Number(props.height)) ? `${props.height}px` : props.height
222
+ };
207
223
  }
208
- return void 0;
224
+ if (props.maxHeight) {
225
+ return {
226
+ maxHeight: !Number.isNaN(Number(props.maxHeight)) ? `${props.maxHeight}px` : props.maxHeight
227
+ };
228
+ }
229
+ return {};
209
230
  });
210
- const bodyHeight = computed(() => {
211
- const headerHeight = layout.headerHeight.value || 0;
212
- const bodyHeight2 = layout.bodyHeight.value;
213
- const footerHeight = layout.footerHeight.value || 0;
231
+ const scrollbarStyle = computed(() => {
232
+ var _a;
214
233
  if (props.height) {
215
234
  return {
216
- height: bodyHeight2 ? `${bodyHeight2}px` : ""
235
+ height: "100%"
217
236
  };
218
- } else if (props.maxHeight) {
219
- const maxHeight = calcMaxHeight(props.maxHeight, footerHeight, headerHeight);
220
- if (maxHeight !== null) {
237
+ }
238
+ if (props.maxHeight) {
239
+ if (!Number.isNaN(Number(props.maxHeight))) {
240
+ const headerHeight = ((_a = table.refs.headerWrapper) == null ? void 0 : _a.scrollHeight) || 0;
241
+ const maxHeight = props.maxHeight;
242
+ const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight);
243
+ if (reachMaxHeight) {
244
+ return {
245
+ maxHeight: `${tableScrollHeight.value - headerHeight}px`
246
+ };
247
+ }
248
+ } else {
221
249
  return {
222
- "max-height": `${maxHeight}${isNumber(maxHeight) ? "px" : ""}`
250
+ maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value}px)`
223
251
  };
224
252
  }
225
253
  }
226
254
  return {};
227
255
  });
228
- const emptyBlockStyle = computed(() => {
229
- if (props.data && props.data.length)
230
- return null;
231
- let height2 = "100%";
232
- if (layout.appendHeight.value) {
233
- height2 = `calc(100% - ${layout.appendHeight.value}px)`;
234
- }
235
- return {
236
- width: tableWidth.value ? `${tableWidth.value}px` : "",
237
- height: height2
238
- };
239
- });
240
256
  const handleFixedMousewheel = (event, data) => {
241
257
  const bodyWrapper = table.refs.bodyWrapper;
242
258
  if (Math.abs(data.spinY) > 0) {
@@ -252,47 +268,6 @@ function useStyle(props, layout, store, table) {
252
268
  bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
253
269
  }
254
270
  };
255
- const fixedHeight = computed(() => {
256
- if (props.maxHeight) {
257
- if (props.showSummary) {
258
- return {
259
- bottom: 0
260
- };
261
- }
262
- return {
263
- bottom: layout.scrollX.value && props.data.length ? `${layout.gutterWidth}px` : ""
264
- };
265
- } else {
266
- if (props.showSummary) {
267
- return {
268
- height: layout.tableHeight.value ? `${layout.tableHeight.value}px` : ""
269
- };
270
- }
271
- return {
272
- height: layout.viewportHeight.value ? `${layout.viewportHeight.value}px` : ""
273
- };
274
- }
275
- });
276
- const fixedBodyHeight = computed(() => {
277
- if (props.height) {
278
- return {
279
- height: layout.fixedBodyHeight.value ? `${layout.fixedBodyHeight.value}px` : ""
280
- };
281
- } else if (props.maxHeight) {
282
- let maxHeight = parseHeight(props.maxHeight);
283
- if (typeof maxHeight === "number") {
284
- maxHeight = layout.scrollX.value ? maxHeight - layout.gutterWidth : maxHeight;
285
- if (props.showHeader) {
286
- maxHeight -= layout.headerHeight.value;
287
- }
288
- maxHeight -= layout.footerHeight.value;
289
- return {
290
- "max-height": `${maxHeight}px`
291
- };
292
- }
293
- }
294
- return {};
295
- });
296
271
  return {
297
272
  isHidden,
298
273
  renderExpanded,
@@ -301,19 +276,17 @@ function useStyle(props, layout, store, table) {
301
276
  handleMouseLeave,
302
277
  handleHeaderFooterMousewheel,
303
278
  tableSize,
304
- bodyHeight,
305
- height,
306
279
  emptyBlockStyle,
307
280
  handleFixedMousewheel,
308
- fixedHeight,
309
- fixedBodyHeight,
310
281
  resizeProxyVisible,
311
282
  bodyWidth,
312
283
  resizeState,
313
284
  doLayout,
314
285
  tableBodyStyles,
315
286
  tableLayout,
316
- scrollbarViewStyle
287
+ scrollbarViewStyle,
288
+ tableInnerStyle,
289
+ scrollbarStyle
317
290
  };
318
291
  }
319
292
 
@@ -1 +1 @@
1
- {"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { isNumber, isString } from '@element-plus/utils'\nimport { useSize } from '@element-plus/hooks'\nimport { parseHeight } from '../util'\n\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref<{\n width: null | number\n height: null | number\n }>({\n width: null,\n height: null,\n })\n const isGroup = ref(false)\n const scrollbarViewStyle = {\n display: 'block',\n verticalAlign: 'middle',\n }\n const tableWidth = ref()\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const tableBodyStyles = computed(() => {\n return {\n width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : '',\n }\n })\n\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth()\n requestAnimationFrame(syncPostion)\n }\n onMounted(async () => {\n await nextTick()\n store.updateColumns()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n const el: HTMLElement = table.vnode.el as HTMLElement\n if (props.flexible && el && el.parentElement) {\n // Automatic minimum size of flex-items\n // Ensure that the main axis does not follow the width of the items\n el.parentElement.style.minWidth = '0'\n }\n\n resizeState.value = {\n width: (tableWidth.value = el.offsetWidth),\n height: el.offsetHeight,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n setScrollClassByEl(tableWrapper, className)\n }\n const hasScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n return !!(tableWrapper && tableWrapper.classList.contains(className))\n }\n const syncPostion = function () {\n if (!table.refs.scrollBarRef) return\n if (!layout.scrollX.value) {\n const scrollingNoneClass = 'is-scrolling-none'\n if (!hasScrollClass(scrollingNoneClass)) {\n setScrollClass(scrollingNoneClass)\n }\n return\n }\n const scrollContainer = table.refs.scrollBarRef.wrap$\n if (!scrollContainer) return\n const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer\n const { headerWrapper, footerWrapper } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }\n\n const bindEvents = () => {\n if (!table.refs.scrollBarRef) return\n if (table.refs.scrollBarRef.wrap$) {\n useEventListener(table.refs.scrollBarRef.wrap$, 'scroll', syncPostion, {\n passive: true,\n })\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n }\n const resizeListener = () => {\n if (!table.$ready) return\n let shouldUpdateLayout = false\n const el = table.vnode.el\n const { width: oldWidth, height: oldHeight } = resizeState.value\n\n const width = (tableWidth.value = el.offsetWidth)\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n }\n doLayout()\n }\n }\n const tableSize = useSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n\n const tableLayout = computed(() => {\n if (props.maxHeight) return 'fixed'\n return props.tableLayout\n })\n\n function calcMaxHeight(\n maxHeight: string | number,\n footerHeight: number,\n headerHeight: number\n ) {\n const parsedMaxHeight = parseHeight(maxHeight)\n const tableHeaderHeight = props.showHeader ? headerHeight : 0\n if (parsedMaxHeight === null) return\n if (isString(parsedMaxHeight)) {\n return `calc(${parsedMaxHeight} - ${footerHeight}px - ${tableHeaderHeight}px)`\n }\n return parsedMaxHeight - footerHeight - tableHeaderHeight\n }\n\n const height = computed(() => {\n const headerHeight = layout.headerHeight.value || 0\n const bodyHeight = layout.bodyHeight.value\n const footerHeight = layout.footerHeight.value || 0\n if (props.height) {\n return bodyHeight ? bodyHeight : undefined\n } else if (props.maxHeight) {\n return calcMaxHeight(props.maxHeight, footerHeight, headerHeight)\n }\n return undefined\n })\n\n const bodyHeight = computed(() => {\n const headerHeight = layout.headerHeight.value || 0\n const bodyHeight = layout.bodyHeight.value\n const footerHeight = layout.footerHeight.value || 0\n if (props.height) {\n return {\n height: bodyHeight ? `${bodyHeight}px` : '',\n }\n } else if (props.maxHeight) {\n const maxHeight = calcMaxHeight(\n props.maxHeight,\n footerHeight,\n headerHeight\n )\n if (maxHeight !== null) {\n return {\n 'max-height': `${maxHeight}${isNumber(maxHeight) ? 'px' : ''}`,\n }\n }\n }\n return {}\n })\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (layout.appendHeight.value) {\n height = `calc(100% - ${layout.appendHeight.value}px)`\n }\n return {\n width: tableWidth.value ? `${tableWidth.value}px` : '',\n height,\n }\n })\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n const fixedHeight = computed(() => {\n if (props.maxHeight) {\n if (props.showSummary) {\n return {\n bottom: 0,\n }\n }\n return {\n bottom:\n layout.scrollX.value && props.data.length\n ? `${layout.gutterWidth}px`\n : '',\n }\n } else {\n if (props.showSummary) {\n return {\n height: layout.tableHeight.value\n ? `${layout.tableHeight.value}px`\n : '',\n }\n }\n return {\n height: layout.viewportHeight.value\n ? `${layout.viewportHeight.value}px`\n : '',\n }\n }\n })\n const fixedBodyHeight = computed(() => {\n if (props.height) {\n return {\n height: layout.fixedBodyHeight.value\n ? `${layout.fixedBodyHeight.value}px`\n : '',\n }\n } else if (props.maxHeight) {\n let maxHeight = parseHeight(props.maxHeight)\n if (typeof maxHeight === 'number') {\n maxHeight = layout.scrollX.value\n ? maxHeight - layout.gutterWidth\n : maxHeight\n if (props.showHeader) {\n maxHeight -= layout.headerHeight.value\n }\n maxHeight -= layout.footerHeight.value\n return {\n 'max-height': `${maxHeight}px`,\n }\n }\n }\n return {}\n })\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n bodyHeight,\n height,\n emptyBlockStyle,\n handleFixedMousewheel,\n fixedHeight,\n fixedBodyHeight,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;;;;AAaA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC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../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["// @ts-nocheck\nimport {\n computed,\n nextTick,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { useSize } from '@element-plus/hooks'\n\nimport type { Table, TableProps } from './defaults'\nimport type { Store } from '../store'\nimport type TableLayout from '../table-layout'\nimport type { TableColumnCtx } from '../table-column/defaults'\n\nfunction useStyle<T>(\n props: TableProps<T>,\n layout: TableLayout<T>,\n store: Store<T>,\n table: Table<T>\n) {\n const isHidden = ref(false)\n const renderExpanded = ref(null)\n const resizeProxyVisible = ref(false)\n const setDragVisible = (visible: boolean) => {\n resizeProxyVisible.value = visible\n }\n const resizeState = ref<{\n width: null | number\n height: null | number\n headerHeight: null | number\n }>({\n width: null,\n height: null,\n headerHeight: null,\n })\n const isGroup = ref(false)\n const scrollbarViewStyle = {\n display: 'inline-block',\n verticalAlign: 'middle',\n }\n const tableWidth = ref()\n const tableScrollHeight = ref(0)\n const bodyScrollHeight = ref(0)\n const headerScrollHeight = ref(0)\n\n watchEffect(() => {\n layout.setHeight(props.height)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey)) return\n store.setCurrentRowKey(`${currentRowKey}`)\n },\n {\n immediate: true,\n }\n )\n watch(\n () => props.data,\n (data) => {\n table.store.commit('setData', data)\n },\n {\n immediate: true,\n deep: true,\n }\n )\n watchEffect(() => {\n if (props.expandRowKeys) {\n store.setExpandRowKeysAdapter(props.expandRowKeys)\n }\n })\n\n const handleMouseLeave = () => {\n table.store.commit('setHoverRow', null)\n if (table.hoverState) table.hoverState = null\n }\n\n const handleHeaderFooterMousewheel = (event, data) => {\n const { pixelX, pixelY } = data\n if (Math.abs(pixelX) >= Math.abs(pixelY)) {\n table.refs.bodyWrapper.scrollLeft += data.pixelX / 5\n }\n }\n\n const shouldUpdateHeight = computed(() => {\n return (\n props.height ||\n props.maxHeight ||\n store.states.fixedColumns.value.length > 0 ||\n store.states.rightFixedColumns.value.length > 0\n )\n })\n\n const tableBodyStyles = computed(() => {\n return {\n width: layout.bodyWidth.value ? `${layout.bodyWidth.value}px` : '',\n }\n })\n\n const doLayout = () => {\n if (shouldUpdateHeight.value) {\n layout.updateElsHeight()\n }\n layout.updateColumnsWidth()\n requestAnimationFrame(syncPostion)\n }\n onMounted(async () => {\n await nextTick()\n store.updateColumns()\n bindEvents()\n requestAnimationFrame(doLayout)\n\n const el: HTMLElement = table.vnode.el as HTMLElement\n const tableHeader: HTMLElement = table.refs.headerWrapper\n if (props.flexible && el && el.parentElement) {\n // Automatic minimum size of flex-items\n // Ensure that the main axis does not follow the width of the items\n el.parentElement.style.minWidth = '0'\n }\n\n resizeState.value = {\n width: (tableWidth.value = el.offsetWidth),\n height: el.offsetHeight,\n headerHeight:\n props.showHeader && tableHeader ? tableHeader.offsetHeight : null,\n }\n\n // init filters\n store.states.columns.value.forEach((column: TableColumnCtx<T>) => {\n if (column.filteredValue && column.filteredValue.length) {\n table.store.commit('filterChange', {\n column,\n values: column.filteredValue,\n silent: true,\n })\n }\n })\n table.$ready = true\n })\n const setScrollClassByEl = (el: HTMLElement, className: string) => {\n if (!el) return\n const classList = Array.from(el.classList).filter(\n (item) => !item.startsWith('is-scrolling-')\n )\n classList.push(layout.scrollX.value ? className : 'is-scrolling-none')\n el.className = classList.join(' ')\n }\n const setScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n setScrollClassByEl(tableWrapper, className)\n }\n const hasScrollClass = (className: string) => {\n const { tableWrapper } = table.refs\n return !!(tableWrapper && tableWrapper.classList.contains(className))\n }\n const syncPostion = function () {\n if (!table.refs.scrollBarRef) return\n if (!layout.scrollX.value) {\n const scrollingNoneClass = 'is-scrolling-none'\n if (!hasScrollClass(scrollingNoneClass)) {\n setScrollClass(scrollingNoneClass)\n }\n return\n }\n const scrollContainer = table.refs.scrollBarRef.wrap$\n if (!scrollContainer) return\n const { scrollLeft, offsetWidth, scrollWidth } = scrollContainer\n const { headerWrapper, footerWrapper } = table.refs\n if (headerWrapper) headerWrapper.scrollLeft = scrollLeft\n if (footerWrapper) footerWrapper.scrollLeft = scrollLeft\n const maxScrollLeftPosition = scrollWidth - offsetWidth - 1\n if (scrollLeft >= maxScrollLeftPosition) {\n setScrollClass('is-scrolling-right')\n } else if (scrollLeft === 0) {\n setScrollClass('is-scrolling-left')\n } else {\n setScrollClass('is-scrolling-middle')\n }\n }\n\n const bindEvents = () => {\n if (!table.refs.scrollBarRef) return\n if (table.refs.scrollBarRef.wrap$) {\n useEventListener(table.refs.scrollBarRef.wrap$, 'scroll', syncPostion, {\n passive: true,\n })\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n }\n const resizeListener = () => {\n if (!table.$ready) return\n let shouldUpdateLayout = false\n const el = table.vnode.el\n const {\n width: oldWidth,\n height: oldHeight,\n headerHeight: oldHeaderHeight,\n } = resizeState.value\n\n const width = (tableWidth.value = el.offsetWidth)\n if (oldWidth !== width) {\n shouldUpdateLayout = true\n }\n\n const height = el.offsetHeight\n if ((props.height || shouldUpdateHeight.value) && oldHeight !== height) {\n shouldUpdateLayout = true\n }\n\n const tableHeader: HTMLElement = table.refs.headerWrapper\n if (props.showHeader && tableHeader.offsetHeight !== oldHeaderHeight) {\n shouldUpdateLayout = true\n }\n\n tableScrollHeight.value = table.refs.tableWrapper.scrollHeight\n headerScrollHeight.value = table.refs.headerWrapper?.scrollHeight || 0\n bodyScrollHeight.value = tableScrollHeight.value - headerScrollHeight.value\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n headerHeight: props.showHeader ? tableHeader.offsetHeight : null,\n }\n doLayout()\n }\n }\n const tableSize = useSize()\n const bodyWidth = computed(() => {\n const { bodyWidth: bodyWidth_, scrollY, gutterWidth } = layout\n return bodyWidth_.value\n ? `${(bodyWidth_.value as number) - (scrollY.value ? gutterWidth : 0)}px`\n : ''\n })\n\n const tableLayout = computed(() => {\n if (props.maxHeight) return 'fixed'\n return props.tableLayout\n })\n\n const emptyBlockStyle = computed(() => {\n if (props.data && props.data.length) return null\n let height = '100%'\n if (bodyScrollHeight.value) {\n height = `${bodyScrollHeight.value}px`\n }\n const width = tableWidth.value\n return {\n width: width ? `${width}px` : '',\n height,\n }\n })\n\n const tableInnerStyle = computed(() => {\n if (props.height) {\n return {\n height: !Number.isNaN(Number(props.height))\n ? `${props.height}px`\n : props.height,\n }\n }\n if (props.maxHeight) {\n return {\n maxHeight: !Number.isNaN(Number(props.maxHeight))\n ? `${props.maxHeight}px`\n : props.maxHeight,\n }\n }\n return {}\n })\n\n const scrollbarStyle = computed(() => {\n if (props.height) {\n return {\n height: '100%',\n }\n }\n if (props.maxHeight) {\n if (!Number.isNaN(Number(props.maxHeight))) {\n const headerHeight = table.refs.headerWrapper?.scrollHeight || 0\n const maxHeight = props.maxHeight\n const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight)\n if (reachMaxHeight) {\n return {\n maxHeight: `${tableScrollHeight.value - headerHeight}px`,\n }\n }\n } else {\n return {\n maxHeight: `calc(${props.maxHeight} - ${headerScrollHeight.value}px)`,\n }\n }\n }\n\n return {}\n })\n\n /**\n * fix layout\n */\n const handleFixedMousewheel = (event, data) => {\n const bodyWrapper = table.refs.bodyWrapper\n if (Math.abs(data.spinY) > 0) {\n const currentScrollTop = bodyWrapper.scrollTop\n if (data.pixelY < 0 && currentScrollTop !== 0) {\n event.preventDefault()\n }\n if (\n data.pixelY > 0 &&\n bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop\n ) {\n event.preventDefault()\n }\n bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5)\n } else {\n bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5)\n }\n }\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n handleFixedMousewheel,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\n tableInnerStyle,\n scrollbarStyle,\n }\n}\n\nexport default useStyle\n"],"names":[],"mappings":";;;;;AAWA,SAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE;AAC/C,EAAE,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,EAAE,MAAM,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACxC,EAAE,MAAM,cAAc,GAAG,CAAC,OAAO,KAAK;AACtC,IAAI,kBAAkB,CAAC,KAAK,GAAG,OAAO,CAAC;AACvC,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,GAAG,CAAC;AAC1B,IAAI,KAAK,EAAE,IAAI;AACf,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,YAAY,EAAE,IAAI;AACtB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,kBAAkB,GAAG;AAC7B,IAAI,OAAO,EAAE,cAAc;AAC3B,IAAI,aAAa,EAAE,QAAQ;AAC3B,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;AAC3B,EAAE,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC,EAAE,MAAM,gBAAgB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAClC,EAAE,MAAM,kBAAkB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACpC,EAAE,WAAW,CAAC,MAAM;AACpB,IAAI,MAAM,CAAC,SAAS,CAAC,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AC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC1D,KAAK,MAAM;AACX,MAAM,WAAW,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC3D,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,cAAc;AAClB,IAAI,cAAc;AAClB,IAAI,OAAO;AACX,IAAI,gBAAgB;AACpB,IAAI,4BAA4B;AAChC,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,qBAAqB;AACzB,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,kBAAkB;AACtB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
@@ -20,17 +20,13 @@ declare class TableLayout<T> {
20
20
  headerHeight: Ref<null | number>;
21
21
  appendHeight: Ref<null | number>;
22
22
  footerHeight: Ref<null | number>;
23
- viewportHeight: Ref<null | number>;
24
- bodyHeight: Ref<null | number>;
25
- bodyScrollHeight: Ref<number>;
26
- fixedBodyHeight: Ref<null | number>;
27
23
  gutterWidth: number;
28
24
  constructor(options: Record<string, any>);
29
25
  updateScrollY(): boolean;
30
26
  setHeight(value: string | number, prop?: string): any;
31
27
  setMaxHeight(value: string | number): void;
32
28
  getFlattenColumns(): TableColumnCtx<T>[];
33
- updateElsHeight(): any;
29
+ updateElsHeight(): void;
34
30
  headerDisplayNone(elm: HTMLElement): boolean;
35
31
  updateColumnsWidth(): void;
36
32
  addObserver(observer: TableHeader): void;
@@ -18,14 +18,6 @@ class TableLayout {
18
18
  this.bodyWidth = ref(null);
19
19
  this.fixedWidth = ref(null);
20
20
  this.rightFixedWidth = ref(null);
21
- this.tableHeight = ref(null);
22
- this.headerHeight = ref(44);
23
- this.appendHeight = ref(0);
24
- this.footerHeight = ref(44);
25
- this.viewportHeight = ref(null);
26
- this.bodyHeight = ref(null);
27
- this.bodyScrollHeight = ref(0);
28
- this.fixedBodyHeight = ref(null);
29
21
  this.gutterWidth = 0;
30
22
  for (const name in options) {
31
23
  if (hasOwn(options, name)) {
@@ -47,15 +39,11 @@ class TableLayout {
47
39
  const height = this.height.value;
48
40
  if (height === null)
49
41
  return false;
50
- const bodyWrapper = this.table.refs.bodyWrapper;
51
- if (this.table.vnode.el && bodyWrapper) {
42
+ const scrollBarRef = this.table.refs.scrollBarRef;
43
+ if (this.table.vnode.el && scrollBarRef) {
52
44
  let scrollY = true;
53
45
  const prevScrollY = this.scrollY.value;
54
- if (this.bodyHeight.value === null) {
55
- scrollY = false;
56
- } else {
57
- scrollY = bodyWrapper.scrollHeight > this.bodyHeight.value;
58
- }
46
+ scrollY = scrollBarRef.wrap$.scrollHeight > scrollBarRef.wrap$.clientHeight;
59
47
  this.scrollY.value = scrollY;
60
48
  return prevScrollY !== scrollY;
61
49
  }
@@ -93,43 +81,6 @@ class TableLayout {
93
81
  return flattenColumns;
94
82
  }
95
83
  updateElsHeight() {
96
- var _a, _b;
97
- if (!this.table.$ready)
98
- return nextTick(() => this.updateElsHeight());
99
- const {
100
- tableWrapper,
101
- headerWrapper,
102
- appendWrapper,
103
- footerWrapper,
104
- tableHeader,
105
- tableBody
106
- } = this.table.refs;
107
- if (tableWrapper && tableWrapper.style.display === "none") {
108
- return;
109
- }
110
- const { tableLayout } = this.table.props;
111
- this.appendHeight.value = appendWrapper ? appendWrapper.offsetHeight : 0;
112
- if (this.showHeader && !headerWrapper && tableLayout === "fixed") {
113
- return;
114
- }
115
- const headerTrElm = tableHeader ? tableHeader : null;
116
- const noneHeader = this.headerDisplayNone(headerTrElm);
117
- const headerWrapperOffsetHeight = (headerWrapper == null ? void 0 : headerWrapper.offsetHeight) || 0;
118
- const headerHeight = this.headerHeight.value = !this.showHeader ? 0 : headerWrapperOffsetHeight;
119
- if (this.showHeader && !noneHeader && headerWrapperOffsetHeight > 0 && (this.table.store.states.columns.value || []).length > 0 && headerHeight < 2) {
120
- return nextTick(() => this.updateElsHeight());
121
- }
122
- const tableHeight = this.tableHeight.value = (_b = (_a = this.table) == null ? void 0 : _a.vnode.el) == null ? void 0 : _b.clientHeight;
123
- const footerHeight = this.footerHeight.value = footerWrapper ? footerWrapper.offsetHeight : 0;
124
- if (this.height.value !== null) {
125
- if (this.bodyHeight.value === null) {
126
- requestAnimationFrame(() => this.updateElsHeight());
127
- }
128
- this.bodyHeight.value = tableHeight - headerHeight - footerHeight + (footerWrapper ? 1 : 0);
129
- this.bodyScrollHeight.value = tableBody == null ? void 0 : tableBody.scrollHeight;
130
- }
131
- this.fixedBodyHeight.value = this.scrollX.value ? this.bodyHeight.value - this.gutterWidth : this.bodyHeight.value;
132
- this.viewportHeight.value = this.scrollX.value ? tableHeight - this.gutterWidth : tableHeight;
133
84
  this.updateScrollY();
134
85
  this.notifyObservers("scrollable");
135
86
  }