@element-plus/nightly 0.0.20250629 → 0.0.20250630
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.
- package/dist/index.full.js +96 -88
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +96 -88
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +24 -119
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +119 -24
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +42 -193
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +206 -42
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +4 -4
- package/es/components/carousel/src/carousel-item.mjs +7 -69
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +69 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +61 -214
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +214 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +84 -652
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +652 -84
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +115 -178
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +178 -115
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +23 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -23
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog.mjs +68 -172
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +172 -68
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/drawer/src/drawer.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +47 -322
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +322 -47
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -35
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +35 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +19 -19
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +437 -106
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +106 -437
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +215 -73
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +73 -215
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/mention/index.mjs +2 -2
- package/es/components/mention/src/mention.mjs +287 -65
- package/es/components/mention/src/mention.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +65 -287
- package/es/components/mention/src/mention2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +53 -207
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +207 -53
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +30 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -30
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/split-panel.mjs +150 -19
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +19 -150
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +41 -35
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +35 -41
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +228 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -228
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/store/expand.d.ts +3 -2
- package/es/components/table/src/store/expand.mjs.map +1 -1
- package/es/components/table/src/store/helper.d.ts +518 -1
- package/es/components/table/src/store/index.d.ts +1042 -6
- package/es/components/table/src/store/index.mjs +12 -6
- package/es/components/table/src/store/index.mjs.map +1 -1
- package/es/components/table/src/store/tree.d.ts +25 -1
- package/es/components/table/src/store/tree.mjs +7 -5
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/table/src/store/watcher.d.ts +79 -1
- package/es/components/table/src/store/watcher.mjs +9 -10
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +36 -34
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +4 -5
- package/es/components/table/src/table/style-helper.mjs +7 -21
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table/utils-helper.d.ts +1 -1
- package/es/components/table/src/table-body/index.d.ts +4 -4
- package/es/components/table/src/table-body/styles-helper.d.ts +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +30 -25
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +27 -28
- package/es/components/table/src/table-footer/index.d.ts +5 -5
- package/es/components/table/src/table-footer/mapState-helper.d.ts +6 -6
- package/es/components/table/src/table-footer/style-helper.d.ts +4 -3
- package/es/components/table/src/table-footer/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.d.ts +4 -4
- package/es/components/table/src/table-header/style.helper.d.ts +3 -2
- package/es/components/table/src/table-header/style.helper.mjs.map +1 -1
- package/es/components/table/src/table-header/utils-helper.d.ts +1 -1
- package/es/components/table/src/table-layout.d.ts +4 -4
- package/es/components/table/src/table-layout.mjs +8 -5
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.mjs +0 -2
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +564 -48
- package/es/components/table/src/util.d.ts +20 -20
- package/es/components/table/src/util.mjs +16 -14
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +18 -8
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +8 -18
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/index.d.ts +1158 -113
- package/es/index.mjs +19 -19
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +25 -119
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +119 -25
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +42 -192
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +205 -42
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/carousel/index.js +4 -4
- package/lib/components/carousel/src/carousel-item.js +7 -69
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +69 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +62 -214
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +214 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +85 -652
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +652 -85
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +115 -178
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +178 -115
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +25 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -25
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog.js +69 -172
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +172 -69
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/drawer/src/drawer.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +48 -326
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +326 -48
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -35
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +35 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +19 -19
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +434 -104
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +104 -434
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +214 -73
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +73 -214
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/mention/index.js +2 -2
- package/lib/components/mention/src/mention.js +285 -64
- package/lib/components/mention/src/mention.js.map +1 -1
- package/lib/components/mention/src/mention2.js +64 -285
- package/lib/components/mention/src/mention2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +53 -207
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +207 -53
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +32 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -32
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/split-panel.js +150 -19
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +19 -150
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +41 -36
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +36 -41
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +227 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -227
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/store/expand.d.ts +3 -2
- package/lib/components/table/src/store/expand.js.map +1 -1
- package/lib/components/table/src/store/helper.d.ts +518 -1
- package/lib/components/table/src/store/index.d.ts +1042 -6
- package/lib/components/table/src/store/index.js +12 -6
- package/lib/components/table/src/store/index.js.map +1 -1
- package/lib/components/table/src/store/tree.d.ts +25 -1
- package/lib/components/table/src/store/tree.js +7 -5
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/table/src/store/watcher.d.ts +79 -1
- package/lib/components/table/src/store/watcher.js +8 -9
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +36 -34
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +4 -5
- package/lib/components/table/src/table/style-helper.js +7 -21
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table-body/index.d.ts +4 -4
- package/lib/components/table/src/table-body/styles-helper.d.ts +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +30 -25
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +27 -28
- package/lib/components/table/src/table-footer/index.d.ts +5 -5
- package/lib/components/table/src/table-footer/mapState-helper.d.ts +6 -6
- package/lib/components/table/src/table-footer/style-helper.d.ts +4 -3
- package/lib/components/table/src/table-footer/style-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.d.ts +4 -4
- package/lib/components/table/src/table-header/style.helper.d.ts +3 -2
- package/lib/components/table/src/table-header/style.helper.js.map +1 -1
- package/lib/components/table/src/table-header/utils-helper.d.ts +1 -1
- package/lib/components/table/src/table-layout.d.ts +4 -4
- package/lib/components/table/src/table-layout.js +8 -5
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.js +0 -2
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +564 -48
- package/lib/components/table/src/util.d.ts +20 -20
- package/lib/components/table/src/util.js +15 -13
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +18 -8
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +8 -18
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/index.d.ts +1158 -113
- package/lib/index.js +19 -19
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1,31 +1,34 @@
|
|
1
1
|
import type { ComponentInternalInstance, PropType, Ref, VNode } from 'vue';
|
2
|
-
import type { DefaultRow, Table } from '../table/defaults';
|
2
|
+
import type { DefaultRow, Table, TableSortOrder } from '../table/defaults';
|
3
3
|
import type { TableOverflowTooltipFormatter, TableOverflowTooltipOptions } from '../util';
|
4
|
-
type
|
4
|
+
import type { Store } from '../store';
|
5
|
+
type CI<T extends DefaultRow> = {
|
5
6
|
column: TableColumnCtx<T>;
|
6
7
|
$index: number;
|
8
|
+
store: Store<T>;
|
9
|
+
_self: any;
|
7
10
|
};
|
8
11
|
type Filters = {
|
9
12
|
text: string;
|
10
13
|
value: string;
|
11
14
|
}[];
|
12
|
-
type FilterMethods<T> = (value:
|
15
|
+
type FilterMethods<T extends DefaultRow> = (value: string, row: T, column: TableColumnCtx<T>) => void;
|
13
16
|
type ValueOf<T> = T[keyof T];
|
14
|
-
|
17
|
+
type TableColumnCtx<T extends DefaultRow = DefaultRow> = {
|
15
18
|
id: string;
|
16
|
-
realWidth: number;
|
19
|
+
realWidth: number | null;
|
17
20
|
type: string;
|
18
21
|
label: string;
|
19
22
|
className: string;
|
20
23
|
labelClassName: string;
|
21
24
|
property: string;
|
22
25
|
prop: string;
|
23
|
-
width
|
26
|
+
width?: string | number;
|
24
27
|
minWidth: string | number;
|
25
28
|
renderHeader: (data: CI<T>) => VNode;
|
26
29
|
sortable: boolean | string;
|
27
30
|
sortMethod: (a: T, b: T) => number;
|
28
|
-
sortBy: string | ((row: T, index: number) => string) | string[];
|
31
|
+
sortBy: string | ((row: T, index: number, array?: T[]) => string) | string[];
|
29
32
|
resizable: boolean;
|
30
33
|
columnKey: string;
|
31
34
|
rawColumnKey: string;
|
@@ -44,22 +47,24 @@ interface TableColumnCtx<T> {
|
|
44
47
|
filterMultiple: boolean;
|
45
48
|
filterClassName: string;
|
46
49
|
index: number | ((index: number) => number);
|
47
|
-
sortOrders: (
|
50
|
+
sortOrders: (TableSortOrder | null)[];
|
48
51
|
renderCell: (data: any) => void;
|
49
52
|
colSpan: number;
|
50
53
|
rowSpan: number;
|
51
|
-
children
|
54
|
+
children?: TableColumnCtx<T>[];
|
52
55
|
level: number;
|
53
56
|
filterable: boolean | FilterMethods<T> | Filters;
|
54
|
-
order:
|
57
|
+
order: TableSortOrder | null;
|
55
58
|
isColumnGroup: boolean;
|
56
59
|
isSubColumn: boolean;
|
57
60
|
columns: TableColumnCtx<T>[];
|
58
61
|
getColumnIndex: () => number;
|
59
62
|
no: number;
|
60
63
|
filterOpened?: boolean;
|
61
|
-
|
62
|
-
|
64
|
+
renderFilterIcon?: (scope: any) => VNode;
|
65
|
+
renderExpand?: (scope: any) => VNode;
|
66
|
+
};
|
67
|
+
interface TableColumn<T extends DefaultRow> extends ComponentInternalInstance {
|
63
68
|
vnode: {
|
64
69
|
vParent: TableColumn<T> | Table<T>;
|
65
70
|
} & VNode;
|
@@ -113,7 +118,7 @@ declare const _default: {
|
|
113
118
|
/**
|
114
119
|
* @description render function for table header of this column
|
115
120
|
*/
|
116
|
-
renderHeader: PropType<TableColumnCtx<
|
121
|
+
renderHeader: PropType<TableColumnCtx<any>["renderHeader"]>;
|
117
122
|
/**
|
118
123
|
* @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table
|
119
124
|
*/
|
@@ -124,11 +129,11 @@ declare const _default: {
|
|
124
129
|
/**
|
125
130
|
* @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort
|
126
131
|
*/
|
127
|
-
sortMethod: PropType<TableColumnCtx<
|
132
|
+
sortMethod: PropType<TableColumnCtx<any>["sortMethod"]>;
|
128
133
|
/**
|
129
134
|
* @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal
|
130
135
|
*/
|
131
|
-
sortBy: PropType<TableColumnCtx<
|
136
|
+
sortBy: PropType<TableColumnCtx<any>["sortBy"]>;
|
132
137
|
/**
|
133
138
|
* @description whether column width can be resized, works when `border` of `el-table` is `true`
|
134
139
|
*/
|
@@ -152,13 +157,13 @@ declare const _default: {
|
|
152
157
|
* @description whether to hide extra content and show them in a tooltip when hovering on the cell
|
153
158
|
*/
|
154
159
|
showOverflowTooltip: {
|
155
|
-
type: PropType<TableColumnCtx<
|
160
|
+
type: PropType<TableColumnCtx<any>["showOverflowTooltip"]>;
|
156
161
|
default: undefined;
|
157
162
|
};
|
158
163
|
/**
|
159
164
|
* @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`
|
160
165
|
*/
|
161
|
-
tooltipFormatter: PropType<TableColumnCtx<
|
166
|
+
tooltipFormatter: PropType<TableColumnCtx<any>["tooltipFormatter"]>;
|
162
167
|
/**
|
163
168
|
* @description whether column is fixed at left / right. Will be fixed at left if `true`
|
164
169
|
*/
|
@@ -166,11 +171,11 @@ declare const _default: {
|
|
166
171
|
/**
|
167
172
|
* @description function that formats cell content
|
168
173
|
*/
|
169
|
-
formatter: PropType<TableColumnCtx<
|
174
|
+
formatter: PropType<TableColumnCtx<any>["formatter"]>;
|
170
175
|
/**
|
171
176
|
* @description function that determines if a certain row can be selected, works when `type` is 'selection'
|
172
177
|
*/
|
173
|
-
selectable: PropType<TableColumnCtx<
|
178
|
+
selectable: PropType<TableColumnCtx<any>["selectable"]>;
|
174
179
|
/**
|
175
180
|
* @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work
|
176
181
|
*/
|
@@ -178,15 +183,15 @@ declare const _default: {
|
|
178
183
|
/**
|
179
184
|
* @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`
|
180
185
|
*/
|
181
|
-
filterMethod: PropType<TableColumnCtx<
|
186
|
+
filterMethod: PropType<TableColumnCtx<any>["filterMethod"]>;
|
182
187
|
/**
|
183
188
|
* @description filter value for selected data, might be useful when table header is rendered with `render-header`
|
184
189
|
*/
|
185
|
-
filteredValue: PropType<TableColumnCtx<
|
190
|
+
filteredValue: PropType<TableColumnCtx<any>["filteredValue"]>;
|
186
191
|
/**
|
187
192
|
* @description an array of data filtering options. For each element in this array, `text` and `value` are required
|
188
193
|
*/
|
189
|
-
filters: PropType<TableColumnCtx<
|
194
|
+
filters: PropType<TableColumnCtx<any>["filters"]>;
|
190
195
|
/**
|
191
196
|
* @description placement for the filter dropdown
|
192
197
|
*/
|
@@ -205,14 +210,14 @@ declare const _default: {
|
|
205
210
|
/**
|
206
211
|
* @description customize indices for each row, works on columns with `type=index`
|
207
212
|
*/
|
208
|
-
index: PropType<TableColumnCtx<
|
213
|
+
index: PropType<TableColumnCtx<any>["index"]>;
|
209
214
|
/**
|
210
215
|
* @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array
|
211
216
|
*/
|
212
217
|
sortOrders: {
|
213
|
-
type: PropType<TableColumnCtx<
|
218
|
+
type: PropType<TableColumnCtx<any>["sortOrders"]>;
|
214
219
|
default: () => (string | null)[];
|
215
|
-
validator: (val: TableColumnCtx<
|
220
|
+
validator: (val: TableColumnCtx<any>["sortOrders"]) => boolean;
|
216
221
|
};
|
217
222
|
};
|
218
223
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defaults.js","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport type { ComponentInternalInstance, PropType, Ref, VNode } from 'vue'\nimport type { DefaultRow, Table } from '../table/defaults'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\n\ntype CI<T> = { column: TableColumnCtx<T>; $index: number }\n\ntype Filters = {\n text: string\n value: string\n}[]\n\ntype FilterMethods<T> = (value, row: T, column: TableColumnCtx<T>) => void\n\ntype ValueOf<T> = T[keyof T]\n\ninterface TableColumnCtx<T> {\n id: string\n realWidth: number\n type: string\n label: string\n className: string\n labelClassName: string\n property: string\n prop: string\n width: string | number\n minWidth: string | number\n renderHeader: (data: CI<T>) => VNode\n sortable: boolean | string\n sortMethod: (a: T, b: T) => number\n sortBy: string | ((row: T, index: number) => string) | string[]\n resizable: boolean\n columnKey: string\n rawColumnKey: string\n align: string\n headerAlign: string\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n fixed: boolean | string\n formatter: (\n row: T,\n column: TableColumnCtx<T>,\n cellValue,\n index: number\n ) => VNode | string\n selectable: (row: T, index: number) => boolean\n reserveSelection: boolean\n filterMethod: FilterMethods<T>\n filteredValue: string[]\n filters: Filters\n filterPlacement: string\n filterMultiple: boolean\n filterClassName: string\n index: number | ((index: number) => number)\n sortOrders: ('ascending' | 'descending' | null)[]\n renderCell: (data: any) => void\n colSpan: number\n rowSpan: number\n children: TableColumnCtx<T>[]\n level: number\n filterable: boolean | FilterMethods<T> | Filters\n order: string\n isColumnGroup: boolean\n isSubColumn: boolean\n columns: TableColumnCtx<T>[]\n getColumnIndex: () => number\n no: number\n filterOpened?: boolean\n}\n\ninterface TableColumn<T> extends ComponentInternalInstance {\n vnode: {\n vParent: TableColumn<T> | Table<T>\n } & VNode\n vParent: TableColumn<T> | Table<T>\n columnId: string\n columnConfig: Ref<Partial<TableColumnCtx<T>>>\n}\n\nexport type { Filters, FilterMethods, TableColumnCtx, TableColumn, ValueOf }\n\nexport default {\n /**\n * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n */\n type: {\n type: String,\n default: 'default',\n },\n /**\n * @description column label\n */\n label: String,\n /**\n * @description class name of cells in the column\n */\n className: String,\n /**\n * @description class name of the label of this column\n */\n labelClassName: String,\n /**\n * @description\n */\n property: String,\n /**\n * @description field name. You can also use its alias: `property`\n */\n prop: String,\n /**\n * @description column width\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description render function for table header of this column\n */\n renderHeader: Function as PropType<\n TableColumnCtx<DefaultRow>['renderHeader']\n >,\n /**\n * @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table\n */\n sortable: {\n type: [Boolean, String],\n default: false,\n },\n /**\n * @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort\n */\n sortMethod: Function as PropType<TableColumnCtx<DefaultRow>['sortMethod']>,\n /**\n * @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal\n */\n sortBy: [String, Function, Array] as PropType<\n TableColumnCtx<DefaultRow>['sortBy']\n >,\n /**\n * @description whether column width can be resized, works when `border` of `el-table` is `true`\n */\n resizable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered\n */\n columnKey: String,\n /**\n * @description alignment, the value should be 'left' \\/ 'center' \\/ 'right'\n */\n align: String,\n /**\n * @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right'\n */\n headerAlign: String,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell\n */\n showOverflowTooltip: {\n type: [Boolean, Object] as PropType<\n TableColumnCtx<DefaultRow>['showOverflowTooltip']\n >,\n default: undefined,\n },\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<\n TableColumnCtx<DefaultRow>['tooltipFormatter']\n >,\n /**\n * @description whether column is fixed at left / right. Will be fixed at left if `true`\n */\n fixed: [Boolean, String],\n /**\n * @description function that formats cell content\n */\n formatter: Function as PropType<TableColumnCtx<DefaultRow>['formatter']>,\n /**\n * @description function that determines if a certain row can be selected, works when `type` is 'selection'\n */\n selectable: Function as PropType<TableColumnCtx<DefaultRow>['selectable']>,\n /**\n * @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work\n */\n reserveSelection: Boolean,\n /**\n * @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`\n */\n filterMethod: Function as PropType<\n TableColumnCtx<DefaultRow>['filterMethod']\n >,\n /**\n * @description filter value for selected data, might be useful when table header is rendered with `render-header`\n */\n filteredValue: Array as PropType<TableColumnCtx<DefaultRow>['filteredValue']>,\n /**\n * @description an array of data filtering options. For each element in this array, `text` and `value` are required\n */\n filters: Array as PropType<TableColumnCtx<DefaultRow>['filters']>,\n /**\n * @description placement for the filter dropdown\n */\n filterPlacement: String,\n /**\n * @description whether data filtering supports multiple options\n */\n filterMultiple: {\n type: Boolean,\n default: true,\n },\n /**\n * @description className for the filter dropdown\n */\n filterClassName: String,\n /**\n * @description customize indices for each row, works on columns with `type=index`\n */\n index: [Number, Function] as PropType<TableColumnCtx<DefaultRow>['index']>,\n /**\n * @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array\n */\n sortOrders: {\n type: Array as PropType<TableColumnCtx<DefaultRow>['sortOrders']>,\n default: () => {\n return ['ascending', 'descending', null]\n },\n validator: (val: TableColumnCtx<unknown>['sortOrders']) => {\n return val.every((order: string) =>\n ['ascending', 'descending', null].includes(order)\n )\n },\n },\n}\n"],"names":[],"mappings":";;;;AAAA,mBAAe;AACf,E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AE,YAAY,EAAE,QAAQ;AACxB,EAAE,aAAa,EAAE,KAAK;AACtB,EAAE,OAAO,EAAE,KAAK;AAChB,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM;AACnB,MAAM,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAC/C,KAAK;AACL,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK;AACxB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"defaults.js","sources":["../../../../../../../packages/components/table/src/table-column/defaults.ts"],"sourcesContent":["import type { ComponentInternalInstance, PropType, Ref, VNode } from 'vue'\nimport type { DefaultRow, Table, TableSortOrder } from '../table/defaults'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\nimport type { Store } from '../store'\n\ntype CI<T extends DefaultRow> = {\n column: TableColumnCtx<T>\n $index: number\n store: Store<T>\n _self: any\n}\n\ntype Filters = {\n text: string\n value: string\n}[]\n\ntype FilterMethods<T extends DefaultRow> = (\n value: string,\n row: T,\n column: TableColumnCtx<T>\n) => void\n\ntype ValueOf<T> = T[keyof T]\n\ntype TableColumnCtx<T extends DefaultRow = DefaultRow> = {\n id: string\n realWidth: number | null\n type: string\n label: string\n className: string\n labelClassName: string\n property: string\n prop: string\n width?: string | number\n minWidth: string | number\n renderHeader: (data: CI<T>) => VNode\n sortable: boolean | string\n sortMethod: (a: T, b: T) => number\n sortBy: string | ((row: T, index: number, array?: T[]) => string) | string[]\n resizable: boolean\n columnKey: string\n rawColumnKey: string\n align: string\n headerAlign: string\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n fixed: boolean | string\n formatter: (\n row: T,\n column: TableColumnCtx<T>,\n cellValue: any,\n index: number\n ) => VNode | string\n selectable: (row: T, index: number) => boolean\n reserveSelection: boolean\n filterMethod: FilterMethods<T>\n filteredValue: string[]\n filters: Filters\n filterPlacement: string\n filterMultiple: boolean\n filterClassName: string\n index: number | ((index: number) => number)\n sortOrders: (TableSortOrder | null)[]\n renderCell: (data: any) => void\n colSpan: number\n rowSpan: number\n children?: TableColumnCtx<T>[]\n level: number\n filterable: boolean | FilterMethods<T> | Filters\n order: TableSortOrder | null\n isColumnGroup: boolean\n isSubColumn: boolean\n columns: TableColumnCtx<T>[]\n getColumnIndex: () => number\n no: number\n filterOpened?: boolean\n renderFilterIcon?: (scope: any) => VNode\n renderExpand?: (scope: any) => VNode\n}\n\ninterface TableColumn<T extends DefaultRow> extends ComponentInternalInstance {\n vnode: {\n vParent: TableColumn<T> | Table<T>\n } & VNode\n vParent: TableColumn<T> | Table<T>\n columnId: string\n columnConfig: Ref<Partial<TableColumnCtx<T>>>\n}\n\nexport type { Filters, FilterMethods, TableColumnCtx, TableColumn, ValueOf }\n\nexport default {\n /**\n * @description type of the column. If set to `selection`, the column will display checkbox. If set to `index`, the column will display index of the row (staring from 1). If set to `expand`, the column will display expand icon\n */\n type: {\n type: String,\n default: 'default',\n },\n /**\n * @description column label\n */\n label: String,\n /**\n * @description class name of cells in the column\n */\n className: String,\n /**\n * @description class name of the label of this column\n */\n labelClassName: String,\n /**\n * @description\n */\n property: String,\n /**\n * @description field name. You can also use its alias: `property`\n */\n prop: String,\n /**\n * @description column width\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width. Columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description render function for table header of this column\n */\n renderHeader: Function as PropType<TableColumnCtx<any>['renderHeader']>,\n /**\n * @description whether column can be sorted. Remote sorting can be done by setting this attribute to 'custom' and listening to the `sort-change` event of Table\n */\n sortable: {\n type: [Boolean, String],\n default: false,\n },\n /**\n * @description sorting method, works when `sortable` is `true`. Should return a number, just like Array.sort\n */\n sortMethod: Function as PropType<TableColumnCtx<any>['sortMethod']>,\n /**\n * @description specify which property to sort by, works when `sortable` is `true` and `sort-method` is `undefined`. If set to an Array, the column will sequentially sort by the next property if the previous one is equal\n */\n sortBy: [String, Function, Array] as PropType<TableColumnCtx<any>['sortBy']>,\n /**\n * @description whether column width can be resized, works when `border` of `el-table` is `true`\n */\n resizable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description column's key. If you need to use the filter-change event, you need this attribute to identify which column is being filtered\n */\n columnKey: String,\n /**\n * @description alignment, the value should be 'left' \\/ 'center' \\/ 'right'\n */\n align: String,\n /**\n * @description alignment of the table header. If omitted, the value of the above `align` attribute will be applied, the value should be 'left' \\/ 'center' \\/ 'right'\n */\n headerAlign: String,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell\n */\n showOverflowTooltip: {\n type: [Boolean, Object] as PropType<\n TableColumnCtx<any>['showOverflowTooltip']\n >,\n default: undefined,\n },\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<\n TableColumnCtx<any>['tooltipFormatter']\n >,\n /**\n * @description whether column is fixed at left / right. Will be fixed at left if `true`\n */\n fixed: [Boolean, String],\n /**\n * @description function that formats cell content\n */\n formatter: Function as PropType<TableColumnCtx<any>['formatter']>,\n /**\n * @description function that determines if a certain row can be selected, works when `type` is 'selection'\n */\n selectable: Function as PropType<TableColumnCtx<any>['selectable']>,\n /**\n * @description whether to reserve selection after data refreshing, works when `type` is 'selection'. Note that `row-key` is required for this to work\n */\n reserveSelection: Boolean,\n /**\n * @description data filtering method. If `filter-multiple` is on, this method will be called multiple times for each row, and a row will display if one of the calls returns `true`\n */\n filterMethod: Function as PropType<TableColumnCtx<any>['filterMethod']>,\n /**\n * @description filter value for selected data, might be useful when table header is rendered with `render-header`\n */\n filteredValue: Array as PropType<TableColumnCtx<any>['filteredValue']>,\n /**\n * @description an array of data filtering options. For each element in this array, `text` and `value` are required\n */\n filters: Array as PropType<TableColumnCtx<any>['filters']>,\n /**\n * @description placement for the filter dropdown\n */\n filterPlacement: String,\n /**\n * @description whether data filtering supports multiple options\n */\n filterMultiple: {\n type: Boolean,\n default: true,\n },\n /**\n * @description className for the filter dropdown\n */\n filterClassName: String,\n /**\n * @description customize indices for each row, works on columns with `type=index`\n */\n index: [Number, Function] as PropType<TableColumnCtx<any>['index']>,\n /**\n * @description the order of the sorting strategies used when sorting the data, works when `sortable` is `true`. Accepts an array, as the user clicks on the header, the column is sorted in order of the elements in the array\n */\n sortOrders: {\n type: Array as PropType<TableColumnCtx<any>['sortOrders']>,\n default: () => {\n return ['ascending', 'descending', null]\n },\n validator: (val: TableColumnCtx<any>['sortOrders']) => {\n return val.every((order: TableSortOrder | null) =>\n ['ascending', 'descending', null].includes(order)\n )\n },\n },\n}\n"],"names":[],"mappings":";;;;AAAA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,cAAc,EAAE,MAAM;AACxB,EAAE,QAAQ,EAAE,MAAM;AAClB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAA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,EAAE,MAAM;AACnB,MAAM,OAAO,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;AAC/C,KAAK;AACL,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK;AACxB,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AACrF,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { TableColumnCtx } from './defaults';
|
2
|
-
import type { DefaultRow } from '../table/defaults';
|
3
2
|
declare const _default: import("vue").DefineComponent<{
|
4
3
|
type: {
|
5
4
|
type: StringConstructor;
|
@@ -18,13 +17,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
18
17
|
type: (NumberConstructor | StringConstructor)[];
|
19
18
|
default: string;
|
20
19
|
};
|
21
|
-
renderHeader: import("vue").PropType<TableColumnCtx<
|
20
|
+
renderHeader: import("vue").PropType<TableColumnCtx<any>["renderHeader"]>;
|
22
21
|
sortable: {
|
23
22
|
type: (StringConstructor | BooleanConstructor)[];
|
24
23
|
default: boolean;
|
25
24
|
};
|
26
|
-
sortMethod: import("vue").PropType<TableColumnCtx<
|
27
|
-
sortBy: import("vue").PropType<TableColumnCtx<
|
25
|
+
sortMethod: import("vue").PropType<TableColumnCtx<any>["sortMethod"]>;
|
26
|
+
sortBy: import("vue").PropType<TableColumnCtx<any>["sortBy"]>;
|
28
27
|
resizable: {
|
29
28
|
type: BooleanConstructor;
|
30
29
|
default: boolean;
|
@@ -33,28 +32,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
33
32
|
align: StringConstructor;
|
34
33
|
headerAlign: StringConstructor;
|
35
34
|
showOverflowTooltip: {
|
36
|
-
type: import("vue").PropType<TableColumnCtx<
|
35
|
+
type: import("vue").PropType<TableColumnCtx<any>["showOverflowTooltip"]>;
|
37
36
|
default: undefined;
|
38
37
|
};
|
39
|
-
tooltipFormatter: import("vue").PropType<TableColumnCtx<
|
38
|
+
tooltipFormatter: import("vue").PropType<TableColumnCtx<any>["tooltipFormatter"]>;
|
40
39
|
fixed: (StringConstructor | BooleanConstructor)[];
|
41
|
-
formatter: import("vue").PropType<TableColumnCtx<
|
42
|
-
selectable: import("vue").PropType<TableColumnCtx<
|
40
|
+
formatter: import("vue").PropType<TableColumnCtx<any>["formatter"]>;
|
41
|
+
selectable: import("vue").PropType<TableColumnCtx<any>["selectable"]>;
|
43
42
|
reserveSelection: BooleanConstructor;
|
44
|
-
filterMethod: import("vue").PropType<TableColumnCtx<
|
45
|
-
filteredValue: import("vue").PropType<TableColumnCtx<
|
46
|
-
filters: import("vue").PropType<TableColumnCtx<
|
43
|
+
filterMethod: import("vue").PropType<TableColumnCtx<any>["filterMethod"]>;
|
44
|
+
filteredValue: import("vue").PropType<TableColumnCtx<any>["filteredValue"]>;
|
45
|
+
filters: import("vue").PropType<TableColumnCtx<any>["filters"]>;
|
47
46
|
filterPlacement: StringConstructor;
|
48
47
|
filterMultiple: {
|
49
48
|
type: BooleanConstructor;
|
50
49
|
default: boolean;
|
51
50
|
};
|
52
51
|
filterClassName: StringConstructor;
|
53
|
-
index: import("vue").PropType<TableColumnCtx<
|
52
|
+
index: import("vue").PropType<TableColumnCtx<any>["index"]>;
|
54
53
|
sortOrders: {
|
55
|
-
type: import("vue").PropType<TableColumnCtx<
|
54
|
+
type: import("vue").PropType<TableColumnCtx<any>["sortOrders"]>;
|
56
55
|
default: () => (string | null)[];
|
57
|
-
validator: (val: TableColumnCtx<
|
56
|
+
validator: (val: TableColumnCtx<any>["sortOrders"]) => boolean;
|
58
57
|
};
|
59
58
|
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
60
59
|
type: {
|
@@ -74,13 +73,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
73
|
type: (NumberConstructor | StringConstructor)[];
|
75
74
|
default: string;
|
76
75
|
};
|
77
|
-
renderHeader: import("vue").PropType<TableColumnCtx<
|
76
|
+
renderHeader: import("vue").PropType<TableColumnCtx<any>["renderHeader"]>;
|
78
77
|
sortable: {
|
79
78
|
type: (StringConstructor | BooleanConstructor)[];
|
80
79
|
default: boolean;
|
81
80
|
};
|
82
|
-
sortMethod: import("vue").PropType<TableColumnCtx<
|
83
|
-
sortBy: import("vue").PropType<TableColumnCtx<
|
81
|
+
sortMethod: import("vue").PropType<TableColumnCtx<any>["sortMethod"]>;
|
82
|
+
sortBy: import("vue").PropType<TableColumnCtx<any>["sortBy"]>;
|
84
83
|
resizable: {
|
85
84
|
type: BooleanConstructor;
|
86
85
|
default: boolean;
|
@@ -89,35 +88,35 @@ declare const _default: import("vue").DefineComponent<{
|
|
89
88
|
align: StringConstructor;
|
90
89
|
headerAlign: StringConstructor;
|
91
90
|
showOverflowTooltip: {
|
92
|
-
type: import("vue").PropType<TableColumnCtx<
|
91
|
+
type: import("vue").PropType<TableColumnCtx<any>["showOverflowTooltip"]>;
|
93
92
|
default: undefined;
|
94
93
|
};
|
95
|
-
tooltipFormatter: import("vue").PropType<TableColumnCtx<
|
94
|
+
tooltipFormatter: import("vue").PropType<TableColumnCtx<any>["tooltipFormatter"]>;
|
96
95
|
fixed: (StringConstructor | BooleanConstructor)[];
|
97
|
-
formatter: import("vue").PropType<TableColumnCtx<
|
98
|
-
selectable: import("vue").PropType<TableColumnCtx<
|
96
|
+
formatter: import("vue").PropType<TableColumnCtx<any>["formatter"]>;
|
97
|
+
selectable: import("vue").PropType<TableColumnCtx<any>["selectable"]>;
|
99
98
|
reserveSelection: BooleanConstructor;
|
100
|
-
filterMethod: import("vue").PropType<TableColumnCtx<
|
101
|
-
filteredValue: import("vue").PropType<TableColumnCtx<
|
102
|
-
filters: import("vue").PropType<TableColumnCtx<
|
99
|
+
filterMethod: import("vue").PropType<TableColumnCtx<any>["filterMethod"]>;
|
100
|
+
filteredValue: import("vue").PropType<TableColumnCtx<any>["filteredValue"]>;
|
101
|
+
filters: import("vue").PropType<TableColumnCtx<any>["filters"]>;
|
103
102
|
filterPlacement: StringConstructor;
|
104
103
|
filterMultiple: {
|
105
104
|
type: BooleanConstructor;
|
106
105
|
default: boolean;
|
107
106
|
};
|
108
107
|
filterClassName: StringConstructor;
|
109
|
-
index: import("vue").PropType<TableColumnCtx<
|
108
|
+
index: import("vue").PropType<TableColumnCtx<any>["index"]>;
|
110
109
|
sortOrders: {
|
111
|
-
type: import("vue").PropType<TableColumnCtx<
|
110
|
+
type: import("vue").PropType<TableColumnCtx<any>["sortOrders"]>;
|
112
111
|
default: () => (string | null)[];
|
113
|
-
validator: (val: TableColumnCtx<
|
112
|
+
validator: (val: TableColumnCtx<any>["sortOrders"]) => boolean;
|
114
113
|
};
|
115
114
|
}>>, {
|
116
115
|
width: string | number;
|
117
116
|
minWidth: string | number;
|
118
117
|
type: string;
|
119
118
|
showOverflowTooltip: boolean | Partial<Pick<import("element-plus").ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined;
|
120
|
-
sortOrders: ("
|
119
|
+
sortOrders: (import("../table/defaults").TableSortOrder | null)[];
|
121
120
|
sortable: string | boolean;
|
122
121
|
resizable: boolean;
|
123
122
|
reserveSelection: boolean;
|
@@ -47,11 +47,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
47
47
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
48
48
|
cssVarBlockName: (name: string) => string;
|
49
49
|
};
|
50
|
-
onScrollableChange: (layout: import("../table-layout").default<
|
51
|
-
onColumnsChange: (layout: import("../table-layout").default<
|
52
|
-
getCellClasses: (columns: import("../table-column/defaults").TableColumnCtx<
|
53
|
-
getCellStyles: (column: import("../table-column/defaults").TableColumnCtx<
|
54
|
-
columns:
|
50
|
+
onScrollableChange: (layout: import("../table-layout").default<DefaultRow>) => void;
|
51
|
+
onColumnsChange: (layout: import("../table-layout").default<DefaultRow>) => void;
|
52
|
+
getCellClasses: (columns: import("../table-column/defaults").TableColumnCtx<DefaultRow>[], cellIndex: number) => string[];
|
53
|
+
getCellStyles: (column: import("../table-column/defaults").TableColumnCtx<DefaultRow>, cellIndex: number) => import("vue").CSSProperties | undefined;
|
54
|
+
columns: never[] | import("vue").Ref<import("../table-column/defaults").TableColumnCtx<DefaultRow>[]>;
|
55
55
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
56
56
|
fixed: {
|
57
57
|
type: StringConstructor;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
declare function useMapState(): {
|
2
|
-
leftFixedLeafCount: import("vue").ComputedRef<
|
3
|
-
rightFixedLeafCount: import("vue").ComputedRef<
|
4
|
-
columnsCount: import("vue").ComputedRef<
|
5
|
-
leftFixedCount: import("vue").ComputedRef<
|
6
|
-
rightFixedCount: import("vue").ComputedRef<
|
7
|
-
columns:
|
2
|
+
leftFixedLeafCount: import("vue").ComputedRef<number>;
|
3
|
+
rightFixedLeafCount: import("vue").ComputedRef<number>;
|
4
|
+
columnsCount: import("vue").ComputedRef<number>;
|
5
|
+
leftFixedCount: import("vue").ComputedRef<number>;
|
6
|
+
rightFixedCount: import("vue").ComputedRef<number>;
|
7
|
+
columns: never[] | import("vue").Ref<import("element-plus").TableColumnCtx<import("../table/defaults").DefaultRow>[]>;
|
8
8
|
};
|
9
9
|
export default useMapState;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import type { TableColumnCtx } from '../table-column/defaults';
|
2
|
+
import type { DefaultRow } from '../table/defaults';
|
2
3
|
import type { TableFooter } from '.';
|
3
|
-
declare function useStyle<T>(props: TableFooter<T>): {
|
4
|
+
declare function useStyle<T extends DefaultRow>(props: TableFooter<T>): {
|
4
5
|
getCellClasses: (columns: TableColumnCtx<T>[], cellIndex: number) => string[];
|
5
|
-
getCellStyles: (column: TableColumnCtx<T>, cellIndex: number) =>
|
6
|
-
columns:
|
6
|
+
getCellStyles: (column: TableColumnCtx<T>, cellIndex: number) => import("vue").CSSProperties | undefined;
|
7
|
+
columns: never[] | import("vue").Ref<TableColumnCtx<DefaultRow>[]>;
|
7
8
|
};
|
8
9
|
export default useStyle;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-helper.js","sources":["../../../../../../../packages/components/table/src/table-footer/style-helper.ts"],"sourcesContent":["import { useNamespace } from '@element-plus/hooks'\nimport {\n ensurePosition,\n getFixedColumnOffset,\n getFixedColumnsClass,\n} from '../util'\nimport useMapState from './mapState-helper'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableFooter } from '.'\n\nfunction useStyle<T>(props: TableFooter<T>) {\n const { columns } = useMapState()\n const ns = useNamespace('table')\n\n const getCellClasses = (columns: TableColumnCtx<T>[], cellIndex: number) => {\n const column = columns[cellIndex]\n const classes = [\n ns.e('cell'),\n column.id,\n column.align,\n column.labelClassName,\n ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store),\n ]\n if (column.className) {\n classes.push(column.className)\n }\n if (!column.children) {\n classes.push(ns.is('leaf'))\n }\n return classes\n }\n\n const getCellStyles = (column: TableColumnCtx<T>, cellIndex: number) => {\n const fixedStyle = getFixedColumnOffset(\n cellIndex,\n column.fixed,\n props.store\n )\n ensurePosition(fixedStyle, 'left')\n ensurePosition(fixedStyle, 'right')\n return fixedStyle\n }\n\n return {\n getCellClasses,\n getCellStyles,\n columns,\n }\n}\n\nexport default useStyle\n"],"names":["useMapState","useNamespace","getFixedColumnsClass","getFixedColumnOffset","ensurePosition"],"mappings":";;;;;;;;AAOA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,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AI,aAAa;AACjB,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"style-helper.js","sources":["../../../../../../../packages/components/table/src/table-footer/style-helper.ts"],"sourcesContent":["import { useNamespace } from '@element-plus/hooks'\nimport {\n ensurePosition,\n getFixedColumnOffset,\n getFixedColumnsClass,\n} from '../util'\nimport useMapState from './mapState-helper'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { DefaultRow } from '../table/defaults'\nimport type { TableFooter } from '.'\n\nfunction useStyle<T extends DefaultRow>(props: TableFooter<T>) {\n const { columns } = useMapState()\n const ns = useNamespace('table')\n\n const getCellClasses = (columns: TableColumnCtx<T>[], cellIndex: number) => {\n const column = columns[cellIndex]\n const classes = [\n ns.e('cell'),\n column.id,\n column.align,\n column.labelClassName,\n ...getFixedColumnsClass(ns.b(), cellIndex, column.fixed, props.store),\n ]\n if (column.className) {\n classes.push(column.className)\n }\n if (!column.children) {\n classes.push(ns.is('leaf'))\n }\n return classes\n }\n\n const getCellStyles = (column: TableColumnCtx<T>, cellIndex: number) => {\n const fixedStyle = getFixedColumnOffset(\n cellIndex,\n column.fixed,\n props.store\n )\n ensurePosition(fixedStyle, 'left')\n ensurePosition(fixedStyle, 'right')\n return fixedStyle\n }\n\n return {\n getCellClasses,\n getCellStyles,\n columns,\n }\n}\n\nexport default useStyle\n"],"names":["useMapState","useNamespace","getFixedColumnsClass","getFixedColumnOffset","ensurePosition"],"mappings":";;;;;;;;AAOA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAGA,yBAAW,EAAE,CAAC;AACpC,EAAE,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACnC,EAAE,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,SAAS,KAAK;AAClD,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvC,IAAI,MAAM,OAAO,GAAG;AACpB,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAClB,MAAM,MAAM,CAAC,EAAE;AACf,MAAM,MAAM,CAAC,KAAK;AAClB,MAAM,MAAM,CAAC,cAAc;AAC3B,MAAM,GAAGC,yBAAoB,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;AAC3E,KAAK,CAAC;AACN,IAAI,IAAI,MAAM,CAAC,SAAS,EAAE;AAC1B,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACrC,KAAK;AACL,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC1B,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AAClC,KAAK;AACL,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG,CAAC;AACJ,EAAE,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK;AAC/C,IAAI,MAAM,UAAU,GAAGC,yBAAoB,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;AAClF,IAAIC,mBAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACvC,IAAIA,mBAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AACxC,IAAI,OAAO,UAAU,CAAC;AACtB,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
|
@@ -58,13 +58,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
58
58
|
cssVarBlockName: (name: string) => string;
|
59
59
|
};
|
60
60
|
filterPanels: Ref<{}>;
|
61
|
-
onColumnsChange: (layout: import("../table-layout.js").default<
|
62
|
-
onScrollableChange: (layout: import("../table-layout.js").default<
|
61
|
+
onColumnsChange: (layout: import("../table-layout.js").default<DefaultRow>) => void;
|
62
|
+
onScrollableChange: (layout: import("../table-layout.js").default<DefaultRow>) => void;
|
63
63
|
columnRows: import("vue").ComputedRef<import("../table-column/defaults.js").TableColumnCtx<unknown>[]>;
|
64
64
|
getHeaderRowClass: (rowIndex: number) => string;
|
65
65
|
getHeaderRowStyle: (rowIndex: number) => any;
|
66
|
-
getHeaderCellClass: (rowIndex: number, columnIndex: number, row:
|
67
|
-
getHeaderCellStyle: (rowIndex: number, columnIndex: number, row:
|
66
|
+
getHeaderCellClass: (rowIndex: number, columnIndex: number, row: DefaultRow, column: import("../table-column/defaults.js").TableColumnCtx<DefaultRow>) => string;
|
67
|
+
getHeaderCellStyle: (rowIndex: number, columnIndex: number, row: DefaultRow, column: import("../table-column/defaults.js").TableColumnCtx<DefaultRow>) => import("vue").CSSProperties;
|
68
68
|
handleHeaderClick: (event: Event, column: import("../table-column/defaults.js").TableColumnCtx<unknown>) => void;
|
69
69
|
handleHeaderContextMenu: (event: Event, column: import("../table-column/defaults.js").TableColumnCtx<unknown>) => void;
|
70
70
|
handleMouseDown: (event: MouseEvent, column: import("../table-column/defaults.js").TableColumnCtx<unknown>) => void;
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import type { TableColumnCtx } from '../table-column/defaults';
|
2
|
+
import type { DefaultRow } from '../table/defaults';
|
2
3
|
import type { TableHeaderProps } from '.';
|
3
|
-
declare function useStyle<T>(props: TableHeaderProps<T>): {
|
4
|
+
declare function useStyle<T extends DefaultRow>(props: TableHeaderProps<T>): {
|
4
5
|
getHeaderRowStyle: (rowIndex: number) => any;
|
5
6
|
getHeaderRowClass: (rowIndex: number) => string;
|
6
|
-
getHeaderCellStyle: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>) =>
|
7
|
+
getHeaderCellStyle: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>) => import("vue").CSSProperties;
|
7
8
|
getHeaderCellClass: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>) => string;
|
8
9
|
};
|
9
10
|
export default useStyle;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style.helper.js","sources":["../../../../../../../packages/components/table/src/table-header/style.helper.ts"],"sourcesContent":["import { inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport {\n ensurePosition,\n getFixedColumnOffset,\n getFixedColumnsClass,\n} from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { TableHeaderProps } from '.'\n\nfunction useStyle<T>(props: TableHeaderProps<T>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n\n const getHeaderRowStyle = (rowIndex: number) => {\n const headerRowStyle = parent?.props.headerRowStyle\n if (isFunction(headerRowStyle)) {\n return headerRowStyle.call(null, { rowIndex })\n }\n return headerRowStyle\n }\n\n const getHeaderRowClass = (rowIndex: number): string => {\n const classes: string[] = []\n const headerRowClassName = parent?.props.headerRowClassName\n if (isString(headerRowClassName)) {\n classes.push(headerRowClassName)\n } else if (isFunction(headerRowClassName)) {\n classes.push(headerRowClassName.call(null, { rowIndex }))\n }\n\n return classes.join(' ')\n }\n\n const getHeaderCellStyle = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n let headerCellStyles = parent?.props.headerCellStyle ?? {}\n if (isFunction(headerCellStyles)) {\n headerCellStyles = headerCellStyles.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n }\n const fixedStyle = getFixedColumnOffset<T>(\n columnIndex,\n column.fixed,\n props.store,\n row as unknown as TableColumnCtx<T>[]\n )\n ensurePosition(fixedStyle, 'left')\n ensurePosition(fixedStyle, 'right')\n return Object.assign({}, headerCellStyles, fixedStyle)\n }\n\n const getHeaderCellClass = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n const fixedClasses = getFixedColumnsClass<T>(\n ns.b(),\n columnIndex,\n column.fixed,\n props.store,\n row as unknown as TableColumnCtx<T>[]\n )\n const classes = [\n column.id,\n column.order,\n column.headerAlign,\n column.className,\n column.labelClassName,\n ...fixedClasses,\n ]\n\n if (!column.children) {\n classes.push('is-leaf')\n }\n\n if (column.sortable) {\n classes.push('is-sortable')\n }\n\n const headerCellClassName = parent?.props.headerCellClassName\n if (isString(headerCellClassName)) {\n classes.push(headerCellClassName)\n } else if (isFunction(headerCellClassName)) {\n classes.push(\n headerCellClassName.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n )\n }\n\n classes.push(ns.e('cell'))\n\n return classes.filter((className) => Boolean(className)).join(' ')\n }\n\n return {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n }\n}\n\nexport default useStyle\n"],"names":["inject","TABLE_INJECTION_KEY","useNamespace","isFunction","isString","getFixedColumnOffset","ensurePosition","getFixedColumnsClass"],"mappings":";;;;;;;;;;AASA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,MAAM,GAAGA,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACnC,EAAE,MAAM,iBAAiB,GAAG,CAAC,QAAQ,KAAK;AAC1C,IAAI,MAAM,cAAc,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;AACjF,IAAI,IAAIC,iBAAU,CAAC,cAAc,CAAC,EAAE;AACpC,MAAM,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AACrD,KAAK;AACL,IAAI,OAAO,cAAc,CAAC;AAC1B,GAAG,CAAC;AACJ,EAAE,MAAM,iBAAiB,GAAG,CAAC,QAAQ,KAAK;AAC1C,IAAI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,GAAG;AACX,QAAQ,MAAM;AACd,OAAO,CAAC,CAAC,CAAC;AACV,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvE,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,iBAAiB;AACrB,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,kBAAkB;AACtB,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"style.helper.js","sources":["../../../../../../../packages/components/table/src/table-header/style.helper.ts"],"sourcesContent":["import { inject } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport {\n ensurePosition,\n getFixedColumnOffset,\n getFixedColumnsClass,\n} from '../util'\nimport { TABLE_INJECTION_KEY } from '../tokens'\n\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type { DefaultRow } from '../table/defaults'\nimport type { TableHeaderProps } from '.'\n\nfunction useStyle<T extends DefaultRow>(props: TableHeaderProps<T>) {\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n\n const getHeaderRowStyle = (rowIndex: number) => {\n const headerRowStyle = parent?.props.headerRowStyle\n if (isFunction(headerRowStyle)) {\n return headerRowStyle.call(null, { rowIndex })\n }\n return headerRowStyle\n }\n\n const getHeaderRowClass = (rowIndex: number): string => {\n const classes: string[] = []\n const headerRowClassName = parent?.props.headerRowClassName\n if (isString(headerRowClassName)) {\n classes.push(headerRowClassName)\n } else if (isFunction(headerRowClassName)) {\n classes.push(headerRowClassName.call(null, { rowIndex }))\n }\n\n return classes.join(' ')\n }\n\n const getHeaderCellStyle = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n let headerCellStyles = parent?.props.headerCellStyle ?? {}\n if (isFunction(headerCellStyles)) {\n headerCellStyles = headerCellStyles.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n }\n const fixedStyle = getFixedColumnOffset<T>(\n columnIndex,\n column.fixed,\n props.store,\n row as unknown as TableColumnCtx<T>[]\n )\n ensurePosition(fixedStyle, 'left')\n ensurePosition(fixedStyle, 'right')\n return Object.assign({}, headerCellStyles, fixedStyle)\n }\n\n const getHeaderCellClass = (\n rowIndex: number,\n columnIndex: number,\n row: T,\n column: TableColumnCtx<T>\n ) => {\n const fixedClasses = getFixedColumnsClass<T>(\n ns.b(),\n columnIndex,\n column.fixed,\n props.store,\n row as unknown as TableColumnCtx<T>[]\n )\n const classes = [\n column.id,\n column.order,\n column.headerAlign,\n column.className,\n column.labelClassName,\n ...fixedClasses,\n ]\n\n if (!column.children) {\n classes.push('is-leaf')\n }\n\n if (column.sortable) {\n classes.push('is-sortable')\n }\n\n const headerCellClassName = parent?.props.headerCellClassName\n if (isString(headerCellClassName)) {\n classes.push(headerCellClassName)\n } else if (isFunction(headerCellClassName)) {\n classes.push(\n headerCellClassName.call(null, {\n rowIndex,\n columnIndex,\n row,\n column,\n })\n )\n }\n\n classes.push(ns.e('cell'))\n\n return classes.filter((className) => Boolean(className)).join(' ')\n }\n\n return {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n }\n}\n\nexport default useStyle\n"],"names":["inject","TABLE_INJECTION_KEY","useNamespace","isFunction","isString","getFixedColumnOffset","ensurePosition","getFixedColumnsClass"],"mappings":";;;;;;;;;;AASA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,MAAM,MAAM,GAAGA,UAAM,CAACC,0BAAmB,CAAC,CAAC;AAC7C,EAAE,MAAM,EAAE,GAAGC,kBAAY,CAAC,OAAO,CAAC,CAAC;AACnC,EAAE,MAAM,iBAAiB,GAAG,CAAC,QAAQ,KAAK;A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AAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC;AAC3F,IAAI,IAAIH,eAAQ,CAAC,mBAAmB,CAAC,EAAE;AACvC,MAAM,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;AACxC,KAAK,MAAM,IAAID,iBAAU,CAAC,mBAAmB,CAAC,EAAE;AAChD,MAAM,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,EAAE;AAClD,QAAQ,QAAQ;AAChB,QAAQ,WAAW;AACnB,QAAQ,GAAG;AACX,QAAQ,MAAM;AACd,OAAO,CAAC,CAAC,CAAC;AACV,KAAK;AACL,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvE,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,iBAAiB;AACrB,IAAI,iBAAiB;AACrB,IAAI,kBAAkB;AACtB,IAAI,kBAAkB;AACtB,GAAG,CAAC;AACJ;;;;"}
|
@@ -4,6 +4,6 @@ export declare const convertToRows: <T>(originColumns: TableColumnCtx<T>[]) => T
|
|
4
4
|
declare function useUtils<T>(props: TableHeaderProps<T>): {
|
5
5
|
isGroup: import("vue").ComputedRef<boolean>;
|
6
6
|
toggleAllSelection: (event: Event) => void;
|
7
|
-
columnRows: import("vue").ComputedRef<TableColumnCtx<
|
7
|
+
columnRows: import("vue").ComputedRef<TableColumnCtx<T>[]>;
|
8
8
|
};
|
9
9
|
export default useUtils;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Ref } from 'vue';
|
2
2
|
import type { TableColumnCtx } from './table-column/defaults';
|
3
3
|
import type { TableHeader } from './table-header';
|
4
|
-
import type { Table } from './table/defaults';
|
4
|
+
import type { DefaultRow, Table } from './table/defaults';
|
5
5
|
import type { Store } from './store';
|
6
|
-
declare class TableLayout<T> {
|
6
|
+
declare class TableLayout<T extends DefaultRow> {
|
7
7
|
observers: TableHeader[];
|
8
8
|
table: Table<T>;
|
9
9
|
store: Store<T>;
|
@@ -23,8 +23,8 @@ declare class TableLayout<T> {
|
|
23
23
|
gutterWidth: number;
|
24
24
|
constructor(options: Record<string, any>);
|
25
25
|
updateScrollY(): boolean;
|
26
|
-
setHeight(value: string | number, prop?: string):
|
27
|
-
setMaxHeight(value: string | number): void;
|
26
|
+
setHeight(value: string | number | null, prop?: string): void;
|
27
|
+
setMaxHeight(value: string | number | null): void;
|
28
28
|
getFlattenColumns(): TableColumnCtx<T>[];
|
29
29
|
updateElsHeight(): void;
|
30
30
|
headerDisplayNone(elm: HTMLElement): boolean;
|
@@ -60,12 +60,14 @@ class TableLayout {
|
|
60
60
|
const el = this.table.vnode.el;
|
61
61
|
value = util.parseHeight(value);
|
62
62
|
this.height.value = Number(value);
|
63
|
-
if (!el && (value || value === 0))
|
64
|
-
|
65
|
-
|
63
|
+
if (!el && (value || value === 0)) {
|
64
|
+
vue.nextTick(() => this.setHeight(value, prop));
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
if (el && types.isNumber(value)) {
|
66
68
|
el.style[prop] = `${value}px`;
|
67
69
|
this.updateElsHeight();
|
68
|
-
} else if (shared.isString(value)) {
|
70
|
+
} else if (el && shared.isString(value)) {
|
69
71
|
el.style[prop] = value;
|
70
72
|
this.updateElsHeight();
|
71
73
|
}
|
@@ -102,10 +104,11 @@ class TableLayout {
|
|
102
104
|
return false;
|
103
105
|
}
|
104
106
|
updateColumnsWidth() {
|
107
|
+
var _a;
|
105
108
|
if (!core.isClient)
|
106
109
|
return;
|
107
110
|
const fit = this.fit;
|
108
|
-
const bodyWidth = this.table.vnode.el.clientWidth;
|
111
|
+
const bodyWidth = (_a = this.table.vnode.el) == null ? void 0 : _a.clientWidth;
|
109
112
|
let bodyMinWidth = 0;
|
110
113
|
const flattenColumns = this.getFlattenColumns();
|
111
114
|
const flexColumns = flattenColumns.filter((column) => !types.isNumber(column.width));
|