@element-plus/nightly 0.0.20250723 → 0.0.20250724
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +101 -53
- package/dist/index.full.min.js +15 -15
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +101 -54
- 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/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +5 -81
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +81 -5
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +16 -134
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +134 -16
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +42 -22
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +22 -42
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +668 -86
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +2 -0
- package/es/components/cascader/src/cascader2.mjs +86 -652
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -23
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +23 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +400 -49
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +49 -400
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/dialog/index.mjs +1 -1
- package/es/components/dialog/src/constants.d.ts +1 -0
- package/es/components/dialog/src/constants.mjs +2 -1
- package/es/components/dialog/src/constants.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +3 -1
- package/es/components/dialog/src/dialog.mjs +5 -0
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +3 -0
- package/es/components/dialog/src/dialog2.mjs +4 -12
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.d.ts +7 -1
- package/es/components/dialog/src/use-dialog.mjs +39 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/drawer/src/drawer.d.ts +1 -0
- package/es/components/drawer/src/drawer.vue.d.ts +3 -0
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +322 -47
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +47 -322
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/index.mjs +13 -13
- package/es/components/pagination/src/components/sizes.mjs +71 -23
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +23 -71
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +18 -23
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.mjs +139 -11
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +11 -139
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/select/index.mjs +1 -1
- package/es/components/select/src/option.mjs +13 -89
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option2.mjs +89 -13
- package/es/components/select/src/option2.mjs.map +1 -1
- package/es/components/select/src/select2.mjs +1 -1
- package/es/components/select/src/useOption.mjs +1 -1
- package/es/components/slider/src/button.mjs +19 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -69
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +69 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/table/src/store/helper.d.ts +12 -12
- package/es/components/table/src/store/index.d.ts +24 -24
- package/es/components/table/src/store/tree.d.ts +3 -3
- package/es/components/table/src/store/tree.mjs +11 -10
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/table/src/store/watcher.d.ts +2 -2
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +1 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +12 -12
- package/es/components/table/src/util.d.ts +1 -1
- package/es/components/table/src/util.mjs +3 -3
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/table-v2/src/composables/use-row.mjs +6 -1
- package/es/components/table-v2/src/composables/use-row.mjs.map +1 -1
- package/es/components/table-v2/src/row.d.ts +2 -2
- package/es/components/table-v2/src/row.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +8 -61
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +61 -8
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/index.d.ts +46 -27
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +5 -81
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +81 -5
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +17 -134
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +134 -17
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +42 -22
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +22 -42
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +668 -87
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +2 -0
- package/lib/components/cascader/src/cascader2.js +87 -652
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -25
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +25 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +399 -50
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +50 -399
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/dialog/index.js +1 -0
- package/lib/components/dialog/index.js.map +1 -1
- package/lib/components/dialog/src/constants.d.ts +1 -0
- package/lib/components/dialog/src/constants.js +2 -0
- package/lib/components/dialog/src/constants.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +3 -1
- package/lib/components/dialog/src/dialog.js +5 -0
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +3 -0
- package/lib/components/dialog/src/dialog2.js +3 -11
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.d.ts +7 -1
- package/lib/components/dialog/src/use-dialog.js +39 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/drawer/src/drawer.d.ts +1 -0
- package/lib/components/drawer/src/drawer.vue.d.ts +3 -0
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +326 -48
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +48 -326
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/index.js +13 -12
- package/lib/components/index.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +71 -23
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +23 -71
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/scrollbar/index.js +1 -1
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +18 -23
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.js +139 -11
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +11 -139
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select/src/option.js +14 -89
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option2.js +89 -14
- package/lib/components/select/src/option2.js.map +1 -1
- package/lib/components/select/src/select2.js +1 -1
- package/lib/components/select/src/useOption.js +1 -1
- package/lib/components/slider/src/button.js +20 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -69
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +69 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/table/src/store/helper.d.ts +12 -12
- package/lib/components/table/src/store/index.d.ts +24 -24
- package/lib/components/table/src/store/tree.d.ts +3 -3
- package/lib/components/table/src/store/tree.js +11 -10
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/table/src/store/watcher.d.ts +2 -2
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +1 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +12 -12
- package/lib/components/table/src/util.d.ts +1 -1
- package/lib/components/table/src/util.js +3 -3
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/table-v2/src/composables/use-row.js +5 -0
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -1
- package/lib/components/table-v2/src/row.d.ts +2 -2
- package/lib/components/table-v2/src/row.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +9 -61
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +61 -9
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/index.d.ts +46 -27
- package/lib/index.js +13 -12
- package/lib/index.js.map +1 -1
- 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/tags.json +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader.scss +10 -0
- package/theme-chalk/src/common/var.scss +10 -0
- package/theme-chalk/src/input.scss +1 -0
- package/web-types.json +1 -1
@@ -2,33 +2,77 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var statistic = require('./statistic.js');
|
7
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
8
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
9
|
+
var shared = require('@vue/shared');
|
10
|
+
var types = require('../../../utils/types.js');
|
6
11
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
12
|
+
const __default__ = vue.defineComponent({
|
13
|
+
name: "ElStatistic"
|
14
|
+
});
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: statistic.statisticProps,
|
18
|
+
setup(__props, { expose }) {
|
19
|
+
const props = __props;
|
20
|
+
const ns = index.useNamespace("statistic");
|
21
|
+
const displayValue = vue.computed(() => {
|
22
|
+
const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
|
23
|
+
if (shared.isFunction(formatter))
|
24
|
+
return formatter(value);
|
25
|
+
if (!types.isNumber(value) || Number.isNaN(value))
|
26
|
+
return value;
|
27
|
+
let [integer, decimal = ""] = String(value).split(".");
|
28
|
+
decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
|
29
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
30
|
+
return [integer, decimal].join(decimal ? decimalSeparator : "");
|
31
|
+
});
|
32
|
+
expose({
|
33
|
+
displayValue
|
34
|
+
});
|
35
|
+
return (_ctx, _cache) => {
|
36
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
37
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
38
|
+
}, [
|
39
|
+
_ctx.$slots.title || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
40
|
+
key: 0,
|
41
|
+
class: vue.normalizeClass(vue.unref(ns).e("head"))
|
42
|
+
}, [
|
43
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
44
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
45
|
+
])
|
46
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
47
|
+
vue.createElementVNode("div", {
|
48
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
49
|
+
}, [
|
50
|
+
_ctx.$slots.prefix || _ctx.prefix ? (vue.openBlock(), vue.createElementBlock("div", {
|
51
|
+
key: 0,
|
52
|
+
class: vue.normalizeClass(vue.unref(ns).e("prefix"))
|
53
|
+
}, [
|
54
|
+
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
|
55
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.prefix), 1)
|
56
|
+
])
|
57
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
58
|
+
vue.createElementVNode("span", {
|
59
|
+
class: vue.normalizeClass(vue.unref(ns).e("number")),
|
60
|
+
style: vue.normalizeStyle(_ctx.valueStyle)
|
61
|
+
}, vue.toDisplayString(vue.unref(displayValue)), 7),
|
62
|
+
_ctx.$slots.suffix || _ctx.suffix ? (vue.openBlock(), vue.createElementBlock("div", {
|
63
|
+
key: 1,
|
64
|
+
class: vue.normalizeClass(vue.unref(ns).e("suffix"))
|
65
|
+
}, [
|
66
|
+
vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
|
67
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.suffix), 1)
|
68
|
+
])
|
69
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
70
|
+
], 2)
|
71
|
+
], 2);
|
72
|
+
};
|
30
73
|
}
|
31
74
|
});
|
75
|
+
var Statistic = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "statistic.vue"]]);
|
32
76
|
|
33
|
-
exports
|
77
|
+
exports["default"] = Statistic;
|
34
78
|
//# sourceMappingURL=statistic2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"statistic2.js","sources":["../../../../../../packages/components/statistic/src/statistic.
|
1
|
+
{"version":3,"file":"statistic2.js","sources":["../../../../../../packages/components/statistic/src/statistic.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"$slots.title || title\" :class=\"ns.e('head')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div :class=\"ns.e('content')\">\n <div v-if=\"$slots.prefix || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n <span>{{ prefix }}</span>\n </slot>\n </div>\n <span :class=\"ns.e('number')\" :style=\"valueStyle\">\n {{ displayValue }}\n </span>\n <div v-if=\"$slots.suffix || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n <span>{{ suffix }}</span>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isNumber } from '@element-plus/utils'\nimport { statisticProps } from './statistic'\n\ndefineOptions({\n name: 'ElStatistic',\n})\n\nconst props = defineProps(statisticProps)\nconst ns = useNamespace('statistic')\n\nconst displayValue = computed(() => {\n const { value, formatter, precision, decimalSeparator, groupSeparator } =\n props\n\n if (isFunction(formatter)) return formatter(value)\n\n // https://github.com/element-plus/element-plus/issues/17784\n if (!isNumber(value) || Number.isNaN(value)) return value\n\n let [integer, decimal = ''] = String(value).split('.')\n decimal = decimal\n .padEnd(precision, '0')\n .slice(0, precision > 0 ? precision : 0)\n integer = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator)\n return [integer, decimal].join(decimal ? decimalSeparator : '')\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":["useNamespace","computed","isFunction","isNumber"],"mappings":";;;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAIC,iBAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAACC,eAAS,KAAU,CAAA,IAAA,MAAM,CAAO,KAAA,CAAA,KAAK,CAAE;AAC5C,QAAU,OAAA,KAAA,CAAA;AAGV,MAAU,IAAA,CAAA,OAAA,EAAA,OAAgB,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAuC,CAAA,CAAA;AACjE,MAAA,OAAO,GAAU,OAAA,CAAA,MAAO,UAAO,EAAA,GAAA,CAAA,CAAU,qBAAqB,CAAA,GAAA,SAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAC/D,OAAA,GAAA,OAAA,CAAA,OAAA,CAAA,uBAAA,EAAA,cAAA,CAAA,CAAA;AAED,MAAa,OAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,gBAAA,GAAA,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MAAA,CAAA;AAAA,MAAA,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -4,7 +4,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
4
4
|
setData(states: {
|
5
5
|
_currentRowKey: import("vue").Ref<string | null>;
|
6
6
|
currentRow: import("vue").Ref<T | null>;
|
7
|
-
expandRowKeys: import("vue").Ref<
|
7
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
8
8
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
9
9
|
indent: import("vue").Ref<number>;
|
10
10
|
lazy: import("vue").Ref<boolean>;
|
@@ -46,7 +46,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
46
46
|
insertColumn(states: {
|
47
47
|
_currentRowKey: import("vue").Ref<string | null>;
|
48
48
|
currentRow: import("vue").Ref<T | null>;
|
49
|
-
expandRowKeys: import("vue").Ref<
|
49
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
50
50
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
51
51
|
indent: import("vue").Ref<number>;
|
52
52
|
lazy: import("vue").Ref<boolean>;
|
@@ -88,7 +88,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
88
88
|
updateColumnOrder(states: {
|
89
89
|
_currentRowKey: import("vue").Ref<string | null>;
|
90
90
|
currentRow: import("vue").Ref<T | null>;
|
91
|
-
expandRowKeys: import("vue").Ref<
|
91
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
92
92
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
93
93
|
indent: import("vue").Ref<number>;
|
94
94
|
lazy: import("vue").Ref<boolean>;
|
@@ -130,7 +130,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
130
130
|
removeColumn(states: {
|
131
131
|
_currentRowKey: import("vue").Ref<string | null>;
|
132
132
|
currentRow: import("vue").Ref<T | null>;
|
133
|
-
expandRowKeys: import("vue").Ref<
|
133
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
134
134
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
135
135
|
indent: import("vue").Ref<number>;
|
136
136
|
lazy: import("vue").Ref<boolean>;
|
@@ -172,7 +172,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
172
172
|
sort(states: {
|
173
173
|
_currentRowKey: import("vue").Ref<string | null>;
|
174
174
|
currentRow: import("vue").Ref<T | null>;
|
175
|
-
expandRowKeys: import("vue").Ref<
|
175
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
176
176
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
177
177
|
indent: import("vue").Ref<number>;
|
178
178
|
lazy: import("vue").Ref<boolean>;
|
@@ -214,7 +214,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
214
214
|
changeSortCondition(states: {
|
215
215
|
_currentRowKey: import("vue").Ref<string | null>;
|
216
216
|
currentRow: import("vue").Ref<T | null>;
|
217
|
-
expandRowKeys: import("vue").Ref<
|
217
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
218
218
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
219
219
|
indent: import("vue").Ref<number>;
|
220
220
|
lazy: import("vue").Ref<boolean>;
|
@@ -256,7 +256,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
256
256
|
filterChange(_states: {
|
257
257
|
_currentRowKey: import("vue").Ref<string | null>;
|
258
258
|
currentRow: import("vue").Ref<T | null>;
|
259
|
-
expandRowKeys: import("vue").Ref<
|
259
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
260
260
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
261
261
|
indent: import("vue").Ref<number>;
|
262
262
|
lazy: import("vue").Ref<boolean>;
|
@@ -299,7 +299,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
299
299
|
rowSelectedChanged(_states: {
|
300
300
|
_currentRowKey: import("vue").Ref<string | null>;
|
301
301
|
currentRow: import("vue").Ref<T | null>;
|
302
|
-
expandRowKeys: import("vue").Ref<
|
302
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
303
303
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
304
304
|
indent: import("vue").Ref<number>;
|
305
305
|
lazy: import("vue").Ref<boolean>;
|
@@ -341,7 +341,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
341
341
|
setHoverRow(states: {
|
342
342
|
_currentRowKey: import("vue").Ref<string | null>;
|
343
343
|
currentRow: import("vue").Ref<T | null>;
|
344
|
-
expandRowKeys: import("vue").Ref<
|
344
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
345
345
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
346
346
|
indent: import("vue").Ref<number>;
|
347
347
|
lazy: import("vue").Ref<boolean>;
|
@@ -383,7 +383,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
383
383
|
setCurrentRow(_states: {
|
384
384
|
_currentRowKey: import("vue").Ref<string | null>;
|
385
385
|
currentRow: import("vue").Ref<T | null>;
|
386
|
-
expandRowKeys: import("vue").Ref<
|
386
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
387
387
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
388
388
|
indent: import("vue").Ref<number>;
|
389
389
|
lazy: import("vue").Ref<boolean>;
|
@@ -447,7 +447,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
447
447
|
clearFilter: (columnKeys?: string[] | string) => void;
|
448
448
|
clearSort: () => void;
|
449
449
|
toggleRowExpansion: (row: T, expanded?: boolean) => void;
|
450
|
-
setExpandRowKeysAdapter: (val:
|
450
|
+
setExpandRowKeysAdapter: (val: string[]) => void;
|
451
451
|
setCurrentRowKey: (key: string) => void;
|
452
452
|
toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void;
|
453
453
|
isRowExpanded: (row: T) => boolean;
|
@@ -459,7 +459,7 @@ export declare function createStore<T extends DefaultRow>(table: Table<T>, props
|
|
459
459
|
states: {
|
460
460
|
_currentRowKey: import("vue").Ref<string | null>;
|
461
461
|
currentRow: import("vue").Ref<T | null>;
|
462
|
-
expandRowKeys: import("vue").Ref<
|
462
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
463
463
|
treeData: import("vue").Ref<Record<string, import("./tree").TreeData>>;
|
464
464
|
indent: import("vue").Ref<number>;
|
465
465
|
lazy: import("vue").Ref<boolean>;
|
@@ -10,7 +10,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
10
10
|
setData(states: {
|
11
11
|
_currentRowKey: Ref<string | null>;
|
12
12
|
currentRow: Ref<T | null>;
|
13
|
-
expandRowKeys: Ref<
|
13
|
+
expandRowKeys: Ref<string[]>;
|
14
14
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
15
15
|
indent: Ref<number>;
|
16
16
|
lazy: Ref<boolean>;
|
@@ -52,7 +52,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
52
52
|
insertColumn(states: {
|
53
53
|
_currentRowKey: Ref<string | null>;
|
54
54
|
currentRow: Ref<T | null>;
|
55
|
-
expandRowKeys: Ref<
|
55
|
+
expandRowKeys: Ref<string[]>;
|
56
56
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
57
57
|
indent: Ref<number>;
|
58
58
|
lazy: Ref<boolean>;
|
@@ -94,7 +94,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
94
94
|
updateColumnOrder(states: {
|
95
95
|
_currentRowKey: Ref<string | null>;
|
96
96
|
currentRow: Ref<T | null>;
|
97
|
-
expandRowKeys: Ref<
|
97
|
+
expandRowKeys: Ref<string[]>;
|
98
98
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
99
99
|
indent: Ref<number>;
|
100
100
|
lazy: Ref<boolean>;
|
@@ -136,7 +136,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
136
136
|
removeColumn(states: {
|
137
137
|
_currentRowKey: Ref<string | null>;
|
138
138
|
currentRow: Ref<T | null>;
|
139
|
-
expandRowKeys: Ref<
|
139
|
+
expandRowKeys: Ref<string[]>;
|
140
140
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
141
141
|
indent: Ref<number>;
|
142
142
|
lazy: Ref<boolean>;
|
@@ -178,7 +178,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
178
178
|
sort(states: {
|
179
179
|
_currentRowKey: Ref<string | null>;
|
180
180
|
currentRow: Ref<T | null>;
|
181
|
-
expandRowKeys: Ref<
|
181
|
+
expandRowKeys: Ref<string[]>;
|
182
182
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
183
183
|
indent: Ref<number>;
|
184
184
|
lazy: Ref<boolean>;
|
@@ -220,7 +220,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
220
220
|
changeSortCondition(states: {
|
221
221
|
_currentRowKey: Ref<string | null>;
|
222
222
|
currentRow: Ref<T | null>;
|
223
|
-
expandRowKeys: Ref<
|
223
|
+
expandRowKeys: Ref<string[]>;
|
224
224
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
225
225
|
indent: Ref<number>;
|
226
226
|
lazy: Ref<boolean>;
|
@@ -262,7 +262,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
262
262
|
filterChange(_states: {
|
263
263
|
_currentRowKey: Ref<string | null>;
|
264
264
|
currentRow: Ref<T | null>;
|
265
|
-
expandRowKeys: Ref<
|
265
|
+
expandRowKeys: Ref<string[]>;
|
266
266
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
267
267
|
indent: Ref<number>;
|
268
268
|
lazy: Ref<boolean>;
|
@@ -305,7 +305,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
305
305
|
rowSelectedChanged(_states: {
|
306
306
|
_currentRowKey: Ref<string | null>;
|
307
307
|
currentRow: Ref<T | null>;
|
308
|
-
expandRowKeys: Ref<
|
308
|
+
expandRowKeys: Ref<string[]>;
|
309
309
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
310
310
|
indent: Ref<number>;
|
311
311
|
lazy: Ref<boolean>;
|
@@ -347,7 +347,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
347
347
|
setHoverRow(states: {
|
348
348
|
_currentRowKey: Ref<string | null>;
|
349
349
|
currentRow: Ref<T | null>;
|
350
|
-
expandRowKeys: Ref<
|
350
|
+
expandRowKeys: Ref<string[]>;
|
351
351
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
352
352
|
indent: Ref<number>;
|
353
353
|
lazy: Ref<boolean>;
|
@@ -389,7 +389,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
389
389
|
setCurrentRow(_states: {
|
390
390
|
_currentRowKey: Ref<string | null>;
|
391
391
|
currentRow: Ref<T | null>;
|
392
|
-
expandRowKeys: Ref<
|
392
|
+
expandRowKeys: Ref<string[]>;
|
393
393
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
394
394
|
indent: Ref<number>;
|
395
395
|
lazy: Ref<boolean>;
|
@@ -453,7 +453,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
453
453
|
clearFilter: (columnKeys?: string[] | string) => void;
|
454
454
|
clearSort: () => void;
|
455
455
|
toggleRowExpansion: (row: T, expanded?: boolean) => void;
|
456
|
-
setExpandRowKeysAdapter: (val:
|
456
|
+
setExpandRowKeysAdapter: (val: string[]) => void;
|
457
457
|
setCurrentRowKey: (key: string) => void;
|
458
458
|
toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void;
|
459
459
|
isRowExpanded: (row: T) => boolean;
|
@@ -465,7 +465,7 @@ declare function useStore<T extends DefaultRow>(): {
|
|
465
465
|
states: {
|
466
466
|
_currentRowKey: Ref<string | null>;
|
467
467
|
currentRow: Ref<T | null>;
|
468
|
-
expandRowKeys: Ref<
|
468
|
+
expandRowKeys: Ref<string[]>;
|
469
469
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
470
470
|
indent: Ref<number>;
|
471
471
|
lazy: Ref<boolean>;
|
@@ -530,7 +530,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
530
530
|
setData(states: {
|
531
531
|
_currentRowKey: Ref<string | null>;
|
532
532
|
currentRow: Ref<T | null>;
|
533
|
-
expandRowKeys: Ref<
|
533
|
+
expandRowKeys: Ref<string[]>;
|
534
534
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
535
535
|
indent: Ref<number>;
|
536
536
|
lazy: Ref<boolean>;
|
@@ -572,7 +572,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
572
572
|
insertColumn(states: {
|
573
573
|
_currentRowKey: Ref<string | null>;
|
574
574
|
currentRow: Ref<T | null>;
|
575
|
-
expandRowKeys: Ref<
|
575
|
+
expandRowKeys: Ref<string[]>;
|
576
576
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
577
577
|
indent: Ref<number>;
|
578
578
|
lazy: Ref<boolean>;
|
@@ -614,7 +614,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
614
614
|
updateColumnOrder(states: {
|
615
615
|
_currentRowKey: Ref<string | null>;
|
616
616
|
currentRow: Ref<T | null>;
|
617
|
-
expandRowKeys: Ref<
|
617
|
+
expandRowKeys: Ref<string[]>;
|
618
618
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
619
619
|
indent: Ref<number>;
|
620
620
|
lazy: Ref<boolean>;
|
@@ -656,7 +656,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
656
656
|
removeColumn(states: {
|
657
657
|
_currentRowKey: Ref<string | null>;
|
658
658
|
currentRow: Ref<T | null>;
|
659
|
-
expandRowKeys: Ref<
|
659
|
+
expandRowKeys: Ref<string[]>;
|
660
660
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
661
661
|
indent: Ref<number>;
|
662
662
|
lazy: Ref<boolean>;
|
@@ -698,7 +698,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
698
698
|
sort(states: {
|
699
699
|
_currentRowKey: Ref<string | null>;
|
700
700
|
currentRow: Ref<T | null>;
|
701
|
-
expandRowKeys: Ref<
|
701
|
+
expandRowKeys: Ref<string[]>;
|
702
702
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
703
703
|
indent: Ref<number>;
|
704
704
|
lazy: Ref<boolean>;
|
@@ -740,7 +740,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
740
740
|
changeSortCondition(states: {
|
741
741
|
_currentRowKey: Ref<string | null>;
|
742
742
|
currentRow: Ref<T | null>;
|
743
|
-
expandRowKeys: Ref<
|
743
|
+
expandRowKeys: Ref<string[]>;
|
744
744
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
745
745
|
indent: Ref<number>;
|
746
746
|
lazy: Ref<boolean>;
|
@@ -782,7 +782,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
782
782
|
filterChange(_states: {
|
783
783
|
_currentRowKey: Ref<string | null>;
|
784
784
|
currentRow: Ref<T | null>;
|
785
|
-
expandRowKeys: Ref<
|
785
|
+
expandRowKeys: Ref<string[]>;
|
786
786
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
787
787
|
indent: Ref<number>;
|
788
788
|
lazy: Ref<boolean>;
|
@@ -825,7 +825,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
825
825
|
rowSelectedChanged(_states: {
|
826
826
|
_currentRowKey: Ref<string | null>;
|
827
827
|
currentRow: Ref<T | null>;
|
828
|
-
expandRowKeys: Ref<
|
828
|
+
expandRowKeys: Ref<string[]>;
|
829
829
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
830
830
|
indent: Ref<number>;
|
831
831
|
lazy: Ref<boolean>;
|
@@ -867,7 +867,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
867
867
|
setHoverRow(states: {
|
868
868
|
_currentRowKey: Ref<string | null>;
|
869
869
|
currentRow: Ref<T | null>;
|
870
|
-
expandRowKeys: Ref<
|
870
|
+
expandRowKeys: Ref<string[]>;
|
871
871
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
872
872
|
indent: Ref<number>;
|
873
873
|
lazy: Ref<boolean>;
|
@@ -909,7 +909,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
909
909
|
setCurrentRow(_states: {
|
910
910
|
_currentRowKey: Ref<string | null>;
|
911
911
|
currentRow: Ref<T | null>;
|
912
|
-
expandRowKeys: Ref<
|
912
|
+
expandRowKeys: Ref<string[]>;
|
913
913
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
914
914
|
indent: Ref<number>;
|
915
915
|
lazy: Ref<boolean>;
|
@@ -973,7 +973,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
973
973
|
clearFilter: (columnKeys?: string[] | string) => void;
|
974
974
|
clearSort: () => void;
|
975
975
|
toggleRowExpansion: (row: T, expanded?: boolean) => void;
|
976
|
-
setExpandRowKeysAdapter: (val:
|
976
|
+
setExpandRowKeysAdapter: (val: string[]) => void;
|
977
977
|
setCurrentRowKey: (key: string) => void;
|
978
978
|
toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void;
|
979
979
|
isRowExpanded: (row: T) => boolean;
|
@@ -985,7 +985,7 @@ declare class HelperStore<T extends DefaultRow> {
|
|
985
985
|
states: {
|
986
986
|
_currentRowKey: Ref<string | null>;
|
987
987
|
currentRow: Ref<T | null>;
|
988
|
-
expandRowKeys: Ref<
|
988
|
+
expandRowKeys: Ref<string[]>;
|
989
989
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
990
990
|
indent: Ref<number>;
|
991
991
|
lazy: Ref<boolean>;
|
@@ -9,12 +9,12 @@ declare function useTree<T extends DefaultRow>(watcherData: WatcherPropsData<T>)
|
|
9
9
|
loadData: (row: T, key: string, treeNode: TreeNode) => void;
|
10
10
|
loadOrToggle: (row: T) => void;
|
11
11
|
toggleTreeExpansion: (row: T, expanded?: boolean) => void;
|
12
|
-
updateTreeExpandKeys: (value:
|
12
|
+
updateTreeExpandKeys: (value: string[]) => void;
|
13
13
|
updateTreeData: (ifChangeExpandRowKeys?: boolean, ifExpandAll?: boolean) => void;
|
14
14
|
updateKeyChildren: (key: string, data: T[]) => void;
|
15
|
-
normalize: (data: T[]) =>
|
15
|
+
normalize: (data: T[]) => Record<string, TreeData>;
|
16
16
|
states: {
|
17
|
-
expandRowKeys: import("vue").Ref<
|
17
|
+
expandRowKeys: import("vue").Ref<string[]>;
|
18
18
|
treeData: import("vue").Ref<Record<string, TreeData>>;
|
19
19
|
indent: import("vue").Ref<number>;
|
20
20
|
lazy: import("vue").Ref<boolean>;
|
@@ -46,20 +46,20 @@ function useTree(watcherData) {
|
|
46
46
|
});
|
47
47
|
const normalize = (data) => {
|
48
48
|
const rowKey = watcherData.rowKey.value;
|
49
|
-
const res =
|
49
|
+
const res = {};
|
50
50
|
util.walkTreeNode(data, (parent, children, level) => {
|
51
|
-
const parentId = util.getRowIdentity(parent, rowKey
|
51
|
+
const parentId = util.getRowIdentity(parent, rowKey);
|
52
52
|
if (shared.isArray(children)) {
|
53
|
-
res
|
54
|
-
children: children.map((row) => row
|
53
|
+
res[parentId] = {
|
54
|
+
children: children.map((row) => util.getRowIdentity(row, rowKey)),
|
55
55
|
level
|
56
|
-
}
|
56
|
+
};
|
57
57
|
} else if (lazy.value) {
|
58
|
-
res
|
58
|
+
res[parentId] = {
|
59
59
|
children: [],
|
60
60
|
lazy: true,
|
61
61
|
level
|
62
|
-
}
|
62
|
+
};
|
63
63
|
}
|
64
64
|
}, childrenColumnName.value, lazyColumnIdentifier.value, lazy.value);
|
65
65
|
return res;
|
@@ -69,8 +69,9 @@ function useTree(watcherData) {
|
|
69
69
|
ifExpandAll || (ifExpandAll = (_a = instance.store) == null ? void 0 : _a.states.defaultExpandAll.value);
|
70
70
|
const nested = normalizedData.value;
|
71
71
|
const normalizedLazyNode_ = normalizedLazyNode.value;
|
72
|
+
const keys = Object.keys(nested);
|
72
73
|
const newTreeData = {};
|
73
|
-
if (
|
74
|
+
if (keys.length) {
|
74
75
|
const oldTreeData = vue.unref(treeData);
|
75
76
|
const rootLazyRowKeys = [];
|
76
77
|
const getExpanded = (oldValue, key) => {
|
@@ -85,9 +86,9 @@ function useTree(watcherData) {
|
|
85
86
|
return !!((oldValue == null ? void 0 : oldValue.expanded) || included);
|
86
87
|
}
|
87
88
|
};
|
88
|
-
|
89
|
+
keys.forEach((key) => {
|
89
90
|
const oldValue = oldTreeData[key];
|
90
|
-
const newValue = { ...nested
|
91
|
+
const newValue = { ...nested[key] };
|
91
92
|
newValue.expanded = getExpanded(oldValue, key);
|
92
93
|
if (newValue.lazy) {
|
93
94
|
const { loaded = false, loading = false } = oldValue || {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tree.js","sources":["../../../../../../../packages/components/table/src/store/tree.ts"],"sourcesContent":["import { computed, getCurrentInstance, ref, unref, watch } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { getRowIdentity, walkTreeNode } from '../util'\n\nimport type { WatcherPropsData } from '.'\nimport type { DefaultRow, Table, TableProps, TreeNode } from '../table/defaults'\n\nexport interface TreeData extends TreeNode {\n children?: string[]\n lazy?: boolean\n loaded?: boolean\n}\n\nfunction useTree<T extends DefaultRow>(watcherData: WatcherPropsData<T>) {\n const expandRowKeys = ref<Array<string | number>>([])\n const treeData = ref<Record<string, TreeData>>({})\n const indent = ref(16)\n const lazy = ref(false)\n const lazyTreeNodeMap = ref<Record<string, T[]>>({})\n const lazyColumnIdentifier = ref('hasChildren')\n const childrenColumnName = ref('children')\n const checkStrictly = ref(false)\n const instance = getCurrentInstance() as Table<T>\n const normalizedData = computed(() => {\n if (!watcherData.rowKey.value) return {}\n const data = watcherData.data.value || []\n return normalize(data)\n })\n const normalizedLazyNode = computed(() => {\n const rowKey = watcherData.rowKey.value\n const keys = Object.keys(lazyTreeNodeMap.value)\n const res: Record<string, { children: string[] }> = {}\n if (!keys.length) return res\n keys.forEach((key) => {\n if (lazyTreeNodeMap.value[key].length) {\n const item: typeof res[number] = { children: [] }\n lazyTreeNodeMap.value[key].forEach((row) => {\n const currentRowKey = getRowIdentity(row, rowKey)\n item.children.push(currentRowKey)\n if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {\n res[currentRowKey] = { children: [] }\n }\n })\n res[key] = item\n }\n })\n return res\n })\n\n const normalize = (data: T[]) => {\n const rowKey = watcherData.rowKey.value\n const res = new Map<string | number, TreeData>() // 使用 Map 替代 Object,解决 number key 的问题\n walkTreeNode(\n data,\n (parent, children, level) => {\n const parentId = getRowIdentity(parent, rowKey, true)\n if (isArray(children)) {\n res.set(parentId, {\n children: children.map((row) => row[rowKey!]),\n level,\n })\n } else if (lazy.value) {\n // 当 children 不存在且 lazy 为 true,该节点即为懒加载的节点\n res.set(parentId, {\n children: [],\n lazy: true,\n level,\n })\n }\n },\n childrenColumnName.value,\n lazyColumnIdentifier.value,\n lazy.value\n )\n return res\n }\n\n const updateTreeData = (\n ifChangeExpandRowKeys = false,\n ifExpandAll?: boolean\n ) => {\n ifExpandAll ||= instance.store?.states.defaultExpandAll.value\n const nested = normalizedData.value\n const normalizedLazyNode_ = normalizedLazyNode.value\n const newTreeData: Record<string, TreeData> = {}\n if (nested instanceof Map && nested.size) {\n const oldTreeData = unref(treeData)\n const rootLazyRowKeys: string[] = []\n const getExpanded = (oldValue: TreeData, key: string) => {\n if (ifChangeExpandRowKeys) {\n if (expandRowKeys.value) {\n return ifExpandAll || expandRowKeys.value.includes(key)\n } else {\n return !!(ifExpandAll || oldValue?.expanded)\n }\n } else {\n const included =\n ifExpandAll ||\n (expandRowKeys.value && expandRowKeys.value.includes(key))\n return !!(oldValue?.expanded || included)\n }\n }\n // 合并 expanded 与 display,确保数据刷新后,状态不变\n nested.forEach((_, key) => {\n const oldValue = oldTreeData[key]\n const newValue = { ...nested.get(key) }\n newValue.expanded = getExpanded(oldValue, key)\n if (newValue.lazy) {\n const { loaded = false, loading = false } = oldValue || {}\n newValue.loaded = !!loaded\n newValue.loading = !!loading\n rootLazyRowKeys.push(key)\n }\n newTreeData[key] = newValue\n })\n // 根据懒加载数据更新 treeData\n const lazyKeys = Object.keys(normalizedLazyNode_)\n if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {\n lazyKeys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const lazyNodeChildren = normalizedLazyNode_[key].children\n if (rootLazyRowKeys.includes(key)) {\n // 懒加载的 root 节点,更新一下原有的数据,原来的 children 一定是空数组\n if (newTreeData[key].children?.length !== 0) {\n throw new Error('[ElTable]children must be an empty array.')\n }\n newTreeData[key].children = lazyNodeChildren\n } else {\n const { loaded = false, loading = false } = oldValue || {}\n newTreeData[key] = {\n lazy: true,\n loaded: !!loaded,\n loading: !!loading,\n expanded: getExpanded(oldValue, key),\n children: lazyNodeChildren,\n level: undefined,\n }\n }\n })\n }\n }\n treeData.value = newTreeData\n instance.store?.updateTableScrollY()\n }\n\n watch(\n () => expandRowKeys.value,\n () => {\n updateTreeData(true)\n }\n )\n\n watch(\n () => normalizedData.value,\n () => {\n updateTreeData()\n }\n )\n watch(\n () => normalizedLazyNode.value,\n () => {\n updateTreeData()\n }\n )\n\n const updateTreeExpandKeys = (value: (string | number)[]) => {\n expandRowKeys.value = value\n updateTreeData()\n }\n const isUseLazy = (data: TreeData) => {\n return lazy.value && data && 'loaded' in data && !data.loaded\n }\n const toggleTreeExpansion = (row: T, expanded?: boolean) => {\n instance.store.assertRowKey()\n\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = id && treeData.value[id]\n if (id && data && 'expanded' in data) {\n const oldExpanded = data.expanded\n expanded = isUndefined(expanded) ? !data.expanded : expanded\n treeData.value[id].expanded = expanded\n if (oldExpanded !== expanded) {\n instance.emit('expand-change', row, expanded)\n }\n isUseLazy(data) && loadData(row, id, data)\n instance.store.updateTableScrollY()\n }\n }\n\n const loadOrToggle = (row: T) => {\n instance.store.assertRowKey()\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = treeData.value[id]\n if (isUseLazy(data)) {\n loadData(row, id, data)\n } else {\n toggleTreeExpansion(row, undefined)\n }\n }\n\n const loadData = (row: T, key: string, treeNode: TreeNode) => {\n const { load } = instance.props as unknown as TableProps<T>\n if (load && !treeData.value[key].loaded) {\n treeData.value[key].loading = true\n load(row, treeNode, (data) => {\n if (!isArray(data)) {\n throw new TypeError('[ElTable] data must be an array')\n }\n treeData.value[key].loading = false\n treeData.value[key].loaded = true\n treeData.value[key].expanded = true\n if (data.length) {\n lazyTreeNodeMap.value[key] = data\n }\n instance.emit('expand-change', row, true)\n })\n }\n }\n\n const updateKeyChildren = (key: string, data: T[]) => {\n const { lazy, rowKey } = instance.props as unknown as TableProps<T>\n if (!lazy) return\n if (!rowKey) throw new Error('[Table] rowKey is required in updateKeyChild')\n\n if (lazyTreeNodeMap.value[key]) {\n lazyTreeNodeMap.value[key] = data\n }\n }\n\n return {\n loadData,\n loadOrToggle,\n toggleTreeExpansion,\n updateTreeExpandKeys,\n updateTreeData,\n updateKeyChildren,\n normalize,\n states: {\n expandRowKeys,\n treeData,\n indent,\n lazy,\n lazyTreeNodeMap,\n lazyColumnIdentifier,\n childrenColumnName,\n checkStrictly,\n },\n }\n}\n\nexport default useTree\n"],"names":["ref","getCurrentInstance","computed","getRowIdentity","walkTreeNode","isArray","unref","watch","isUndefined"],"mappings":";;;;;;;;;AAGA,SAAS,OAAO,CAAC,WAAW,EAAE;AAC9B,EAAE,MAAM,aAAa,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAChC,EAAE,MAAM,QAAQ,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAC3B,EAAE,MAAM,MAAM,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AACzB,EAAE,MAAM,IAAI,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AAC1B,EAAE,MAAM,eAAe,GAAGA,OAAG,CAAC,EAAE,CAAC,CAAC;AAClC,EAAE,MAAM,oBAAoB,GAAGA,OAAG,CAAC,aAAa,CAAC,CAAC;AAClD,EAAE,MAAM,kBAAkB,GAAGA,OAAG,CAAC,UAAU,CAAC,CAAC;AAC7C,EAAE,MAAM,aAAa,GAAGA,OAAG,CAAC,KAAK,CAAC,CAAC;AACnC,EAAE,MAAM,QAAQ,GAAGC,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,cAAc,GAAGC,YAAQ,CAAC,MAAM;AACxC,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK;AACjC,MAAM,OAAO,EAAE,CAAC;AAChB,IAAI,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;AAC9C,IAAI,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,GAAG,CAAC,CAAC;AACL,EA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C;AAClD,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;AAC3C,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AACnD,IAAI,IAAI,CAAC,KAAK;AACd,MAAM,OAAO;AACb,IAAI,IAAI,CAAC,MAAM;AACf,MAAM,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;AACtE,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AACpC,MAAM,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACxC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,SAAS;AACb,IAAI,MAAM,EAAE;AACZ,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,MAAM;AACZ,MAAM,IAAI;AACV,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"tree.js","sources":["../../../../../../../packages/components/table/src/store/tree.ts"],"sourcesContent":["import { computed, getCurrentInstance, ref, unref, watch } from 'vue'\nimport { isArray, isUndefined } from '@element-plus/utils'\nimport { getRowIdentity, walkTreeNode } from '../util'\n\nimport type { WatcherPropsData } from '.'\nimport type { DefaultRow, Table, TableProps, TreeNode } from '../table/defaults'\n\nexport interface TreeData extends TreeNode {\n children?: string[]\n lazy?: boolean\n loaded?: boolean\n}\n\nfunction useTree<T extends DefaultRow>(watcherData: WatcherPropsData<T>) {\n const expandRowKeys = ref<Array<string>>([])\n const treeData = ref<Record<string, TreeData>>({})\n const indent = ref(16)\n const lazy = ref(false)\n const lazyTreeNodeMap = ref<Record<string, T[]>>({})\n const lazyColumnIdentifier = ref('hasChildren')\n const childrenColumnName = ref('children')\n const checkStrictly = ref(false)\n const instance = getCurrentInstance() as Table<T>\n const normalizedData = computed(() => {\n if (!watcherData.rowKey.value) return {}\n const data = watcherData.data.value || []\n return normalize(data)\n })\n const normalizedLazyNode = computed(() => {\n const rowKey = watcherData.rowKey.value\n const keys = Object.keys(lazyTreeNodeMap.value)\n const res: Record<string, { children: string[] }> = {}\n if (!keys.length) return res\n keys.forEach((key) => {\n if (lazyTreeNodeMap.value[key].length) {\n const item: typeof res[number] = { children: [] }\n lazyTreeNodeMap.value[key].forEach((row) => {\n const currentRowKey = getRowIdentity(row, rowKey)\n item.children.push(currentRowKey)\n if (row[lazyColumnIdentifier.value] && !res[currentRowKey]) {\n res[currentRowKey] = { children: [] }\n }\n })\n res[key] = item\n }\n })\n return res\n })\n\n const normalize = (data: T[]) => {\n const rowKey = watcherData.rowKey.value\n const res = {} as Record<string, TreeData>\n walkTreeNode(\n data,\n (parent, children, level) => {\n const parentId = getRowIdentity(parent, rowKey)\n if (isArray(children)) {\n res[parentId] = {\n children: children.map((row) => getRowIdentity(row, rowKey)),\n level,\n }\n } else if (lazy.value) {\n // 当 children 不存在且 lazy 为 true,该节点即为懒加载的节点\n res[parentId] = {\n children: [],\n lazy: true,\n level,\n }\n }\n },\n childrenColumnName.value,\n lazyColumnIdentifier.value,\n lazy.value\n )\n return res\n }\n\n const updateTreeData = (\n ifChangeExpandRowKeys = false,\n ifExpandAll?: boolean\n ) => {\n ifExpandAll ||= instance.store?.states.defaultExpandAll.value\n const nested = normalizedData.value\n const normalizedLazyNode_ = normalizedLazyNode.value\n const keys = Object.keys(nested)\n const newTreeData: Record<string, TreeData> = {}\n if (keys.length) {\n const oldTreeData = unref(treeData)\n const rootLazyRowKeys: string[] = []\n const getExpanded = (oldValue: TreeData, key: string) => {\n if (ifChangeExpandRowKeys) {\n if (expandRowKeys.value) {\n return ifExpandAll || expandRowKeys.value.includes(key)\n } else {\n return !!(ifExpandAll || oldValue?.expanded)\n }\n } else {\n const included =\n ifExpandAll ||\n (expandRowKeys.value && expandRowKeys.value.includes(key))\n return !!(oldValue?.expanded || included)\n }\n }\n // 合并 expanded 与 display,确保数据刷新后,状态不变\n keys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const newValue = { ...nested[key] }\n newValue.expanded = getExpanded(oldValue, key)\n if (newValue.lazy) {\n const { loaded = false, loading = false } = oldValue || {}\n newValue.loaded = !!loaded\n newValue.loading = !!loading\n rootLazyRowKeys.push(key)\n }\n newTreeData[key] = newValue\n })\n // 根据懒加载数据更新 treeData\n const lazyKeys = Object.keys(normalizedLazyNode_)\n if (lazy.value && lazyKeys.length && rootLazyRowKeys.length) {\n lazyKeys.forEach((key) => {\n const oldValue = oldTreeData[key]\n const lazyNodeChildren = normalizedLazyNode_[key].children\n if (rootLazyRowKeys.includes(key)) {\n // 懒加载的 root 节点,更新一下原有的数据,原来的 children 一定是空数组\n if (newTreeData[key].children?.length !== 0) {\n throw new Error('[ElTable]children must be an empty array.')\n }\n newTreeData[key].children = lazyNodeChildren\n } else {\n const { loaded = false, loading = false } = oldValue || {}\n newTreeData[key] = {\n lazy: true,\n loaded: !!loaded,\n loading: !!loading,\n expanded: getExpanded(oldValue, key),\n children: lazyNodeChildren,\n level: undefined,\n }\n }\n })\n }\n }\n treeData.value = newTreeData\n instance.store?.updateTableScrollY()\n }\n\n watch(\n () => expandRowKeys.value,\n () => {\n updateTreeData(true)\n }\n )\n\n watch(\n () => normalizedData.value,\n () => {\n updateTreeData()\n }\n )\n watch(\n () => normalizedLazyNode.value,\n () => {\n updateTreeData()\n }\n )\n\n const updateTreeExpandKeys = (value: string[]) => {\n expandRowKeys.value = value\n updateTreeData()\n }\n const isUseLazy = (data: TreeData) => {\n return lazy.value && data && 'loaded' in data && !data.loaded\n }\n const toggleTreeExpansion = (row: T, expanded?: boolean) => {\n instance.store.assertRowKey()\n\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = id && treeData.value[id]\n if (id && data && 'expanded' in data) {\n const oldExpanded = data.expanded\n expanded = isUndefined(expanded) ? !data.expanded : expanded\n treeData.value[id].expanded = expanded\n if (oldExpanded !== expanded) {\n instance.emit('expand-change', row, expanded)\n }\n isUseLazy(data) && loadData(row, id, data)\n instance.store.updateTableScrollY()\n }\n }\n\n const loadOrToggle = (row: T) => {\n instance.store.assertRowKey()\n const rowKey = watcherData.rowKey.value\n const id = getRowIdentity(row, rowKey)\n const data = treeData.value[id]\n if (isUseLazy(data)) {\n loadData(row, id, data)\n } else {\n toggleTreeExpansion(row, undefined)\n }\n }\n\n const loadData = (row: T, key: string, treeNode: TreeNode) => {\n const { load } = instance.props as unknown as TableProps<T>\n if (load && !treeData.value[key].loaded) {\n treeData.value[key].loading = true\n load(row, treeNode, (data) => {\n if (!isArray(data)) {\n throw new TypeError('[ElTable] data must be an array')\n }\n treeData.value[key].loading = false\n treeData.value[key].loaded = true\n treeData.value[key].expanded = true\n if (data.length) {\n lazyTreeNodeMap.value[key] = data\n }\n instance.emit('expand-change', row, true)\n })\n }\n }\n\n const updateKeyChildren = (key: string, data: T[]) => {\n const { lazy, rowKey } = instance.props as unknown as TableProps<T>\n if (!lazy) return\n if (!rowKey) throw new Error('[Table] rowKey is required in updateKeyChild')\n\n if (lazyTreeNodeMap.value[key]) {\n lazyTreeNodeMap.value[key] = data\n }\n }\n\n return {\n loadData,\n loadOrToggle,\n toggleTreeExpansion,\n updateTreeExpandKeys,\n updateTreeData,\n updateKeyChildren,\n normalize,\n states: {\n expandRowKeys,\n treeData,\n indent,\n lazy,\n lazyTreeNodeMap,\n lazyColumnIdentifier,\n childrenColumnName,\n checkStrictly,\n },\n }\n}\n\nexport default useTree\n"],"names":["ref","getCurrentInstance","computed","getRowIdentity","walkTreeNode","isArray","unref","watch","isUndefined"],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,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;AACpC,MAAM,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACxC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,SAAS;AACb,IAAI,MAAM,EAAE;AACZ,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,MAAM;AACZ,MAAM,IAAI;AACV,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,aAAa;AACnB,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
@@ -25,7 +25,7 @@ declare function useWatcher<T extends DefaultRow>(): {
|
|
25
25
|
clearFilter: (columnKeys?: string[] | string) => void;
|
26
26
|
clearSort: () => void;
|
27
27
|
toggleRowExpansion: (row: T, expanded?: boolean) => void;
|
28
|
-
setExpandRowKeysAdapter: (val:
|
28
|
+
setExpandRowKeysAdapter: (val: string[]) => void;
|
29
29
|
setCurrentRowKey: (key: string) => void;
|
30
30
|
toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void;
|
31
31
|
isRowExpanded: (row: T) => boolean;
|
@@ -37,7 +37,7 @@ declare function useWatcher<T extends DefaultRow>(): {
|
|
37
37
|
states: {
|
38
38
|
_currentRowKey: Ref<string | null>;
|
39
39
|
currentRow: Ref<T | null>;
|
40
|
-
expandRowKeys: Ref<
|
40
|
+
expandRowKeys: Ref<string[]>;
|
41
41
|
treeData: Ref<Record<string, import("./tree").TreeData>>;
|
42
42
|
indent: Ref<number>;
|
43
43
|
lazy: Ref<boolean>;
|