@element-plus/nightly 0.0.20250819 → 0.0.20250820
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 +12 -4
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +12 -4
- 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/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +31 -65
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +65 -31
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +48 -23
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +23 -48
- 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 +691 -101
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +101 -691
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +34 -16
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +16 -34
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +27 -202
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +202 -27
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +447 -46
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +46 -447
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +16 -16
- package/es/components/pagination/src/components/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +31 -127
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +127 -31
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +3 -2
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +258 -83
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +83 -258
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/splitter/index.mjs +2 -2
- package/es/components/splitter/src/split-panel.mjs +17 -153
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +153 -17
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -227
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +227 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table-column/watcher-helper.mjs +8 -0
- package/es/components/table/src/table-column/watcher-helper.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -82
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +82 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +21 -67
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +67 -21
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +57 -132
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +132 -57
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +16 -16
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +32 -65
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +65 -32
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +48 -24
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +24 -48
- 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 +690 -101
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +101 -690
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +34 -16
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +16 -34
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +28 -202
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +202 -28
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +447 -47
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +47 -447
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +16 -16
- package/lib/components/pagination/src/components/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +32 -127
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +127 -32
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +3 -2
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +257 -83
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +83 -257
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/splitter/index.js +2 -2
- package/lib/components/splitter/src/split-panel.js +17 -153
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +153 -17
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -226
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +226 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table-column/watcher-helper.js +8 -0
- package/lib/components/table/src/table-column/watcher-helper.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -82
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +82 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +21 -67
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +67 -21
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +57 -137
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +137 -57
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +16 -16
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n isString,\n isValidComponentSize,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType, __ExtractPublicPropTypes } from 'vue'\n\nexport const switchProps = buildProps({\n /**\n * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type\n */\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description whether Switch is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Switch is in loading state\n */\n loading: Boolean,\n /**\n * @description size of Switch\n */\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n /**\n * @description width of Switch\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether icon or text is displayed inside dot, only the first character will be rendered for text\n */\n inlinePrompt: Boolean,\n /**\n * @description component of the icon displayed in action when in `off` state\n */\n inactiveActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed in action when in `on` state\n */\n activeActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `on` state, overrides `active-text`\n */\n activeIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `off` state, overrides `inactive-text`\n */\n inactiveIcon: {\n type: iconPropType,\n },\n /**\n * @description text displayed when in `on` state\n */\n activeText: {\n type: String,\n default: '',\n },\n /**\n * @description text displayed when in `off` state\n */\n inactiveText: {\n type: String,\n default: '',\n },\n /**\n * @description switch value when in `on` state\n */\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n /**\n * @description switch value when in `off` state\n */\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description input name of Switch\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching\n */\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n /**\n * @description id for input\n */\n id: String,\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\nexport type SwitchPropsPublic = __ExtractPublicPropTypes<typeof switchProps>\n\nexport const switchEmits = {\n [UPDATE_MODEL_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [CHANGE_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [INPUT_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n}\nexport type SwitchEmits = typeof switchEmits\n\nexport type SwitchInstance = InstanceType<typeof Switch> & unknown\n"],"names":["buildProps","isValidComponentSize","iconPropType","definePropType","useAriaProps","UPDATE_MODEL_EVENT","isBoolean","isString","isNumber","CHANGE_EVENT","INPUT_EVENT"],"mappings":";;;;;;;;;;;;AAeY,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAEC,8BAAoB;AACnC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEA,iBAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEC,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAGC,kBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC3E,EAAE,CAACE,iBAAW,GAAG,CAAC,GAAG,KAAKJ,eAAS,CAAC,GAAG,CAAC,IAAIC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC;AAC1E;;;;;"}
|
1
|
+
{"version":3,"file":"switch2.js","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" @click.prevent=\"switchValue\">\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n :aria-label=\"ariaLabel\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @keydown.enter=\"switchValue\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"labelLeftKls\"\n >\n <el-icon v-if=\"inactiveIcon\">\n <component :is=\"inactiveIcon\" />\n </el-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span ref=\"core\" :class=\"ns.e('core')\" :style=\"coreStyle\">\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <el-icon :class=\"ns.is('icon')\">\n <component :is=\"checked ? activeIcon : inactiveIcon\" />\n </el-icon>\n </template>\n <template v-else-if=\"activeText || inactiveText\">\n <span :class=\"ns.is('text')\" :aria-hidden=\"!checked\">\n {{ checked ? activeText : inactiveText }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <el-icon v-if=\"loading\" :class=\"ns.is('loading')\">\n <loading />\n </el-icon>\n <slot v-else-if=\"checked\" name=\"active-action\">\n <el-icon v-if=\"activeActionIcon\">\n <component :is=\"activeActionIcon\" />\n </el-icon>\n </slot>\n <slot v-else-if=\"!checked\" name=\"inactive-action\">\n <el-icon v-if=\"inactiveActionIcon\">\n <component :is=\"inactiveActionIcon\" />\n </el-icon>\n </slot>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"labelRightKls\"\n >\n <el-icon v-if=\"activeIcon\">\n <component :is=\"activeIcon\" />\n </el-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport {\n addUnit,\n debugWarn,\n isBoolean,\n isPromise,\n throwError,\n} from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { switchEmits, switchProps } from './switch'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElSwitch'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(switchProps)\nconst emit = defineEmits(switchEmits)\n\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst switchDisabled = useFormDisabled(computed(() => props.loading))\nconst isControlled = ref(props.modelValue !== false)\nconst input = ref<HTMLInputElement>()\nconst core = ref<HTMLSpanElement>()\n\nconst switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('checked', checked.value),\n])\n\nconst labelLeftKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked.value),\n])\n\nconst labelRightKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked.value),\n])\n\nconst coreStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.width),\n}))\n\nwatch(\n () => props.modelValue,\n () => {\n isControlled.value = true\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : false\n})\n\nconst checked = computed(() => actualValue.value === props.activeValue)\n\nif (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {\n emit(UPDATE_MODEL_EVENT, props.inactiveValue)\n emit(CHANGE_EVENT, props.inactiveValue)\n emit(INPUT_EVENT, props.inactiveValue)\n}\n\nwatch(checked, (val) => {\n input.value!.checked = val\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n})\n\nconst handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n emit(INPUT_EVENT, val)\n nextTick(() => {\n input.value!.checked = checked.value\n })\n}\n\nconst switchValue = () => {\n if (switchDisabled.value) return\n\n const { beforeChange } = props\n if (!beforeChange) {\n handleChange()\n return\n }\n\n const shouldChange = beforeChange()\n\n const isPromiseOrBool = [\n isPromise(shouldChange),\n isBoolean(shouldChange),\n ].includes(true)\n if (!isPromiseOrBool) {\n throwError(\n COMPONENT_NAME,\n 'beforeChange must return type `Promise<boolean>` or `boolean`'\n )\n }\n\n if (isPromise(shouldChange)) {\n shouldChange\n .then((result) => {\n if (result) {\n handleChange()\n }\n })\n .catch((e) => {\n debugWarn(COMPONENT_NAME, `some error occurred: ${e}`)\n })\n } else if (shouldChange) {\n handleChange()\n }\n}\n\nconst focus = (): void => {\n input.value?.focus?.()\n}\n\nonMounted(() => {\n input.value!.checked = checked.value\n})\n\ndefineExpose({\n /**\n * @description manual focus to the switch component\n **/\n focus,\n /**\n * @description whether Switch is checked\n */\n checked,\n})\n</script>\n"],"names":["useFormItem","useFormSize","useNamespace","useFormItemInputId","useFormDisabled","computed","ref","addUnit","watch","UPDATE_MODEL_EVENT","INPUT_EVENT","debugWarn","CHANGE_EVENT","nextTick","isPromise","isBoolean","throwError","onMounted","_openBlock","_createElementBlock","_normalizeClass","_unref","_withModifiers","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;uCAqGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAE,QAAS,EAAA,GAAIA,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,aAAaC,8BAAY,EAAA,C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{
|
59
60
|
property: "prop",
|
60
61
|
align: "realAlign",
|
@@ -69,6 +70,13 @@ function useWatcher(owner, props_) {
|
|
69
70
|
});
|
70
71
|
}
|
71
72
|
});
|
73
|
+
parentProps.forEach((key) => {
|
74
|
+
if (shared.hasOwn(owner.value.props, key)) {
|
75
|
+
vue.watch(() => owner.value.props[key], (newVal) => {
|
76
|
+
instance.columnConfig.value[key] = newVal;
|
77
|
+
});
|
78
|
+
}
|
79
|
+
});
|
72
80
|
};
|
73
81
|
return {
|
74
82
|
registerComplexWatchers,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"watcher-helper.js","sources":["../../../../../../../packages/components/table/src/table-column/watcher-helper.ts"],"sourcesContent":["import { getCurrentInstance, watch } from 'vue'\nimport { hasOwn } from '@element-plus/utils'\nimport { parseMinWidth, parseWidth } from '../util'\n\nimport type { ComputedRef } from 'vue'\nimport type { DefaultRow } from '../table/defaults'\nimport type { TableColumn, TableColumnCtx, ValueOf } from './defaults'\n\nfunction getAllAliases(props: string[], aliases: Record<string, string>) {\n return props.reduce((prev, cur) => {\n prev[cur as keyof typeof prev] = cur\n return prev\n }, aliases)\n}\nfunction useWatcher<T extends DefaultRow>(\n owner: ComputedRef<any>,\n props_: Partial<TableColumnCtx<T>>\n) {\n const instance = getCurrentInstance() as TableColumn<T>\n const registerComplexWatchers = () => {\n const props = ['fixed']\n const aliases: Record<string, string> = {\n realWidth: 'width',\n realMinWidth: 'minWidth',\n }\n const allAliases = getAllAliases(props, aliases)\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key]\n if (hasOwn(props_, columnKey)) {\n watch(\n () => props_[columnKey],\n (newVal) => {\n let value: ValueOf<TableColumnCtx<T>> = newVal\n if (columnKey === 'width' && key === 'realWidth') {\n value = parseWidth(newVal)\n }\n if (columnKey === 'minWidth' && key === 'realMinWidth') {\n value = parseMinWidth(newVal)\n }\n instance.columnConfig.value[columnKey as never] = value as never\n instance.columnConfig.value[key as never] = value as never\n const updateColumns = columnKey === 'fixed'\n owner.value.store.scheduleLayout(updateColumns)\n }\n )\n }\n })\n }\n const registerNormalWatchers = () => {\n const props = [\n 'label',\n 'filters',\n 'filterMultiple',\n 'filteredValue',\n 'sortable',\n 'index',\n 'formatter',\n 'className',\n 'labelClassName',\n 'filterClassName',\n 'showOverflowTooltip',\n 'tooltipFormatter',\n ]\n const aliases: Record<string, string> = {\n property: 'prop',\n align: 'realAlign',\n headerAlign: 'realHeaderAlign',\n }\n const allAliases = getAllAliases(props, aliases)\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key]\n if (hasOwn(props_, columnKey)) {\n watch(\n () => props_[columnKey],\n (newVal) => {\n instance.columnConfig.value[key as never] = newVal\n }\n )\n }\n })\n }\n\n return {\n registerComplexWatchers,\n registerNormalWatchers,\n }\n}\n\nexport default useWatcher\n"],"names":["getCurrentInstance","hasOwn","watch","parseWidth","parseMinWidth"],"mappings":";;;;;;;;AAGA,SAAS,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE;AACvC,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK;AACrC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;AACpB,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG,EAAE,OAAO,CAAC,CAAC;AACd,CAAC;AACD,SAAS,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE;AACnC,EAAE,MAAM,QAAQ,GAAGA,sBAAkB,EAAE,CAAC;AACxC,EAAE,MAAM,uBAAuB,GAAG,MAAM;AACxC,IAAI,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAC5B,IAAI,MAAM,OAAO,GAAG;AACpB,MAAM,SAAS,EAAE,OAAO;AACxB,MAAM,YAAY,EAAE,UAAU;AAC9B,KAAK,CAAC;AACN,IAAI,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,MAAM,CAAC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AkB;AACxB,KAAK,CAAC;AACN,IAAI,MAAM,OAAO,GAAG;AACpB,MAAM,QAAQ,EAAE,MAAM;AACtB,MAAM,KAAK,EAAE,WAAW;AACxB,MAAM,WAAW,EAAE,iBAAiB;AACpC,KAAK,CAAC;AACN,IAAI,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACrD,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC7C,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACrC,MAAM,IAAIH,aAAM,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE;AACrC,QAAQC,SAAK,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,KAAK;AACnD,UAAU,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AACpD,SAAS,CAAC,CAAC;AACX,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,uBAAuB;AAC3B,IAAI,sBAAsB;AAC1B,GAAG,CAAC;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"watcher-helper.js","sources":["../../../../../../../packages/components/table/src/table-column/watcher-helper.ts"],"sourcesContent":["import { getCurrentInstance, watch } from 'vue'\nimport { hasOwn } from '@element-plus/utils'\nimport { parseMinWidth, parseWidth } from '../util'\n\nimport type { ComputedRef } from 'vue'\nimport type { DefaultRow } from '../table/defaults'\nimport type { TableColumn, TableColumnCtx, ValueOf } from './defaults'\n\nfunction getAllAliases(props: string[], aliases: Record<string, string>) {\n return props.reduce((prev, cur) => {\n prev[cur as keyof typeof prev] = cur\n return prev\n }, aliases)\n}\nfunction useWatcher<T extends DefaultRow>(\n owner: ComputedRef<any>,\n props_: Partial<TableColumnCtx<T>>\n) {\n const instance = getCurrentInstance() as TableColumn<T>\n const registerComplexWatchers = () => {\n const props = ['fixed']\n const aliases: Record<string, string> = {\n realWidth: 'width',\n realMinWidth: 'minWidth',\n }\n const allAliases = getAllAliases(props, aliases)\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key]\n if (hasOwn(props_, columnKey)) {\n watch(\n () => props_[columnKey],\n (newVal) => {\n let value: ValueOf<TableColumnCtx<T>> = newVal\n if (columnKey === 'width' && key === 'realWidth') {\n value = parseWidth(newVal)\n }\n if (columnKey === 'minWidth' && key === 'realMinWidth') {\n value = parseMinWidth(newVal)\n }\n instance.columnConfig.value[columnKey as never] = value as never\n instance.columnConfig.value[key as never] = value as never\n const updateColumns = columnKey === 'fixed'\n owner.value.store.scheduleLayout(updateColumns)\n }\n )\n }\n })\n }\n const registerNormalWatchers = () => {\n const props = [\n 'label',\n 'filters',\n 'filterMultiple',\n 'filteredValue',\n 'sortable',\n 'index',\n 'formatter',\n 'className',\n 'labelClassName',\n 'filterClassName',\n 'showOverflowTooltip',\n 'tooltipFormatter',\n ]\n const parentProps = ['showOverflowTooltip']\n const aliases: Record<string, string> = {\n property: 'prop',\n align: 'realAlign',\n headerAlign: 'realHeaderAlign',\n }\n const allAliases = getAllAliases(props, aliases)\n Object.keys(allAliases).forEach((key) => {\n const columnKey = aliases[key]\n if (hasOwn(props_, columnKey)) {\n watch(\n () => props_[columnKey],\n (newVal) => {\n instance.columnConfig.value[key as never] = newVal\n }\n )\n }\n })\n parentProps.forEach((key) => {\n if (hasOwn(owner.value.props, key)) {\n watch(\n () => owner.value.props[key],\n (newVal) => {\n instance.columnConfig.value[key] = newVal as never\n }\n )\n }\n })\n }\n\n return {\n registerComplexWatchers,\n registerNormalWatchers,\n }\n}\n\nexport default useWatcher\n"],"names":["getCurrentInstance","hasOwn","watch","parseWidth","parseMinWidth"],"mappings":";;;;;;;;AAGA,SAAS,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE;AACvC,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI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,OAAO;AACP,KAAK,CAAC,CAAC;AACP,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AACjC,MAAM,IAAID,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;AAC1C,QAAQC,SAAK,CAAC,MAAM,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,KAAK;AACxD,UAAU,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AACpD,SAAS,CAAC,CAAC;AACX,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,uBAAuB;AAC3B,IAAI,sBAAsB;AAC1B,GAAG,CAAC;AACJ;;;;"}
|
@@ -3,10 +3,10 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var tabs = require('./src/tabs.js');
|
6
|
-
var tabPane$1 = require('./src/tab-
|
6
|
+
var tabPane$1 = require('./src/tab-pane2.js');
|
7
7
|
var tabBar = require('./src/tab-bar.js');
|
8
8
|
var tabNav = require('./src/tab-nav.js');
|
9
|
-
var tabPane = require('./src/tab-
|
9
|
+
var tabPane = require('./src/tab-pane.js');
|
10
10
|
var constants = require('./src/constants.js');
|
11
11
|
var install = require('../../utils/vue/install.js');
|
12
12
|
|
@@ -2,89 +2,20 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var core = require('@vueuse/core');
|
7
|
-
var constants = require('./constants.js');
|
8
|
-
var tabPane = require('./tab-pane2.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var error = require('../../../utils/error.js');
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
12
6
|
|
13
|
-
const
|
14
|
-
|
15
|
-
|
7
|
+
const tabPaneProps = runtime.buildProps({
|
8
|
+
label: {
|
9
|
+
type: String,
|
10
|
+
default: ""
|
11
|
+
},
|
12
|
+
name: {
|
13
|
+
type: [String, Number]
|
14
|
+
},
|
15
|
+
closable: Boolean,
|
16
|
+
disabled: Boolean,
|
17
|
+
lazy: Boolean
|
16
18
|
});
|
17
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
18
|
-
...__default__,
|
19
|
-
props: tabPane.tabPaneProps,
|
20
|
-
setup(__props) {
|
21
|
-
const props = __props;
|
22
|
-
const instance = vue.getCurrentInstance();
|
23
|
-
const slots = vue.useSlots();
|
24
|
-
const tabsRoot = vue.inject(constants.tabsRootContextKey);
|
25
|
-
if (!tabsRoot)
|
26
|
-
error.throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
27
|
-
const ns = index.useNamespace("tab-pane");
|
28
|
-
const paneRef = vue.ref();
|
29
|
-
const index$1 = vue.ref();
|
30
|
-
const isClosable = vue.computed(() => props.closable || tabsRoot.props.closable);
|
31
|
-
const active = core.eagerComputed(() => {
|
32
|
-
var _a;
|
33
|
-
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index$1.value);
|
34
|
-
});
|
35
|
-
const loaded = vue.ref(active.value);
|
36
|
-
const paneName = vue.computed(() => {
|
37
|
-
var _a;
|
38
|
-
return (_a = props.name) != null ? _a : index$1.value;
|
39
|
-
});
|
40
|
-
const shouldBeRender = core.eagerComputed(() => !props.lazy || loaded.value || active.value);
|
41
|
-
const isFocusInsidePane = () => {
|
42
|
-
var _a;
|
43
|
-
return (_a = paneRef.value) == null ? void 0 : _a.contains(document.activeElement);
|
44
|
-
};
|
45
|
-
vue.watch(active, (val) => {
|
46
|
-
if (val)
|
47
|
-
loaded.value = true;
|
48
|
-
});
|
49
|
-
const pane = vue.reactive({
|
50
|
-
uid: instance.uid,
|
51
|
-
getVnode: () => instance.vnode,
|
52
|
-
slots,
|
53
|
-
props,
|
54
|
-
paneName,
|
55
|
-
active,
|
56
|
-
index: index$1,
|
57
|
-
isClosable,
|
58
|
-
isFocusInsidePane
|
59
|
-
});
|
60
|
-
tabsRoot.registerPane(pane);
|
61
|
-
vue.onBeforeUnmount(() => {
|
62
|
-
tabsRoot.unregisterPane(pane);
|
63
|
-
});
|
64
|
-
vue.onBeforeUpdate(() => {
|
65
|
-
var _a;
|
66
|
-
if (slots.label)
|
67
|
-
(_a = tabsRoot.nav$.value) == null ? void 0 : _a.scheduleRender();
|
68
|
-
});
|
69
|
-
return (_ctx, _cache) => {
|
70
|
-
return vue.unref(shouldBeRender) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
71
|
-
key: 0,
|
72
|
-
id: `pane-${vue.unref(paneName)}`,
|
73
|
-
ref_key: "paneRef",
|
74
|
-
ref: paneRef,
|
75
|
-
class: vue.normalizeClass(vue.unref(ns).b()),
|
76
|
-
role: "tabpanel",
|
77
|
-
"aria-hidden": !vue.unref(active),
|
78
|
-
"aria-labelledby": `tab-${vue.unref(paneName)}`
|
79
|
-
}, [
|
80
|
-
vue.renderSlot(_ctx.$slots, "default")
|
81
|
-
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
|
82
|
-
[vue.vShow, vue.unref(active)]
|
83
|
-
]) : vue.createCommentVNode("v-if", true);
|
84
|
-
};
|
85
|
-
}
|
86
|
-
});
|
87
|
-
var TabPane = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tab-pane.vue"]]);
|
88
19
|
|
89
|
-
exports
|
20
|
+
exports.tabPaneProps = tabPaneProps;
|
90
21
|
//# sourceMappingURL=tab-pane.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-pane.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
1
|
+
{"version":3,"file":"tab-pane.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n /**\n * @description title of the tab\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'\n */\n name: {\n type: [String, Number],\n },\n /**\n * @description whether Tab is closable\n */\n closable: Boolean,\n /**\n * @description whether Tab is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Tab is lazily rendered\n */\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\nexport type TabPanePropsPublic = __ExtractPublicPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane> & unknown\n"],"names":["buildProps"],"mappings":";;;;;;AACY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
|
@@ -2,20 +2,89 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var core = require('@vueuse/core');
|
7
|
+
var constants = require('./constants.js');
|
8
|
+
var tabPane = require('./tab-pane.js');
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
+
var error = require('../../../utils/error.js');
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
6
12
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
default: ""
|
11
|
-
},
|
12
|
-
name: {
|
13
|
-
type: [String, Number]
|
14
|
-
},
|
15
|
-
closable: Boolean,
|
16
|
-
disabled: Boolean,
|
17
|
-
lazy: Boolean
|
13
|
+
const COMPONENT_NAME = "ElTabPane";
|
14
|
+
const __default__ = vue.defineComponent({
|
15
|
+
name: COMPONENT_NAME
|
18
16
|
});
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
18
|
+
...__default__,
|
19
|
+
props: tabPane.tabPaneProps,
|
20
|
+
setup(__props) {
|
21
|
+
const props = __props;
|
22
|
+
const instance = vue.getCurrentInstance();
|
23
|
+
const slots = vue.useSlots();
|
24
|
+
const tabsRoot = vue.inject(constants.tabsRootContextKey);
|
25
|
+
if (!tabsRoot)
|
26
|
+
error.throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
27
|
+
const ns = index.useNamespace("tab-pane");
|
28
|
+
const paneRef = vue.ref();
|
29
|
+
const index$1 = vue.ref();
|
30
|
+
const isClosable = vue.computed(() => props.closable || tabsRoot.props.closable);
|
31
|
+
const active = core.eagerComputed(() => {
|
32
|
+
var _a;
|
33
|
+
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index$1.value);
|
34
|
+
});
|
35
|
+
const loaded = vue.ref(active.value);
|
36
|
+
const paneName = vue.computed(() => {
|
37
|
+
var _a;
|
38
|
+
return (_a = props.name) != null ? _a : index$1.value;
|
39
|
+
});
|
40
|
+
const shouldBeRender = core.eagerComputed(() => !props.lazy || loaded.value || active.value);
|
41
|
+
const isFocusInsidePane = () => {
|
42
|
+
var _a;
|
43
|
+
return (_a = paneRef.value) == null ? void 0 : _a.contains(document.activeElement);
|
44
|
+
};
|
45
|
+
vue.watch(active, (val) => {
|
46
|
+
if (val)
|
47
|
+
loaded.value = true;
|
48
|
+
});
|
49
|
+
const pane = vue.reactive({
|
50
|
+
uid: instance.uid,
|
51
|
+
getVnode: () => instance.vnode,
|
52
|
+
slots,
|
53
|
+
props,
|
54
|
+
paneName,
|
55
|
+
active,
|
56
|
+
index: index$1,
|
57
|
+
isClosable,
|
58
|
+
isFocusInsidePane
|
59
|
+
});
|
60
|
+
tabsRoot.registerPane(pane);
|
61
|
+
vue.onBeforeUnmount(() => {
|
62
|
+
tabsRoot.unregisterPane(pane);
|
63
|
+
});
|
64
|
+
vue.onBeforeUpdate(() => {
|
65
|
+
var _a;
|
66
|
+
if (slots.label)
|
67
|
+
(_a = tabsRoot.nav$.value) == null ? void 0 : _a.scheduleRender();
|
68
|
+
});
|
69
|
+
return (_ctx, _cache) => {
|
70
|
+
return vue.unref(shouldBeRender) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
71
|
+
key: 0,
|
72
|
+
id: `pane-${vue.unref(paneName)}`,
|
73
|
+
ref_key: "paneRef",
|
74
|
+
ref: paneRef,
|
75
|
+
class: vue.normalizeClass(vue.unref(ns).b()),
|
76
|
+
role: "tabpanel",
|
77
|
+
"aria-hidden": !vue.unref(active),
|
78
|
+
"aria-labelledby": `tab-${vue.unref(paneName)}`
|
79
|
+
}, [
|
80
|
+
vue.renderSlot(_ctx.$slots, "default")
|
81
|
+
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
|
82
|
+
[vue.vShow, vue.unref(active)]
|
83
|
+
]) : vue.createCommentVNode("v-if", true);
|
84
|
+
};
|
85
|
+
}
|
86
|
+
});
|
87
|
+
var TabPane = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tab-pane.vue"]]);
|
19
88
|
|
20
|
-
exports
|
89
|
+
exports["default"] = TabPane;
|
21
90
|
//# sourceMappingURL=tab-pane2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-pane2.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
1
|
+
{"version":3,"file":"tab-pane2.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n ref=\"paneRef\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onBeforeUpdate,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst slots = useSlots()\n\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <el-tabs><el-tab-pane /></el-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst paneRef = ref<HTMLDivElement>()\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nconst isFocusInsidePane = () => {\n return paneRef.value?.contains(document.activeElement)\n}\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n getVnode: () => instance.vnode,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n isFocusInsidePane,\n})\n\ntabsRoot.registerPane(pane)\n\nonBeforeUnmount(() => {\n tabsRoot.unregisterPane(pane)\n})\n\nonBeforeUpdate(() => {\n if (slots.label) tabsRoot.nav$.value?.scheduleRender()\n})\n</script>\n"],"names":["getCurrentInstance","useSlots","inject","tabsRootContextKey","throwError","useNamespace","ref","index","computed","eagerComputed","watch","reactive","onBeforeUnmount"],"mappings":";;;;;;;;;;;;;uCAkCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;AAGA,IAAA,MAAM,WAAWA,sBAAmB,EAAA,CAAA;AACpC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAWC,WAAOC,4BAAkB,CAAA,CAAA;AAC1C,IAAA,IAAI,CAAC,QAAA;AACH,MAAAC,gBAAA,CAAW,gBAAgB,4CAA4C,CAAA,CAAA;AAEzE,IAAM,MAAA,EAAA,GAAKC,mBAAa,UAAU,CAAA,CAAA;AAElC,IAAA,MAAM,UAAUC,OAAoB,EAAA,CAAA;AACpC,IAAA,MAAMC,UAAQD,OAAY,EAAA,CAAA;AAC1B,IAAA,MAAM,aAAaE,YAAS,CAAA,MAAM,MAAM,QAAY,IAAA,QAAA,CAAS,MAAM,QAAQ,CAAA,CAAA;AAC3E,IAAA,MAAM,MAAS,GAAAC,kBAAA,CAAA,MAAA;AAAA,MACb,MAAM,CAAS;AAA2C,MAC5D,OAAA,QAAA,CAAA,WAAA,CAAA,KAAA,MAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAAF,OAAA,CAAA,KAAA,CAAA,CAAA;AACA,KAAM,CAAA,CAAA;AACN,IAAA,MAAM,gBAAoB,CAAA,MAAA,CAAA,KAAA,CAAM,CAAM;AACtC,IAAA,MAAM,QAAiB,GAAAC,YAAA,CAAA,MAAA;AAAA,MACrB,MAAM,CAAC;AAAqC,MAC9C,OAAA,CAAA,EAAA,GAAA,KAAA,CAAA,IAAA,KAAA,IAAA,GAAA,EAAA,GAAAD,OAAA,CAAA,KAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACE,IAAA,MAAA,cAAe,GAAAE,kBAAgB,CAAA,MAAsB,CAAA,KAAA,CAAA,IAAA,IAAA,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IACvD,MAAA,iBAAA,GAAA,MAAA;AAEA,MAAM,IAAA,EAAA,CAAA;AACJ,MAAI,OAAA,CAAK,YAAe,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,QAAA,CAAA,QAAA,CAAA,aAAA,CAAA,CAAA;AAAA,KACzB,CAAA;AAED,IAAAC,SAAA,CAAM,QAAgB,CAAA,GAAA,KAAA;AAAA,MACpB,OAAc;AAAA,QACd,MAAA,CAAA,QAAyB,IAAA,CAAA;AAAA,KACzB,CAAA,CAAA;AAAA,IACA,MAAA,IAAA,GAAAC,YAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,GAAA;AAAA,MACA,QAAA,EAAA,MAAA,QAAA,CAAA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACD,MAAA;AAED,aAAAJ,OAAA;AAEA,MAAA,UAAA;AACE,MAAA;AAA4B,KAC7B,CAAA,CAAA;AAED,IAAA,QAAA,CAAA,YAAqB,CAAA,IAAA,CAAA,CAAA;AACnB,IAAAK,mBAAU,CAAA,MAAgB;AAA2B,MACtD,QAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var text$1 = require('./src/
|
6
|
-
var text = require('./src/
|
5
|
+
var text$1 = require('./src/text2.js');
|
6
|
+
var text = require('./src/text.js');
|
7
7
|
var install = require('../../utils/vue/install.js');
|
8
8
|
|
9
9
|
const ElText = install.withInstall(text$1["default"]);
|
@@ -2,75 +2,29 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
8
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
9
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
10
|
-
var types = require('../../../utils/types.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var size = require('../../../constants/size.js');
|
11
7
|
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
const bindTitle = () => {
|
31
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
32
|
-
const inheritTitle = vue.useAttrs().title;
|
33
|
-
if (inheritTitle)
|
34
|
-
return;
|
35
|
-
let shouldAddTitle = false;
|
36
|
-
const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
|
37
|
-
if (props.truncated) {
|
38
|
-
const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
|
39
|
-
const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
|
40
|
-
if (width && scrollWidth && scrollWidth > width) {
|
41
|
-
shouldAddTitle = true;
|
42
|
-
}
|
43
|
-
} else if (!types.isUndefined(props.lineClamp)) {
|
44
|
-
const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
|
45
|
-
const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
|
46
|
-
if (height && scrollHeight && scrollHeight > height) {
|
47
|
-
shouldAddTitle = true;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
if (shouldAddTitle) {
|
51
|
-
(_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text);
|
52
|
-
} else {
|
53
|
-
(_g = textRef.value) == null ? void 0 : _g.removeAttribute("title");
|
54
|
-
}
|
55
|
-
};
|
56
|
-
vue.onMounted(bindTitle);
|
57
|
-
vue.onUpdated(bindTitle);
|
58
|
-
return (_ctx, _cache) => {
|
59
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
60
|
-
ref_key: "textRef",
|
61
|
-
ref: textRef,
|
62
|
-
class: vue.normalizeClass(vue.unref(textKls)),
|
63
|
-
style: vue.normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
64
|
-
}, {
|
65
|
-
default: vue.withCtx(() => [
|
66
|
-
vue.renderSlot(_ctx.$slots, "default")
|
67
|
-
]),
|
68
|
-
_: 3
|
69
|
-
}, 8, ["class", "style"]);
|
70
|
-
};
|
8
|
+
const textProps = runtime.buildProps({
|
9
|
+
type: {
|
10
|
+
type: String,
|
11
|
+
values: ["primary", "success", "info", "warning", "danger", ""],
|
12
|
+
default: ""
|
13
|
+
},
|
14
|
+
size: {
|
15
|
+
type: String,
|
16
|
+
values: size.componentSizes,
|
17
|
+
default: ""
|
18
|
+
},
|
19
|
+
truncated: Boolean,
|
20
|
+
lineClamp: {
|
21
|
+
type: [String, Number]
|
22
|
+
},
|
23
|
+
tag: {
|
24
|
+
type: String,
|
25
|
+
default: "span"
|
71
26
|
}
|
72
27
|
});
|
73
|
-
var Text = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "text.vue"]]);
|
74
28
|
|
75
|
-
exports
|
29
|
+
exports.textProps = textProps;
|
76
30
|
//# sourceMappingURL=text.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.js","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text.js","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\nexport type TextPropsPublic = __ExtractPublicPropTypes<typeof textProps>\n"],"names":["buildProps","componentSizes"],"mappings":";;;;;;;AAEY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
@@ -2,29 +2,75 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var text = require('./text.js');
|
7
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
8
|
+
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
10
|
+
var types = require('../../../utils/types.js');
|
7
11
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
const __default__ = vue.defineComponent({
|
13
|
+
name: "ElText"
|
14
|
+
});
|
15
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
16
|
+
...__default__,
|
17
|
+
props: text.textProps,
|
18
|
+
setup(__props) {
|
19
|
+
const props = __props;
|
20
|
+
const textRef = vue.ref();
|
21
|
+
const textSize = useFormCommonProps.useFormSize();
|
22
|
+
const ns = index.useNamespace("text");
|
23
|
+
const textKls = vue.computed(() => [
|
24
|
+
ns.b(),
|
25
|
+
ns.m(props.type),
|
26
|
+
ns.m(textSize.value),
|
27
|
+
ns.is("truncated", props.truncated),
|
28
|
+
ns.is("line-clamp", !types.isUndefined(props.lineClamp))
|
29
|
+
]);
|
30
|
+
const bindTitle = () => {
|
31
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
32
|
+
const inheritTitle = vue.useAttrs().title;
|
33
|
+
if (inheritTitle)
|
34
|
+
return;
|
35
|
+
let shouldAddTitle = false;
|
36
|
+
const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
|
37
|
+
if (props.truncated) {
|
38
|
+
const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
|
39
|
+
const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
|
40
|
+
if (width && scrollWidth && scrollWidth > width) {
|
41
|
+
shouldAddTitle = true;
|
42
|
+
}
|
43
|
+
} else if (!types.isUndefined(props.lineClamp)) {
|
44
|
+
const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
|
45
|
+
const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
|
46
|
+
if (height && scrollHeight && scrollHeight > height) {
|
47
|
+
shouldAddTitle = true;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
if (shouldAddTitle) {
|
51
|
+
(_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text);
|
52
|
+
} else {
|
53
|
+
(_g = textRef.value) == null ? void 0 : _g.removeAttribute("title");
|
54
|
+
}
|
55
|
+
};
|
56
|
+
vue.onMounted(bindTitle);
|
57
|
+
vue.onUpdated(bindTitle);
|
58
|
+
return (_ctx, _cache) => {
|
59
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
60
|
+
ref_key: "textRef",
|
61
|
+
ref: textRef,
|
62
|
+
class: vue.normalizeClass(vue.unref(textKls)),
|
63
|
+
style: vue.normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
64
|
+
}, {
|
65
|
+
default: vue.withCtx(() => [
|
66
|
+
vue.renderSlot(_ctx.$slots, "default")
|
67
|
+
]),
|
68
|
+
_: 3
|
69
|
+
}, 8, ["class", "style"]);
|
70
|
+
};
|
26
71
|
}
|
27
72
|
});
|
73
|
+
var Text = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "text.vue"]]);
|
28
74
|
|
29
|
-
exports
|
75
|
+
exports["default"] = Text;
|
30
76
|
//# sourceMappingURL=text2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text2.js","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text2.js","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n ref=\"textRef\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, ref, useAttrs } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\nconst textRef = ref<HTMLElement>()\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n\nconst bindTitle = () => {\n const inheritTitle = useAttrs().title\n\n if (inheritTitle) return\n let shouldAddTitle = false\n const text = textRef.value?.textContent || ''\n\n if (props.truncated) {\n const width = textRef.value?.offsetWidth\n const scrollWidth = textRef.value?.scrollWidth\n if (width && scrollWidth && scrollWidth > width) {\n shouldAddTitle = true\n }\n } else if (!isUndefined(props.lineClamp)) {\n const height = textRef.value?.offsetHeight\n const scrollHeight = textRef.value?.scrollHeight\n if (height && scrollHeight && scrollHeight > height) {\n shouldAddTitle = true\n }\n }\n\n if (shouldAddTitle) {\n textRef.value?.setAttribute('title', text)\n } else {\n textRef.value?.removeAttribute('title')\n }\n}\n\nonMounted(bindTitle)\nonUpdated(bindTitle)\n</script>\n"],"names":["ref","useFormSize","useNamespace","computed","isUndefined","useAttrs"],"mappings":";;;;;;;;;;;uCAkBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAA,MAAM,UAAUA,OAAiB,EAAA,CAAA;AAEjC,IAAA,MAAM,WAAWC,8BAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAKC,mBAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAA,CAAG,CAAE,CAAA,QAAA,CAAS,KAAK,CAAA;AAAA,MACnB,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,GAAG,EAAG,CAAA,YAAA,EAAc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,YAAA,GAAA,MAAA,EAAA;AAAA,UACF,cAAA,GAAA,IAAA,CAAA;AAEA,SAAA;AACE,OAAQ;AAAiC,MAC3C,IAAO,cAAA,EAAA;AACL,QAAQ,CAAA,EAAA,GAAA,OAAA,CAAA,iBAAuB,KAAO,CAAA,GAAA,EAAA,CAAA,YAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AAAA,OACxC,MAAA;AAAA,QACF,CAAA,EAAA,GAAA,OAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,eAAA,CAAA,OAAA,CAAA,CAAA;AAEA,OAAA;AACA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var timeSelect$1 = require('./src/time-
|
6
|
-
var timeSelect = require('./src/time-
|
5
|
+
var timeSelect$1 = require('./src/time-select2.js');
|
6
|
+
var timeSelect = require('./src/time-select.js');
|
7
7
|
var install = require('../../utils/vue/install.js');
|
8
8
|
|
9
9
|
const ElTimeSelect = install.withInstall(timeSelect$1["default"]);
|