element-plus 2.3.4 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +159 -111
- package/dist/index.full.min.js +24 -24
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +24 -24
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +160 -111
- 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.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 +21 -21
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.js.map +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.min.mjs.map +1 -1
- package/dist/locale/fa.mjs +21 -21
- 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/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/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/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/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/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/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-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/carousel/index.d.ts +10 -0
- package/es/components/carousel/src/carousel-item.vue.d.ts +1 -0
- package/es/components/carousel/src/carousel-item2.mjs +7 -1
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +8 -0
- package/es/components/carousel/src/carousel2.mjs +7 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/constants.d.ts +1 -0
- package/es/components/carousel/src/constants.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel-item.d.ts +1 -0
- package/es/components/carousel/src/use-carousel-item.mjs +7 -5
- package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +8 -0
- package/es/components/carousel/src/use-carousel.mjs +21 -1
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +16 -16
- package/es/components/cascader/src/cascader.vue.d.ts +8 -8
- package/es/components/check-tag/index.d.ts +1 -0
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag.vue.d.ts +1 -0
- package/es/components/check-tag/src/check-tag2.mjs +3 -2
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +1 -1
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input-number/src/input-number2.mjs +4 -1
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/loading/src/service.mjs +2 -2
- package/es/components/loading/src/service.mjs.map +1 -1
- package/es/components/menu/src/menu.mjs +1 -1
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/message-box/src/index.mjs +0 -2
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/notification/src/notification.mjs +1 -4
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification.vue.d.ts +3 -4
- package/es/components/notification/src/notification2.mjs +2 -1
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +6 -6
- package/es/components/pagination/src/components/pager.vue.d.ts +2 -0
- package/es/components/pagination/src/components/pager2.mjs +14 -12
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +1 -3
- package/es/components/pagination/src/pagination.d.ts +9 -9
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popper/src/composables/use-content-dom.mjs +2 -2
- package/es/components/popper/src/composables/use-content-dom.mjs.map +1 -1
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +71 -30
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +30 -71
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/select/index.d.ts +1 -3
- package/es/components/select/src/option.mjs +1 -1
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/select.mjs +0 -4
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +1 -3
- package/es/components/select/src/token.d.ts +1 -1
- package/es/components/select/src/token.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -3
- package/es/components/select/src/useSelect.mjs +16 -14
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/steps/index.d.ts +7 -3
- package/es/components/steps/src/item.vue.d.ts +5 -2
- package/es/components/steps/src/item2.mjs +12 -9
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/steps/src/steps.vue.d.ts +3 -2
- package/es/components/steps/src/steps2.mjs +8 -3
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +3 -7
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/event-helper.mjs +6 -2
- package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
- package/es/components/table-v2/src/renderers/cell.mjs +1 -1
- package/es/components/table-v2/src/renderers/cell.mjs.map +1 -1
- package/es/components/tag/index.d.ts +8 -8
- package/es/components/tag/src/tag.d.ts +2 -2
- package/es/components/tag/src/tag.mjs +2 -2
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag.vue.d.ts +8 -8
- package/es/components/tag/src/tag2.mjs +3 -3
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +44 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -44
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/time-select/index.d.ts +4 -12
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +2 -6
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/timeline/index.d.ts +38 -0
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.vue.d.ts +19 -0
- package/es/components/timeline/src/timeline-item2.mjs +9 -7
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tree/index.d.ts +2 -2
- package/es/components/tree/src/model/useDragNode.mjs +2 -2
- package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
- package/es/components/tree/src/tree.type.d.ts +1 -1
- package/es/components/tree/src/tree.vue.d.ts +1 -1
- package/es/components/tree-select/src/tree-select.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +21 -4
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +5 -1
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/hooks/index.d.ts +0 -1
- package/es/hooks/index.mjs +0 -1
- package/es/hooks/index.mjs.map +1 -1
- package/es/index.mjs +1 -2
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/fa.mjs +20 -20
- package/es/locale/lang/fa.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/carousel/index.d.ts +10 -0
- package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -0
- package/lib/components/carousel/src/carousel-item2.js +7 -1
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +8 -0
- package/lib/components/carousel/src/carousel2.js +7 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/constants.d.ts +1 -0
- package/lib/components/carousel/src/constants.js.map +1 -1
- package/lib/components/carousel/src/use-carousel-item.d.ts +1 -0
- package/lib/components/carousel/src/use-carousel-item.js +7 -5
- package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +8 -0
- package/lib/components/carousel/src/use-carousel.js +21 -1
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +16 -16
- package/lib/components/cascader/src/cascader.vue.d.ts +8 -8
- package/lib/components/check-tag/index.d.ts +1 -0
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag.vue.d.ts +1 -0
- package/lib/components/check-tag/src/check-tag2.js +2 -1
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/image/src/image2.js +1 -1
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/input-number/src/input-number2.js +3 -0
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/loading/src/service.js +2 -2
- package/lib/components/loading/src/service.js.map +1 -1
- package/lib/components/menu/src/menu.js +1 -1
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/message-box/src/index.js +0 -2
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/notification/src/notification.js +1 -4
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +3 -4
- package/lib/components/notification/src/notification2.js +2 -1
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/pagination/index.d.ts +6 -6
- package/lib/components/pagination/src/components/pager.vue.d.ts +2 -0
- package/lib/components/pagination/src/components/pager2.js +14 -12
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -3
- package/lib/components/pagination/src/pagination.d.ts +9 -9
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popper/src/composables/use-content-dom.js +2 -2
- package/lib/components/popper/src/composables/use-content-dom.js.map +1 -1
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +71 -32
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +32 -71
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/select/index.d.ts +1 -3
- package/lib/components/select/src/option.js +1 -1
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/select.js +0 -4
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +1 -3
- package/lib/components/select/src/token.d.ts +1 -1
- package/lib/components/select/src/token.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -3
- package/lib/components/select/src/useSelect.js +16 -14
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/steps/index.d.ts +7 -3
- package/lib/components/steps/src/item.vue.d.ts +5 -2
- package/lib/components/steps/src/item2.js +12 -9
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +3 -2
- package/lib/components/steps/src/steps2.js +7 -2
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +3 -7
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-header/event-helper.js +6 -2
- package/lib/components/table/src/table-header/event-helper.js.map +1 -1
- package/lib/components/table-v2/src/renderers/cell.js +1 -1
- package/lib/components/table-v2/src/renderers/cell.js.map +1 -1
- package/lib/components/tag/index.d.ts +8 -8
- package/lib/components/tag/src/tag.d.ts +2 -2
- package/lib/components/tag/src/tag.js +2 -2
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +8 -8
- package/lib/components/tag/src/tag2.js +3 -3
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +44 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -44
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/time-select/index.d.ts +4 -12
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -6
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/timeline/index.d.ts +38 -0
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.vue.d.ts +19 -0
- package/lib/components/timeline/src/timeline-item2.js +8 -6
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tree/index.d.ts +2 -2
- package/lib/components/tree/src/model/useDragNode.js +2 -2
- package/lib/components/tree/src/model/useDragNode.js.map +1 -1
- package/lib/components/tree/src/tree.type.d.ts +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +1 -1
- package/lib/components/tree-select/src/tree-select.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +21 -4
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +4 -0
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -1
- package/lib/hooks/index.js +52 -54
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.js +53 -55
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/fa.js +20 -20
- package/lib/locale/lang/fa.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-carousel-item.css +1 -1
- package/theme-chalk/el-carousel.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/carousel-item.scss +8 -0
- package/theme-chalk/src/carousel.scss +9 -2
- package/theme-chalk/src/form.scss +7 -0
- package/theme-chalk/src/image.scss +6 -6
- package/theme-chalk/src/progress.scss +10 -1
- package/theme-chalk/src/text.scss +1 -1
- package/web-types.json +1 -1
- package/es/hooks/use-restore-active/index.d.ts +0 -6
- package/es/hooks/use-restore-active/index.mjs +0 -23
- package/es/hooks/use-restore-active/index.mjs.map +0 -1
- package/lib/hooks/use-restore-active/index.d.ts +0 -6
- package/lib/hooks/use-restore-active/index.js +0 -27
- package/lib/hooks/use-restore-active/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teleport.mjs","sources":["../../../../../../packages/components/teleport/src/teleport.
|
|
1
|
+
{"version":3,"file":"teleport.mjs","sources":["../../../../../../packages/components/teleport/src/teleport.vue"],"sourcesContent":["<template>\n <teleport v-if=\"container\" :to=\"container\" :disabled=\"disabled\">\n <div ref=\"containerRef\" :class=\"ns.b()\" :style=\"containerStyle\">\n <slot />\n </div>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { teleportProps } from './teleport'\nimport type { StyleValue } from 'vue'\n\nconst props = defineProps(teleportProps)\n\nconst ns = useNamespace('teleport')\nconst containerRef = ref<HTMLElement>()\n\nconst containerStyle = computed<StyleValue>(() => {\n return props.container === 'body'\n ? [\n props.style,\n {\n position: 'absolute',\n top: `0px`,\n left: `0px`,\n zIndex: props.zIndex,\n },\n ]\n : {}\n})\n\ndefineExpose({\n /** @description container element */\n containerRef,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAClC,IAAA,MAAM,eAAe,GAAiB,EAAA,CAAA;AAEtC,IAAM,MAAA,cAAA,GAAiB,SAAqB,MAAM;AAChD,MAAO,OAAA,KAAA,CAAM,cAAc,MACvB,GAAA;AAAA,QACE,KAAM,CAAA,KAAA;AAAA,QACN;AAAA,UACE,QAAU,EAAA,UAAA;AAAA,UACV,GAAK,EAAA,CAAA,GAAA,CAAA;AAAA,UACL,IAAM,EAAA,CAAA,GAAA,CAAA;AAAA,UACN,QAAQ,KAAM,CAAA,MAAA;AAAA,SAChB;AAAA,UAEF,EAAC,CAAA;AAAA,KACN,CAAA,CAAA;AAED,IAAa,MAAA,CAAA;AAAA,MAEX,YAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,49 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../../../
|
|
3
|
-
import { teleportProps } from './teleport.mjs';
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
6
3
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
] : {};
|
|
24
|
-
});
|
|
25
|
-
expose({
|
|
26
|
-
containerRef
|
|
27
|
-
});
|
|
28
|
-
return (_ctx, _cache) => {
|
|
29
|
-
return _ctx.container ? (openBlock(), createBlock(Teleport$1, {
|
|
30
|
-
key: 0,
|
|
31
|
-
to: _ctx.container,
|
|
32
|
-
disabled: _ctx.disabled
|
|
33
|
-
}, [
|
|
34
|
-
createElementVNode("div", {
|
|
35
|
-
ref_key: "containerRef",
|
|
36
|
-
ref: containerRef,
|
|
37
|
-
class: normalizeClass(unref(ns).b()),
|
|
38
|
-
style: normalizeStyle(unref(containerStyle))
|
|
39
|
-
}, [
|
|
40
|
-
renderSlot(_ctx.$slots, "default")
|
|
41
|
-
], 6)
|
|
42
|
-
], 8, ["to", "disabled"])) : createCommentVNode("v-if", true);
|
|
43
|
-
};
|
|
4
|
+
const teleportProps = buildProps({
|
|
5
|
+
container: {
|
|
6
|
+
type: definePropType(String),
|
|
7
|
+
default: "body"
|
|
8
|
+
},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
style: {
|
|
14
|
+
type: definePropType([String, Array, Object])
|
|
15
|
+
},
|
|
16
|
+
zIndex: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "2000"
|
|
44
19
|
}
|
|
45
20
|
});
|
|
46
|
-
var Teleport = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/teleport/src/teleport.vue"]]);
|
|
47
21
|
|
|
48
|
-
export {
|
|
22
|
+
export { teleportProps };
|
|
49
23
|
//# sourceMappingURL=teleport2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teleport2.mjs","sources":["../../../../../../packages/components/teleport/src/teleport.
|
|
1
|
+
{"version":3,"file":"teleport2.mjs","sources":["../../../../../../packages/components/teleport/src/teleport.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Teleport from './teleport.vue'\n\nexport const teleportProps = buildProps({\n container: {\n type: definePropType<string>(String),\n default: 'body',\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n zIndex: {\n type: String,\n default: '2000',\n },\n} as const)\n\nexport type TeleportProps = ExtractPropTypes<typeof teleportProps>\nexport type TeleportInstance = InstanceType<typeof Teleport>\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -248,14 +248,13 @@ declare const _TimeSelect: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
248
248
|
deletePrevTag: (e: any) => void;
|
|
249
249
|
deleteTag: (event: any, tag: any) => void;
|
|
250
250
|
deleteSelected: (event: any) => void;
|
|
251
|
-
handleOptionSelect: (option: any
|
|
251
|
+
handleOptionSelect: (option: any) => void;
|
|
252
252
|
scrollToOption: (option: any) => void;
|
|
253
253
|
inputWidth: import("vue").Ref<number>;
|
|
254
254
|
selected: import("vue").Ref<any>;
|
|
255
255
|
inputLength: import("vue").Ref<number>;
|
|
256
256
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
257
257
|
visible: import("vue").Ref<boolean>;
|
|
258
|
-
softFocus: import("vue").Ref<boolean>;
|
|
259
258
|
selectedLabel: import("vue").Ref<string>;
|
|
260
259
|
hoverIndex: import("vue").Ref<number>;
|
|
261
260
|
query: import("vue").Ref<string>;
|
|
@@ -263,7 +262,6 @@ declare const _TimeSelect: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
263
262
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
264
263
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
265
264
|
isOnComposition: import("vue").Ref<boolean>;
|
|
266
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
267
265
|
options: import("vue").Ref<Map<any, any>>;
|
|
268
266
|
resetInputHeight: () => void;
|
|
269
267
|
managePlaceholder: () => void;
|
|
@@ -6939,14 +6937,13 @@ declare const _TimeSelect: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6939
6937
|
deletePrevTag: (e: any) => void;
|
|
6940
6938
|
deleteTag: (event: any, tag: any) => void;
|
|
6941
6939
|
deleteSelected: (event: any) => void;
|
|
6942
|
-
handleOptionSelect: (option: any
|
|
6940
|
+
handleOptionSelect: (option: any) => void;
|
|
6943
6941
|
scrollToOption: (option: any) => void;
|
|
6944
6942
|
inputWidth: import("vue").Ref<number>;
|
|
6945
6943
|
selected: import("vue").Ref<any>;
|
|
6946
6944
|
inputLength: import("vue").Ref<number>;
|
|
6947
6945
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
6948
6946
|
visible: import("vue").Ref<boolean>;
|
|
6949
|
-
softFocus: import("vue").Ref<boolean>;
|
|
6950
6947
|
selectedLabel: import("vue").Ref<string>;
|
|
6951
6948
|
hoverIndex: import("vue").Ref<number>;
|
|
6952
6949
|
query: import("vue").Ref<string>;
|
|
@@ -6954,7 +6951,6 @@ declare const _TimeSelect: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
6954
6951
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
6955
6952
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
6956
6953
|
isOnComposition: import("vue").Ref<boolean>;
|
|
6957
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
6958
6954
|
options: import("vue").Ref<Map<any, any>>;
|
|
6959
6955
|
resetInputHeight: () => void;
|
|
6960
6956
|
managePlaceholder: () => void;
|
|
@@ -13849,14 +13845,13 @@ export declare const ElTimeSelect: SFCWithInstall<import("vue").DefineComponent<
|
|
|
13849
13845
|
deletePrevTag: (e: any) => void;
|
|
13850
13846
|
deleteTag: (event: any, tag: any) => void;
|
|
13851
13847
|
deleteSelected: (event: any) => void;
|
|
13852
|
-
handleOptionSelect: (option: any
|
|
13848
|
+
handleOptionSelect: (option: any) => void;
|
|
13853
13849
|
scrollToOption: (option: any) => void;
|
|
13854
13850
|
inputWidth: import("vue").Ref<number>;
|
|
13855
13851
|
selected: import("vue").Ref<any>;
|
|
13856
13852
|
inputLength: import("vue").Ref<number>;
|
|
13857
13853
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
13858
13854
|
visible: import("vue").Ref<boolean>;
|
|
13859
|
-
softFocus: import("vue").Ref<boolean>;
|
|
13860
13855
|
selectedLabel: import("vue").Ref<string>;
|
|
13861
13856
|
hoverIndex: import("vue").Ref<number>;
|
|
13862
13857
|
query: import("vue").Ref<string>;
|
|
@@ -13864,7 +13859,6 @@ export declare const ElTimeSelect: SFCWithInstall<import("vue").DefineComponent<
|
|
|
13864
13859
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
13865
13860
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
13866
13861
|
isOnComposition: import("vue").Ref<boolean>;
|
|
13867
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
13868
13862
|
options: import("vue").Ref<Map<any, any>>;
|
|
13869
13863
|
resetInputHeight: () => void;
|
|
13870
13864
|
managePlaceholder: () => void;
|
|
@@ -20540,14 +20534,13 @@ export declare const ElTimeSelect: SFCWithInstall<import("vue").DefineComponent<
|
|
|
20540
20534
|
deletePrevTag: (e: any) => void;
|
|
20541
20535
|
deleteTag: (event: any, tag: any) => void;
|
|
20542
20536
|
deleteSelected: (event: any) => void;
|
|
20543
|
-
handleOptionSelect: (option: any
|
|
20537
|
+
handleOptionSelect: (option: any) => void;
|
|
20544
20538
|
scrollToOption: (option: any) => void;
|
|
20545
20539
|
inputWidth: import("vue").Ref<number>;
|
|
20546
20540
|
selected: import("vue").Ref<any>;
|
|
20547
20541
|
inputLength: import("vue").Ref<number>;
|
|
20548
20542
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
20549
20543
|
visible: import("vue").Ref<boolean>;
|
|
20550
|
-
softFocus: import("vue").Ref<boolean>;
|
|
20551
20544
|
selectedLabel: import("vue").Ref<string>;
|
|
20552
20545
|
hoverIndex: import("vue").Ref<number>;
|
|
20553
20546
|
query: import("vue").Ref<string>;
|
|
@@ -20555,7 +20548,6 @@ export declare const ElTimeSelect: SFCWithInstall<import("vue").DefineComponent<
|
|
|
20555
20548
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
20556
20549
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
20557
20550
|
isOnComposition: import("vue").Ref<boolean>;
|
|
20558
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
20559
20551
|
options: import("vue").Ref<Map<any, any>>;
|
|
20560
20552
|
resetInputHeight: () => void;
|
|
20561
20553
|
managePlaceholder: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-select.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type TimeSelect from './time-select.vue'\nimport type { Component, ExtractPropTypes, PropType } from 'vue'\n\nexport const timeSelectProps = buildProps({\n format: {\n type: String,\n default: 'HH:mm',\n },\n modelValue: String,\n disabled: Boolean,\n editable: {\n type: Boolean,\n default: true,\n },\n effect: {\n type: String as PropType<'light' | 'dark' | string>,\n default: 'light',\n },\n clearable: {\n type: Boolean,\n default: true,\n },\n size: useSizeProp,\n placeholder: String,\n start: {\n type: String,\n default: '09:00',\n },\n end: {\n type: String,\n default: '18:00',\n },\n step: {\n type: String,\n default: '00:30',\n },\n minTime: String,\n maxTime: String,\n name: String,\n prefixIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Clock,\n },\n clearIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => CircleClose,\n },\n} as const)\n\nexport type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>\n\nexport type TimeSelectInstance = InstanceType<typeof TimeSelect>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,KAAK;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,WAAW;AAC9B,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"time-select.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { CircleClose, Clock } from '@element-plus/icons-vue'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type TimeSelect from './time-select.vue'\nimport type { Component, ExtractPropTypes, PropType } from 'vue'\n\nexport const timeSelectProps = buildProps({\n /**\n * @description set format of time\n */\n format: {\n type: String,\n default: 'HH:mm',\n },\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description whether TimeSelect is disabled\n */\n disabled: Boolean,\n /**\n * @description whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: String as PropType<'light' | 'dark' | string>,\n default: 'light',\n },\n /**\n * @description whether to show clear button\n */\n clearable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description placeholder in non-range mode\n */\n placeholder: String,\n /**\n * @description start time\n */\n start: {\n type: String,\n default: '09:00',\n },\n /**\n * @description end time\n */\n end: {\n type: String,\n default: '18:00',\n },\n /**\n * @description time step\n */\n step: {\n type: String,\n default: '00:30',\n },\n /**\n * @description minimum time, any time before this time will be disabled\n */\n minTime: String,\n /**\n * @description maximum time, any time after this time will be disabled\n */\n maxTime: String,\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description custom prefix icon component\n */\n prefixIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Clock,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => CircleClose,\n },\n} as const)\n\nexport type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>\n\nexport type TimeSelectInstance = InstanceType<typeof TimeSelect>\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,KAAK;AACxB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,MAAM,WAAW;AAC9B,GAAG;AACH,CAAC;;;;"}
|
|
@@ -247,14 +247,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
247
247
|
deletePrevTag: (e: any) => void;
|
|
248
248
|
deleteTag: (event: any, tag: any) => void;
|
|
249
249
|
deleteSelected: (event: any) => void;
|
|
250
|
-
handleOptionSelect: (option: any
|
|
250
|
+
handleOptionSelect: (option: any) => void;
|
|
251
251
|
scrollToOption: (option: any) => void;
|
|
252
252
|
inputWidth: import("vue").Ref<number>;
|
|
253
253
|
selected: import("vue").Ref<any>;
|
|
254
254
|
inputLength: import("vue").Ref<number>;
|
|
255
255
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
256
256
|
visible: import("vue").Ref<boolean>;
|
|
257
|
-
softFocus: import("vue").Ref<boolean>;
|
|
258
257
|
selectedLabel: import("vue").Ref<string>;
|
|
259
258
|
hoverIndex: import("vue").Ref<number>;
|
|
260
259
|
query: import("vue").Ref<string>;
|
|
@@ -262,7 +261,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
262
261
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
263
262
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
264
263
|
isOnComposition: import("vue").Ref<boolean>;
|
|
265
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
266
264
|
options: import("vue").Ref<Map<any, any>>;
|
|
267
265
|
resetInputHeight: () => void;
|
|
268
266
|
managePlaceholder: () => void;
|
|
@@ -6938,14 +6936,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6938
6936
|
deletePrevTag: (e: any) => void;
|
|
6939
6937
|
deleteTag: (event: any, tag: any) => void;
|
|
6940
6938
|
deleteSelected: (event: any) => void;
|
|
6941
|
-
handleOptionSelect: (option: any
|
|
6939
|
+
handleOptionSelect: (option: any) => void;
|
|
6942
6940
|
scrollToOption: (option: any) => void;
|
|
6943
6941
|
inputWidth: import("vue").Ref<number>;
|
|
6944
6942
|
selected: import("vue").Ref<any>;
|
|
6945
6943
|
inputLength: import("vue").Ref<number>;
|
|
6946
6944
|
filteredOptionsCount: import("vue").Ref<number>;
|
|
6947
6945
|
visible: import("vue").Ref<boolean>;
|
|
6948
|
-
softFocus: import("vue").Ref<boolean>;
|
|
6949
6946
|
selectedLabel: import("vue").Ref<string>;
|
|
6950
6947
|
hoverIndex: import("vue").Ref<number>;
|
|
6951
6948
|
query: import("vue").Ref<string>;
|
|
@@ -6953,7 +6950,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6953
6950
|
currentPlaceholder: import("vue").Ref<string | (() => string)>;
|
|
6954
6951
|
menuVisibleOnFocus: import("vue").Ref<boolean>;
|
|
6955
6952
|
isOnComposition: import("vue").Ref<boolean>;
|
|
6956
|
-
isSilentBlur: import("vue").Ref<boolean>;
|
|
6957
6953
|
options: import("vue").Ref<Map<any, any>>;
|
|
6958
6954
|
resetInputHeight: () => void;
|
|
6959
6955
|
managePlaceholder: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-select2.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.vue"],"sourcesContent":["<template>\n <el-select\n ref=\"select\"\n :model-value=\"value\"\n :disabled=\"_disabled\"\n :clearable=\"clearable\"\n :clear-icon=\"clearIcon\"\n :size=\"size\"\n :effect=\"effect\"\n :placeholder=\"placeholder\"\n default-first-option\n :filterable=\"editable\"\n @update:model-value=\"(event) => $emit('update:modelValue', event)\"\n @change=\"(event) => $emit('change', event)\"\n @blur=\"(event) => $emit('blur', event)\"\n @focus=\"(event) => $emit('focus', event)\"\n >\n <el-option\n v-for=\"item in items\"\n :key=\"item.value\"\n :label=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n />\n <template #prefix>\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('prefix-icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </template>\n </el-select>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport ElSelect from '@element-plus/components/select'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timeSelectProps } from './time-select'\nimport { compareTime, formatTime, nextTime, parseTime } from './utils'\n\ndayjs.extend(customParseFormat)\n\nconst { Option: ElOption } = ElSelect\n\ndefineOptions({\n name: 'ElTimeSelect',\n})\n\ndefineEmits(['change', 'blur', 'focus', 'update:modelValue'])\n\nconst props = defineProps(timeSelectProps)\n\nconst nsInput = useNamespace('input')\nconst select = ref<typeof ElSelect>()\n\nconst _disabled = useFormDisabled()\n\nconst value = computed(() => props.modelValue)\nconst start = computed(() => {\n const time = parseTime(props.start)\n return time ? formatTime(time) : null\n})\n\nconst end = computed(() => {\n const time = parseTime(props.end)\n return time ? formatTime(time) : null\n})\n\nconst step = computed(() => {\n const time = parseTime(props.step)\n return time ? formatTime(time) : null\n})\n\nconst minTime = computed(() => {\n const time = parseTime(props.minTime || '')\n return time ? formatTime(time) : null\n})\n\nconst maxTime = computed(() => {\n const time = parseTime(props.maxTime || '')\n return time ? formatTime(time) : null\n})\n\nconst items = computed(() => {\n const result: { value: string; disabled: boolean }[] = []\n if (props.start && props.end && props.step) {\n let current = start.value\n let currentTime: string\n while (current && end.value && compareTime(current, end.value) <= 0) {\n currentTime = dayjs(current, 'HH:mm').format(props.format)\n result.push({\n value: currentTime,\n disabled:\n compareTime(current, minTime.value || '-1:-1') <= 0 ||\n compareTime(current, maxTime.value || '100:100') >= 0,\n })\n current = nextTime(current, step.value!)\n }\n }\n return result\n})\n\nconst blur = () => {\n select.value?.blur?.()\n}\n\nconst focus = () => {\n select.value?.focus?.()\n}\n\ndefineExpose({\n blur,\n focus,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;mCA+Cc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AANA,IAAA,KAAA,CAAM,OAAO,iBAAiB,CAAA,CAAA;AAE9B,IAAM,MAAA,EAAE,QAAQ,QAAa,EAAA,GAAA,QAAA,CAAA;AAU7B,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AACpC,IAAA,MAAM,SAAS,GAAqB,EAAA,CAAA;AAEpC,IAAA,MAAM,YAAY,eAAgB,EAAA,CAAA;AAElC,IAAA,MAAM,KAAQ,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,UAAU,CAAA,CAAA;AAC7C,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAM,MAAA,IAAA,GAAO,SAAU,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAClC,MAAO,OAAA,IAAA,GAAO,UAAW,CAAA,IAAI,CAAI,GAAA,IAAA,CAAA;AAAA,KAClC,CAAA,CAAA;AAED,IAAM,MAAA,GAAA,GAAM,SAAS,MAAM;AACzB,MAAM,MAAA,IAAA,GAAO,SAAU,CAAA,KAA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AA,MAAA,CAAO,IAAK,CAAA;AAAA,YACV,KAAO,EAAA,WAAA;AAAA,YACP,QACE,EAAA,WAAA,CAAY,OAAS,EAAA,OAAA,CAAQ,KAAS,IAAA,OAAO,CAAK,IAAA,CAAA,IAClD,WAAY,CAAA,OAAA,EAAS,OAAQ,CAAA,KAAA,IAAS,SAAS,CAAK,IAAA,CAAA;AAAA,WACvD,CAAA,CAAA;AACD,UAAU,OAAA,GAAA,QAAA,CAAS,OAAS,EAAA,IAAA,CAAK,KAAM,CAAA,CAAA;AAAA,SACzC;AAAA,OACF;AACA,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,IAAA,EAAA;AAAqB,MACvB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAEA,KAAA,CAAA;AACE,IAAA,MAAA,cAAsB;AAAA,MACxB,IAAA,EAAA,EAAA,EAAA,CAAA;AAEA,MAAa,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"time-select2.mjs","sources":["../../../../../../packages/components/time-select/src/time-select.vue"],"sourcesContent":["<template>\n <el-select\n ref=\"select\"\n :model-value=\"value\"\n :disabled=\"_disabled\"\n :clearable=\"clearable\"\n :clear-icon=\"clearIcon\"\n :size=\"size\"\n :effect=\"effect\"\n :placeholder=\"placeholder\"\n default-first-option\n :filterable=\"editable\"\n @update:model-value=\"(event) => $emit('update:modelValue', event)\"\n @change=\"(event) => $emit('change', event)\"\n @blur=\"(event) => $emit('blur', event)\"\n @focus=\"(event) => $emit('focus', event)\"\n >\n <el-option\n v-for=\"item in items\"\n :key=\"item.value\"\n :label=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n />\n <template #prefix>\n <el-icon v-if=\"prefixIcon\" :class=\"nsInput.e('prefix-icon')\">\n <component :is=\"prefixIcon\" />\n </el-icon>\n </template>\n </el-select>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat.js'\nimport ElSelect from '@element-plus/components/select'\nimport { useFormDisabled } from '@element-plus/components/form'\nimport ElIcon from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timeSelectProps } from './time-select'\nimport { compareTime, formatTime, nextTime, parseTime } from './utils'\n\ndayjs.extend(customParseFormat)\n\nconst { Option: ElOption } = ElSelect\n\ndefineOptions({\n name: 'ElTimeSelect',\n})\n\ndefineEmits(['change', 'blur', 'focus', 'update:modelValue'])\n\nconst props = defineProps(timeSelectProps)\n\nconst nsInput = useNamespace('input')\nconst select = ref<typeof ElSelect>()\n\nconst _disabled = useFormDisabled()\n\nconst value = computed(() => props.modelValue)\nconst start = computed(() => {\n const time = parseTime(props.start)\n return time ? formatTime(time) : null\n})\n\nconst end = computed(() => {\n const time = parseTime(props.end)\n return time ? formatTime(time) : null\n})\n\nconst step = computed(() => {\n const time = parseTime(props.step)\n return time ? formatTime(time) : null\n})\n\nconst minTime = computed(() => {\n const time = parseTime(props.minTime || '')\n return time ? formatTime(time) : null\n})\n\nconst maxTime = computed(() => {\n const time = parseTime(props.maxTime || '')\n return time ? formatTime(time) : null\n})\n\nconst items = computed(() => {\n const result: { value: string; disabled: boolean }[] = []\n if (props.start && props.end && props.step) {\n let current = start.value\n let currentTime: string\n while (current && end.value && compareTime(current, end.value) <= 0) {\n currentTime = dayjs(current, 'HH:mm').format(props.format)\n result.push({\n value: currentTime,\n disabled:\n compareTime(current, minTime.value || '-1:-1') <= 0 ||\n compareTime(current, maxTime.value || '100:100') >= 0,\n })\n current = nextTime(current, step.value!)\n }\n }\n return result\n})\n\nconst blur = () => {\n select.value?.blur?.()\n}\n\nconst focus = () => {\n select.value?.focus?.()\n}\n\ndefineExpose({\n /**\n * @description focus the Input component\n */\n blur,\n /**\n * @description blur the Input component\n */\n focus,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;mCA+Cc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AANA,IAAA,KAAA,CAAM,OAAO,iBAAiB,CAAA,CAAA;AAE9B,IAAM,MAAA,EAAE,QAAQ,QAAa,EAAA,GAAA,QAAA,CAAA;AAU7B,IAAM,MAAA,OAAA,GAAU,aAAa,OAAO,CAAA,CAAA;AACpC,IAAA,MAAM,SAAS,GAAqB,EAAA,CAAA;AAEpC,IAAA,MAAM,YAAY,eAAgB,EAAA,CAAA;AAElC,IAAA,MAAM,KAAQ,GAAA,QAAA,CAAS,MAAM,KAAA,CAAM,UAAU,CAAA,CAAA;AAC7C,IAAM,MAAA,KAAA,GAAQ,SAAS,MAAM;AAC3B,MAAM,MAAA,IAAA,GAAO,SAAU,CAAA,KAAA,CAAM,KAAK,CAAA,CAAA;AAClC,MAAO,OAAA,IAAA,GAAO,UAAW,CAAA,IAAI,CAAI,GAAA,IAAA,CAAA;AAAA,KAClC,CAAA,CAAA;AAED,IAAM,MAAA,GAAA,GAAM,SAAS,MAAM;AACzB,MAAM,MAAA,IAAA,GAAO,SAAU,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AAChC,MAAO,OAAA,IAAA,GAAO,UAAW,CAAA,IAAI,CAAI,GAAA,IAAA,CAAA;AAAA,KAClC,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAM,MAAA,IAAA,GAAO,SAAU,CAAA,KAAA,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CAAK,IAAA,CAAA;AAAA,WACvD,CAAA,CAAA;AACD,UAAU,OAAA,GAAA,QAAA,CAAS,OAAS,EAAA,IAAA,CAAK,KAAM,CAAA,CAAA;AAAA,SACzC;AAAA,OACF;AACA,MAAO,OAAA,MAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,IAAA,EAAA;AAAqB,MACvB,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAEA,KAAA,CAAA;AACE,IAAA,MAAA,cAAsB;AAAA,MACxB,IAAA,EAAA,EAAA,EAAA,CAAA;AAEA,MAAa,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KAIX,CAAA;AAAA,IAIA,MAAA,CAAA;AAAA,MACD,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,6 +17,24 @@ export declare const ElTimeline: import("element-plus/es/utils").SFCWithInstall<
|
|
|
17
17
|
};
|
|
18
18
|
readonly hollow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
19
19
|
}, {
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
22
|
+
readonly hideTimestamp: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
23
|
+
readonly center: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
24
|
+
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
|
|
25
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
26
|
+
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
27
|
+
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
|
|
28
|
+
readonly icon: {
|
|
29
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
30
|
+
readonly required: false;
|
|
31
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
32
|
+
__epPropKey: true;
|
|
33
|
+
};
|
|
34
|
+
readonly hollow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
35
|
+
}>> & {
|
|
36
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
37
|
+
}>>;
|
|
20
38
|
ns: {
|
|
21
39
|
namespace: import("vue").ComputedRef<string>;
|
|
22
40
|
b: (blockSuffix?: string) => string;
|
|
@@ -35,6 +53,7 @@ export declare const ElTimeline: import("element-plus/es/utils").SFCWithInstall<
|
|
|
35
53
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
36
54
|
cssVarBlockName: (name: string) => string;
|
|
37
55
|
};
|
|
56
|
+
defaultNodeKls: import("vue").ComputedRef<string[]>;
|
|
38
57
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
39
58
|
readonly size: {
|
|
40
59
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
@@ -141,6 +160,24 @@ export declare const ElTimelineItem: import("element-plus/es/utils").SFCWithInst
|
|
|
141
160
|
};
|
|
142
161
|
readonly hollow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
143
162
|
}, {
|
|
163
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
164
|
+
readonly timestamp: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
165
|
+
readonly hideTimestamp: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
166
|
+
readonly center: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
167
|
+
readonly placement: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
|
|
168
|
+
readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
169
|
+
readonly color: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
170
|
+
readonly size: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
|
|
171
|
+
readonly icon: {
|
|
172
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
173
|
+
readonly required: false;
|
|
174
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
175
|
+
__epPropKey: true;
|
|
176
|
+
};
|
|
177
|
+
readonly hollow: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
178
|
+
}>> & {
|
|
179
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
180
|
+
}>>;
|
|
144
181
|
ns: {
|
|
145
182
|
namespace: import("vue").ComputedRef<string>;
|
|
146
183
|
b: (blockSuffix?: string) => string;
|
|
@@ -159,6 +196,7 @@ export declare const ElTimelineItem: import("element-plus/es/utils").SFCWithInst
|
|
|
159
196
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
160
197
|
cssVarBlockName: (name: string) => string;
|
|
161
198
|
};
|
|
199
|
+
defaultNodeKls: import("vue").ComputedRef<string[]>;
|
|
162
200
|
ElIcon: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
163
201
|
readonly size: {
|
|
164
202
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n timestamp: {\n type: String,\n default: '',\n },\n hideTimestamp: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n color: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n icon: {\n type: iconPropType,\n },\n hollow: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":[],"mappings":";;;;AACY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n /**\n * @description timestamp content\n */\n timestamp: {\n type: String,\n default: '',\n },\n /**\n * @description whether to show timestamp\n */\n hideTimestamp: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether vertically centered\n */\n center: {\n type: Boolean,\n default: false,\n },\n /**\n * @description position of timestamp\n */\n placement: {\n type: String,\n values: ['top', 'bottom'],\n default: 'bottom',\n },\n /**\n * @description node type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'danger', 'info'],\n default: '',\n },\n /**\n * @description background color of node\n */\n color: {\n type: String,\n default: '',\n },\n /**\n * @description node size\n */\n size: {\n type: String,\n values: ['normal', 'large'],\n default: 'normal',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description icon is hollow\n */\n hollow: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":[],"mappings":";;;;AACY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;AAC/D,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -14,6 +14,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
};
|
|
15
15
|
readonly hollow: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
16
16
|
}, {
|
|
17
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
readonly timestamp: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
19
|
+
readonly hideTimestamp: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
20
|
+
readonly center: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
21
|
+
readonly placement: import("../../../utils").EpPropFinalized<StringConstructor, "top" | "bottom", unknown, "bottom", boolean>;
|
|
22
|
+
readonly type: import("../../../utils").EpPropFinalized<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
23
|
+
readonly color: import("../../../utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
24
|
+
readonly size: import("../../../utils").EpPropFinalized<StringConstructor, "large" | "normal", unknown, "normal", boolean>;
|
|
25
|
+
readonly icon: {
|
|
26
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
|
|
27
|
+
readonly required: false;
|
|
28
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
|
+
__epPropKey: true;
|
|
30
|
+
};
|
|
31
|
+
readonly hollow: import("../../../utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
32
|
+
}>> & {
|
|
33
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
34
|
+
}>>;
|
|
17
35
|
ns: {
|
|
18
36
|
namespace: import("vue").ComputedRef<string>;
|
|
19
37
|
b: (blockSuffix?: string) => string;
|
|
@@ -32,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
50
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
33
51
|
cssVarBlockName: (name: string) => string;
|
|
34
52
|
};
|
|
53
|
+
defaultNodeKls: import("vue").ComputedRef<string[]>;
|
|
35
54
|
ElIcon: import("../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
36
55
|
readonly size: {
|
|
37
56
|
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => (string | number) & {}) | (() => string | number) | ((new (...args: any[]) => (string | number) & {}) | (() => string | number))[], unknown, unknown>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString } from 'vue';
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString } from 'vue';
|
|
2
2
|
import { ElIcon } from '../../icon/index.mjs';
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import { timelineItemProps } from './timeline-item.mjs';
|
|
@@ -12,7 +12,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
...__default__,
|
|
13
13
|
props: timelineItemProps,
|
|
14
14
|
setup(__props) {
|
|
15
|
+
const props = __props;
|
|
15
16
|
const ns = useNamespace("timeline-item");
|
|
17
|
+
const defaultNodeKls = computed(() => [
|
|
18
|
+
ns.e("node"),
|
|
19
|
+
ns.em("node", props.size || ""),
|
|
20
|
+
ns.em("node", props.type || ""),
|
|
21
|
+
ns.is("hollow", props.hollow)
|
|
22
|
+
]);
|
|
16
23
|
return (_ctx, _cache) => {
|
|
17
24
|
return openBlock(), createElementBlock("li", {
|
|
18
25
|
class: normalizeClass([unref(ns).b(), { [unref(ns).e("center")]: _ctx.center }])
|
|
@@ -22,12 +29,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
29
|
}, null, 2),
|
|
23
30
|
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
24
31
|
key: 0,
|
|
25
|
-
class: normalizeClass(
|
|
26
|
-
unref(ns).e("node"),
|
|
27
|
-
unref(ns).em("node", _ctx.size || ""),
|
|
28
|
-
unref(ns).em("node", _ctx.type || ""),
|
|
29
|
-
unref(ns).is("hollow", _ctx.hollow)
|
|
30
|
-
]),
|
|
32
|
+
class: normalizeClass(unref(defaultNodeKls)),
|
|
31
33
|
style: normalizeStyle({
|
|
32
34
|
backgroundColor: _ctx.color
|
|
33
35
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"
|
|
1
|
+
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"defaultNodeKls\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <el-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </el-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { useNamespace } from '@element-plus/hooks'\nimport { timelineItemProps } from './timeline-item'\n\ndefineOptions({\n name: 'ElTimelineItem',\n})\n\nconst props = defineProps(timelineItemProps)\n\nconst ns = useNamespace('timeline-item')\nconst defaultNodeKls = computed(() => [\n ns.e('node'),\n ns.em('node', props.size || ''),\n ns.em('node', props.type || ''),\n ns.is('hollow', props.hollow),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;mCA8Cc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,eAAe,CAAA,CAAA;AACvC,IAAM,MAAA,cAAA,GAAiB,SAAS,MAAM;AAAA,MACpC,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,KAAA,CAAM,QAAQ,EAAE,CAAA;AAAA,MAC9B,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,KAC7B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -184,7 +184,7 @@ declare const _Tree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
184
184
|
props: {
|
|
185
185
|
children?: string | undefined;
|
|
186
186
|
label?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => string) | undefined;
|
|
187
|
-
disabled?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) =>
|
|
187
|
+
disabled?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => boolean) | undefined;
|
|
188
188
|
isLeaf?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => boolean) | undefined;
|
|
189
189
|
class?: ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => string | {
|
|
190
190
|
[key: string]: boolean;
|
|
@@ -619,7 +619,7 @@ export declare const ElTree: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
619
619
|
props: {
|
|
620
620
|
children?: string | undefined;
|
|
621
621
|
label?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => string) | undefined;
|
|
622
|
-
disabled?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) =>
|
|
622
|
+
disabled?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => boolean) | undefined;
|
|
623
623
|
isLeaf?: string | ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => boolean) | undefined;
|
|
624
624
|
class?: ((data: import("./src/tree.type").TreeNodeData, node: import("./src/model/node").default) => string | {
|
|
625
625
|
[key: string]: boolean;
|
|
@@ -30,7 +30,7 @@ function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
|
|
|
30
30
|
const treeNodeDragOver = ({ event, treeNode }) => {
|
|
31
31
|
const dropNode = treeNode;
|
|
32
32
|
const oldDropNode = dragState.value.dropNode;
|
|
33
|
-
if (oldDropNode && oldDropNode !== dropNode) {
|
|
33
|
+
if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) {
|
|
34
34
|
removeClass(oldDropNode.$el, ns.is("drop-inner"));
|
|
35
35
|
}
|
|
36
36
|
const draggingNode = dragState.value.draggingNode;
|
|
@@ -46,7 +46,7 @@ function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {
|
|
|
46
46
|
dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
|
|
47
47
|
}
|
|
48
48
|
event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
|
|
49
|
-
if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {
|
|
49
|
+
if ((dropPrev || dropInner || dropNext) && (oldDropNode == null ? void 0 : oldDropNode.node.id) !== dropNode.node.id) {
|
|
50
50
|
if (oldDropNode) {
|
|
51
51
|
ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
|
|
52
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDragNode.mjs","sources":["../../../../../../../packages/components/tree/src/model/useDragNode.ts"],"sourcesContent":["// @ts-nocheck\nimport { provide, ref } from 'vue'\nimport { addClass, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { InjectionKey } from 'vue'\nimport type Node from './node'\nimport type { NodeDropType } from '../tree.type'\n\ninterface TreeNode {\n node: Node\n $el?: HTMLElement\n}\n\ninterface DragOptions {\n event: DragEvent\n treeNode: TreeNode\n}\n\nexport interface DragEvents {\n treeNodeDragStart: (options: DragOptions) => void\n treeNodeDragOver: (options: DragOptions) => void\n treeNodeDragEnd: (event: DragEvent) => void\n}\n\nexport const dragEventsKey: InjectionKey<DragEvents> = Symbol('dragEvents')\n\nexport function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {\n const ns = useNamespace('tree')\n const dragState = ref({\n showDropIndicator: false,\n draggingNode: null,\n dropNode: null,\n allowDrop: true,\n dropType: null,\n })\n\n const treeNodeDragStart = ({ event, treeNode }: DragOptions) => {\n if (\n typeof props.allowDrag === 'function' &&\n !props.allowDrag(treeNode.node)\n ) {\n event.preventDefault()\n return false\n }\n event.dataTransfer.effectAllowed = 'move'\n\n // wrap in try catch to address IE's error when first param is 'text/plain'\n try {\n // setData is required for draggable to work in FireFox\n // the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox\n event.dataTransfer.setData('text/plain', '')\n } catch {}\n dragState.value.draggingNode = treeNode\n ctx.emit('node-drag-start', treeNode.node, event)\n }\n\n const treeNodeDragOver = ({ event, treeNode }: DragOptions) => {\n const dropNode = treeNode\n const oldDropNode = dragState.value.dropNode\n if (oldDropNode && oldDropNode !== dropNode) {\n removeClass(oldDropNode.$el, ns.is('drop-inner'))\n }\n const draggingNode = dragState.value.draggingNode\n if (!draggingNode || !dropNode) return\n\n let dropPrev = true\n let dropInner = true\n let dropNext = true\n let userAllowDropInner = true\n if (typeof props.allowDrop === 'function') {\n dropPrev = props.allowDrop(draggingNode.node, dropNode.node, 'prev')\n userAllowDropInner = dropInner = props.allowDrop(\n draggingNode.node,\n dropNode.node,\n 'inner'\n )\n dropNext = props.allowDrop(draggingNode.node, dropNode.node, 'next')\n }\n event.dataTransfer.dropEffect =\n dropInner || dropPrev || dropNext ? 'move' : 'none'\n if ((dropPrev || dropInner || dropNext) && oldDropNode !== dropNode) {\n if (oldDropNode) {\n ctx.emit('node-drag-leave', draggingNode.node, oldDropNode.node, event)\n }\n ctx.emit('node-drag-enter', draggingNode.node, dropNode.node, event)\n }\n\n if (dropPrev || dropInner || dropNext) {\n dragState.value.dropNode = dropNode\n }\n\n if (dropNode.node.nextSibling === draggingNode.node) {\n dropNext = false\n }\n if (dropNode.node.previousSibling === draggingNode.node) {\n dropPrev = false\n }\n if (dropNode.node.contains(draggingNode.node, false)) {\n dropInner = false\n }\n if (\n draggingNode.node === dropNode.node ||\n draggingNode.node.contains(dropNode.node)\n ) {\n dropPrev = false\n dropInner = false\n dropNext = false\n }\n\n const targetPosition = dropNode.$el.getBoundingClientRect()\n const treePosition = el$.value.getBoundingClientRect()\n\n let dropType: NodeDropType\n const prevPercent = dropPrev ? (dropInner ? 0.25 : dropNext ? 0.45 : 1) : -1\n const nextPercent = dropNext ? (dropInner ? 0.75 : dropPrev ? 0.55 : 0) : 1\n\n let indicatorTop = -9999\n const distance = event.clientY - targetPosition.top\n if (distance < targetPosition.height * prevPercent) {\n dropType = 'before'\n } else if (distance > targetPosition.height * nextPercent) {\n dropType = 'after'\n } else if (dropInner) {\n dropType = 'inner'\n } else {\n dropType = 'none'\n }\n\n const iconPosition = dropNode.$el\n .querySelector(`.${ns.be('node', 'expand-icon')}`)\n .getBoundingClientRect()\n const dropIndicator = dropIndicator$.value\n if (dropType === 'before') {\n indicatorTop = iconPosition.top - treePosition.top\n } else if (dropType === 'after') {\n indicatorTop = iconPosition.bottom - treePosition.top\n }\n dropIndicator.style.top = `${indicatorTop}px`\n dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`\n\n if (dropType === 'inner') {\n addClass(dropNode.$el, ns.is('drop-inner'))\n } else {\n removeClass(dropNode.$el, ns.is('drop-inner'))\n }\n\n dragState.value.showDropIndicator =\n dropType === 'before' || dropType === 'after'\n dragState.value.allowDrop =\n dragState.value.showDropIndicator || userAllowDropInner\n dragState.value.dropType = dropType\n ctx.emit('node-drag-over', draggingNode.node, dropNode.node, event)\n }\n\n const treeNodeDragEnd = (event: DragEvent) => {\n const { draggingNode, dropType, dropNode } = dragState.value\n event.preventDefault()\n event.dataTransfer.dropEffect = 'move'\n\n if (draggingNode && dropNode) {\n const draggingNodeCopy = { data: draggingNode.node.data }\n if (dropType !== 'none') {\n draggingNode.node.remove()\n }\n if (dropType === 'before') {\n dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node)\n } else if (dropType === 'after') {\n dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node)\n } else if (dropType === 'inner') {\n dropNode.node.insertChild(draggingNodeCopy)\n }\n if (dropType !== 'none') {\n store.value.registerNode(draggingNodeCopy)\n }\n\n removeClass(dropNode.$el, ns.is('drop-inner'))\n\n ctx.emit(\n 'node-drag-end',\n draggingNode.node,\n dropNode.node,\n dropType,\n event\n )\n if (dropType !== 'none') {\n ctx.emit('node-drop', draggingNode.node, dropNode.node, dropType, event)\n }\n }\n if (draggingNode && !dropNode) {\n ctx.emit('node-drag-end', draggingNode.node, null, dropType, event)\n }\n\n dragState.value.showDropIndicator = false\n dragState.value.draggingNode = null\n dragState.value.dropNode = null\n dragState.value.allowDrop = true\n }\n\n provide(dragEventsKey, {\n treeNodeDragStart,\n treeNodeDragOver,\n treeNodeDragEnd,\n })\n\n return {\n dragState,\n }\n}\n"],"names":[],"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,KAAK,CAAC,CAAC;AAC1E,KAAK;AACL,IAAI,SAAS,CAAC,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAC9C,IAAI,SAAS,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AACxC,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;AACpC,IAAI,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;AACrC,GAAG,CAAC;AACJ,EAAE,OAAO,CAAC,aAAa,EAAE;AACzB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,SAAS;AACb,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"useDragNode.mjs","sources":["../../../../../../../packages/components/tree/src/model/useDragNode.ts"],"sourcesContent":["// @ts-nocheck\nimport { provide, ref } from 'vue'\nimport { addClass, removeClass } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { InjectionKey } from 'vue'\nimport type Node from './node'\nimport type { NodeDropType } from '../tree.type'\n\ninterface TreeNode {\n node: Node\n $el?: HTMLElement\n}\n\ninterface DragOptions {\n event: DragEvent\n treeNode: TreeNode\n}\n\nexport interface DragEvents {\n treeNodeDragStart: (options: DragOptions) => void\n treeNodeDragOver: (options: DragOptions) => void\n treeNodeDragEnd: (event: DragEvent) => void\n}\n\nexport const dragEventsKey: InjectionKey<DragEvents> = Symbol('dragEvents')\n\nexport function useDragNodeHandler({ props, ctx, el$, dropIndicator$, store }) {\n const ns = useNamespace('tree')\n const dragState = ref({\n showDropIndicator: false,\n draggingNode: null,\n dropNode: null,\n allowDrop: true,\n dropType: null,\n })\n\n const treeNodeDragStart = ({ event, treeNode }: DragOptions) => {\n if (\n typeof props.allowDrag === 'function' &&\n !props.allowDrag(treeNode.node)\n ) {\n event.preventDefault()\n return false\n }\n event.dataTransfer.effectAllowed = 'move'\n\n // wrap in try catch to address IE's error when first param is 'text/plain'\n try {\n // setData is required for draggable to work in FireFox\n // the content has to be '' so dragging a node out of the tree won't open a new tab in FireFox\n event.dataTransfer.setData('text/plain', '')\n } catch {}\n dragState.value.draggingNode = treeNode\n ctx.emit('node-drag-start', treeNode.node, event)\n }\n\n const treeNodeDragOver = ({ event, treeNode }: DragOptions) => {\n const dropNode = treeNode\n const oldDropNode = dragState.value.dropNode\n if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) {\n removeClass(oldDropNode.$el, ns.is('drop-inner'))\n }\n const draggingNode = dragState.value.draggingNode\n if (!draggingNode || !dropNode) return\n\n let dropPrev = true\n let dropInner = true\n let dropNext = true\n let userAllowDropInner = true\n if (typeof props.allowDrop === 'function') {\n dropPrev = props.allowDrop(draggingNode.node, dropNode.node, 'prev')\n userAllowDropInner = dropInner = props.allowDrop(\n draggingNode.node,\n dropNode.node,\n 'inner'\n )\n dropNext = props.allowDrop(draggingNode.node, dropNode.node, 'next')\n }\n event.dataTransfer.dropEffect =\n dropInner || dropPrev || dropNext ? 'move' : 'none'\n if (\n (dropPrev || dropInner || dropNext) &&\n oldDropNode?.node.id !== dropNode.node.id\n ) {\n if (oldDropNode) {\n ctx.emit('node-drag-leave', draggingNode.node, oldDropNode.node, event)\n }\n ctx.emit('node-drag-enter', draggingNode.node, dropNode.node, event)\n }\n\n if (dropPrev || dropInner || dropNext) {\n dragState.value.dropNode = dropNode\n }\n\n if (dropNode.node.nextSibling === draggingNode.node) {\n dropNext = false\n }\n if (dropNode.node.previousSibling === draggingNode.node) {\n dropPrev = false\n }\n if (dropNode.node.contains(draggingNode.node, false)) {\n dropInner = false\n }\n if (\n draggingNode.node === dropNode.node ||\n draggingNode.node.contains(dropNode.node)\n ) {\n dropPrev = false\n dropInner = false\n dropNext = false\n }\n\n const targetPosition = dropNode.$el.getBoundingClientRect()\n const treePosition = el$.value.getBoundingClientRect()\n\n let dropType: NodeDropType\n const prevPercent = dropPrev ? (dropInner ? 0.25 : dropNext ? 0.45 : 1) : -1\n const nextPercent = dropNext ? (dropInner ? 0.75 : dropPrev ? 0.55 : 0) : 1\n\n let indicatorTop = -9999\n const distance = event.clientY - targetPosition.top\n if (distance < targetPosition.height * prevPercent) {\n dropType = 'before'\n } else if (distance > targetPosition.height * nextPercent) {\n dropType = 'after'\n } else if (dropInner) {\n dropType = 'inner'\n } else {\n dropType = 'none'\n }\n\n const iconPosition = dropNode.$el\n .querySelector(`.${ns.be('node', 'expand-icon')}`)\n .getBoundingClientRect()\n const dropIndicator = dropIndicator$.value\n if (dropType === 'before') {\n indicatorTop = iconPosition.top - treePosition.top\n } else if (dropType === 'after') {\n indicatorTop = iconPosition.bottom - treePosition.top\n }\n dropIndicator.style.top = `${indicatorTop}px`\n dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`\n\n if (dropType === 'inner') {\n addClass(dropNode.$el, ns.is('drop-inner'))\n } else {\n removeClass(dropNode.$el, ns.is('drop-inner'))\n }\n\n dragState.value.showDropIndicator =\n dropType === 'before' || dropType === 'after'\n dragState.value.allowDrop =\n dragState.value.showDropIndicator || userAllowDropInner\n dragState.value.dropType = dropType\n ctx.emit('node-drag-over', draggingNode.node, dropNode.node, event)\n }\n\n const treeNodeDragEnd = (event: DragEvent) => {\n const { draggingNode, dropType, dropNode } = dragState.value\n event.preventDefault()\n event.dataTransfer.dropEffect = 'move'\n\n if (draggingNode && dropNode) {\n const draggingNodeCopy = { data: draggingNode.node.data }\n if (dropType !== 'none') {\n draggingNode.node.remove()\n }\n if (dropType === 'before') {\n dropNode.node.parent.insertBefore(draggingNodeCopy, dropNode.node)\n } else if (dropType === 'after') {\n dropNode.node.parent.insertAfter(draggingNodeCopy, dropNode.node)\n } else if (dropType === 'inner') {\n dropNode.node.insertChild(draggingNodeCopy)\n }\n if (dropType !== 'none') {\n store.value.registerNode(draggingNodeCopy)\n }\n\n removeClass(dropNode.$el, ns.is('drop-inner'))\n\n ctx.emit(\n 'node-drag-end',\n draggingNode.node,\n dropNode.node,\n dropType,\n event\n )\n if (dropType !== 'none') {\n ctx.emit('node-drop', draggingNode.node, dropNode.node, dropType, event)\n }\n }\n if (draggingNode && !dropNode) {\n ctx.emit('node-drag-end', draggingNode.node, null, dropType, event)\n }\n\n dragState.value.showDropIndicator = false\n dragState.value.draggingNode = null\n dragState.value.dropNode = null\n dragState.value.allowDrop = true\n }\n\n provide(dragEventsKey, {\n treeNodeDragStart,\n treeNodeDragOver,\n treeNodeDragEnd,\n })\n\n return {\n dragState,\n }\n}\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,aAAa,GAAG,MAAM,CAAC,YAAY,EAAE;AAC3C,SAAS,kBAAkB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE;AAC/E,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAClC,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC;AACxB,IAAI,iBAAiB,EAAE,KAAK;AAC5B,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,QAAQ,EAAE,IAAI;AAClB,IAAI,SAAS,EAAE,IAAI;AACnB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,iBAAiB,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK;AACrD,IAAI,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;AAClF,MAAM,KAAK,CAAC,cAAc,EAAE,CAAC;AAC7B,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK;AACL,IAAI,KAAK,CAAC,YAAY,CAAC,aAAa,GAAG,MAAM,CAAC;AAC9C,IAAI,IAAI;AACR,MAAM,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACnD,KAAK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AC,CAAC,CAAC;AACrD,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACnF,MAAM,IAAI,QAAQ,KAAK,MAAM,EAAE;AAC/B,QAAQ,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACjF,OAAO;AACP,KAAK;AACL,IAAI,IAAI,YAAY,IAAI,CAAC,QAAQ,EAAE;AACnC,MAAM,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC1E,KAAK;AACL,IAAI,SAAS,CAAC,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAC9C,IAAI,SAAS,CAAC,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AACxC,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;AACpC,IAAI,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;AACrC,GAAG,CAAC;AACJ,EAAE,OAAO,CAAC,aAAa,EAAE;AACzB,IAAI,iBAAiB;AACrB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,SAAS;AACb,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -53,7 +53,7 @@ export declare interface TreeStoreOptions {
|
|
|
53
53
|
export declare interface TreeOptionProps {
|
|
54
54
|
children?: string;
|
|
55
55
|
label?: string | ((data: TreeNodeData, node: Node) => string);
|
|
56
|
-
disabled?: string | ((data: TreeNodeData, node: Node) =>
|
|
56
|
+
disabled?: string | ((data: TreeNodeData, node: Node) => boolean);
|
|
57
57
|
isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean);
|
|
58
58
|
class?: (data: TreeNodeData, node: Node) => string | {
|
|
59
59
|
[key: string]: boolean;
|
|
@@ -187,7 +187,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
187
187
|
props: {
|
|
188
188
|
children?: string | undefined;
|
|
189
189
|
label?: string | ((data: TreeNodeData, node: Node) => string) | undefined;
|
|
190
|
-
disabled?: string | ((data: TreeNodeData, node: Node) =>
|
|
190
|
+
disabled?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
|
|
191
191
|
isLeaf?: string | ((data: TreeNodeData, node: Node) => boolean) | undefined;
|
|
192
192
|
class?: ((data: TreeNodeData, node: Node) => string | {
|
|
193
193
|
[key: string]: boolean;
|