@element-plus/nightly 0.0.20251214 → 0.0.20251215
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.full.js +109 -78
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +110 -79
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix.d.ts +2 -0
- package/es/components/affix/src/affix.mjs +6 -0
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix.vue.d.ts +6 -0
- package/es/components/affix/src/affix2.mjs +21 -7
- package/es/components/affix/src/affix2.mjs.map +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/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +111 -63
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +63 -111
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +43 -64
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +64 -43
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker.mjs +1 -0
- package/es/components/date-picker/src/date-picker.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs +4 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs +6 -4
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +3 -0
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +3 -0
- package/es/components/date-picker-panel/src/panel-utils.d.ts +16 -2
- package/es/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -0
- package/es/components/date-picker-panel/src/props/date-picker-panel.mjs +4 -0
- package/es/components/date-picker-panel/src/props/date-picker-panel.mjs.map +1 -1
- package/es/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -0
- package/es/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -0
- package/es/components/date-picker-panel/src/props/shared.d.ts +1 -0
- package/es/components/date-picker-panel/src/props/shared.mjs +5 -1
- package/es/components/date-picker-panel/src/props/shared.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +69 -234
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +234 -69
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +14 -14
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +15 -103
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +103 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.d.ts +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/es/components/popover/src/popover.vue.d.ts +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +132 -89
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +89 -132
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/select/index.mjs +1 -1
- package/es/components/select/src/option.mjs +91 -13
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option2.mjs +13 -91
- package/es/components/select/src/option2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -1
- package/es/components/select/src/select2.mjs +1 -1
- package/es/components/select/src/useOption.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/splitter/index.mjs +4 -4
- package/es/components/splitter/src/split-panel.mjs +20 -160
- package/es/components/splitter/src/split-panel.mjs.map +1 -1
- package/es/components/splitter/src/split-panel2.mjs +160 -20
- package/es/components/splitter/src/split-panel2.mjs.map +1 -1
- package/es/components/splitter/src/splitter.mjs +101 -15
- package/es/components/splitter/src/splitter.mjs.map +1 -1
- package/es/components/splitter/src/splitter2.mjs +15 -101
- package/es/components/splitter/src/splitter2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +35 -41
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +41 -35
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +75 -248
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +248 -75
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +11 -92
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +92 -11
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +109 -27
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +27 -109
- package/es/components/tag/src/tag2.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/tooltip/src/content.mjs +2 -2
- package/es/components/tooltip/src/content.vue.d.ts +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +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 +10 -60
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +60 -10
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/index.mjs +14 -14
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix.d.ts +2 -0
- package/lib/components/affix/src/affix.js +6 -0
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix.vue.d.ts +6 -0
- package/lib/components/affix/src/affix2.js +20 -6
- package/lib/components/affix/src/affix2.js.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/autocomplete/src/autocomplete.vue.d.ts +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +111 -64
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +64 -111
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +43 -64
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +64 -43
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker.js +1 -0
- package/lib/components/date-picker/src/date-picker.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.js +4 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue.d.ts +3 -0
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js +6 -4
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.vue.d.ts +3 -0
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +3 -0
- package/lib/components/date-picker-panel/src/panel-utils.d.ts +16 -2
- package/lib/components/date-picker-panel/src/props/date-picker-panel.d.ts +1 -0
- package/lib/components/date-picker-panel/src/props/date-picker-panel.js +4 -0
- package/lib/components/date-picker-panel/src/props/date-picker-panel.js.map +1 -1
- package/lib/components/date-picker-panel/src/props/panel-date-pick.d.ts +1 -0
- package/lib/components/date-picker-panel/src/props/panel-date-range.d.ts +1 -0
- package/lib/components/date-picker-panel/src/props/shared.d.ts +1 -0
- package/lib/components/date-picker-panel/src/props/shared.js +5 -1
- package/lib/components/date-picker-panel/src/props/shared.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +6 -63
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +63 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +69 -233
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +233 -69
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +14 -14
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +16 -103
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +103 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/pagination/src/pagination.d.ts +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +1 -1
- package/lib/components/popover/src/popover.vue.d.ts +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +132 -94
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +94 -132
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/select/index.js +1 -1
- package/lib/components/select/src/option.js +91 -14
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option2.js +14 -91
- package/lib/components/select/src/option2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -1
- package/lib/components/select/src/select2.js +1 -1
- package/lib/components/select/src/useOption.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/splitter/index.js +4 -4
- package/lib/components/splitter/src/split-panel.js +21 -160
- package/lib/components/splitter/src/split-panel.js.map +1 -1
- package/lib/components/splitter/src/split-panel2.js +160 -21
- package/lib/components/splitter/src/split-panel2.js.map +1 -1
- package/lib/components/splitter/src/splitter.js +101 -16
- package/lib/components/splitter/src/splitter.js.map +1 -1
- package/lib/components/splitter/src/splitter2.js +16 -101
- package/lib/components/splitter/src/splitter2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +36 -41
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +41 -36
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +75 -247
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +247 -75
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +11 -92
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +92 -11
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +109 -28
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +28 -109
- package/lib/components/tag/src/tag2.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/tooltip/src/content.js +2 -2
- package/lib/components/tooltip/src/content.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +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 +11 -60
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +60 -11
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/index.js +14 -14
- 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/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar2.js","sources":["../../../../../../packages/components/tabs/src/tab-bar.
|
|
1
|
+
{"version":3,"file":"tab-bar2.js","sources":["../../../../../../packages/components/tabs/src/tab-bar.vue"],"sourcesContent":["<template>\n <div\n v-if=\"renderActiveBar\"\n ref=\"barRef\"\n :class=\"[ns.e('active-bar'), ns.is(rootTabs!.props.tabPosition)]\"\n :style=\"barStyle\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, nextTick, onBeforeUnmount, ref, watch } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { capitalize, isUndefined, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabBarProps } from './tab-bar'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElTabBar'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabBarProps)\n\nconst rootTabs = inject(tabsRootContextKey)\nif (!rootTabs) throwError(COMPONENT_NAME, '<el-tabs><el-tab-bar /></el-tabs>')\n\nconst ns = useNamespace('tabs')\n\nconst barRef = ref<HTMLDivElement>()\nconst barStyle = ref<CSSProperties>()\n/**\n * when defaultValue is not set, the bar is always shown.\n *\n * when defaultValue is set, the bar will be hidden until style is calculated\n * to avoid the bar showing in the wrong position on initial render.\n */\nconst renderActiveBar = computed(\n () =>\n isUndefined(rootTabs.props.defaultValue) ||\n Boolean(barStyle.value?.transform)\n)\n\nconst getBarStyle = (): CSSProperties => {\n let offset = 0\n let tabSize = 0\n\n const sizeName = ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n const sizeDir = sizeName === 'width' ? 'x' : 'y'\n const position = sizeDir === 'x' ? 'left' : 'top'\n\n props.tabs.every((tab) => {\n if (isUndefined(tab.paneName)) return false\n const $el = props.tabRefs[tab.paneName]\n if (!$el) return false\n\n if (!tab.active) {\n return true\n }\n\n offset = $el[`offset${capitalize(position)}`]\n tabSize = $el[`client${capitalize(sizeName)}`]\n\n const tabStyles = window.getComputedStyle($el)\n\n if (sizeName === 'width') {\n tabSize -=\n Number.parseFloat(tabStyles.paddingLeft) +\n Number.parseFloat(tabStyles.paddingRight)\n offset += Number.parseFloat(tabStyles.paddingLeft)\n }\n return false\n })\n\n return {\n [sizeName]: `${tabSize}px`,\n transform: `translate${capitalize(sizeDir)}(${offset}px)`,\n }\n}\n\nconst update = () => (barStyle.value = getBarStyle())\n\nconst tabObservers = [] as ReturnType<typeof useResizeObserver>[]\nconst observerTabs = () => {\n tabObservers.forEach((observer) => observer.stop())\n tabObservers.length = 0\n\n Object.values(props.tabRefs).forEach((tab) => {\n tabObservers.push(useResizeObserver(tab, update))\n })\n}\n\nwatch(\n () => props.tabs,\n async () => {\n await nextTick()\n update()\n\n observerTabs()\n },\n { immediate: true }\n)\nconst barObserver = useResizeObserver(barRef, () => update())\n\nonBeforeUnmount(() => {\n tabObservers.forEach((observer) => observer.stop())\n tabObservers.length = 0\n barObserver.stop()\n})\n\ndefineExpose({\n /** @description tab root html element */\n ref: barRef,\n /** @description method to manually update tab bar style */\n update,\n})\n</script>\n"],"names":["inject","tabsRootContextKey","throwError","ref","computed","isUndefined","capitalize","useResizeObserver","watch","nextTick","onBeforeUnmount","_unref","_openBlock","_createElementBlock"],"mappings":"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"}
|
|
@@ -8,7 +8,7 @@ var index$1 = require('../../icon/index.js');
|
|
|
8
8
|
var iconsVue = require('@element-plus/icons-vue');
|
|
9
9
|
var useWheel = require('../../virtual-list/src/hooks/use-wheel.js');
|
|
10
10
|
var lodashUnified = require('lodash-unified');
|
|
11
|
-
var tabBar = require('./tab-
|
|
11
|
+
var tabBar = require('./tab-bar2.js');
|
|
12
12
|
var constants = require('./constants.js');
|
|
13
13
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
14
14
|
var typescript = require('../../../utils/typescript.js');
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tag$1 = require('./src/
|
|
6
|
-
var tag = require('./src/
|
|
5
|
+
var tag$1 = require('./src/tag.js');
|
|
6
|
+
var tag = require('./src/tag2.js');
|
|
7
7
|
var install = require('../../utils/vue/install.js');
|
|
8
8
|
|
|
9
9
|
const ElTag = install.withInstall(tag$1["default"]);
|
|
@@ -2,35 +2,116 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$2 = require('../../icon/index.js');
|
|
7
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
+
var tag = require('./tag2.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
11
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
12
|
+
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
7
13
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
type: String,
|
|
11
|
-
values: ["primary", "success", "info", "warning", "danger"],
|
|
12
|
-
default: "primary"
|
|
13
|
-
},
|
|
14
|
-
closable: Boolean,
|
|
15
|
-
disableTransitions: Boolean,
|
|
16
|
-
hit: Boolean,
|
|
17
|
-
color: String,
|
|
18
|
-
size: {
|
|
19
|
-
type: String,
|
|
20
|
-
values: size.componentSizes
|
|
21
|
-
},
|
|
22
|
-
effect: {
|
|
23
|
-
type: String,
|
|
24
|
-
values: ["dark", "light", "plain"],
|
|
25
|
-
default: "light"
|
|
26
|
-
},
|
|
27
|
-
round: Boolean
|
|
14
|
+
const __default__ = vue.defineComponent({
|
|
15
|
+
name: "ElTag"
|
|
28
16
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: tag.tagProps,
|
|
20
|
+
emits: tag.tagEmits,
|
|
21
|
+
setup(__props, { emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const tagSize = useFormCommonProps.useFormSize();
|
|
24
|
+
const { t } = index.useLocale();
|
|
25
|
+
const ns = index$1.useNamespace("tag");
|
|
26
|
+
const containerKls = vue.computed(() => {
|
|
27
|
+
const { type, hit, effect, closable, round } = props;
|
|
28
|
+
return [
|
|
29
|
+
ns.b(),
|
|
30
|
+
ns.is("closable", closable),
|
|
31
|
+
ns.m(type || "primary"),
|
|
32
|
+
ns.m(tagSize.value),
|
|
33
|
+
ns.m(effect),
|
|
34
|
+
ns.is("hit", hit),
|
|
35
|
+
ns.is("round", round)
|
|
36
|
+
];
|
|
37
|
+
});
|
|
38
|
+
const handleClose = (event) => {
|
|
39
|
+
emit("close", event);
|
|
40
|
+
};
|
|
41
|
+
const handleClick = (event) => {
|
|
42
|
+
emit("click", event);
|
|
43
|
+
};
|
|
44
|
+
const handleVNodeMounted = (vnode) => {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
|
47
|
+
vnode.component.subTree.component.bum = null;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
54
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
55
|
+
onClick: handleClick
|
|
56
|
+
}, [
|
|
57
|
+
vue.createElementVNode("span", {
|
|
58
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
59
|
+
}, [
|
|
60
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
61
|
+
], 2),
|
|
62
|
+
_ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
63
|
+
key: 0,
|
|
64
|
+
"aria-label": vue.unref(t)("el.tag.close"),
|
|
65
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
68
|
+
}, [
|
|
69
|
+
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
70
|
+
default: vue.withCtx(() => [
|
|
71
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
})
|
|
75
|
+
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
76
|
+
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
77
|
+
key: 1,
|
|
78
|
+
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
|
79
|
+
appear: "",
|
|
80
|
+
onVnodeMounted: handleVNodeMounted
|
|
81
|
+
}, {
|
|
82
|
+
default: vue.withCtx(() => [
|
|
83
|
+
vue.createElementVNode("span", {
|
|
84
|
+
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
85
|
+
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
86
|
+
onClick: handleClick
|
|
87
|
+
}, [
|
|
88
|
+
vue.createElementVNode("span", {
|
|
89
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
90
|
+
}, [
|
|
91
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
92
|
+
], 2),
|
|
93
|
+
_ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
94
|
+
key: 0,
|
|
95
|
+
"aria-label": vue.unref(t)("el.tag.close"),
|
|
96
|
+
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
97
|
+
type: "button",
|
|
98
|
+
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
99
|
+
}, [
|
|
100
|
+
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
101
|
+
default: vue.withCtx(() => [
|
|
102
|
+
vue.createVNode(vue.unref(iconsVue.Close))
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
})
|
|
106
|
+
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
107
|
+
], 6)
|
|
108
|
+
]),
|
|
109
|
+
_: 3
|
|
110
|
+
}, 8, ["name"]));
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
|
33
115
|
|
|
34
|
-
exports
|
|
35
|
-
exports.tagProps = tagProps;
|
|
116
|
+
exports["default"] = Tag;
|
|
36
117
|
//# sourceMappingURL=tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag.js","sources":["../../../../../../packages/components/tag/src/tag.vue"],"sourcesContent":["<template>\n <span\n v-if=\"disableTransitions\"\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <button\n v-if=\"closable\"\n :aria-label=\"t('el.tag.close')\"\n :class=\"ns.e('close')\"\n type=\"button\"\n @click.stop=\"handleClose\"\n >\n <el-icon>\n <Close />\n </el-icon>\n </button>\n </span>\n <transition\n v-else\n :name=\"`${ns.namespace.value}-zoom-in-center`\"\n appear\n @vue:mounted=\"handleVNodeMounted\"\n >\n <span\n :class=\"containerKls\"\n :style=\"{ backgroundColor: color }\"\n @click=\"handleClick\"\n >\n <span :class=\"ns.e('content')\">\n <slot />\n </span>\n <button\n v-if=\"closable\"\n :aria-label=\"t('el.tag.close')\"\n :class=\"ns.e('close')\"\n type=\"button\"\n @click.stop=\"handleClose\"\n >\n <el-icon>\n <Close />\n </el-icon>\n </button>\n </span>\n </transition>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport ElIcon from '@element-plus/components/icon'\nimport { Close } from '@element-plus/icons-vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { tagEmits, tagProps } from './tag'\n\nimport type { VNode } from 'vue'\n\ndefineOptions({\n name: 'ElTag',\n})\nconst props = defineProps(tagProps)\nconst emit = defineEmits(tagEmits)\n\nconst tagSize = useFormSize()\nconst { t } = useLocale()\nconst ns = useNamespace('tag')\nconst containerKls = computed(() => {\n const { type, hit, effect, closable, round } = props\n return [\n ns.b(),\n ns.is('closable', closable),\n ns.m(type || 'primary'),\n ns.m(tagSize.value),\n ns.m(effect),\n ns.is('hit', hit),\n ns.is('round', round),\n ]\n})\n\n// methods\nconst handleClose = (event: MouseEvent) => {\n emit('close', event)\n}\n\nconst handleClick = (event: MouseEvent) => {\n emit('click', event)\n}\n\nconst handleVNodeMounted = (vnode: VNode) => {\n // @ts-ignore\n if (vnode?.component?.subTree?.component?.bum) {\n // @ts-ignore\n vnode.component.subTree.component.bum = null\n }\n}\n</script>\n"],"names":["useFormSize","useLocale","useNamespace","computed"],"mappings":";;;;;;;;;;;;;uCA6Dc,CAAA;AAAA,EACZ,IAAM,EAAA,OAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,UAAUA,8BAAY,EAAA,CAAA;AAC5B,IAAM,MAAA,EAAE,CAAE,EAAA,GAAIC,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,KAAK,CAAA,CAAA;AAC7B,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,EAAE,IAAM,EAAA,GAAA,EAAK,MAAQ,EAAA,QAAA,EAAU,OAAU,GAAA,KAAA,CAAA;AAC/C,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,EAAG,CAAA,UAAA,EAAY,QAAQ,CAAA;AAAA,QAC1B,EAAA,CAAG,CAAE,CAAA,IAAA,IAAQ,SAAS,CAAA;AAAA,QACtB,EAAA,CAAG,CAAE,CAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,QAClB,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,QACX,EAAA,CAAG,EAAG,CAAA,KAAA,EAAO,GAAG,CAAA;AAAA,QAChB,EAAA,CAAG,EAAG,CAAA,OAAA,EAAS,KAAK,CAAA;AAAA,OACtB,CAAA;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,CAAC,KAAsB,KAAA;AACzC,MAAA,IAAA,CAAK,SAAS,KAAK,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAM,MAAA,kBAAA,GAAqB,CAAC,KAAiB,KAAA;AAE3C,MAAA,IAAI,EAAO,EAAA,EAAA,EAAA,EAAA,CAAA;AAET,MAAM,IAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAkB,GAAA,KAAA,IAAA,IAAA,GAAgB,KAAA,CAAA,GAAA,KAAA,CAAA,SAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,SAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,GAAA,EAAA;AAAA,QAC1C,KAAA,CAAA,SAAA,CAAA,OAAA,CAAA,SAAA,CAAA,GAAA,GAAA,IAAA,CAAA;AAAA,OACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,116 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var iconsVue = require('@element-plus/icons-vue');
|
|
8
|
-
var tag = require('./tag.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
11
|
-
var index = require('../../../hooks/use-locale/index.js');
|
|
12
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var size = require('../../../constants/size.js');
|
|
13
7
|
|
|
14
|
-
const
|
|
15
|
-
|
|
8
|
+
const tagProps = runtime.buildProps({
|
|
9
|
+
type: {
|
|
10
|
+
type: String,
|
|
11
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
|
12
|
+
default: "primary"
|
|
13
|
+
},
|
|
14
|
+
closable: Boolean,
|
|
15
|
+
disableTransitions: Boolean,
|
|
16
|
+
hit: Boolean,
|
|
17
|
+
color: String,
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
values: size.componentSizes
|
|
21
|
+
},
|
|
22
|
+
effect: {
|
|
23
|
+
type: String,
|
|
24
|
+
values: ["dark", "light", "plain"],
|
|
25
|
+
default: "light"
|
|
26
|
+
},
|
|
27
|
+
round: Boolean
|
|
16
28
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
setup(__props, { emit }) {
|
|
22
|
-
const props = __props;
|
|
23
|
-
const tagSize = useFormCommonProps.useFormSize();
|
|
24
|
-
const { t } = index.useLocale();
|
|
25
|
-
const ns = index$1.useNamespace("tag");
|
|
26
|
-
const containerKls = vue.computed(() => {
|
|
27
|
-
const { type, hit, effect, closable, round } = props;
|
|
28
|
-
return [
|
|
29
|
-
ns.b(),
|
|
30
|
-
ns.is("closable", closable),
|
|
31
|
-
ns.m(type || "primary"),
|
|
32
|
-
ns.m(tagSize.value),
|
|
33
|
-
ns.m(effect),
|
|
34
|
-
ns.is("hit", hit),
|
|
35
|
-
ns.is("round", round)
|
|
36
|
-
];
|
|
37
|
-
});
|
|
38
|
-
const handleClose = (event) => {
|
|
39
|
-
emit("close", event);
|
|
40
|
-
};
|
|
41
|
-
const handleClick = (event) => {
|
|
42
|
-
emit("click", event);
|
|
43
|
-
};
|
|
44
|
-
const handleVNodeMounted = (vnode) => {
|
|
45
|
-
var _a, _b, _c;
|
|
46
|
-
if ((_c = (_b = (_a = vnode == null ? void 0 : vnode.component) == null ? void 0 : _a.subTree) == null ? void 0 : _b.component) == null ? void 0 : _c.bum) {
|
|
47
|
-
vnode.component.subTree.component.bum = null;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
return (_ctx, _cache) => {
|
|
51
|
-
return _ctx.disableTransitions ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
52
|
-
key: 0,
|
|
53
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
54
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
55
|
-
onClick: handleClick
|
|
56
|
-
}, [
|
|
57
|
-
vue.createElementVNode("span", {
|
|
58
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
59
|
-
}, [
|
|
60
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
61
|
-
], 2),
|
|
62
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
63
|
-
key: 0,
|
|
64
|
-
"aria-label": vue.unref(t)("el.tag.close"),
|
|
65
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
66
|
-
type: "button",
|
|
67
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
68
|
-
}, [
|
|
69
|
-
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
70
|
-
default: vue.withCtx(() => [
|
|
71
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
})
|
|
75
|
-
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
76
|
-
], 6)) : (vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
77
|
-
key: 1,
|
|
78
|
-
name: `${vue.unref(ns).namespace.value}-zoom-in-center`,
|
|
79
|
-
appear: "",
|
|
80
|
-
onVnodeMounted: handleVNodeMounted
|
|
81
|
-
}, {
|
|
82
|
-
default: vue.withCtx(() => [
|
|
83
|
-
vue.createElementVNode("span", {
|
|
84
|
-
class: vue.normalizeClass(vue.unref(containerKls)),
|
|
85
|
-
style: vue.normalizeStyle({ backgroundColor: _ctx.color }),
|
|
86
|
-
onClick: handleClick
|
|
87
|
-
}, [
|
|
88
|
-
vue.createElementVNode("span", {
|
|
89
|
-
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
90
|
-
}, [
|
|
91
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
92
|
-
], 2),
|
|
93
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
94
|
-
key: 0,
|
|
95
|
-
"aria-label": vue.unref(t)("el.tag.close"),
|
|
96
|
-
class: vue.normalizeClass(vue.unref(ns).e("close")),
|
|
97
|
-
type: "button",
|
|
98
|
-
onClick: vue.withModifiers(handleClose, ["stop"])
|
|
99
|
-
}, [
|
|
100
|
-
vue.createVNode(vue.unref(index$2.ElIcon), null, {
|
|
101
|
-
default: vue.withCtx(() => [
|
|
102
|
-
vue.createVNode(vue.unref(iconsVue.Close))
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
})
|
|
106
|
-
], 10, ["aria-label", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
107
|
-
], 6)
|
|
108
|
-
]),
|
|
109
|
-
_: 3
|
|
110
|
-
}, 8, ["name"]));
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
var Tag = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "tag.vue"]]);
|
|
29
|
+
const tagEmits = {
|
|
30
|
+
close: (evt) => evt instanceof MouseEvent,
|
|
31
|
+
click: (evt) => evt instanceof MouseEvent
|
|
32
|
+
};
|
|
115
33
|
|
|
116
|
-
exports
|
|
34
|
+
exports.tagEmits = tagEmits;
|
|
35
|
+
exports.tagProps = tagProps;
|
|
117
36
|
//# sourceMappingURL=tag2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.
|
|
1
|
+
{"version":3,"file":"tag2.js","sources":["../../../../../../packages/components/tag/src/tag.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type Tag from './tag.vue'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const tagProps = buildProps({\n /**\n * @description type of Tag\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger'],\n default: 'primary',\n },\n /**\n * @description whether Tag can be removed\n */\n closable: Boolean,\n /**\n * @description whether to disable animations\n */\n disableTransitions: Boolean,\n /**\n * @description whether Tag has a highlighted border\n */\n hit: Boolean,\n /**\n * @description background color of the Tag\n */\n color: String,\n /**\n * @description size of Tag\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description theme of Tag\n */\n effect: {\n type: String,\n values: ['dark', 'light', 'plain'],\n default: 'light',\n },\n /**\n * @description whether Tag is rounded\n */\n round: Boolean,\n} as const)\nexport type TagProps = ExtractPropTypes<typeof tagProps>\nexport type TagPropsPublic = __ExtractPublicPropTypes<typeof tagProps>\n\nexport const tagEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type TagEmits = typeof tagEmits\n\nexport type TagInstance = InstanceType<typeof Tag> & unknown\n"],"names":["buildProps","componentSizes"],"mappings":";;;;;;;AAEY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC;AAC/D,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,kBAAkB,EAAE,OAAO;AAC7B,EAAE,GAAG,EAAE,OAAO;AACd,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;AACtC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,CAAC,EAAE;AACS,MAAC,QAAQ,GAAG;AACxB,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;;"}
|
|
@@ -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
|