@element-plus/nightly 0.0.20251119 → 0.0.20251120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +17 -5
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +17 -5
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +24 -129
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +129 -24
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +40 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +96 -40
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +40 -207
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +207 -40
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +31 -65
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +65 -31
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -89
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +89 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -37
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +37 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +69 -234
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +234 -69
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +12 -12
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +135 -50
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +50 -135
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +51 -86
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +86 -51
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +8 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +7 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +225 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -225
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +16 -81
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +81 -16
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/index.mjs +12 -12
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +25 -129
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +129 -25
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +41 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +95 -41
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +40 -206
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +206 -40
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +32 -65
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +65 -32
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +35 -89
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +89 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -37
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +37 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +69 -233
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +233 -69
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +12 -12
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +135 -51
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +51 -135
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +53 -86
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +86 -53
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +8 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +7 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +224 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -224
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +16 -81
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +81 -16
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/index.js +12 -12
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
|
@@ -1,139 +1,54 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
1
|
+
import { QuestionFilled } from '@element-plus/icons-vue';
|
|
2
|
+
import { buttonTypes } from '../../button/src/button.mjs';
|
|
3
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
5
|
+
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
6
|
+
import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
8
|
+
const popconfirmProps = buildProps({
|
|
9
|
+
title: String,
|
|
10
|
+
confirmButtonText: String,
|
|
11
|
+
cancelButtonText: String,
|
|
12
|
+
confirmButtonType: {
|
|
13
|
+
type: String,
|
|
14
|
+
values: buttonTypes,
|
|
15
|
+
default: "primary"
|
|
16
|
+
},
|
|
17
|
+
cancelButtonType: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: buttonTypes,
|
|
20
|
+
default: "text"
|
|
21
|
+
},
|
|
22
|
+
icon: {
|
|
23
|
+
type: iconPropType,
|
|
24
|
+
default: () => QuestionFilled
|
|
25
|
+
},
|
|
26
|
+
iconColor: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "#f90"
|
|
29
|
+
},
|
|
30
|
+
hideIcon: Boolean,
|
|
31
|
+
hideAfter: {
|
|
32
|
+
type: Number,
|
|
33
|
+
default: 200
|
|
34
|
+
},
|
|
35
|
+
effect: {
|
|
36
|
+
...useTooltipContentProps.effect,
|
|
37
|
+
default: "light"
|
|
38
|
+
},
|
|
39
|
+
teleported: useTooltipContentProps.teleported,
|
|
40
|
+
persistent: useTooltipContentProps.persistent,
|
|
41
|
+
width: {
|
|
42
|
+
type: [String, Number],
|
|
43
|
+
default: 150
|
|
44
|
+
},
|
|
45
|
+
virtualTriggering: useTooltipTriggerProps.virtualTriggering,
|
|
46
|
+
virtualRef: useTooltipTriggerProps.virtualRef
|
|
13
47
|
});
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
setup(__props, { expose, emit }) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const { t } = useLocale();
|
|
21
|
-
const ns = useNamespace("popconfirm");
|
|
22
|
-
const tooltipRef = ref();
|
|
23
|
-
const rootRef = ref();
|
|
24
|
-
const popperRef = computed(() => {
|
|
25
|
-
var _a;
|
|
26
|
-
return (_a = unref(tooltipRef)) == null ? void 0 : _a.popperRef;
|
|
27
|
-
});
|
|
28
|
-
const showPopper = () => {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
(_b = (_a = rootRef.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
31
|
-
};
|
|
32
|
-
const hidePopper = () => {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
(_b = (_a = tooltipRef.value) == null ? void 0 : _a.onClose) == null ? void 0 : _b.call(_a);
|
|
35
|
-
};
|
|
36
|
-
const style = computed(() => {
|
|
37
|
-
return {
|
|
38
|
-
width: addUnit(props.width)
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
const confirm = (e) => {
|
|
42
|
-
emit("confirm", e);
|
|
43
|
-
hidePopper();
|
|
44
|
-
};
|
|
45
|
-
const cancel = (e) => {
|
|
46
|
-
emit("cancel", e);
|
|
47
|
-
hidePopper();
|
|
48
|
-
};
|
|
49
|
-
const finalConfirmButtonText = computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
|
|
50
|
-
const finalCancelButtonText = computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
|
|
51
|
-
expose({
|
|
52
|
-
popperRef,
|
|
53
|
-
hide: hidePopper
|
|
54
|
-
});
|
|
55
|
-
return (_ctx, _cache) => {
|
|
56
|
-
return openBlock(), createBlock(unref(ElTooltip), mergeProps({
|
|
57
|
-
ref_key: "tooltipRef",
|
|
58
|
-
ref: tooltipRef,
|
|
59
|
-
trigger: "click",
|
|
60
|
-
effect: _ctx.effect
|
|
61
|
-
}, _ctx.$attrs, {
|
|
62
|
-
"virtual-triggering": _ctx.virtualTriggering,
|
|
63
|
-
"virtual-ref": _ctx.virtualRef,
|
|
64
|
-
"popper-class": `${unref(ns).namespace.value}-popover`,
|
|
65
|
-
"popper-style": unref(style),
|
|
66
|
-
teleported: _ctx.teleported,
|
|
67
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
68
|
-
"hide-after": _ctx.hideAfter,
|
|
69
|
-
persistent: _ctx.persistent,
|
|
70
|
-
loop: "",
|
|
71
|
-
onShow: showPopper
|
|
72
|
-
}), {
|
|
73
|
-
content: withCtx(() => [
|
|
74
|
-
createElementVNode("div", {
|
|
75
|
-
ref_key: "rootRef",
|
|
76
|
-
ref: rootRef,
|
|
77
|
-
tabindex: "-1",
|
|
78
|
-
class: normalizeClass(unref(ns).b())
|
|
79
|
-
}, [
|
|
80
|
-
createElementVNode("div", {
|
|
81
|
-
class: normalizeClass(unref(ns).e("main"))
|
|
82
|
-
}, [
|
|
83
|
-
!_ctx.hideIcon && _ctx.icon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
84
|
-
key: 0,
|
|
85
|
-
class: normalizeClass(unref(ns).e("icon")),
|
|
86
|
-
style: normalizeStyle({ color: _ctx.iconColor })
|
|
87
|
-
}, {
|
|
88
|
-
default: withCtx(() => [
|
|
89
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
90
|
-
]),
|
|
91
|
-
_: 1
|
|
92
|
-
}, 8, ["class", "style"])) : createCommentVNode("v-if", true),
|
|
93
|
-
createTextVNode(" " + toDisplayString(_ctx.title), 1)
|
|
94
|
-
], 2),
|
|
95
|
-
createElementVNode("div", {
|
|
96
|
-
class: normalizeClass(unref(ns).e("action"))
|
|
97
|
-
}, [
|
|
98
|
-
renderSlot(_ctx.$slots, "actions", {
|
|
99
|
-
confirm,
|
|
100
|
-
cancel
|
|
101
|
-
}, () => [
|
|
102
|
-
createVNode(unref(ElButton), {
|
|
103
|
-
size: "small",
|
|
104
|
-
type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
|
|
105
|
-
text: _ctx.cancelButtonType === "text",
|
|
106
|
-
onClick: cancel
|
|
107
|
-
}, {
|
|
108
|
-
default: withCtx(() => [
|
|
109
|
-
createTextVNode(toDisplayString(unref(finalCancelButtonText)), 1)
|
|
110
|
-
]),
|
|
111
|
-
_: 1
|
|
112
|
-
}, 8, ["type", "text"]),
|
|
113
|
-
createVNode(unref(ElButton), {
|
|
114
|
-
size: "small",
|
|
115
|
-
type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
|
|
116
|
-
text: _ctx.confirmButtonType === "text",
|
|
117
|
-
onClick: confirm
|
|
118
|
-
}, {
|
|
119
|
-
default: withCtx(() => [
|
|
120
|
-
createTextVNode(toDisplayString(unref(finalConfirmButtonText)), 1)
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["type", "text"])
|
|
124
|
-
])
|
|
125
|
-
], 2)
|
|
126
|
-
], 2)
|
|
127
|
-
]),
|
|
128
|
-
default: withCtx(() => [
|
|
129
|
-
_ctx.$slots.reference ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
|
|
130
|
-
]),
|
|
131
|
-
_: 3
|
|
132
|
-
}, 16, ["effect", "virtual-triggering", "virtual-ref", "popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
var Popconfirm = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "popconfirm.vue"]]);
|
|
48
|
+
const popconfirmEmits = {
|
|
49
|
+
confirm: (e) => e instanceof MouseEvent,
|
|
50
|
+
cancel: (e) => e instanceof MouseEvent
|
|
51
|
+
};
|
|
137
52
|
|
|
138
|
-
export {
|
|
53
|
+
export { popconfirmEmits, popconfirmProps };
|
|
139
54
|
//# sourceMappingURL=popconfirm2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popconfirm2.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.
|
|
1
|
+
{"version":3,"file":"popconfirm2.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: Boolean,\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n virtualTriggering: useTooltipTriggerProps.virtualTriggering,\n virtualRef: useTooltipTriggerProps.virtualRef,\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>\nexport type PopconfirmPropsPublic = __ExtractPublicPropTypes<\n typeof popconfirmProps\n>\n\nexport type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown\n"],"names":[],"mappings":";;;;;;;AAOY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,iBAAiB,EAAE,MAAM;AAC3B,EAAE,gBAAgB,EAAE,MAAM;AAC1B,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,cAAc;AACjC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,GAAG,sBAAsB,CAAC,MAAM;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE,sBAAsB,CAAC,iBAAiB;AAC7D,EAAE,UAAU,EAAE,sBAAsB,CAAC,UAAU;AAC/C,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACzC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACxC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dropdownProps } from '../../dropdown/src/dropdown.mjs';
|
|
2
2
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
-
import { useTooltipTriggerProps } from '../../tooltip/src/
|
|
3
|
+
import { useTooltipTriggerProps } from '../../tooltip/src/trigger.mjs';
|
|
4
4
|
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
|
5
5
|
import { isBoolean } from '../../../utils/types.mjs';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Radio from './src/radio2.mjs';
|
|
2
2
|
import RadioButton from './src/radio-button2.mjs';
|
|
3
|
-
import RadioGroup from './src/radio-
|
|
3
|
+
import RadioGroup from './src/radio-group2.mjs';
|
|
4
4
|
export { radioEmits, radioProps, radioPropsBase } from './src/radio.mjs';
|
|
5
|
-
export { radioDefaultProps, radioGroupEmits, radioGroupProps } from './src/radio-
|
|
5
|
+
export { radioDefaultProps, radioGroupEmits, radioGroupProps } from './src/radio-group.mjs';
|
|
6
6
|
export { radioButtonProps } from './src/radio-button.mjs';
|
|
7
7
|
export { radioGroupKey } from './src/constants.mjs';
|
|
8
8
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,90 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import Radio from './radio2.mjs';
|
|
6
|
-
import RadioButton from './radio-button2.mjs';
|
|
7
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
10
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
11
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
|
12
|
-
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
1
|
+
import { radioEmits } from './radio.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
|
4
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
|
13
5
|
|
|
14
|
-
const
|
|
15
|
-
|
|
6
|
+
const radioGroupProps = buildProps({
|
|
7
|
+
id: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: void 0
|
|
10
|
+
},
|
|
11
|
+
size: useSizeProp,
|
|
12
|
+
disabled: Boolean,
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: [String, Number, Boolean],
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
fill: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
textColor: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
name: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
validateEvent: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
options: {
|
|
34
|
+
type: definePropType(Array)
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
type: definePropType(Object),
|
|
38
|
+
default: () => radioDefaultProps
|
|
39
|
+
},
|
|
40
|
+
type: {
|
|
41
|
+
type: String,
|
|
42
|
+
values: ["radio", "button"],
|
|
43
|
+
default: "radio"
|
|
44
|
+
},
|
|
45
|
+
...useAriaProps(["ariaLabel"])
|
|
16
46
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const ns = useNamespace("radio");
|
|
24
|
-
const radioId = useId();
|
|
25
|
-
const radioGroupRef = ref();
|
|
26
|
-
const { formItem } = useFormItem();
|
|
27
|
-
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
28
|
-
formItemContext: formItem
|
|
29
|
-
});
|
|
30
|
-
const changeEvent = (value) => {
|
|
31
|
-
emit(UPDATE_MODEL_EVENT, value);
|
|
32
|
-
nextTick(() => emit(CHANGE_EVENT, value));
|
|
33
|
-
};
|
|
34
|
-
onMounted(() => {
|
|
35
|
-
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
36
|
-
const firstLabel = radios[0];
|
|
37
|
-
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
38
|
-
firstLabel.tabIndex = 0;
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
const name = computed(() => {
|
|
42
|
-
return props.name || radioId.value;
|
|
43
|
-
});
|
|
44
|
-
const aliasProps = computed(() => ({
|
|
45
|
-
...radioDefaultProps,
|
|
46
|
-
...props.props
|
|
47
|
-
}));
|
|
48
|
-
const getOptionProps = (option) => {
|
|
49
|
-
const { label, value, disabled } = aliasProps.value;
|
|
50
|
-
const base = {
|
|
51
|
-
label: option[label],
|
|
52
|
-
value: option[value],
|
|
53
|
-
disabled: option[disabled]
|
|
54
|
-
};
|
|
55
|
-
return { ...omit(option, [label, value, disabled]), ...base };
|
|
56
|
-
};
|
|
57
|
-
const optionComponent = computed(() => props.type === "button" ? RadioButton : Radio);
|
|
58
|
-
provide(radioGroupKey, reactive({
|
|
59
|
-
...toRefs(props),
|
|
60
|
-
changeEvent,
|
|
61
|
-
name
|
|
62
|
-
}));
|
|
63
|
-
watch(() => props.modelValue, (newVal, oldValue) => {
|
|
64
|
-
if (props.validateEvent && !isEqual(newVal, oldValue)) {
|
|
65
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
return (_ctx, _cache) => {
|
|
69
|
-
return openBlock(), createElementBlock("div", {
|
|
70
|
-
id: unref(groupId),
|
|
71
|
-
ref_key: "radioGroupRef",
|
|
72
|
-
ref: radioGroupRef,
|
|
73
|
-
class: normalizeClass(unref(ns).b("group")),
|
|
74
|
-
role: "radiogroup",
|
|
75
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
76
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
|
77
|
-
}, [
|
|
78
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
79
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
|
|
80
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)), mergeProps({ key: index }, getOptionProps(item)), null, 16);
|
|
81
|
-
}), 128))
|
|
82
|
-
])
|
|
83
|
-
], 10, ["id", "aria-label", "aria-labelledby"]);
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
|
|
47
|
+
const radioGroupEmits = radioEmits;
|
|
48
|
+
const radioDefaultProps = {
|
|
49
|
+
label: "label",
|
|
50
|
+
value: "value",
|
|
51
|
+
disabled: "disabled"
|
|
52
|
+
};
|
|
88
53
|
|
|
89
|
-
export {
|
|
54
|
+
export { radioDefaultProps, radioGroupEmits, radioGroupProps };
|
|
90
55
|
//# sourceMappingURL=radio-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.
|
|
1
|
+
{"version":3,"file":"radio-group.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\n\nimport type { RadioPropsPublic } from './radio'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n options: {\n type: definePropType<radioOption[]>(Array),\n },\n props: {\n type: definePropType<radioOptionProp>(Object),\n default: () => radioDefaultProps,\n },\n type: {\n type: String,\n values: ['radio', 'button'] as const,\n default: 'radio',\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\nexport type RadioGroupPropsPublic = __ExtractPublicPropTypes<\n typeof radioGroupProps\n>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup> & unknown\n\nexport type radioOption = RadioPropsPublic & Record<string, any>\n\nexport const radioDefaultProps: Required<radioOptionProp> = {\n label: 'label',\n value: 'value',\n disabled: 'disabled',\n}\nexport type radioOptionProp = {\n value?: string\n label?: string\n disabled?: string\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,MAAM,iBAAiB;AACpC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;AAC/B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAG,WAAW;AAC9B,MAAC,iBAAiB,GAAG;AACjC,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,QAAQ,EAAE,UAAU;AACtB;;;;"}
|
|
@@ -1,55 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent, ref, onMounted, computed, provide, reactive, toRefs, watch, openBlock, createElementBlock, unref, normalizeClass, renderSlot, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, nextTick } from 'vue';
|
|
2
|
+
import { radioGroupProps, radioGroupEmits, radioDefaultProps } from './radio-group.mjs';
|
|
3
|
+
import { radioGroupKey } from './constants.mjs';
|
|
4
|
+
import { isEqual, omit } from 'lodash-unified';
|
|
5
|
+
import Radio from './radio2.mjs';
|
|
6
|
+
import RadioButton from './radio-button2.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
|
+
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
10
|
+
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
11
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
|
12
|
+
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
|
5
13
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
type: String,
|
|
9
|
-
default: void 0
|
|
10
|
-
},
|
|
11
|
-
size: useSizeProp,
|
|
12
|
-
disabled: Boolean,
|
|
13
|
-
modelValue: {
|
|
14
|
-
type: [String, Number, Boolean],
|
|
15
|
-
default: void 0
|
|
16
|
-
},
|
|
17
|
-
fill: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
textColor: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ""
|
|
24
|
-
},
|
|
25
|
-
name: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: void 0
|
|
28
|
-
},
|
|
29
|
-
validateEvent: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: true
|
|
32
|
-
},
|
|
33
|
-
options: {
|
|
34
|
-
type: definePropType(Array)
|
|
35
|
-
},
|
|
36
|
-
props: {
|
|
37
|
-
type: definePropType(Object),
|
|
38
|
-
default: () => radioDefaultProps
|
|
39
|
-
},
|
|
40
|
-
type: {
|
|
41
|
-
type: String,
|
|
42
|
-
values: ["radio", "button"],
|
|
43
|
-
default: "radio"
|
|
44
|
-
},
|
|
45
|
-
...useAriaProps(["ariaLabel"])
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "ElRadioGroup"
|
|
46
16
|
});
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: radioGroupProps,
|
|
20
|
+
emits: radioGroupEmits,
|
|
21
|
+
setup(__props, { emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const ns = useNamespace("radio");
|
|
24
|
+
const radioId = useId();
|
|
25
|
+
const radioGroupRef = ref();
|
|
26
|
+
const { formItem } = useFormItem();
|
|
27
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
|
28
|
+
formItemContext: formItem
|
|
29
|
+
});
|
|
30
|
+
const changeEvent = (value) => {
|
|
31
|
+
emit(UPDATE_MODEL_EVENT, value);
|
|
32
|
+
nextTick(() => emit(CHANGE_EVENT, value));
|
|
33
|
+
};
|
|
34
|
+
onMounted(() => {
|
|
35
|
+
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
36
|
+
const firstLabel = radios[0];
|
|
37
|
+
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
38
|
+
firstLabel.tabIndex = 0;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const name = computed(() => {
|
|
42
|
+
return props.name || radioId.value;
|
|
43
|
+
});
|
|
44
|
+
const aliasProps = computed(() => ({
|
|
45
|
+
...radioDefaultProps,
|
|
46
|
+
...props.props
|
|
47
|
+
}));
|
|
48
|
+
const getOptionProps = (option) => {
|
|
49
|
+
const { label, value, disabled } = aliasProps.value;
|
|
50
|
+
const base = {
|
|
51
|
+
label: option[label],
|
|
52
|
+
value: option[value],
|
|
53
|
+
disabled: option[disabled]
|
|
54
|
+
};
|
|
55
|
+
return { ...omit(option, [label, value, disabled]), ...base };
|
|
56
|
+
};
|
|
57
|
+
const optionComponent = computed(() => props.type === "button" ? RadioButton : Radio);
|
|
58
|
+
provide(radioGroupKey, reactive({
|
|
59
|
+
...toRefs(props),
|
|
60
|
+
changeEvent,
|
|
61
|
+
name
|
|
62
|
+
}));
|
|
63
|
+
watch(() => props.modelValue, (newVal, oldValue) => {
|
|
64
|
+
if (props.validateEvent && !isEqual(newVal, oldValue)) {
|
|
65
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock("div", {
|
|
70
|
+
id: unref(groupId),
|
|
71
|
+
ref_key: "radioGroupRef",
|
|
72
|
+
ref: radioGroupRef,
|
|
73
|
+
class: normalizeClass(unref(ns).b("group")),
|
|
74
|
+
role: "radiogroup",
|
|
75
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
76
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
|
77
|
+
}, [
|
|
78
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
79
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, index) => {
|
|
80
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(optionComponent)), mergeProps({ key: index }, getOptionProps(item)), null, 16);
|
|
81
|
+
}), 128))
|
|
82
|
+
])
|
|
83
|
+
], 10, ["id", "aria-label", "aria-labelledby"]);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
|
|
53
88
|
|
|
54
|
-
export {
|
|
89
|
+
export { RadioGroup as default };
|
|
55
90
|
//# sourceMappingURL=radio-group2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.
|
|
1
|
+
{"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.vue"],"sourcesContent":["<template>\n <div\n :id=\"groupId\"\n ref=\"radioGroupRef\"\n :class=\"ns.b('group')\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'radio-group' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <slot>\n <component\n :is=\"optionComponent\"\n v-for=\"(item, index) in options\"\n :key=\"index\"\n v-bind=\"getOptionProps(item)\"\n />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport {\n radioDefaultProps,\n radioGroupEmits,\n radioGroupProps,\n} from './radio-group'\nimport { radioGroupKey } from './constants'\nimport { isEqual, omit } from 'lodash-unified'\nimport ElRadio from './radio.vue'\nimport ElRadioButton from './radio-button.vue'\n\nimport type { RadioGroupProps } from './radio-group'\n\ndefineOptions({\n name: 'ElRadioGroup',\n})\n\nconst props = defineProps(radioGroupProps)\nconst emit = defineEmits(radioGroupEmits)\n\nconst ns = useNamespace('radio')\nconst radioId = useId()\nconst radioGroupRef = ref<HTMLDivElement>()\nconst { formItem } = useFormItem()\nconst { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst changeEvent = (value: RadioGroupProps['modelValue']) => {\n emit(UPDATE_MODEL_EVENT, value)\n nextTick(() => emit(CHANGE_EVENT, value))\n}\n\nonMounted(() => {\n const radios =\n radioGroupRef.value!.querySelectorAll<HTMLInputElement>('[type=radio]')\n const firstLabel = radios[0]\n if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {\n firstLabel.tabIndex = 0\n }\n})\n\nconst name = computed(() => {\n return props.name || radioId.value\n})\n\nconst aliasProps = computed(() => ({\n ...radioDefaultProps,\n ...props.props,\n}))\nconst getOptionProps = (option: Record<string, any>) => {\n const { label, value, disabled } = aliasProps.value\n const base = {\n label: option[label],\n value: option[value],\n disabled: option[disabled],\n }\n return { ...omit(option, [label, value, disabled]), ...base }\n}\n\nconst optionComponent = computed(() =>\n props.type === 'button' ? ElRadioButton : ElRadio\n)\n\nprovide(\n radioGroupKey,\n reactive({\n ...toRefs(props),\n changeEvent,\n name,\n })\n)\n\nwatch(\n () => props.modelValue,\n (newVal, oldValue) => {\n if (props.validateEvent && !isEqual(newVal, oldValue)) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n</script>\n"],"names":["ElRadioButton","ElRadio","_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":"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"}
|
|
@@ -291,7 +291,13 @@ const useSelect = (props, emit) => {
|
|
|
291
291
|
return newOption;
|
|
292
292
|
};
|
|
293
293
|
const updateHoveringIndex = () => {
|
|
294
|
-
|
|
294
|
+
const length = states.selected.length;
|
|
295
|
+
if (length > 0) {
|
|
296
|
+
const lastOption = states.selected[length - 1];
|
|
297
|
+
states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
|
|
298
|
+
} else {
|
|
299
|
+
states.hoveringIndex = -1;
|
|
300
|
+
}
|
|
295
301
|
};
|
|
296
302
|
const resetSelectionWidth = () => {
|
|
297
303
|
states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
|
|
@@ -422,7 +428,7 @@ const useSelect = (props, emit) => {
|
|
|
422
428
|
};
|
|
423
429
|
const scrollToOption = (option) => {
|
|
424
430
|
var _a, _b, _c, _d, _e;
|
|
425
|
-
const targetOption = isArray(option) ? option[
|
|
431
|
+
const targetOption = isArray(option) ? option[option.length - 1] : option;
|
|
426
432
|
let target = null;
|
|
427
433
|
if (!isNil(targetOption == null ? void 0 : targetOption.value)) {
|
|
428
434
|
const options = optionsArray.value.filter((item) => item.value === targetOption.value);
|