@element-plus/nightly 0.0.20220117 → 0.0.20220118
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 +2196 -3407
- package/dist/index.full.min.js +8 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2189 -3403
- 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/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/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/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/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/alert/index.d.ts +5 -5
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +5 -5
- package/es/components/avatar/index.d.ts +1 -1
- package/es/components/avatar/src/avatar.d.ts +3 -1
- package/es/components/avatar/src/avatar.mjs +1 -1
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar.vue.d.ts +1 -1
- package/es/components/avatar/src/avatar.vue_vue_type_script_lang.mjs +13 -8
- package/es/components/avatar/src/avatar.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/avatar/src/avatar.vue_vue_type_template_id_46e3f365_lang.mjs.map +1 -1
- package/es/components/button/index.d.ts +6 -0
- package/es/components/button/src/button-group.vue.d.ts +2 -0
- package/es/components/button/src/button.vue.d.ts +2 -0
- package/es/components/card/index.d.ts +13 -1
- package/es/components/card/src/card.d.ts +2 -0
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card.vue.d.ts +13 -1
- package/es/components/card/src/card.vue_vue_type_script_lang.mjs +9 -1
- package/es/components/card/src/card.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.mjs +8 -9
- package/es/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +38 -34
- package/es/components/cascader/src/index.vue.d.ts +19 -17
- package/es/components/check-tag/index.d.ts +21 -9
- package/es/components/check-tag/index.mjs +3 -2
- package/es/components/check-tag/index.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag.d.ts +12 -0
- package/es/components/check-tag/src/check-tag.mjs +16 -0
- package/es/components/check-tag/src/check-tag.mjs.map +1 -0
- package/es/components/check-tag/src/check-tag.vue.d.ts +29 -0
- package/es/components/check-tag/src/check-tag.vue_vue_type_script_lang.mjs +25 -0
- package/es/components/check-tag/src/check-tag.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/check-tag/src/{index.vue_vue_type_template_id_58558910_lang.mjs → check-tag.vue_vue_type_template_id_d949910a_lang.mjs} +2 -5
- package/es/components/check-tag/src/check-tag.vue_vue_type_template_id_d949910a_lang.mjs.map +1 -0
- package/es/components/check-tag/src/check-tag2.mjs +7 -0
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +2 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.mjs +10 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_template_id_78e07aa7_lang.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.mjs +12 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_template_id_62b45ab2_lang.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/index.vue.d.ts +4 -4
- package/es/components/divider/index.d.ts +14 -1
- package/es/components/divider/src/divider.d.ts +2 -0
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider.vue.d.ts +15 -1
- package/es/components/divider/src/divider.vue_vue_type_script_lang.mjs +16 -2
- package/es/components/divider/src/divider.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.mjs +3 -3
- package/es/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +13 -11
- package/es/components/dropdown/src/dropdown.vue.d.ts +13 -11
- package/es/components/empty/index.d.ts +11 -0
- package/es/components/empty/src/empty.d.ts +2 -0
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty.vue.d.ts +11 -0
- package/es/components/empty/src/empty.vue_vue_type_script_lang.mjs +3 -0
- package/es/components/empty/src/empty.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.mjs +20 -19
- package/es/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.mjs.map +1 -1
- package/es/components/icon/index.d.ts +11 -0
- package/es/components/icon/src/icon.d.ts +2 -0
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon.vue.d.ts +11 -0
- package/es/components/icon/src/icon.vue_vue_type_script_lang.mjs +14 -15
- package/es/components/icon/src/icon.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.mjs +1 -1
- package/es/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.mjs.map +1 -1
- package/es/components/image/src/image.vue_vue_type_script_lang.mjs +14 -3
- package/es/components/image/src/image.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/image/src/image.vue_vue_type_template_id_34467287_lang.mjs.map +1 -1
- package/es/components/index.mjs +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs +1 -1
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs.map +1 -1
- package/es/components/link/index.d.ts +11 -0
- package/es/components/link/src/link.d.ts +2 -0
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link.vue.d.ts +11 -0
- package/es/components/link/src/link.vue_vue_type_script_lang.mjs +4 -0
- package/es/components/link/src/link.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/link/src/link.vue_vue_type_template_id_6a422645_lang.mjs +7 -8
- package/es/components/link/src/link.vue_vue_type_template_id_6a422645_lang.mjs.map +1 -1
- package/es/components/menu/index.d.ts +2 -2
- package/es/components/menu/src/menu.d.ts +2 -2
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/popover/index.d.ts +32 -26
- package/es/components/popover/src/index.vue.d.ts +16 -13
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs +6 -1
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs.map +1 -1
- package/es/components/rate/index.d.ts +11 -0
- package/es/components/rate/src/rate.d.ts +2 -0
- package/es/components/rate/src/rate.mjs +1 -1
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +11 -0
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs +7 -5
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs +7 -7
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs.map +1 -1
- package/es/components/result/index.d.ts +11 -0
- package/es/components/result/src/result.d.ts +2 -0
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result.vue.d.ts +11 -0
- package/es/components/result/src/result.vue_vue_type_script_lang.mjs +4 -0
- package/es/components/result/src/result.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.mjs +24 -25
- package/es/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.mjs.map +1 -1
- package/es/components/row/index.d.ts +3 -3
- package/es/components/row/src/row.d.ts +7 -6
- package/es/components/row/src/row.mjs +9 -6
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +2 -2
- package/es/components/scrollbar/src/bar.vue_vue_type_script_lang.mjs +11 -4
- package/es/components/scrollbar/src/bar.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.vue_vue_type_template_id_2f63f10a_lang.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/es/components/select/index.d.ts +15 -13
- package/es/components/select/src/select.vue.d.ts +15 -13
- package/es/components/select/src/useSelect.d.ts +13 -11
- package/es/components/select-v2/index.d.ts +38 -28
- package/es/components/select-v2/src/defaults.d.ts +4 -1
- package/es/components/select-v2/src/defaults.mjs +4 -1
- package/es/components/select-v2/src/defaults.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +19 -14
- package/es/components/select-v2/src/useSelect.d.ts +13 -11
- package/es/components/select-v2/src/useSelect.mjs +1 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/space/index.d.ts +2 -2
- package/es/components/space/src/space.d.ts +2 -2
- package/es/components/steps/index.d.ts +2 -2
- package/es/components/steps/src/index.vue.d.ts +2 -2
- package/es/components/switch/index.d.ts +11 -0
- package/es/components/switch/src/switch.vue.d.ts +11 -0
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs +5 -3
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs +21 -21
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs.map +1 -1
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/src/filter-panel.vue.d.ts +13 -11
- package/es/components/table/src/store/index.mjs +1 -1
- package/es/components/table/src/store/index.mjs.map +1 -1
- package/es/components/table/src/store/watcher.mjs +0 -5
- package/es/components/table/src/store/watcher.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +2 -2
- package/es/components/table/src/util.mjs +1 -1
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/tag/index.d.ts +3 -3
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +3 -3
- package/es/components/time-picker/src/common/picker.vue.d.ts +16 -12
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs +12 -1
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs +5 -4
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.mjs +10 -10
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.mjs +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.mjs.map +1 -1
- package/es/components/timeline/index.d.ts +78 -106
- package/es/components/timeline/index.mjs +7 -7
- package/es/components/timeline/index.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item.d.ts +15 -0
- package/es/components/timeline/src/timeline-item.mjs +43 -0
- package/es/components/timeline/src/timeline-item.mjs.map +1 -0
- package/es/components/timeline/src/timeline-item.vue.d.ts +54 -0
- package/es/components/timeline/src/timeline-item.vue_vue_type_script_lang.mjs +22 -0
- package/es/components/timeline/src/timeline-item.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.mjs +60 -0
- package/es/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.mjs.map +1 -0
- package/es/components/timeline/src/timeline-item2.mjs +7 -0
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -0
- package/es/components/timeline/src/{index.vue.d.ts → timeline.d.ts} +3 -2
- package/es/components/timeline/src/timeline.mjs +17 -0
- package/es/components/timeline/src/timeline.mjs.map +1 -0
- package/es/components/tooltip/index.d.ts +5 -4
- package/es/components/tooltip/src/content.vue.d.ts +4 -4
- package/es/components/tooltip/src/tooltip.vue.d.ts +5 -4
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs +1 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +2 -2
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
- package/es/hooks/use-namespace/index.d.ts +2 -0
- package/es/hooks/use-namespace/index.mjs +16 -11
- package/es/hooks/use-namespace/index.mjs.map +1 -1
- package/es/index.mjs +2 -0
- package/es/index.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/alert/index.d.ts +5 -5
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +5 -5
- package/lib/components/avatar/index.d.ts +1 -1
- package/lib/components/avatar/src/avatar.d.ts +3 -1
- package/lib/components/avatar/src/avatar.js +1 -1
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar.vue.d.ts +1 -1
- package/lib/components/avatar/src/avatar.vue_vue_type_script_lang.js +13 -8
- package/lib/components/avatar/src/avatar.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/avatar/src/avatar.vue_vue_type_template_id_46e3f365_lang.js.map +1 -1
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/button/src/button-group.vue.d.ts +2 -0
- package/lib/components/button/src/button.vue.d.ts +2 -0
- package/lib/components/card/index.d.ts +13 -1
- package/lib/components/card/src/card.d.ts +2 -0
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card.vue.d.ts +13 -1
- package/lib/components/card/src/card.vue_vue_type_script_lang.js +9 -1
- package/lib/components/card/src/card.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.js +8 -9
- package/lib/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.js.map +1 -1
- package/lib/components/cascader/index.d.ts +38 -34
- package/lib/components/cascader/src/index.vue.d.ts +19 -17
- package/lib/components/check-tag/index.d.ts +21 -9
- package/lib/components/check-tag/index.js +6 -3
- package/lib/components/check-tag/index.js.map +1 -1
- package/lib/components/check-tag/src/check-tag.d.ts +12 -0
- package/lib/components/check-tag/src/check-tag.js +21 -0
- package/lib/components/check-tag/src/check-tag.js.map +1 -0
- package/lib/components/check-tag/src/check-tag.vue.d.ts +29 -0
- package/lib/components/check-tag/src/{index.vue_vue_type_script_lang.js → check-tag.vue_vue_type_script_lang.js} +8 -10
- package/lib/components/check-tag/src/check-tag.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/check-tag/src/{index.vue_vue_type_template_id_58558910_lang.js → check-tag.vue_vue_type_template_id_d949910a_lang.js} +2 -5
- package/lib/components/check-tag/src/check-tag.vue_vue_type_template_id_d949910a_lang.js.map +1 -0
- package/lib/components/check-tag/src/check-tag2.js +12 -0
- package/lib/components/check-tag/src/check-tag2.js.map +1 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +2 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.js +10 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_template_id_78e07aa7_lang.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.js +12 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_template_id_62b45ab2_lang.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/index.vue.d.ts +4 -4
- package/lib/components/divider/index.d.ts +14 -1
- package/lib/components/divider/src/divider.d.ts +2 -0
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +15 -1
- package/lib/components/divider/src/divider.vue_vue_type_script_lang.js +15 -1
- package/lib/components/divider/src/divider.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.js +3 -3
- package/lib/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +13 -11
- package/lib/components/dropdown/src/dropdown.vue.d.ts +13 -11
- package/lib/components/empty/index.d.ts +11 -0
- package/lib/components/empty/src/empty.d.ts +2 -0
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty.vue.d.ts +11 -0
- package/lib/components/empty/src/empty.vue_vue_type_script_lang.js +3 -0
- package/lib/components/empty/src/empty.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.js +19 -18
- package/lib/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.js.map +1 -1
- package/lib/components/icon/index.d.ts +11 -0
- package/lib/components/icon/src/icon.d.ts +2 -0
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon.vue.d.ts +11 -0
- package/lib/components/icon/src/icon.vue_vue_type_script_lang.js +13 -14
- package/lib/components/icon/src/icon.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.js +1 -1
- package/lib/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.js.map +1 -1
- package/lib/components/image/src/image.vue_vue_type_script_lang.js +14 -3
- package/lib/components/image/src/image.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/image/src/image.vue_vue_type_template_id_34467287_lang.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js +1 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js.map +1 -1
- package/lib/components/link/index.d.ts +11 -0
- package/lib/components/link/src/link.d.ts +2 -0
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link.vue.d.ts +11 -0
- package/lib/components/link/src/link.vue_vue_type_script_lang.js +4 -0
- package/lib/components/link/src/link.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/link/src/link.vue_vue_type_template_id_6a422645_lang.js +7 -8
- package/lib/components/link/src/link.vue_vue_type_template_id_6a422645_lang.js.map +1 -1
- package/lib/components/menu/index.d.ts +2 -2
- package/lib/components/menu/src/menu.d.ts +2 -2
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/popover/index.d.ts +32 -26
- package/lib/components/popover/src/index.vue.d.ts +16 -13
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js +6 -1
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js.map +1 -1
- package/lib/components/rate/index.d.ts +11 -0
- package/lib/components/rate/src/rate.d.ts +2 -0
- package/lib/components/rate/src/rate.js +1 -1
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +11 -0
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js +7 -5
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js +7 -7
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js.map +1 -1
- package/lib/components/result/index.d.ts +11 -0
- package/lib/components/result/src/result.d.ts +2 -0
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result.vue.d.ts +11 -0
- package/lib/components/result/src/result.vue_vue_type_script_lang.js +4 -0
- package/lib/components/result/src/result.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.js +23 -24
- package/lib/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.js.map +1 -1
- package/lib/components/row/index.d.ts +3 -3
- package/lib/components/row/src/row.d.ts +7 -6
- package/lib/components/row/src/row.js +9 -6
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +2 -2
- package/lib/components/scrollbar/src/bar.vue_vue_type_script_lang.js +10 -3
- package/lib/components/scrollbar/src/bar.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/scrollbar/src/bar.vue_vue_type_template_id_2f63f10a_lang.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
- package/lib/components/select/index.d.ts +15 -13
- package/lib/components/select/src/select.vue.d.ts +15 -13
- package/lib/components/select/src/useSelect.d.ts +13 -11
- package/lib/components/select-v2/index.d.ts +38 -28
- package/lib/components/select-v2/src/defaults.d.ts +4 -1
- package/lib/components/select-v2/src/defaults.js +4 -1
- package/lib/components/select-v2/src/defaults.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +19 -14
- package/lib/components/select-v2/src/useSelect.d.ts +13 -11
- package/lib/components/select-v2/src/useSelect.js +1 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/space/index.d.ts +2 -2
- package/lib/components/space/src/space.d.ts +2 -2
- package/lib/components/steps/index.d.ts +2 -2
- package/lib/components/steps/src/index.vue.d.ts +2 -2
- package/lib/components/switch/index.d.ts +11 -0
- package/lib/components/switch/src/switch.vue.d.ts +11 -0
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js +5 -3
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js +21 -21
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js.map +1 -1
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/src/filter-panel.vue.d.ts +13 -11
- package/lib/components/table/src/store/index.js +1 -1
- package/lib/components/table/src/store/index.js.map +1 -1
- package/lib/components/table/src/store/watcher.js +0 -5
- package/lib/components/table/src/store/watcher.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +2 -2
- package/lib/components/table/src/util.js +1 -1
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/tag/index.d.ts +3 -3
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +3 -3
- package/lib/components/time-picker/src/common/picker.vue.d.ts +16 -12
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js +12 -1
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js +5 -4
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.js +10 -10
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.js +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.js.map +1 -1
- package/lib/components/timeline/index.d.ts +78 -106
- package/lib/components/timeline/index.js +8 -7
- package/lib/components/timeline/index.js.map +1 -1
- package/lib/components/timeline/src/timeline-item.d.ts +15 -0
- package/lib/components/timeline/src/timeline-item.js +47 -0
- package/lib/components/timeline/src/timeline-item.js.map +1 -0
- package/lib/components/timeline/src/timeline-item.vue.d.ts +54 -0
- package/lib/components/timeline/src/timeline-item.vue_vue_type_script_lang.js +26 -0
- package/lib/components/timeline/src/timeline-item.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.js +64 -0
- package/lib/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.js.map +1 -0
- package/lib/components/timeline/src/timeline-item2.js +12 -0
- package/lib/components/timeline/src/timeline-item2.js.map +1 -0
- package/lib/components/timeline/src/{index.vue.d.ts → timeline.d.ts} +3 -2
- package/lib/components/timeline/src/timeline.js +21 -0
- package/lib/components/timeline/src/timeline.js.map +1 -0
- package/lib/components/tooltip/index.d.ts +5 -4
- package/lib/components/tooltip/src/content.vue.d.ts +4 -4
- package/lib/components/tooltip/src/tooltip.vue.d.ts +5 -4
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js +1 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +2 -2
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
- package/lib/hooks/use-namespace/index.d.ts +2 -0
- package/lib/hooks/use-namespace/index.js +16 -15
- package/lib/hooks/use-namespace/index.js.map +1 -1
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/popper.scss +1 -1
- package/web-types.json +1 -1
- package/es/components/check-tag/src/index.mjs +0 -7
- package/es/components/check-tag/src/index.mjs.map +0 -1
- package/es/components/check-tag/src/index.vue.d.ts +0 -26
- package/es/components/check-tag/src/index.vue_vue_type_script_lang.mjs +0 -26
- package/es/components/check-tag/src/index.vue_vue_type_script_lang.mjs.map +0 -1
- package/es/components/check-tag/src/index.vue_vue_type_template_id_58558910_lang.mjs.map +0 -1
- package/es/components/timeline/src/index.mjs +0 -5
- package/es/components/timeline/src/index.mjs.map +0 -1
- package/es/components/timeline/src/index.vue_vue_type_script_lang.mjs +0 -17
- package/es/components/timeline/src/index.vue_vue_type_script_lang.mjs.map +0 -1
- package/es/components/timeline/src/item.mjs +0 -7
- package/es/components/timeline/src/item.mjs.map +0 -1
- package/es/components/timeline/src/item.vue.d.ts +0 -70
- package/es/components/timeline/src/item.vue_vue_type_script_lang.mjs +0 -53
- package/es/components/timeline/src/item.vue_vue_type_script_lang.mjs.map +0 -1
- package/es/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.mjs +0 -59
- package/es/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.mjs.map +0 -1
- package/lib/components/check-tag/src/index.js +0 -13
- package/lib/components/check-tag/src/index.js.map +0 -1
- package/lib/components/check-tag/src/index.vue.d.ts +0 -26
- package/lib/components/check-tag/src/index.vue_vue_type_script_lang.js.map +0 -1
- package/lib/components/check-tag/src/index.vue_vue_type_template_id_58558910_lang.js.map +0 -1
- package/lib/components/timeline/src/index.js +0 -10
- package/lib/components/timeline/src/index.js.map +0 -1
- package/lib/components/timeline/src/index.vue_vue_type_script_lang.js +0 -21
- package/lib/components/timeline/src/index.vue_vue_type_script_lang.js.map +0 -1
- package/lib/components/timeline/src/item.js +0 -12
- package/lib/components/timeline/src/item.js.map +0 -1
- package/lib/components/timeline/src/item.vue.d.ts +0 -70
- package/lib/components/timeline/src/item.vue_vue_type_script_lang.js +0 -57
- package/lib/components/timeline/src/item.vue_vue_type_script_lang.js.map +0 -1
- package/lib/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.js +0 -63
- package/lib/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.js.map +0 -1
|
@@ -103,9 +103,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
103
103
|
style: StyleValue;
|
|
104
104
|
transition: string;
|
|
105
105
|
offset: number;
|
|
106
|
-
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
107
|
-
content: string;
|
|
108
106
|
effect: string;
|
|
107
|
+
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
109
108
|
arrowOffset: number;
|
|
110
109
|
boundariesPadding: number;
|
|
111
110
|
fallbackPlacements: import("@popperjs/core").Placement[];
|
|
@@ -168,6 +167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
168
167
|
popperStyle: StyleValue;
|
|
169
168
|
referenceEl: HTMLElement;
|
|
170
169
|
stopPopperMouseEvent: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
170
|
+
content: string;
|
|
171
171
|
showAfter: number;
|
|
172
172
|
hideAfter: number;
|
|
173
173
|
appendTo: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | HTMLElement>, unknown, unknown>;
|
|
@@ -221,9 +221,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
221
221
|
style: StyleValue;
|
|
222
222
|
transition: string;
|
|
223
223
|
offset: number;
|
|
224
|
-
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
225
|
-
content: string;
|
|
226
224
|
effect: string;
|
|
225
|
+
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
227
226
|
arrowOffset: number;
|
|
228
227
|
boundariesPadding: number;
|
|
229
228
|
fallbackPlacements: import("@popperjs/core").Placement[];
|
|
@@ -286,6 +285,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
286
285
|
popperStyle: StyleValue;
|
|
287
286
|
referenceEl: HTMLElement;
|
|
288
287
|
stopPopperMouseEvent: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
288
|
+
content: string;
|
|
289
289
|
showAfter: number;
|
|
290
290
|
hideAfter: number;
|
|
291
291
|
appendTo: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | HTMLElement>, unknown, unknown>;
|
|
@@ -303,7 +303,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
303
303
|
virtualTriggering?: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown> | undefined;
|
|
304
304
|
}> & {
|
|
305
305
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
306
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "style" | "transition" | "offset" | "
|
|
306
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "style" | "transition" | "offset" | "effect" | "visible" | "arrowOffset" | "boundariesPadding" | "fallbackPlacements" | "gpuAcceleration" | "placement" | "popperOptions" | "strategy" | "className" | "enterable" | "pure" | "popperClass" | "popperStyle" | "referenceEl" | "stopPopperMouseEvent" | "content" | "showAfter" | "hideAfter" | "appendTo" | "rawContent" | "persistent" | "teleported" | "trigger" | "virtualRef" | "virtualTriggering" | "openDelay" | "visibleArrow" | "showArrow">;
|
|
307
307
|
$attrs: {
|
|
308
308
|
[x: string]: unknown;
|
|
309
309
|
};
|
|
@@ -358,9 +358,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
358
358
|
style: StyleValue;
|
|
359
359
|
transition: string;
|
|
360
360
|
offset: number;
|
|
361
|
-
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
362
|
-
content: string;
|
|
363
361
|
effect: string;
|
|
362
|
+
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
364
363
|
arrowOffset: number;
|
|
365
364
|
boundariesPadding: number;
|
|
366
365
|
fallbackPlacements: import("@popperjs/core").Placement[];
|
|
@@ -423,6 +422,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
423
422
|
popperStyle: StyleValue;
|
|
424
423
|
referenceEl: HTMLElement;
|
|
425
424
|
stopPopperMouseEvent: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
425
|
+
content: string;
|
|
426
426
|
showAfter: number;
|
|
427
427
|
hideAfter: number;
|
|
428
428
|
appendTo: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | HTMLElement>, unknown, unknown>;
|
|
@@ -482,6 +482,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
482
482
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
483
483
|
} & Readonly<{} & {} & {}> & import("vue").ShallowUnwrapRef<import("../..").ElPopperInjectionContext> & {} & {} & import("vue").ComponentCustomProperties) | null>;
|
|
484
484
|
open: import("vue").Ref<boolean>;
|
|
485
|
+
hide: () => void;
|
|
485
486
|
updatePopper: () => void;
|
|
486
487
|
onOpen: () => void;
|
|
487
488
|
onClose: () => void;
|
|
@@ -490,9 +491,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
490
491
|
style: StyleValue;
|
|
491
492
|
transition: string;
|
|
492
493
|
offset: number;
|
|
493
|
-
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
494
|
-
content: string;
|
|
495
494
|
effect: string;
|
|
495
|
+
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
496
496
|
arrowOffset: number;
|
|
497
497
|
boundariesPadding: number;
|
|
498
498
|
fallbackPlacements: import("@popperjs/core").Placement[];
|
|
@@ -555,6 +555,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
555
555
|
popperStyle: StyleValue;
|
|
556
556
|
referenceEl: HTMLElement;
|
|
557
557
|
stopPopperMouseEvent: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
558
|
+
content: string;
|
|
558
559
|
showAfter: number;
|
|
559
560
|
hideAfter: number;
|
|
560
561
|
appendTo: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | HTMLElement>, unknown, unknown>;
|
|
@@ -628,9 +629,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
628
629
|
style: StyleValue;
|
|
629
630
|
transition: string;
|
|
630
631
|
offset: number;
|
|
631
|
-
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
632
|
-
content: string;
|
|
633
632
|
effect: string;
|
|
633
|
+
visible: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<boolean | null>, unknown, unknown>;
|
|
634
634
|
arrowOffset: number;
|
|
635
635
|
boundariesPadding: number;
|
|
636
636
|
fallbackPlacements: import("@popperjs/core").Placement[];
|
|
@@ -693,6 +693,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
693
693
|
popperStyle: StyleValue;
|
|
694
694
|
referenceEl: HTMLElement;
|
|
695
695
|
stopPopperMouseEvent: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
696
|
+
content: string;
|
|
696
697
|
showAfter: number;
|
|
697
698
|
hideAfter: number;
|
|
698
699
|
appendTo: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | HTMLElement>, unknown, unknown>;
|
|
@@ -752,6 +753,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
752
753
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
753
754
|
} & Readonly<{} & {} & {}> & import("vue").ShallowUnwrapRef<import("../..").ElPopperInjectionContext> & {} & {} & import("vue").ComponentCustomProperties) | null>;
|
|
754
755
|
open: import("vue").Ref<boolean>;
|
|
756
|
+
hide: () => void;
|
|
755
757
|
updatePopper: () => void;
|
|
756
758
|
onOpen: () => void;
|
|
757
759
|
onClose: () => void;
|
|
@@ -794,6 +796,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
794
796
|
$nextTick: typeof import("vue").nextTick;
|
|
795
797
|
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
796
798
|
} & Readonly<{} & {} & {}> & import("vue").ShallowUnwrapRef<import("../..").ElPopperInjectionContext> & {} & {} & import("vue").ComponentCustomProperties) | null | undefined>;
|
|
799
|
+
hide: () => void;
|
|
797
800
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
798
801
|
title?: unknown;
|
|
799
802
|
hideAfter?: unknown;
|
|
@@ -805,7 +808,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
805
808
|
effect?: unknown;
|
|
806
809
|
} & {
|
|
807
810
|
width: import("../../../utils/props").BuildPropType<(StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
808
|
-
content: string;
|
|
809
811
|
effect: string;
|
|
810
812
|
enterable: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
811
813
|
popperClass: string | {
|
|
@@ -834,6 +836,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
834
836
|
[x: string]: any;
|
|
835
837
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
836
838
|
popperStyle: StyleValue;
|
|
839
|
+
content: string;
|
|
837
840
|
hideAfter: number;
|
|
838
841
|
} & {
|
|
839
842
|
title?: string | undefined;
|
|
@@ -841,7 +844,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
841
844
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
842
845
|
}, {
|
|
843
846
|
width: import("../../../utils/props").BuildPropType<(StringConstructor | NumberConstructor)[], unknown, unknown>;
|
|
844
|
-
content: string;
|
|
845
847
|
effect: string;
|
|
846
848
|
enterable: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
847
849
|
popperClass: string | {
|
|
@@ -870,6 +872,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
870
872
|
[x: string]: any;
|
|
871
873
|
} | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
872
874
|
popperStyle: StyleValue;
|
|
875
|
+
content: string;
|
|
873
876
|
hideAfter: number;
|
|
874
877
|
}>;
|
|
875
878
|
export default _default;
|
|
@@ -44,11 +44,16 @@ var script = vue.defineComponent({
|
|
|
44
44
|
props.popperClass
|
|
45
45
|
];
|
|
46
46
|
});
|
|
47
|
+
const hide = () => {
|
|
48
|
+
var _a;
|
|
49
|
+
(_a = tooltipRef.value) == null ? void 0 : _a.hide();
|
|
50
|
+
};
|
|
47
51
|
return {
|
|
48
52
|
kls,
|
|
49
53
|
style,
|
|
50
54
|
tooltipRef,
|
|
51
|
-
popperRef
|
|
55
|
+
popperRef,
|
|
56
|
+
hide
|
|
52
57
|
};
|
|
53
58
|
}
|
|
54
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/popover/src/index.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n persistent\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" class=\"el-popover__title\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, computed, ref, unref } from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { isString } from '@element-plus/utils/util'\nimport { usePopoverProps } from './popover'\n\nimport type { StyleValue } from 'vue'\n\nconst emits = ['update:visible', 'after-enter', 'after-leave']\n\nconst NAME = 'ElPopover'\n\nexport default defineComponent({\n name: NAME,\n components: {\n ElTooltip,\n },\n props: usePopoverProps,\n emits,\n setup(props) {\n const tooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n })\n const width = computed(() => {\n if (isString(props.width)) {\n return props.width as string\n }\n return `${props.width}px`\n })\n\n const style = computed(() => {\n return [\n {\n width: width.value,\n },\n props.popperStyle,\n ] as StyleValue\n })\n\n const kls = computed(() => {\n return [\n { 'el-popover--plain': !!props.content },\n 'el-popover',\n props.popperClass,\n ]\n })\n\n return {\n kls,\n style,\n tooltipRef,\n popperRef,\n }\n },\n})\n</script>\n"],"names":["defineComponent","unref","isString","computed"],"mappings":";;;;;;;;;;AA6BA,WAAW,GAAG,CAAC,kBAAkB;;AAEjC,aAAeA,mBAAe;;AAE9B,EAAE,UAAU,EAAE;;AAEd,GAAG;;AAEH,EAAE,KAAK;EACL,MAAM;IACJ,MAAM;IACN,MAAM;;MAEJ,OAAO,CAAC,EAAE,GAAGC,SAAK;KACnB,CAAC,CAAC;IACH,MAAM,KAAK;MACT,IAAIC,eAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK,MAAM,CAAC;OACpB;;KAEF,CAAC,CAAC;UACG,KAAK,GAAGC,YAAQ,CAAC,MAAM;aACpB;;UAEH,KAAK,EAAE,KAAK,CAAC,KAAK;;;OAGrB,CAAC;MACF,CAAC;;aAEM;QACL;QACA,YAAY;QACZ,KAAK,CAAC;;;IAGV,
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/popover/src/index.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n persistent\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" class=\"el-popover__title\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, computed, ref, unref } from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { isString } from '@element-plus/utils/util'\nimport { usePopoverProps } from './popover'\n\nimport type { StyleValue } from 'vue'\n\nconst emits = ['update:visible', 'after-enter', 'after-leave']\n\nconst NAME = 'ElPopover'\n\nexport default defineComponent({\n name: NAME,\n components: {\n ElTooltip,\n },\n props: usePopoverProps,\n emits,\n setup(props) {\n const tooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n })\n const width = computed(() => {\n if (isString(props.width)) {\n return props.width as string\n }\n return `${props.width}px`\n })\n\n const style = computed(() => {\n return [\n {\n width: width.value,\n },\n props.popperStyle,\n ] as StyleValue\n })\n\n const kls = computed(() => {\n return [\n { 'el-popover--plain': !!props.content },\n 'el-popover',\n props.popperClass,\n ]\n })\n\n const hide = () => {\n tooltipRef.value?.hide()\n }\n\n return {\n kls,\n style,\n tooltipRef,\n popperRef,\n hide,\n }\n },\n})\n</script>\n"],"names":["defineComponent","unref","isString","computed"],"mappings":";;;;;;;;;;AA6BA,WAAW,GAAG,CAAC,kBAAkB;;AAEjC,aAAeA,mBAAe;;AAE9B,EAAE,UAAU,EAAE;;AAEd,GAAG;;AAEH,EAAE,KAAK;EACL,MAAM;IACJ,MAAM;IACN,MAAM;;MAEJ,OAAO,CAAC,EAAE,GAAGC,SAAK;KACnB,CAAC,CAAC;IACH,MAAM,KAAK;MACT,IAAIC,eAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK,MAAM,CAAC;OACpB;;KAEF,CAAC,CAAC;UACG,KAAK,GAAGC,YAAQ,CAAC,MAAM;aACpB;;UAEH,KAAK,EAAE,KAAK,CAAC,KAAK;;;OAGrB,CAAC;MACF,CAAC;;aAEM;QACL;QACA,YAAY;QACZ,KAAK,CAAC;;;IAGV,MAAM,IAAI,GAAG,MAAM;MACjB,IAAI,GAAG;YACD,UAAU,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK;;WAElC;MACL;;;MAGA,SAAS;MACT,IAAI;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_template_id_15486cf0_lang.js","sources":["../../../../../../packages/components/popover/src/index.vue?vue&type=template&id=15486cf0&lang.js"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n persistent\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" class=\"el-popover__title\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, computed, ref, unref } from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { isString } from '@element-plus/utils/util'\nimport { usePopoverProps } from './popover'\n\nimport type { StyleValue } from 'vue'\n\nconst emits = ['update:visible', 'after-enter', 'after-leave']\n\nconst NAME = 'ElPopover'\n\nexport default defineComponent({\n name: NAME,\n components: {\n ElTooltip,\n },\n props: usePopoverProps,\n emits,\n setup(props) {\n const tooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n })\n const width = computed(() => {\n if (isString(props.width)) {\n return props.width as string\n }\n return `${props.width}px`\n })\n\n const style = computed(() => {\n return [\n {\n width: width.value,\n },\n props.popperStyle,\n ] as StyleValue\n })\n\n const kls = computed(() => {\n return [\n { 'el-popover--plain': !!props.content },\n 'el-popover',\n props.popperClass,\n ]\n })\n\n return {\n kls,\n style,\n tooltipRef,\n popperRef,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;EAgBwB;EAA0B;;;;;;;IAZ7C,cAAY,UAAK;IACjB;IACA;IACA;IACA;gBACD;;;OAOa;;;MAGX,2CAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_template_id_15486cf0_lang.js","sources":["../../../../../../packages/components/popover/src/index.vue?vue&type=template&id=15486cf0&lang.js"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"tooltipRef\"\n v-bind=\"$attrs\"\n :aria-label=\"title\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :popper-class=\"kls\"\n :popper-style=\"style\"\n persistent\n >\n <template v-if=\"$slots.reference\">\n <slot name=\"reference\" />\n </template>\n\n <template #content>\n <div v-if=\"title\" class=\"el-popover__title\" role=\"title\">\n {{ title }}\n </div>\n <slot>\n {{ content }}\n </slot>\n </template>\n </el-tooltip>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, computed, ref, unref } from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { isString } from '@element-plus/utils/util'\nimport { usePopoverProps } from './popover'\n\nimport type { StyleValue } from 'vue'\n\nconst emits = ['update:visible', 'after-enter', 'after-leave']\n\nconst NAME = 'ElPopover'\n\nexport default defineComponent({\n name: NAME,\n components: {\n ElTooltip,\n },\n props: usePopoverProps,\n emits,\n setup(props) {\n const tooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)\n const popperRef = computed(() => {\n return unref(tooltipRef)?.popperRef\n })\n const width = computed(() => {\n if (isString(props.width)) {\n return props.width as string\n }\n return `${props.width}px`\n })\n\n const style = computed(() => {\n return [\n {\n width: width.value,\n },\n props.popperStyle,\n ] as StyleValue\n })\n\n const kls = computed(() => {\n return [\n { 'el-popover--plain': !!props.content },\n 'el-popover',\n props.popperClass,\n ]\n })\n\n const hide = () => {\n tooltipRef.value?.hide()\n }\n\n return {\n kls,\n style,\n tooltipRef,\n popperRef,\n hide,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;EAgBwB;EAA0B;;;;;;;IAZ7C,cAAY,UAAK;IACjB;IACA;IACA;IACA;gBACD;;;OAOa;;;MAGX,2CAAA;;;;;;;;"}
|
|
@@ -18,6 +18,17 @@ export declare const ElRate: import("../../utils/types").SFCWithInstall<import("
|
|
|
18
18
|
readonly scoreTemplate: import("../../utils/props").BuildPropReturn<StringConstructor, "{value}", unknown, unknown, unknown>;
|
|
19
19
|
readonly size: import("../../utils/props").BuildPropReturn<(new (...args: any[]) => import("../../utils/types").ComponentSize & {}) | (() => import("../../utils/types").ComponentSize) | ((new (...args: any[]) => import("../../utils/types").ComponentSize & {}) | (() => import("../../utils/types").ComponentSize))[], unknown, unknown, unknown, unknown>;
|
|
20
20
|
}, {
|
|
21
|
+
ns: {
|
|
22
|
+
namespace: import("vue").ComputedRef<string>;
|
|
23
|
+
b: (blockSuffix?: string) => string;
|
|
24
|
+
e: (element?: string | undefined) => string;
|
|
25
|
+
m: (modifier?: string | undefined) => string;
|
|
26
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
27
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
28
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
29
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
30
|
+
is: (name: string, state?: boolean) => string;
|
|
31
|
+
};
|
|
21
32
|
hoverIndex: import("vue").Ref<number>;
|
|
22
33
|
currentValue: import("vue").Ref<number>;
|
|
23
34
|
rateDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentSize } from 'element-plus/es/utils/types';
|
|
2
2
|
import type { Component, ExtractPropTypes } from 'vue';
|
|
3
|
+
import type Rate from './rate.vue';
|
|
3
4
|
export declare const rateProps: {
|
|
4
5
|
readonly modelValue: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
|
|
5
6
|
readonly lowThreshold: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, 2, unknown, unknown, unknown>;
|
|
@@ -26,3 +27,4 @@ export declare const rateEmits: {
|
|
|
26
27
|
"update:modelValue": (value: number) => boolean;
|
|
27
28
|
};
|
|
28
29
|
export declare type RateEmits = typeof rateEmits;
|
|
30
|
+
export declare type RateInstance = InstanceType<typeof Rate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate.js","sources":["../../../../../../packages/components/rate/src/rate.ts"],"sourcesContent":["import { Star, StarFilled } from '@element-plus/icons-vue'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils/props'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type { Component, ExtractPropTypes, PropType } from 'vue'\n\nexport const rateProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n lowThreshold: {\n type: Number,\n default: 2,\n },\n highThreshold: {\n type: Number,\n default: 4,\n },\n max: {\n type: Number,\n default: 5,\n },\n colors: {\n type: definePropType<string[] | Record<number, string>>([Array, Object]),\n default: () => mutable(['#F7BA2A', '#F7BA2A', '#F7BA2A'] as const),\n },\n voidColor: {\n type: String,\n default: '#C6D1DE',\n },\n disabledVoidColor: {\n type: String,\n default: '#EFF2F7',\n },\n icons: {\n type: definePropType<\n Array<string | Component> | Record<number, string | Component>\n >([Array, Object]),\n default: () => [StarFilled, StarFilled, StarFilled],\n },\n voidIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Star,\n },\n disabledvoidIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => StarFilled,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n allowHalf: {\n type: Boolean,\n default: false,\n },\n showText: {\n type: Boolean,\n default: false,\n },\n showScore: {\n type: Boolean,\n default: false,\n },\n textColor: {\n type: String,\n default: '#1f2d3d',\n },\n texts: {\n type: definePropType<string[]>(
|
|
1
|
+
{"version":3,"file":"rate.js","sources":["../../../../../../packages/components/rate/src/rate.ts"],"sourcesContent":["import { Star, StarFilled } from '@element-plus/icons-vue'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils/props'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type { Component, ExtractPropTypes, PropType } from 'vue'\nimport type Rate from './rate.vue'\n\nexport const rateProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n lowThreshold: {\n type: Number,\n default: 2,\n },\n highThreshold: {\n type: Number,\n default: 4,\n },\n max: {\n type: Number,\n default: 5,\n },\n colors: {\n type: definePropType<string[] | Record<number, string>>([Array, Object]),\n default: () => mutable(['#F7BA2A', '#F7BA2A', '#F7BA2A'] as const),\n },\n voidColor: {\n type: String,\n default: '#C6D1DE',\n },\n disabledVoidColor: {\n type: String,\n default: '#EFF2F7',\n },\n icons: {\n type: definePropType<\n Array<string | Component> | Record<number, string | Component>\n >([Array, Object]),\n default: () => [StarFilled, StarFilled, StarFilled],\n },\n voidIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => Star,\n },\n disabledvoidIcon: {\n type: definePropType<string | Component>([String, Object]),\n default: () => StarFilled,\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n allowHalf: {\n type: Boolean,\n default: false,\n },\n showText: {\n type: Boolean,\n default: false,\n },\n showScore: {\n type: Boolean,\n default: false,\n },\n textColor: {\n type: String,\n default: '#1f2d3d',\n },\n texts: {\n type: definePropType<string[]>(Array),\n default: () =>\n mutable([\n 'Extremely bad',\n 'Disappointed',\n 'Fair',\n 'Satisfied',\n 'Surprise',\n ] as const),\n },\n scoreTemplate: {\n type: String,\n default: '{value}',\n },\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n} as const)\n\nexport type RateProps = ExtractPropTypes<typeof rateProps>\n\nexport const rateEmits = {\n change: (value: number) => typeof value === 'number',\n [UPDATE_MODEL_EVENT]: (value: number) => typeof value === 'number',\n}\nexport type RateEmits = typeof rateEmits\n\nexport type RateInstance = InstanceType<typeof Rate>\n"],"names":["buildProps","definePropType","mutable","StarFilled","Star","isValidComponentSize","UPDATE_MODEL_EVENT"],"mappings":"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"}
|
|
@@ -18,6 +18,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
readonly scoreTemplate: import("../../../utils/props").BuildPropReturn<StringConstructor, "{value}", unknown, unknown, unknown>;
|
|
19
19
|
readonly size: import("../../../utils/props").BuildPropReturn<(new (...args: any[]) => import("../../../utils/types").ComponentSize & {}) | (() => import("../../../utils/types").ComponentSize) | ((new (...args: any[]) => import("../../../utils/types").ComponentSize & {}) | (() => import("../../../utils/types").ComponentSize))[], unknown, unknown, unknown, unknown>;
|
|
20
20
|
}, {
|
|
21
|
+
ns: {
|
|
22
|
+
namespace: import("vue").ComputedRef<string>;
|
|
23
|
+
b: (blockSuffix?: string) => string;
|
|
24
|
+
e: (element?: string | undefined) => string;
|
|
25
|
+
m: (modifier?: string | undefined) => string;
|
|
26
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
27
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
28
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
29
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
30
|
+
is: (name: string, state?: boolean) => string;
|
|
31
|
+
};
|
|
21
32
|
hoverIndex: import("vue").Ref<number>;
|
|
22
33
|
currentValue: import("vue").Ref<number>;
|
|
23
34
|
rateDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
@@ -14,6 +14,7 @@ require('../../../hooks/index.js');
|
|
|
14
14
|
var rate = require('./rate.js');
|
|
15
15
|
var form = require('../../../tokens/form.js');
|
|
16
16
|
var index$1 = require('../../../hooks/use-common-props/index.js');
|
|
17
|
+
var index$2 = require('../../../hooks/use-namespace/index.js');
|
|
17
18
|
|
|
18
19
|
function getValueFromMap(value, map) {
|
|
19
20
|
const isExcludedObject = (val) => shared.isObject(val);
|
|
@@ -37,11 +38,11 @@ var script = vue.defineComponent({
|
|
|
37
38
|
setup(props, { emit }) {
|
|
38
39
|
const elForm = vue.inject(form.elFormKey, {});
|
|
39
40
|
const rateSize = index$1.useSize();
|
|
41
|
+
const ns = index$2.useNamespace("rate");
|
|
40
42
|
const currentValue = vue.ref(props.modelValue);
|
|
41
43
|
const hoverIndex = vue.ref(-1);
|
|
42
44
|
const pointerAtLeftHalf = vue.ref(true);
|
|
43
|
-
const
|
|
44
|
-
const rateKls = vue.computed(() => [prefix, `${prefix}--${rateSize.value}`]);
|
|
45
|
+
const rateKls = vue.computed(() => [ns.b(), ns.m(rateSize.value)]);
|
|
45
46
|
const rateDisabled = vue.computed(() => props.disabled || elForm.disabled);
|
|
46
47
|
const text = vue.computed(() => {
|
|
47
48
|
let result = "";
|
|
@@ -151,10 +152,10 @@ var script = vue.defineComponent({
|
|
|
151
152
|
}
|
|
152
153
|
if (props.allowHalf) {
|
|
153
154
|
let target = event.target;
|
|
154
|
-
if (dom.hasClass(target, "
|
|
155
|
-
target = target.querySelector(
|
|
155
|
+
if (dom.hasClass(target, ns.e("item"))) {
|
|
156
|
+
target = target.querySelector(`.${ns.e("icon")}`);
|
|
156
157
|
}
|
|
157
|
-
if (target.clientWidth === 0 || dom.hasClass(target, "
|
|
158
|
+
if (target.clientWidth === 0 || dom.hasClass(target, ns.e("decimal"))) {
|
|
158
159
|
target = target.parentNode;
|
|
159
160
|
}
|
|
160
161
|
pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth;
|
|
@@ -182,6 +183,7 @@ var script = vue.defineComponent({
|
|
|
182
183
|
emit(constants.UPDATE_MODEL_EVENT, 0);
|
|
183
184
|
}
|
|
184
185
|
return {
|
|
186
|
+
ns,
|
|
185
187
|
hoverIndex,
|
|
186
188
|
currentValue,
|
|
187
189
|
rateDisabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/rate/src/rate.vue"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n class=\"el-rate__item\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[{ hover: hoverIndex === item }]\"\n class=\"el-rate__icon\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n class=\"el-rate__icon el-rate__decimal\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n class=\"el-rate__text\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n\n const rateSize = useSize()\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const prefix = 'el-rate'\n const rateKls = computed(() => [prefix, `${prefix}--${rateSize.value}`])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n let target = event.target as HTMLElement\n if (hasClass(target, 'el-rate__item')) {\n target = target.querySelector('.el-rate__icon')!\n }\n if (target.clientWidth === 0 || hasClass(target, 'el-rate__decimal')) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ElIcon","StarFilled","rateProps","inject","elFormKey","useSize","ref","computed","isArray","UPDATE_MODEL_EVENT","EVENT_CODE"],"mappings":";;;;;;;;;;;;;;;;;AAsDA,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE;AACrC,EAAE,sBAAsB,GAAG,CAAC,uBAAgB;AAC5C,EAAE,MAAM,WAAW,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG;;AAExD,IAAI,MAAM,QAAQ,GAAG;IACjB,OAAO;GACR,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE;AAC1B,EAAE;EACA,OAAO,gBAAgB;;aAEVA,mBAAe,CAAC;;EAE7B,UAAU,EAAE;YACVC,YAAM;gBACNC,mBAAU;uBACN;;OAED,EAAEC,cAAS;;OAEX,CAAC,OAAO,EAAE,QAAQ;IACrB,MAAM,MAAM,GAAGC,UAAM,CAACC,cAAS,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAGC,eAAO,EAAE,CAAC;AAC/B;;AAEA,IAAI,MAAM,iBAAiB,GAAGC;IAC1B,MAAM,MAAM;IACZ,MAAM;IACN,MAAM;IACN,MAAM,IAAI;MACR;;cAEQ,GAAG;OACV,MAAM,IAAI;;OAEV;MACD,OAAO,MAAM,CAAC;;IAEhB,MAAM,YAAY,GAAGC;IACrB,MAAM,QAAQ,GAAGA,YAAQ,CAAC,MAAMC,cAAO,CAAC;MACtC,CAAC,KAAK,CAAC,YAAY,GAAG;MACtB,CAAC,KAAK,CAAC,aAAa,KAAK,KAAK,EAAE;;KAEjC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClB,MAAM,WAAW,GAAGD,YAAQ,CAAC,MAAM,eAAe,CAAC,YAAY,CAAC,KAAK,EAAE;;MAErE,IAAI,KAAK,GAAG,EAAE,CAAC;MACf,IAAI,YAAY,CAAC,OAAO;QACtB,KAAK,IAAI,EAAE;OACZ,MAAM,IAAI,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC;;aAET;QACL;QACA,KAAK;QACL;MACF;UACI;;MAEJ,CAAC,KAAK,CAAC,aAAa,GAAG;aAChB,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE;;OAEtB;MACD,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC;QACjB;8BACsB,eAAW,CAAC,MAAM;uBACzB,GAAGA,aAAS,MAAM,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;yBAC3C,GAAGA,YAAQ,CAAC;UAC3B;YACE,MAAM,GAAG;;MAEf,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;MAC5B,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC;;KAEnD,CAAC,CAAC;aACM;MACP,MAAM,gBAAgB;YAChB,iBAAiB,GAAG,KAAK,CAAC;MAChC,OAAO,gBAAgB;;;MAGvB;aACO;QACL,KAAK;;KAER;IACD,SAAS,YAAY,KAAK,EAAE;MAC1B,IAAI,YAAY,CAAC;QACf;;eAEO,CAAC,SAAS,IAAI;yCACE,EAAE;iBAChB,CAAC,UAAU;;;;QAIpB,IAAI,CAACE;;UAEH,IAAI,CAAC,QAAQ,EAAE,MAAM;SACtB;;KAEJ;aACQ,SAAS,CAAC;;QAEf,OAAO;OACR;;MAED,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI;MACnB,IAAI,IAAI,KAAKC,eAAU,CAAC,EAAE,IAAI;QAC5B,IAAI,KAAK,CAAC,SAAS,EAAE;UACnB,aAAa,IAAI,GAAG,CAAC;SACtB,MAAM;UACL;;;QAGF,CAAC,CAAC,cAAc,EAAE,CAAC;OACpB,MAAM,IAAI,IAAI,KAAKA;QAClB,IAAI,KAAK,CAAC,SAAS;UACjB,aAAa,IAAI,IAAI;SACtB,MAAM;UACL,aAAa,IAAI,CAAC,CAAC;SACpB;QACD,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,cAAc,EAAE,CAAC;;mBAER,GAAG;MAChB,aAAa,GAAG,aAAa,GAAG,KAAK,CAAC,GAAG;;;MAGzC,OAAO,aAAa,CAAC;;aAEd,eAAe,CAAC;UACnB,YAAY,CAAC;QACf;;MAEF;;;UAGI,MAAM,GAAG,MAAM,CAAC,cAAc;SAC/B;QACD,IAAI;;SAEH;QACD,iBAAiB,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC;QAC3C,YAAY,CAAC,KAAK,GAAG,iBAAiB,CAAC;aAClC;QACL;;gBAEQ,CAAC,KAAK,GAAG,KAAK,CAAC;;aAElB,iBAAiB;;;;;QAKtB,kBAAkB,KAAK,GAAG,KAAK;OAChC;;MAED;;aAEG,CAAC,WAAW,CAAC;MAChB,aAAa,KAAK,GAAG,GAAG,CAAC;uBACR,CAAC,KAAK;;QAErB,OAAO;UACL,CAACD;;WAEA;gBACK;MACV,YAAY;kBACA;UACR;;;;aAIG;qBACQ;MACf;MACA,WAAW;MACX,SAAS;MACT,eAAe;MACf,iBAAiB;MACjB;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rate.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/rate/src/rate.vue"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n :class=\"ns.e('item')\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[ns.e('icon'), { hover: hoverIndex === item }]\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n :class=\"[ns.e('icon'), ns.e('decimal')]\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n :class=\"ns.e('text')\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useNamespace, useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n const rateSize = useSize()\n const ns = useNamespace('rate')\n\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const rateKls = computed(() => [ns.b(), ns.m(rateSize.value)])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n // TODO: use cache via computed https://github.com/element-plus/element-plus/pull/5456#discussion_r786472092\n let target = event.target as HTMLElement\n if (hasClass(target, ns.e('item'))) {\n target = target.querySelector(`.${ns.e('icon')}`)!\n }\n if (target.clientWidth === 0 || hasClass(target, ns.e('decimal'))) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n ns,\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ElIcon","StarFilled","rateProps","inject","elFormKey","useSize","ref","computed","UPDATE_MODEL_EVENT","EVENT_CODE"],"mappings":";;;;;;;;;;;;;;;;;;AAqDA,SAAS,eAAe,CAAC,UAAU;AACnC,EAAE,sBAAsB,GAAG,CAAC,uBAAgB;AAC5C,EAAE,MAAM,WAAW,GAAG,MAAM,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG;;AAExD,IAAI,MAAM,QAAQ,GAAG;IACjB,OAAO;GACR,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE;AAC1B,EAAE;EACA,OAAO,gBAAgB;;aAEVA,mBAAe,CAAC;;EAE7B,UAAU,EAAE;YACVC,YAAM;gBACNC,mBAAU;uBACN;;OAED,EAAEC,cAAS;;OAEX,CAAC,OAAO,EAAE,QAAQ;IACrB,MAAM,MAAM,GAAGC,UAAM,CAACC,cAAS,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAGC,eAAO,EAAE,CAAC;AAC/B;;AAEA,IAAI,MAAM,UAAU,GAAGC,OAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM,IAAI;MACR;;cAEQ,GAAG;OACV,MAAM,IAAI;;OAEV;MACD,OAAO,MAAM,CAAC;KACf,CAAC,CAAC;IACH,MAAM,YAAY,GAAGC,YAAQ,CAAC;;MAE5B,CAAC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;MACrC,CAAC,KAAK,CAAC,aAAa,GAAG;MACvB,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;;IAE9B,MAAM,WAAW,GAAGA,YAAQ,CAAC,MAAM,eAAe,CAAC;;MAEjD,IAAI,KAAK,GAAG,EAAE,CAAC;MACf,IAAI,YAAY,CAAC,OAAO;QACtB,KAAK,IAAI,EAAE;OACZ,MAAM,IAAI,KAAK,CAAC;QACf,KAAK,QAAQ,CAAC;;aAET;QACL;QACA,KAAK;QACL;MACF;UACI;;MAEJ,CAAC,KAAK,CAAC,aAAa,GAAG;aAChB,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE;;OAEtB;MACD,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC;QACjB;8BACsB,eAAW,CAAC,MAAM;uBACzB,GAAGA,aAAS,MAAM,YAAY,CAAC,KAAK,GAAG,KAAK,CAAC;yBAC3C,GAAGA,YAAQ,CAAC;UAC3B;YACE,MAAM,GAAG;;MAEf,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;MAC5B,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC;;KAEnD,CAAC,CAAC;aACM;MACP,MAAM,gBAAgB;YAChB,iBAAiB,GAAG,KAAK,CAAC;MAChC,OAAO,gBAAgB;;;MAGvB;aACO;QACL,KAAK;;KAER;IACD,SAAS,YAAY,KAAK,EAAE;MAC1B,IAAI,YAAY,CAAC;QACf;;eAEO,CAAC,SAAS,IAAI;yCACE,EAAE;iBAChB,CAAC,UAAU;;;;QAIpB,IAAI,CAACC;;UAEH,IAAI,CAAC,QAAQ,EAAE,MAAM;SACtB;;KAEJ;aACQ,SAAS,CAAC;;QAEf,OAAO;OACR;;MAED,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI;MACnB,IAAI,IAAI,KAAKC,eAAU,CAAC,EAAE,IAAI;QAC5B,IAAI,KAAK,CAAC,SAAS,EAAE;UACnB,aAAa,IAAI,GAAG,CAAC;SACtB,MAAM;UACL;;;QAGF,CAAC,CAAC,cAAc,EAAE,CAAC;OACpB,MAAM,IAAI,IAAI,KAAKA;QAClB,IAAI,KAAK,CAAC,SAAS;UACjB,aAAa,IAAI,IAAI;SACtB,MAAM;UACL,aAAa,IAAI,CAAC,CAAC;SACpB;QACD,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,cAAc,EAAE,CAAC;;mBAER,GAAG;MAChB,aAAa,GAAG,aAAa,GAAG,KAAK,CAAC,GAAG;;;MAGzC,OAAO,aAAa,CAAC;;aAEd,eAAe,CAAC;UACnB,YAAY,CAAC;QACf;;MAEF;;;UAGI,MAAM,GAAG,MAAM,CAAC,cAAc;SAC/B;QACD,IAAI;;SAEH;QACD,iBAAiB,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC;QAC3C,YAAY,CAAC,KAAK,GAAG,iBAAiB,CAAC;aAClC;QACL;;gBAEQ,CAAC,KAAK,GAAG,KAAK,CAAC;;aAElB,iBAAiB;;;;;QAKtB,kBAAkB,KAAK,GAAG,KAAK;OAChC;;MAED;;aAEG,CAAC,WAAW,CAAC;MAChB,aAAa,KAAK,GAAG,GAAG,CAAC;uBACR,CAAC,KAAK;;QAErB,OAAO;UACL,CAACD;;WAEA;QACH;MACF,UAAU;kBACE;kBACA;UACR;kBACQ;;oBAEE;aACP;MACP;MACA,YAAY;MACZ,WAAW;MACX,SAAS;MACT,eAAe;MACf,iBAAiB;;;;;;;"}
|
|
@@ -21,14 +21,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
21
21
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.max, (item, key) => {
|
|
22
22
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
23
23
|
key,
|
|
24
|
-
class: "
|
|
24
|
+
class: vue.normalizeClass(_ctx.ns.e("item")),
|
|
25
25
|
style: vue.normalizeStyle({ cursor: _ctx.rateDisabled ? "auto" : "pointer" }),
|
|
26
26
|
onMousemove: ($event) => _ctx.setCurrentValue(item, $event),
|
|
27
27
|
onMouseleave: _cache[0] || (_cache[0] = (...args) => _ctx.resetCurrentValue && _ctx.resetCurrentValue(...args)),
|
|
28
28
|
onClick: ($event) => _ctx.selectValue(item)
|
|
29
29
|
}, [
|
|
30
30
|
vue.createVNode(_component_el_icon, {
|
|
31
|
-
class: vue.normalizeClass([
|
|
31
|
+
class: vue.normalizeClass([_ctx.ns.e("icon"), { hover: _ctx.hoverIndex === item }]),
|
|
32
32
|
style: vue.normalizeStyle(_ctx.getIconStyle(item))
|
|
33
33
|
}, {
|
|
34
34
|
default: vue.withCtx(() => [
|
|
@@ -36,23 +36,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36
36
|
_ctx.showDecimalIcon(item) ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
37
37
|
key: 0,
|
|
38
38
|
style: vue.normalizeStyle(_ctx.decimalStyle),
|
|
39
|
-
class: "
|
|
39
|
+
class: vue.normalizeClass([_ctx.ns.e("icon"), _ctx.ns.e("decimal")])
|
|
40
40
|
}, {
|
|
41
41
|
default: vue.withCtx(() => [
|
|
42
42
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.decimalIconComponent)))
|
|
43
43
|
]),
|
|
44
44
|
_: 1
|
|
45
|
-
}, 8, ["style"])) : vue.createCommentVNode("v-if", true)
|
|
45
|
+
}, 8, ["style", "class"])) : vue.createCommentVNode("v-if", true)
|
|
46
46
|
]),
|
|
47
47
|
_: 2
|
|
48
48
|
}, 1032, ["class", "style"])
|
|
49
|
-
],
|
|
49
|
+
], 46, _hoisted_2);
|
|
50
50
|
}), 128)),
|
|
51
51
|
_ctx.showText || _ctx.showScore ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
52
52
|
key: 0,
|
|
53
|
-
class: "
|
|
53
|
+
class: vue.normalizeClass(_ctx.ns.e("text")),
|
|
54
54
|
style: vue.normalizeStyle({ color: _ctx.textColor })
|
|
55
|
-
}, vue.toDisplayString(_ctx.text),
|
|
55
|
+
}, vue.toDisplayString(_ctx.text), 7)) : vue.createCommentVNode("v-if", true)
|
|
56
56
|
], 42, _hoisted_1);
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate.vue_vue_type_template_id_38c42df6_lang.js","sources":["../../../../../../packages/components/rate/src/rate.vue?vue&type=template&id=38c42df6&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n class=\"
|
|
1
|
+
{"version":3,"file":"rate.vue_vue_type_template_id_38c42df6_lang.js","sources":["../../../../../../packages/components/rate/src/rate.vue?vue&type=template&id=38c42df6&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n :class=\"ns.e('item')\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[ns.e('icon'), { hover: hoverIndex === item }]\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n :class=\"[ns.e('icon'), ns.e('decimal')]\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n :class=\"ns.e('text')\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useNamespace, useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n const rateSize = useSize()\n const ns = useNamespace('rate')\n\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const rateKls = computed(() => [ns.b(), ns.m(rateSize.value)])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n // TODO: use cache via computed https://github.com/element-plus/element-plus/pull/5456#discussion_r786472092\n let target = event.target as HTMLElement\n if (hasClass(target, ns.e('item'))) {\n target = target.querySelector(`.${ns.e('icon')}`)!\n }\n if (target.clientWidth === 0 || hasClass(target, ns.e('decimal'))) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n ns,\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":["_openBlock","_createVNode"],"mappings":";;;;;;;;;;;;;;IAEK,uBAAO;IACR;IACC,eAAa,EAAE;IACf;IACD,iBAAc;;;aAGNA,gDAAE;;;;QAIP;QACA,uBAAO;QACP;;QAEAC,eAAU;eACL,gCAAa;;;UAGhB,2BAAQ;;;;;yCAKmB;;;;;;oCAI1B;;;;;;;;;;;KAKE;;;;;"}
|
|
@@ -3,6 +3,17 @@ export declare const ElResult: import("../../utils/types").SFCWithInstall<import
|
|
|
3
3
|
readonly subTitle: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
4
4
|
readonly icon: import("../../utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
|
|
5
5
|
}, {
|
|
6
|
+
ns: {
|
|
7
|
+
namespace: import("vue").ComputedRef<string>;
|
|
8
|
+
b: (blockSuffix?: string) => string;
|
|
9
|
+
e: (element?: string | undefined) => string;
|
|
10
|
+
m: (modifier?: string | undefined) => string;
|
|
11
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
12
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
13
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
14
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
15
|
+
is: (name: string, state?: boolean) => string;
|
|
16
|
+
};
|
|
6
17
|
resultIcon: import("vue").ComputedRef<{
|
|
7
18
|
class: "icon-success" | "icon-warning" | "icon-error" | "icon-info";
|
|
8
19
|
component: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Component, ExtractPropTypes } from 'vue';
|
|
2
|
+
import type Result from './result.vue';
|
|
2
3
|
export declare const IconMap: {
|
|
3
4
|
readonly success: "icon-success";
|
|
4
5
|
readonly warning: "icon-warning";
|
|
@@ -12,3 +13,4 @@ export declare const resultProps: {
|
|
|
12
13
|
readonly icon: import("element-plus/es/utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
|
|
13
14
|
};
|
|
14
15
|
export declare type ResultProps = ExtractPropTypes<typeof resultProps>;
|
|
16
|
+
export declare type ResultInstance = InstanceType<typeof Result>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport {\n WarningFilled,\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n subTitle: {\n type: String,\n default: '',\n },\n icon: {\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n"],"names":["CircleCheckFilled","WarningFilled","CircleCloseFilled","InfoFilled","buildProps"],"mappings":";;;;;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGA,0BAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,sBAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAGC,0BAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAGC,mBAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAGC,gBAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"result.js","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport {\n WarningFilled,\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n subTitle: {\n type: String,\n default: '',\n },\n icon: {\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":["CircleCheckFilled","WarningFilled","CircleCloseFilled","InfoFilled","buildProps"],"mappings":";;;;;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGA,0BAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,sBAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAGC,0BAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAGC,mBAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAGC,gBAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;;;"}
|
|
@@ -3,6 +3,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
readonly subTitle: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
4
4
|
readonly icon: import("../../../utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
|
|
5
5
|
}, {
|
|
6
|
+
ns: {
|
|
7
|
+
namespace: import("vue").ComputedRef<string>;
|
|
8
|
+
b: (blockSuffix?: string) => string;
|
|
9
|
+
e: (element?: string | undefined) => string;
|
|
10
|
+
m: (modifier?: string | undefined) => string;
|
|
11
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
12
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
13
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
14
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
15
|
+
is: (name: string, state?: boolean) => string;
|
|
16
|
+
};
|
|
6
17
|
resultIcon: import("vue").ComputedRef<{
|
|
7
18
|
class: "icon-success" | "icon-warning" | "icon-error" | "icon-info";
|
|
8
19
|
component: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
|
+
require('../../../hooks/index.js');
|
|
6
7
|
var result = require('./result.js');
|
|
8
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
9
|
|
|
8
10
|
var script = vue.defineComponent({
|
|
9
11
|
name: "ElResult",
|
|
10
12
|
props: result.resultProps,
|
|
11
13
|
setup(props) {
|
|
14
|
+
const ns = index.useNamespace("result");
|
|
12
15
|
const resultIcon = vue.computed(() => {
|
|
13
16
|
const icon = props.icon;
|
|
14
17
|
const iconClass = icon && result.IconMap[icon] ? result.IconMap[icon] : "icon-info";
|
|
@@ -19,6 +22,7 @@ var script = vue.defineComponent({
|
|
|
19
22
|
};
|
|
20
23
|
});
|
|
21
24
|
return {
|
|
25
|
+
ns,
|
|
22
26
|
resultIcon
|
|
23
27
|
};
|
|
24
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div class=\"
|
|
1
|
+
{"version":3,"file":"result.vue_vue_type_script_lang.js","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots.subTitle\" :class=\"ns.e('subtitle')\">\n <slot name=\"subTitle\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\"></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { resultProps, IconComponentMap, IconMap } from './result'\n\nexport default defineComponent({\n name: 'ElResult',\n props: resultProps,\n setup(props) {\n const ns = useNamespace('result')\n\n const resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n })\n\n return {\n ns,\n resultIcon,\n }\n },\n})\n</script>\n"],"names":["defineComponent","resultProps","useNamespace","IconComponentMap"],"mappings":";;;;;;;;;AA6BA,aAAeA,mBAAe,CAAC;;AAE/B,EAAE,KAAK,EAAEC,kBAAW;EAClB,MAAM,KAAK,EAAE;IACX,MAAM,EAAE,GAAGC;IACX,MAAM;MACJ,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC;;MAExB,MAAM,aAAa,GAAGC;MACtB,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE;QACX;;WAEG;QACH;gBACQ;MACV;;;;;;"}
|