@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
@@ -5,7 +5,7 @@ import type { Store } from '../store';
|
|
5
5
|
import type { TableColumnCtx } from '../table-column/defaults';
|
6
6
|
import type TableLayout from '../table-layout';
|
7
7
|
import type { TableOverflowTooltipFormatter, TableOverflowTooltipOptions } from '../util';
|
8
|
-
|
8
|
+
type DefaultRow = Record<PropertyKey, any>;
|
9
9
|
interface TableRefs {
|
10
10
|
tableWrapper: HTMLElement;
|
11
11
|
headerWrapper: HTMLElement;
|
@@ -30,25 +30,25 @@ interface TreeProps {
|
|
30
30
|
children?: string;
|
31
31
|
checkStrictly?: boolean;
|
32
32
|
}
|
33
|
-
type HoverState<T> = Nullable<{
|
33
|
+
type HoverState<T extends DefaultRow> = Nullable<{
|
34
34
|
cell: HTMLElement;
|
35
35
|
column: TableColumnCtx<T>;
|
36
36
|
row: T;
|
37
37
|
}>;
|
38
|
-
type RIS<T> = {
|
38
|
+
type RIS<T extends DefaultRow> = {
|
39
39
|
row: T;
|
40
40
|
$index: number;
|
41
41
|
store: Store<T>;
|
42
42
|
expanded: boolean;
|
43
43
|
};
|
44
|
-
type RenderExpanded<T> = ({ row, $index, store, expanded
|
45
|
-
type SummaryMethod<T> = (data: {
|
44
|
+
type RenderExpanded<T extends DefaultRow> = ({ row, $index, store, expanded, }: RIS<T>) => VNode;
|
45
|
+
type SummaryMethod<T extends DefaultRow> = (data: {
|
46
46
|
columns: TableColumnCtx<T>[];
|
47
47
|
data: T[];
|
48
48
|
}) => (string | VNode)[];
|
49
|
-
interface Table<T> extends ComponentInternalInstance {
|
49
|
+
interface Table<T extends DefaultRow = any> extends ComponentInternalInstance {
|
50
50
|
$ready: boolean;
|
51
|
-
hoverState?: HoverState<T
|
51
|
+
hoverState?: HoverState<T> | null;
|
52
52
|
renderExpanded: RenderExpanded<T>;
|
53
53
|
store: Store<T>;
|
54
54
|
layout: TableLayout<T>;
|
@@ -64,20 +64,20 @@ type ColumnStyle<T> = CSSProperties | ((data: {
|
|
64
64
|
row: T;
|
65
65
|
rowIndex: number;
|
66
66
|
}) => CSSProperties);
|
67
|
-
type CellCls<T> = string | ((data: {
|
67
|
+
type CellCls<T extends DefaultRow> = string | ((data: {
|
68
68
|
row: T;
|
69
69
|
rowIndex: number;
|
70
70
|
column: TableColumnCtx<T>;
|
71
71
|
columnIndex: number;
|
72
72
|
}) => string);
|
73
|
-
type CellStyle<T> = CSSProperties | ((data: {
|
73
|
+
type CellStyle<T extends DefaultRow> = CSSProperties | ((data: {
|
74
74
|
row: T;
|
75
75
|
rowIndex: number;
|
76
76
|
column: TableColumnCtx<T>;
|
77
77
|
columnIndex: number;
|
78
78
|
}) => CSSProperties);
|
79
79
|
type Layout = 'fixed' | 'auto';
|
80
|
-
interface TableProps<T> {
|
80
|
+
interface TableProps<T extends DefaultRow> {
|
81
81
|
data: T[];
|
82
82
|
size?: ComponentSize;
|
83
83
|
width?: string | number;
|
@@ -132,14 +132,15 @@ interface TableProps<T> {
|
|
132
132
|
appendFilterPanelTo?: string;
|
133
133
|
scrollbarTabindex?: number | string;
|
134
134
|
}
|
135
|
-
type TableTooltipData<T
|
135
|
+
type TableTooltipData<T extends DefaultRow> = Parameters<TableOverflowTooltipFormatter<T>>[0];
|
136
|
+
type TableSortOrder = 'ascending' | 'descending';
|
136
137
|
interface Sort {
|
137
138
|
prop: string;
|
138
|
-
order:
|
139
|
+
order: TableSortOrder;
|
139
140
|
init?: any;
|
140
141
|
silent?: any;
|
141
142
|
}
|
142
|
-
interface Filter<T> {
|
143
|
+
interface Filter<T extends DefaultRow> {
|
143
144
|
column: TableColumnCtx<T>;
|
144
145
|
values: string[];
|
145
146
|
silent: any;
|
@@ -152,12 +153,13 @@ interface TreeNode {
|
|
152
153
|
level?: number;
|
153
154
|
display?: boolean;
|
154
155
|
}
|
155
|
-
interface RenderRowData<T> {
|
156
|
+
interface RenderRowData<T extends DefaultRow> {
|
156
157
|
store: Store<T>;
|
157
158
|
_self: Table<T>;
|
158
159
|
column: TableColumnCtx<T>;
|
159
160
|
row: T;
|
160
161
|
$index: number;
|
162
|
+
cellIndex: number;
|
161
163
|
treeNode?: TreeNode;
|
162
164
|
expanded: boolean;
|
163
165
|
}
|
@@ -166,7 +168,7 @@ declare const _default: {
|
|
166
168
|
* @description table data
|
167
169
|
*/
|
168
170
|
data: {
|
169
|
-
type: PropType<
|
171
|
+
type: PropType<any[]>;
|
170
172
|
default: () => never[];
|
171
173
|
};
|
172
174
|
/**
|
@@ -205,7 +207,7 @@ declare const _default: {
|
|
205
207
|
/**
|
206
208
|
* @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used
|
207
209
|
*/
|
208
|
-
rowKey: PropType<TableProps<
|
210
|
+
rowKey: PropType<TableProps<any>["rowKey"]>;
|
209
211
|
/**
|
210
212
|
* @description whether Table header is visible
|
211
213
|
*/
|
@@ -224,39 +226,39 @@ declare const _default: {
|
|
224
226
|
/**
|
225
227
|
* @description custom summary method
|
226
228
|
*/
|
227
|
-
summaryMethod: PropType<TableProps<
|
229
|
+
summaryMethod: PropType<TableProps<any>["summaryMethod"]>;
|
228
230
|
/**
|
229
231
|
* @description function that returns custom class names for a row, or a string assigning class names for every row
|
230
232
|
*/
|
231
|
-
rowClassName: PropType<TableProps<
|
233
|
+
rowClassName: PropType<TableProps<any>["rowClassName"]>;
|
232
234
|
/**
|
233
235
|
* @description function that returns custom style for a row, or an object assigning custom style for every row
|
234
236
|
*/
|
235
|
-
rowStyle: PropType<TableProps<
|
237
|
+
rowStyle: PropType<TableProps<any>["rowStyle"]>;
|
236
238
|
/**
|
237
239
|
* @description function that returns custom class names for a cell, or a string assigning class names for every cell
|
238
240
|
*/
|
239
|
-
cellClassName: PropType<TableProps<
|
241
|
+
cellClassName: PropType<TableProps<any>["cellClassName"]>;
|
240
242
|
/**
|
241
243
|
* @description function that returns custom style for a cell, or an object assigning custom style for every cell
|
242
244
|
*/
|
243
|
-
cellStyle: PropType<TableProps<
|
245
|
+
cellStyle: PropType<TableProps<any>["cellStyle"]>;
|
244
246
|
/**
|
245
247
|
* @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header
|
246
248
|
*/
|
247
|
-
headerRowClassName: PropType<TableProps<
|
249
|
+
headerRowClassName: PropType<TableProps<any>["headerRowClassName"]>;
|
248
250
|
/**
|
249
251
|
* @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header
|
250
252
|
*/
|
251
|
-
headerRowStyle: PropType<TableProps<
|
253
|
+
headerRowStyle: PropType<TableProps<any>["headerRowStyle"]>;
|
252
254
|
/**
|
253
255
|
* @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header
|
254
256
|
*/
|
255
|
-
headerCellClassName: PropType<TableProps<
|
257
|
+
headerCellClassName: PropType<TableProps<any>["headerCellClassName"]>;
|
256
258
|
/**
|
257
259
|
* @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header
|
258
260
|
*/
|
259
|
-
headerCellStyle: PropType<TableProps<
|
261
|
+
headerCellStyle: PropType<TableProps<any>["headerCellStyle"]>;
|
260
262
|
/**
|
261
263
|
* @description whether current row is highlighted
|
262
264
|
*/
|
@@ -272,7 +274,7 @@ declare const _default: {
|
|
272
274
|
/**
|
273
275
|
* @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop
|
274
276
|
*/
|
275
|
-
expandRowKeys: PropType<TableProps<
|
277
|
+
expandRowKeys: PropType<TableProps<any>["expandRowKeys"]>;
|
276
278
|
/**
|
277
279
|
* @description whether expand all rows by default, works when the table has a column type="expand" or contains tree structure data
|
278
280
|
*/
|
@@ -280,7 +282,7 @@ declare const _default: {
|
|
280
282
|
/**
|
281
283
|
* @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order
|
282
284
|
*/
|
283
|
-
defaultSort: PropType<TableProps<
|
285
|
+
defaultSort: PropType<TableProps<any>["defaultSort"]>;
|
284
286
|
/**
|
285
287
|
* @description the `effect` of the overflow tooltip
|
286
288
|
*/
|
@@ -288,11 +290,11 @@ declare const _default: {
|
|
288
290
|
/**
|
289
291
|
* @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)
|
290
292
|
*/
|
291
|
-
tooltipOptions: PropType<TableProps<
|
293
|
+
tooltipOptions: PropType<TableProps<any>["tooltipOptions"]>;
|
292
294
|
/**
|
293
295
|
* @description method that returns rowspan and colspan
|
294
296
|
*/
|
295
|
-
spanMethod: PropType<TableProps<
|
297
|
+
spanMethod: PropType<TableProps<any>["spanMethod"]>;
|
296
298
|
/**
|
297
299
|
* @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected
|
298
300
|
*/
|
@@ -311,7 +313,7 @@ declare const _default: {
|
|
311
313
|
* @description configuration for rendering nested data
|
312
314
|
*/
|
313
315
|
treeProps: {
|
314
|
-
type: PropType<TableProps<
|
316
|
+
type: PropType<TableProps<any>["treeProps"]>;
|
315
317
|
default: () => {
|
316
318
|
hasChildren: string;
|
317
319
|
children: string;
|
@@ -325,7 +327,7 @@ declare const _default: {
|
|
325
327
|
/**
|
326
328
|
* @description method for loading child row data, only works when `lazy` is true
|
327
329
|
*/
|
328
|
-
load: PropType<TableProps<
|
330
|
+
load: PropType<TableProps<any>["load"]>;
|
329
331
|
style: {
|
330
332
|
type: PropType<CSSProperties>;
|
331
333
|
default: () => {};
|
@@ -352,11 +354,11 @@ declare const _default: {
|
|
352
354
|
/**
|
353
355
|
* @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns
|
354
356
|
*/
|
355
|
-
showOverflowTooltip: PropType<TableProps<
|
357
|
+
showOverflowTooltip: PropType<TableProps<any>["showOverflowTooltip"]>;
|
356
358
|
/**
|
357
359
|
* @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`
|
358
360
|
*/
|
359
|
-
tooltipFormatter: PropType<TableProps<
|
361
|
+
tooltipFormatter: PropType<TableProps<any>["tooltipFormatter"]>;
|
360
362
|
appendFilterPanelTo: StringConstructor;
|
361
363
|
scrollbarTabindex: {
|
362
364
|
type: (NumberConstructor | StringConstructor)[];
|
@@ -378,4 +380,4 @@ declare const _default: {
|
|
378
380
|
};
|
379
381
|
};
|
380
382
|
export default _default;
|
381
|
-
export type { SummaryMethod, Table, TableProps, TableRefs, ColumnCls, ColumnStyle, CellCls, CellStyle, TreeNode, RenderRowData, Sort, Filter, TableColumnCtx, TreeProps, TableTooltipData, };
|
383
|
+
export type { SummaryMethod, Table, TableProps, TableRefs, ColumnCls, ColumnStyle, CellCls, CellStyle, DefaultRow, TreeNode, RenderRowData, Sort, Filter, TableColumnCtx, TreeProps, TableTooltipData, TableSortOrder, };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["// @ts-nocheck\nimport { useSizeProp } from '@element-plus/hooks'\n\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\n VNode,\n} from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { Nullable } from '@element-plus/utils'\nimport type { Store } from '../store'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type TableLayout from '../table-layout'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\n\nexport type DefaultRow = any\n\ninterface TableRefs {\n tableWrapper: HTMLElement\n headerWrapper: HTMLElement\n footerWrapper: HTMLElement\n fixedBodyWrapper: HTMLElement\n rightFixedBodyWrapper: HTMLElement\n bodyWrapper: HTMLElement\n appendWrapper: HTMLElement\n [key: string]: any\n}\n\ninterface TableState {\n isGroup: Ref<boolean>\n resizeState: Ref<{\n width: any\n height: any\n }>\n doLayout: () => void\n debouncedUpdateLayout: () => void\n}\n\ninterface TreeProps {\n hasChildren?: string\n children?: string\n checkStrictly?: boolean\n}\n\ntype HoverState<T> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T> = { row: T; $index: number; store: Store<T>; expanded: boolean }\n\ntype RenderExpanded<T> = ({\n row,\n $index,\n store,\n expanded: boolean,\n}: RIS<T>) => VNode\n\ntype SummaryMethod<T> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => (string | VNode)[]\n\ninterface Table<T> extends ComponentInternalInstance {\n $ready: boolean\n hoverState?: HoverState<T>\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\n}\n\ntype ColumnCls<T> = string | ((data: { row: T; rowIndex: number }) => string)\ntype ColumnStyle<T> =\n | CSSProperties\n | ((data: { row: T; rowIndex: number }) => CSSProperties)\ntype CellCls<T> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T> =\n | CSSProperties\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => CSSProperties)\ntype Layout = 'fixed' | 'auto'\ninterface TableProps<T> {\n data: T[]\n size?: ComponentSize\n width?: string | number\n height?: string | number\n maxHeight?: string | number\n fit?: boolean\n stripe?: boolean\n border?: boolean\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n showHeader?: boolean\n showSummary?: boolean\n sumText?: string\n summaryMethod?: SummaryMethod<T>\n rowClassName?: ColumnCls<T>\n rowStyle?: ColumnStyle<T>\n cellClassName?: CellCls<T>\n cellStyle?: CellStyle<T>\n headerRowClassName?: ColumnCls<T>\n headerRowStyle?: ColumnStyle<T>\n headerCellClassName?: CellCls<T>\n headerCellStyle?: CellStyle<T>\n highlightCurrentRow?: boolean\n currentRowKey?: string | number\n emptyText?: string\n expandRowKeys?: Array<string | number>\n defaultExpandAll?: boolean\n defaultSort?: Sort\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n spanMethod?: (data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) =>\n | number[]\n | {\n rowspan: number\n colspan: number\n }\n | undefined\n selectOnIndeterminate?: boolean\n indent?: number\n treeProps?: TreeProps\n lazy?: boolean\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: CSSProperties\n tableLayout?: Layout\n scrollbarAlwaysOn?: boolean\n flexible?: boolean\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n appendFilterPanelTo?: string\n scrollbarTabindex?: number | string\n}\n\ntype TableTooltipData<T = any> = Parameters<TableOverflowTooltipFormatter<T>>[0]\n\ninterface Sort {\n prop: string\n order: 'ascending' | 'descending'\n init?: any\n silent?: any\n}\n\ninterface Filter<T> {\n column: TableColumnCtx<T>\n values: string[]\n silent: any\n}\n\ninterface TreeNode {\n expanded?: boolean\n loading?: boolean\n noLazyChildren?: boolean\n indent?: number\n level?: number\n display?: boolean\n}\n\ninterface RenderRowData<T> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\nexport default {\n /**\n * @description table data\n */\n data: {\n type: Array as PropType<DefaultRow[]>,\n default: () => [],\n },\n /**\n * @description size of Table\n */\n size: useSizeProp,\n width: [String, Number],\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height: [String, Number],\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight: [String, Number],\n /**\n * @description whether width of column automatically fits its container\n */\n fit: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Table is striped\n */\n stripe: Boolean,\n /**\n * @description whether Table has vertical border\n */\n border: Boolean,\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey: [String, Function] as PropType<TableProps<DefaultRow>['rowKey']>,\n /**\n * @description whether Table header is visible\n */\n showHeader: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to display a summary row\n */\n showSummary: Boolean,\n /**\n * @description displayed text for the first column of summary row\n */\n sumText: String,\n /**\n * @description custom summary method\n */\n summaryMethod: Function as PropType<TableProps<DefaultRow>['summaryMethod']>,\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['rowClassName']\n >,\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle: [Object, Function] as PropType<TableProps<DefaultRow>['rowStyle']>,\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['cellClassName']\n >,\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['cellStyle']\n >,\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerRowClassName']\n >,\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerRowStyle']\n >,\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName: [String, Function] as PropType<\n TableProps<DefaultRow>['headerCellClassName']\n >,\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle: [Object, Function] as PropType<\n TableProps<DefaultRow>['headerCellStyle']\n >,\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow: Boolean,\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey: [String, Number],\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText: String,\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys: Array as PropType<TableProps<DefaultRow>['expandRowKeys']>,\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll: Boolean,\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort: Object as PropType<TableProps<DefaultRow>['defaultSort']>,\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect: String,\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions: Object as PropType<TableProps<DefaultRow>['tooltipOptions']>,\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod: Function as PropType<TableProps<DefaultRow>['spanMethod']>,\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n /**\n * @description horizontal indentation of tree data\n */\n indent: {\n type: Number,\n default: 16,\n },\n /**\n * @description configuration for rendering nested data\n */\n treeProps: {\n type: Object as PropType<TableProps<DefaultRow>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n checkStrictly: false,\n }\n },\n },\n /**\n * @description whether to lazy loading data\n */\n lazy: Boolean,\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load: Function as PropType<TableProps<DefaultRow>['load']>,\n style: {\n type: Object as PropType<CSSProperties>,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn: Boolean,\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible: Boolean,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip: [Boolean, Object] as PropType<\n TableProps<DefaultRow>['showOverflowTooltip']\n >,\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<\n TableProps<DefaultRow>['tooltipFormatter']\n >,\n appendFilterPanelTo: String,\n scrollbarTabindex: {\n type: [Number, String],\n default: undefined,\n },\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent: {\n type: Boolean,\n default: false,\n },\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n TreeProps,\n TableTooltipData,\n}\n"],"names":[],"mappings":";;AACA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,KAAK;AACf,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AACzB,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC7B,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE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AAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,MAAM,OAAO;AACb,QAAQ,WAAW,EAAE,aAAa;AAClC,QAAQ,QAAQ,EAAE,UAAU;AAC5B,QAAQ,aAAa,EAAE,KAAK;AAC5B,OAAO,CAAC;AACR,KAAK;AACL,GAAG;AACH,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,QAAQ;AAChB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,iBAAiB,EAAE,OAAO;AAC5B,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;AACxC,EAAE,gBAAgB,EAAE,QAAQ;AAC5B,EAAE,mBAAmB,EAAE,MAAM;AAC7B,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"defaults.mjs","sources":["../../../../../../../packages/components/table/src/table/defaults.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\n\nimport type {\n CSSProperties,\n ComponentInternalInstance,\n PropType,\n Ref,\n VNode,\n} from 'vue'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type { Nullable } from '@element-plus/utils'\nimport type { Store } from '../store'\nimport type { TableColumnCtx } from '../table-column/defaults'\nimport type TableLayout from '../table-layout'\nimport type {\n TableOverflowTooltipFormatter,\n TableOverflowTooltipOptions,\n} from '../util'\n\ntype DefaultRow = Record<PropertyKey, any>\n\ninterface TableRefs {\n tableWrapper: HTMLElement\n headerWrapper: HTMLElement\n footerWrapper: HTMLElement\n fixedBodyWrapper: HTMLElement\n rightFixedBodyWrapper: HTMLElement\n bodyWrapper: HTMLElement\n appendWrapper: HTMLElement\n [key: string]: any\n}\n\ninterface TableState {\n isGroup: Ref<boolean>\n resizeState: Ref<{\n width: any\n height: any\n }>\n doLayout: () => void\n debouncedUpdateLayout: () => void\n}\n\ninterface TreeProps {\n hasChildren?: string\n children?: string\n checkStrictly?: boolean\n}\n\ntype HoverState<T extends DefaultRow> = Nullable<{\n cell: HTMLElement\n column: TableColumnCtx<T>\n row: T\n}>\n\ntype RIS<T extends DefaultRow> = {\n row: T\n $index: number\n store: Store<T>\n expanded: boolean\n}\n\ntype RenderExpanded<T extends DefaultRow> = ({\n row,\n $index,\n store,\n expanded,\n}: RIS<T>) => VNode\n\ntype SummaryMethod<T extends DefaultRow> = (data: {\n columns: TableColumnCtx<T>[]\n data: T[]\n}) => (string | VNode)[]\n\ninterface Table<T extends DefaultRow = any> extends ComponentInternalInstance {\n $ready: boolean\n hoverState?: HoverState<T> | null\n renderExpanded: RenderExpanded<T>\n store: Store<T>\n layout: TableLayout<T>\n refs: TableRefs\n tableId: string\n state: TableState\n}\n\ntype ColumnCls<T> = string | ((data: { row: T; rowIndex: number }) => string)\ntype ColumnStyle<T> =\n | CSSProperties\n | ((data: { row: T; rowIndex: number }) => CSSProperties)\ntype CellCls<T extends DefaultRow> =\n | string\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => string)\ntype CellStyle<T extends DefaultRow> =\n | CSSProperties\n | ((data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) => CSSProperties)\ntype Layout = 'fixed' | 'auto'\ninterface TableProps<T extends DefaultRow> {\n data: T[]\n size?: ComponentSize\n width?: string | number\n height?: string | number\n maxHeight?: string | number\n fit?: boolean\n stripe?: boolean\n border?: boolean\n rowKey?: string | ((row: T) => string)\n context?: Table<T>\n showHeader?: boolean\n showSummary?: boolean\n sumText?: string\n summaryMethod?: SummaryMethod<T>\n rowClassName?: ColumnCls<T>\n rowStyle?: ColumnStyle<T>\n cellClassName?: CellCls<T>\n cellStyle?: CellStyle<T>\n headerRowClassName?: ColumnCls<T>\n headerRowStyle?: ColumnStyle<T>\n headerCellClassName?: CellCls<T>\n headerCellStyle?: CellStyle<T>\n highlightCurrentRow?: boolean\n currentRowKey?: string | number\n emptyText?: string\n expandRowKeys?: Array<string | number>\n defaultExpandAll?: boolean\n defaultSort?: Sort\n tooltipEffect?: string\n tooltipOptions?: TableOverflowTooltipOptions\n spanMethod?: (data: {\n row: T\n rowIndex: number\n column: TableColumnCtx<T>\n columnIndex: number\n }) =>\n | number[]\n | {\n rowspan: number\n colspan: number\n }\n | undefined\n selectOnIndeterminate?: boolean\n indent?: number\n treeProps?: TreeProps\n lazy?: boolean\n load?: (row: T, treeNode: TreeNode, resolve: (data: T[]) => void) => void\n className?: string\n style?: CSSProperties\n tableLayout?: Layout\n scrollbarAlwaysOn?: boolean\n flexible?: boolean\n showOverflowTooltip?: boolean | TableOverflowTooltipOptions\n tooltipFormatter?: TableOverflowTooltipFormatter<T>\n appendFilterPanelTo?: string\n scrollbarTabindex?: number | string\n}\n\ntype TableTooltipData<T extends DefaultRow> = Parameters<\n TableOverflowTooltipFormatter<T>\n>[0]\ntype TableSortOrder = 'ascending' | 'descending'\n\ninterface Sort {\n prop: string\n order: TableSortOrder\n init?: any\n silent?: any\n}\n\ninterface Filter<T extends DefaultRow> {\n column: TableColumnCtx<T>\n values: string[]\n silent: any\n}\n\ninterface TreeNode {\n expanded?: boolean\n loading?: boolean\n noLazyChildren?: boolean\n indent?: number\n level?: number\n display?: boolean\n}\n\ninterface RenderRowData<T extends DefaultRow> {\n store: Store<T>\n _self: Table<T>\n column: TableColumnCtx<T>\n row: T\n $index: number\n cellIndex: number\n treeNode?: TreeNode\n expanded: boolean\n}\n\nexport default {\n /**\n * @description table data\n */\n data: {\n type: Array as PropType<any[]>,\n default: () => [],\n },\n /**\n * @description size of Table\n */\n size: useSizeProp,\n width: [String, Number],\n /**\n * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles\n */\n height: [String, Number],\n /**\n * @description table's max-height. The legal value is a number or the height in px\n */\n maxHeight: [String, Number],\n /**\n * @description whether width of column automatically fits its container\n */\n fit: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Table is striped\n */\n stripe: Boolean,\n /**\n * @description whether Table has vertical border\n */\n border: Boolean,\n /**\n * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used\n */\n rowKey: [String, Function] as PropType<TableProps<any>['rowKey']>,\n /**\n * @description whether Table header is visible\n */\n showHeader: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to display a summary row\n */\n showSummary: Boolean,\n /**\n * @description displayed text for the first column of summary row\n */\n sumText: String,\n /**\n * @description custom summary method\n */\n summaryMethod: Function as PropType<TableProps<any>['summaryMethod']>,\n /**\n * @description function that returns custom class names for a row, or a string assigning class names for every row\n */\n rowClassName: [String, Function] as PropType<TableProps<any>['rowClassName']>,\n /**\n * @description function that returns custom style for a row, or an object assigning custom style for every row\n */\n rowStyle: [Object, Function] as PropType<TableProps<any>['rowStyle']>,\n /**\n * @description function that returns custom class names for a cell, or a string assigning class names for every cell\n */\n cellClassName: [String, Function] as PropType<\n TableProps<any>['cellClassName']\n >,\n /**\n * @description function that returns custom style for a cell, or an object assigning custom style for every cell\n */\n cellStyle: [Object, Function] as PropType<TableProps<any>['cellStyle']>,\n /**\n * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header\n */\n headerRowClassName: [String, Function] as PropType<\n TableProps<any>['headerRowClassName']\n >,\n /**\n * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header\n */\n headerRowStyle: [Object, Function] as PropType<\n TableProps<any>['headerRowStyle']\n >,\n /**\n * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header\n */\n headerCellClassName: [String, Function] as PropType<\n TableProps<any>['headerCellClassName']\n >,\n /**\n * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header\n */\n headerCellStyle: [Object, Function] as PropType<\n TableProps<any>['headerCellStyle']\n >,\n /**\n * @description whether current row is highlighted\n */\n highlightCurrentRow: Boolean,\n /**\n * @description key of current row, a set only prop\n */\n currentRowKey: [String, Number],\n /**\n * @description displayed text when data is empty. You can customize this area with `#empty`\n */\n emptyText: String,\n /**\n * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop\n */\n expandRowKeys: Array as PropType<TableProps<any>['expandRowKeys']>,\n /**\n * @description whether expand all rows by default, works when the table has a column type=\"expand\" or contains tree structure data\n */\n defaultExpandAll: Boolean,\n /**\n * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order\n */\n defaultSort: Object as PropType<TableProps<any>['defaultSort']>,\n /**\n * @description the `effect` of the overflow tooltip\n */\n tooltipEffect: String,\n /**\n * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)\n */\n tooltipOptions: Object as PropType<TableProps<any>['tooltipOptions']>,\n /**\n * @description method that returns rowspan and colspan\n */\n spanMethod: Function as PropType<TableProps<any>['spanMethod']>,\n /**\n * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected\n */\n selectOnIndeterminate: {\n type: Boolean,\n default: true,\n },\n /**\n * @description horizontal indentation of tree data\n */\n indent: {\n type: Number,\n default: 16,\n },\n /**\n * @description configuration for rendering nested data\n */\n treeProps: {\n type: Object as PropType<TableProps<any>['treeProps']>,\n default: () => {\n return {\n hasChildren: 'hasChildren',\n children: 'children',\n checkStrictly: false,\n }\n },\n },\n /**\n * @description whether to lazy loading data\n */\n lazy: Boolean,\n /**\n * @description method for loading child row data, only works when `lazy` is true\n */\n load: Function as PropType<TableProps<any>['load']>,\n style: {\n type: Object as PropType<CSSProperties>,\n default: () => ({}),\n },\n className: {\n type: String,\n default: '',\n },\n /**\n * @description sets the algorithm used to lay out table cells, rows, and columns\n */\n tableLayout: {\n type: String as PropType<Layout>,\n default: 'fixed',\n },\n /**\n * @description always show scrollbar\n */\n scrollbarAlwaysOn: Boolean,\n /**\n * @description ensure main axis minimum-size doesn't follow the content\n */\n flexible: Boolean,\n /**\n * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns\n */\n showOverflowTooltip: [Boolean, Object] as PropType<\n TableProps<any>['showOverflowTooltip']\n >,\n /**\n * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`\n */\n tooltipFormatter: Function as PropType<TableProps<any>['tooltipFormatter']>,\n appendFilterPanelTo: String,\n scrollbarTabindex: {\n type: [Number, String],\n default: undefined,\n },\n /**\n * @description whether to allow drag the last column\n */\n allowDragLastColumn: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether to preserve expanded row content in DOM when collapsed\n */\n preserveExpandedContent: {\n type: Boolean,\n default: false,\n },\n}\nexport type {\n SummaryMethod,\n Table,\n TableProps,\n TableRefs,\n ColumnCls,\n ColumnStyle,\n CellCls,\n CellStyle,\n DefaultRow,\n TreeNode,\n RenderRowData,\n Sort,\n Filter,\n TableColumnCtx,\n TreeProps,\n TableTooltipData,\n TableSortOrder,\n}\n"],"names":[],"mappings":";;AACA,mBAAe;AACf,EAAE,IAAI,EAAE;AACR,IAAI,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,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
@@ -1,19 +1,18 @@
|
|
1
|
-
import type { Table, TableProps } from './defaults';
|
1
|
+
import type { DefaultRow, Table, TableProps } from './defaults';
|
2
2
|
import type { Store } from '../store';
|
3
3
|
import type TableLayout from '../table-layout';
|
4
|
-
declare function useStyle<T>(props: TableProps<T>, layout: TableLayout<T>, store: Store<T>, table: Table<T>): {
|
4
|
+
declare function useStyle<T extends DefaultRow>(props: TableProps<T>, layout: TableLayout<T>, store: Store<T>, table: Table<T>): {
|
5
5
|
isHidden: import("vue").Ref<boolean>;
|
6
6
|
renderExpanded: import("vue").Ref<null>;
|
7
7
|
setDragVisible: (visible: boolean) => void;
|
8
8
|
isGroup: import("vue").Ref<boolean>;
|
9
9
|
handleMouseLeave: () => void;
|
10
|
-
handleHeaderFooterMousewheel: (
|
10
|
+
handleHeaderFooterMousewheel: (_event: WheelEvent, data: any) => void;
|
11
11
|
tableSize: import("vue").ComputedRef<"" | "small" | "default" | "large">;
|
12
12
|
emptyBlockStyle: import("vue").ComputedRef<{
|
13
13
|
width: string;
|
14
14
|
height: string;
|
15
|
-
} |
|
16
|
-
handleFixedMousewheel: (event: any, data: any) => void;
|
15
|
+
} | undefined>;
|
17
16
|
resizeProxyVisible: import("vue").Ref<boolean>;
|
18
17
|
bodyWidth: import("vue").ComputedRef<string>;
|
19
18
|
resizeState: import("vue").Ref<{
|
@@ -26,10 +26,12 @@ function useStyle(props, layout, store, table) {
|
|
26
26
|
const footerScrollHeight = ref(0);
|
27
27
|
const appendScrollHeight = ref(0);
|
28
28
|
watchEffect(() => {
|
29
|
-
|
29
|
+
var _a;
|
30
|
+
layout.setHeight((_a = props.height) != null ? _a : null);
|
30
31
|
});
|
31
32
|
watchEffect(() => {
|
32
|
-
|
33
|
+
var _a;
|
34
|
+
layout.setMaxHeight((_a = props.maxHeight) != null ? _a : null);
|
33
35
|
});
|
34
36
|
watch(() => [props.currentRowKey, store.states.rowKey], ([currentRowKey, rowKey]) => {
|
35
37
|
if (!unref(rowKey) || !unref(currentRowKey))
|
@@ -54,7 +56,7 @@ function useStyle(props, layout, store, table) {
|
|
54
56
|
if (table.hoverState)
|
55
57
|
table.hoverState = null;
|
56
58
|
};
|
57
|
-
const handleHeaderFooterMousewheel = (
|
59
|
+
const handleHeaderFooterMousewheel = (_event, data) => {
|
58
60
|
const { pixelX, pixelY } = data;
|
59
61
|
if (Math.abs(pixelX) >= Math.abs(pixelY)) {
|
60
62
|
table.refs.bodyWrapper.scrollLeft += data.pixelX / 5;
|
@@ -214,7 +216,7 @@ function useStyle(props, layout, store, table) {
|
|
214
216
|
});
|
215
217
|
const emptyBlockStyle = computed(() => {
|
216
218
|
if (props.data && props.data.length)
|
217
|
-
return
|
219
|
+
return;
|
218
220
|
let height = "100%";
|
219
221
|
if (props.height && bodyScrollHeight.value) {
|
220
222
|
height = `${bodyScrollHeight.value}px`;
|
@@ -234,7 +236,7 @@ function useStyle(props, layout, store, table) {
|
|
234
236
|
if (props.maxHeight) {
|
235
237
|
if (!Number.isNaN(Number(props.maxHeight))) {
|
236
238
|
return {
|
237
|
-
maxHeight: `${props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px`
|
239
|
+
maxHeight: `${+props.maxHeight - headerScrollHeight.value - footerScrollHeight.value}px`
|
238
240
|
};
|
239
241
|
} else {
|
240
242
|
return {
|
@@ -244,21 +246,6 @@ function useStyle(props, layout, store, table) {
|
|
244
246
|
}
|
245
247
|
return {};
|
246
248
|
});
|
247
|
-
const handleFixedMousewheel = (event, data) => {
|
248
|
-
const bodyWrapper = table.refs.bodyWrapper;
|
249
|
-
if (Math.abs(data.spinY) > 0) {
|
250
|
-
const currentScrollTop = bodyWrapper.scrollTop;
|
251
|
-
if (data.pixelY < 0 && currentScrollTop !== 0) {
|
252
|
-
event.preventDefault();
|
253
|
-
}
|
254
|
-
if (data.pixelY > 0 && bodyWrapper.scrollHeight - bodyWrapper.clientHeight > currentScrollTop) {
|
255
|
-
event.preventDefault();
|
256
|
-
}
|
257
|
-
bodyWrapper.scrollTop += Math.ceil(data.pixelY / 5);
|
258
|
-
} else {
|
259
|
-
bodyWrapper.scrollLeft += Math.ceil(data.pixelX / 5);
|
260
|
-
}
|
261
|
-
};
|
262
249
|
return {
|
263
250
|
isHidden,
|
264
251
|
renderExpanded,
|
@@ -268,7 +255,6 @@ function useStyle(props, layout, store, table) {
|
|
268
255
|
handleHeaderFooterMousewheel,
|
269
256
|
tableSize,
|
270
257
|
emptyBlockStyle,
|
271
|
-
handleFixedMousewheel,
|
272
258
|
resizeProxyVisible,
|
273
259
|
bodyWidth,
|
274
260
|
resizeState,
|
@@ -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 { useFormSize } from '@element-plus/components/form'\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 const footerScrollHeight = ref(0)\n const appendScrollHeight = 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) || !unref(currentRowKey)) 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\n // When the test case is running, the context environment simulated by jsdom may have been destroyed,\n // and window.requestAnimationFrame does not exist at this time.\n if (typeof window === 'undefined') return\n requestAnimationFrame(syncPosition)\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 syncPosition = 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.wrapRef\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.wrapRef) {\n useEventListener(\n table.refs.scrollBarRef.wrapRef,\n 'scroll',\n syncPosition,\n {\n passive: true,\n }\n )\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n\n useResizeObserver(table.refs.bodyWrapper, () => {\n resizeListener()\n table.refs?.scrollBarRef?.update()\n })\n }\n const resizeListener = () => {\n const el = table.vnode.el\n if (!table.$ready || !el) return\n\n let shouldUpdateLayout = false\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 =\n props.tableLayout === 'fixed'\n ? table.refs.headerWrapper\n : table.refs.tableHeaderRef?.$el\n if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) {\n shouldUpdateLayout = true\n }\n\n tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0\n headerScrollHeight.value = tableHeader?.scrollHeight || 0\n footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0\n appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0\n bodyScrollHeight.value =\n tableScrollHeight.value -\n headerScrollHeight.value -\n footerScrollHeight.value -\n appendScrollHeight.value\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n headerHeight: (props.showHeader && tableHeader?.offsetHeight) || 0,\n }\n doLayout()\n }\n }\n const tableSize = useFormSize()\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 (props.height && 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 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 return {\n maxHeight: `${\n props.maxHeight -\n headerScrollHeight.value -\n footerScrollHeight.value\n }px`,\n }\n } else {\n return {\n maxHeight: `calc(${props.maxHeight} - ${\n headerScrollHeight.value + footerScrollHeight.value\n }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 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;AACn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AC1D,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,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"style-helper.mjs","sources":["../../../../../../../packages/components/table/src/table/style-helper.ts"],"sourcesContent":["import {\n computed,\n nextTick,\n onMounted,\n ref,\n unref,\n watch,\n watchEffect,\n} from 'vue'\nimport { useEventListener, useResizeObserver } from '@vueuse/core'\nimport { useFormSize } from '@element-plus/components/form'\n\nimport type { DefaultRow, 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 extends DefaultRow>(\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 const footerScrollHeight = ref(0)\n const appendScrollHeight = ref(0)\n\n watchEffect(() => {\n layout.setHeight(props.height ?? null)\n })\n watchEffect(() => {\n layout.setMaxHeight(props.maxHeight ?? null)\n })\n watch(\n () => [props.currentRowKey, store.states.rowKey],\n ([currentRowKey, rowKey]) => {\n if (!unref(rowKey) || !unref(currentRowKey)) 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: WheelEvent, data: any) => {\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\n // When the test case is running, the context environment simulated by jsdom may have been destroyed,\n // and window.requestAnimationFrame does not exist at this time.\n if (typeof window === 'undefined') return\n requestAnimationFrame(syncPosition)\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 syncPosition = 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.wrapRef\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.wrapRef) {\n useEventListener(\n table.refs.scrollBarRef.wrapRef,\n 'scroll',\n syncPosition,\n {\n passive: true,\n }\n )\n }\n if (props.fit) {\n useResizeObserver(table.vnode.el as HTMLElement, resizeListener)\n } else {\n useEventListener(window, 'resize', resizeListener)\n }\n\n useResizeObserver(table.refs.bodyWrapper, () => {\n resizeListener()\n table.refs?.scrollBarRef?.update()\n })\n }\n const resizeListener = () => {\n const el = table.vnode.el\n if (!table.$ready || !el) return\n\n let shouldUpdateLayout = false\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 =\n props.tableLayout === 'fixed'\n ? table.refs.headerWrapper\n : table.refs.tableHeaderRef?.$el\n if (props.showHeader && tableHeader?.offsetHeight !== oldHeaderHeight) {\n shouldUpdateLayout = true\n }\n\n tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0\n headerScrollHeight.value = tableHeader?.scrollHeight || 0\n footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0\n appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0\n bodyScrollHeight.value =\n tableScrollHeight.value -\n headerScrollHeight.value -\n footerScrollHeight.value -\n appendScrollHeight.value\n\n if (shouldUpdateLayout) {\n resizeState.value = {\n width,\n height,\n headerHeight: (props.showHeader && tableHeader?.offsetHeight) || 0,\n }\n doLayout()\n }\n }\n const tableSize = useFormSize()\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\n let height = '100%'\n if (props.height && 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 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 return {\n maxHeight: `${\n +props.maxHeight -\n headerScrollHeight.value -\n footerScrollHeight.value\n }px`,\n }\n } else {\n return {\n maxHeight: `calc(${props.maxHeight} - ${\n headerScrollHeight.value + footerScrollHeight.value\n }px)`,\n }\n }\n }\n\n return {}\n })\n\n return {\n isHidden,\n renderExpanded,\n setDragVisible,\n isGroup,\n handleMouseLeave,\n handleHeaderFooterMousewheel,\n tableSize,\n emptyBlockStyle,\n resizeProxyVisible,\n bodyWidth,\n resizeState,\n doLayout,\n tableBodyStyles,\n tableLayout,\n scrollbarViewStyle,\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,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;AACf,UAAU,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,kBAAkB,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC;AAC1G,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,IAAI,OAAO,EAAE,CAAC;AACd,GAAG,CAAC,CAAC;AACL,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,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,WAAW;AACf,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,WAAW;AACf,IAAI,kBAAkB;AACtB,IAAI,cAAc;AAClB,GAAG,CAAC;AACJ;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Store } from '../store';
|
2
2
|
declare function useUtils<T>(store: Store<T>): {
|
3
3
|
setCurrentRow: (row: T) => void;
|
4
|
-
getSelectionRows: () =>
|
4
|
+
getSelectionRows: () => T[];
|
5
5
|
toggleRowSelection: (row: T, selected?: boolean, ignoreSelectable?: boolean) => void;
|
6
6
|
clearSelection: () => void;
|
7
7
|
clearFilter: (columnKeys?: string[]) => void;
|
@@ -39,9 +39,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
39
39
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
40
40
|
cssVarBlockName: (name: string) => string;
|
41
41
|
};
|
42
|
-
onColumnsChange: (layout: import("../table-layout").default<
|
43
|
-
onScrollableChange: (layout: import("../table-layout").default<
|
44
|
-
wrappedRowRender: (row:
|
42
|
+
onColumnsChange: (layout: import("../table-layout").default<import("../table/defaults").DefaultRow>) => void;
|
43
|
+
onScrollableChange: (layout: import("../table-layout").default<import("../table/defaults").DefaultRow>) => void;
|
44
|
+
wrappedRowRender: (row: import("../table/defaults").DefaultRow, $index: number) => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
45
45
|
[key: string]: any;
|
46
46
|
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
47
47
|
[key: string]: any;
|
@@ -76,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
76
76
|
}>>, {
|
77
77
|
fixed: string;
|
78
78
|
highlight: boolean;
|
79
|
-
context: import("element-plus").Table<
|
79
|
+
context: import("element-plus").Table<import("../table/defaults").DefaultRow>;
|
80
80
|
stripe: boolean;
|
81
81
|
}>;
|
82
82
|
export default _default;
|
@@ -3,7 +3,7 @@ import type { TableBodyProps } from './defaults';
|
|
3
3
|
declare function useStyles<T>(props: Partial<TableBodyProps<T>>): {
|
4
4
|
getRowStyle: (row: T, rowIndex: number) => any;
|
5
5
|
getRowClass: (row: T, rowIndex: number) => string[];
|
6
|
-
getCellStyle: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>) =>
|
6
|
+
getCellStyle: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>) => import("vue").CSSProperties;
|
7
7
|
getCellClass: (rowIndex: number, columnIndex: number, row: T, column: TableColumnCtx<T>, offset: number) => string;
|
8
8
|
getSpan: (row: T, column: TableColumnCtx<T>, rowIndex: number, columnIndex: number) => {
|
9
9
|
rowspan: number;
|