@element-plus/nightly 0.0.20250218 → 0.0.20250220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +30 -9
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +30 -9
- 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/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/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +40 -402
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +402 -40
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/index.mjs +11 -11
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +97 -15
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +15 -97
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/message-box/src/messageBox.mjs +6 -2
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/radio/index.mjs +6 -6
- package/es/components/radio/src/radio-button.mjs +5 -65
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +65 -5
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +32 -73
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +73 -32
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +5 -1
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/src/button2.mjs +4 -2
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/composables/use-slider-button.d.ts +1 -0
- package/es/components/slider/src/composables/use-slider-button.mjs +2 -0
- package/es/components/slider/src/composables/use-slider-button.mjs.map +1 -1
- package/es/components/slider/src/slider.d.ts +1 -0
- package/es/components/slider/src/slider.mjs +4 -0
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider.vue.d.ts +3 -0
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +35 -38
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +38 -35
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +21 -67
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +67 -21
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +19 -130
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +130 -19
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/components/tree/src/model/tree-store.mjs +7 -3
- package/es/components/tree/src/model/tree-store.mjs.map +1 -1
- package/es/components/tree-select/src/tree-select-option.mjs +3 -1
- package/es/components/tree-select/src/tree-select-option.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +210 -27
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +27 -210
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +11 -11
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +40 -400
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +400 -40
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/index.js +11 -11
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +97 -16
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +16 -97
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/message-box/src/messageBox.js +5 -1
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/radio/index.js +6 -6
- package/lib/components/radio/src/radio-button.js +5 -65
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +65 -5
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.js +34 -73
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +73 -34
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +5 -1
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +17 -22
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +22 -17
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/src/button2.js +3 -1
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/composables/use-slider-button.d.ts +1 -0
- package/lib/components/slider/src/composables/use-slider-button.js +2 -0
- package/lib/components/slider/src/composables/use-slider-button.js.map +1 -1
- package/lib/components/slider/src/slider.d.ts +1 -0
- package/lib/components/slider/src/slider.js +4 -0
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider.vue.d.ts +3 -0
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +36 -38
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +38 -36
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +21 -67
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +67 -21
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +21 -130
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +130 -21
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/components/tree/src/model/tree-store.js +7 -3
- package/lib/components/tree/src/model/tree-store.js.map +1 -1
- package/lib/components/tree-select/src/tree-select-option.js +3 -1
- package/lib/components/tree-select/src/tree-select-option.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +210 -27
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +27 -210
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +11 -11
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -2,23 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../tooltip/index.js');
|
|
7
|
+
var useMenu = require('./use-menu.js');
|
|
8
|
+
var menuItem = require('./menu-item2.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
11
|
+
var error = require('../../../utils/error.js');
|
|
7
12
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
default: null
|
|
12
|
-
},
|
|
13
|
-
route: {
|
|
14
|
-
type: runtime.definePropType([String, Object])
|
|
15
|
-
},
|
|
16
|
-
disabled: Boolean
|
|
13
|
+
const COMPONENT_NAME = "ElMenuItem";
|
|
14
|
+
const __default__ = vue.defineComponent({
|
|
15
|
+
name: COMPONENT_NAME
|
|
17
16
|
});
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: menuItem.menuItemProps,
|
|
20
|
+
emits: menuItem.menuItemEmits,
|
|
21
|
+
setup(__props, { expose, emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const instance = vue.getCurrentInstance();
|
|
24
|
+
const rootMenu = vue.inject("rootMenu");
|
|
25
|
+
const nsMenu = index.useNamespace("menu");
|
|
26
|
+
const nsMenuItem = index.useNamespace("menu-item");
|
|
27
|
+
if (!rootMenu)
|
|
28
|
+
error.throwError(COMPONENT_NAME, "can not inject root menu");
|
|
29
|
+
const { parentMenu, indexPath } = useMenu["default"](instance, vue.toRef(props, "index"));
|
|
30
|
+
const subMenu = vue.inject(`subMenu:${parentMenu.value.uid}`);
|
|
31
|
+
if (!subMenu)
|
|
32
|
+
error.throwError(COMPONENT_NAME, "can not inject sub menu");
|
|
33
|
+
const active = vue.computed(() => props.index === rootMenu.activeIndex);
|
|
34
|
+
const item = vue.reactive({
|
|
35
|
+
index: props.index,
|
|
36
|
+
indexPath,
|
|
37
|
+
active
|
|
38
|
+
});
|
|
39
|
+
const handleClick = () => {
|
|
40
|
+
if (!props.disabled) {
|
|
41
|
+
rootMenu.handleMenuItemClick({
|
|
42
|
+
index: props.index,
|
|
43
|
+
indexPath: indexPath.value,
|
|
44
|
+
route: props.route
|
|
45
|
+
});
|
|
46
|
+
emit("click", item);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
vue.onMounted(() => {
|
|
50
|
+
subMenu.addSubMenu(item);
|
|
51
|
+
rootMenu.addMenuItem(item);
|
|
52
|
+
});
|
|
53
|
+
vue.onBeforeUnmount(() => {
|
|
54
|
+
subMenu.removeSubMenu(item);
|
|
55
|
+
rootMenu.removeMenuItem(item);
|
|
56
|
+
});
|
|
57
|
+
expose({
|
|
58
|
+
parentMenu,
|
|
59
|
+
rootMenu,
|
|
60
|
+
active,
|
|
61
|
+
nsMenu,
|
|
62
|
+
nsMenuItem,
|
|
63
|
+
handleClick
|
|
64
|
+
});
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
67
|
+
class: vue.normalizeClass([
|
|
68
|
+
vue.unref(nsMenuItem).b(),
|
|
69
|
+
vue.unref(nsMenuItem).is("active", vue.unref(active)),
|
|
70
|
+
vue.unref(nsMenuItem).is("disabled", _ctx.disabled)
|
|
71
|
+
]),
|
|
72
|
+
role: "menuitem",
|
|
73
|
+
tabindex: "-1",
|
|
74
|
+
onClick: handleClick
|
|
75
|
+
}, [
|
|
76
|
+
vue.unref(parentMenu).type.name === "ElMenu" && vue.unref(rootMenu).props.collapse && _ctx.$slots.title ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElTooltip), {
|
|
77
|
+
key: 0,
|
|
78
|
+
effect: vue.unref(rootMenu).props.popperEffect,
|
|
79
|
+
placement: "right",
|
|
80
|
+
"fallback-placements": ["left"],
|
|
81
|
+
persistent: vue.unref(rootMenu).props.persistent
|
|
82
|
+
}, {
|
|
83
|
+
content: vue.withCtx(() => [
|
|
84
|
+
vue.renderSlot(_ctx.$slots, "title")
|
|
85
|
+
]),
|
|
86
|
+
default: vue.withCtx(() => [
|
|
87
|
+
vue.createElementVNode("div", {
|
|
88
|
+
class: vue.normalizeClass(vue.unref(nsMenu).be("tooltip", "trigger"))
|
|
89
|
+
}, [
|
|
90
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
91
|
+
], 2)
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 8, ["effect", "persistent"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
95
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
96
|
+
vue.renderSlot(_ctx.$slots, "title")
|
|
97
|
+
], 64))
|
|
98
|
+
], 2);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var MenuItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "menu-item.vue"]]);
|
|
21
103
|
|
|
22
|
-
exports
|
|
23
|
-
exports.menuItemProps = menuItemProps;
|
|
104
|
+
exports["default"] = MenuItem;
|
|
24
105
|
//# sourceMappingURL=menu-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.js","sources":["../../../../../../packages/components/menu/src/menu-item.
|
|
1
|
+
{"version":3,"file":"menu-item.js","sources":["../../../../../../packages/components/menu/src/menu-item.vue"],"sourcesContent":["<template>\n <li\n :class=\"[\n nsMenuItem.b(),\n nsMenuItem.is('active', active),\n nsMenuItem.is('disabled', disabled),\n ]\"\n role=\"menuitem\"\n tabindex=\"-1\"\n @click=\"handleClick\"\n >\n <el-tooltip\n v-if=\"\n parentMenu.type.name === 'ElMenu' &&\n rootMenu.props.collapse &&\n $slots.title\n \"\n :effect=\"rootMenu.props.popperEffect\"\n placement=\"right\"\n :fallback-placements=\"['left']\"\n :persistent=\"rootMenu.props.persistent\"\n >\n <template #content>\n <slot name=\"title\" />\n </template>\n <div :class=\"nsMenu.be('tooltip', 'trigger')\">\n <slot />\n </div>\n </el-tooltip>\n <template v-else>\n <slot />\n <slot name=\"title\" />\n </template>\n </li>\n</template>\n\n<script lang=\"ts\" setup>\n// @ts-nocheck\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onMounted,\n reactive,\n toRef,\n} from 'vue'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport useMenu from './use-menu'\nimport { menuItemEmits, menuItemProps } from './menu-item'\n\nimport type { MenuItemRegistered, MenuProvider, SubMenuProvider } from './types'\n\nconst COMPONENT_NAME = 'ElMenuItem'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(menuItemProps)\nconst emit = defineEmits(menuItemEmits)\n\nconst instance = getCurrentInstance()!\nconst rootMenu = inject<MenuProvider>('rootMenu')\nconst nsMenu = useNamespace('menu')\nconst nsMenuItem = useNamespace('menu-item')\nif (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\nconst { parentMenu, indexPath } = useMenu(instance, toRef(props, 'index'))\n\nconst subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value.uid}`)\nif (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\nconst active = computed(() => props.index === rootMenu.activeIndex)\nconst item: MenuItemRegistered = reactive({\n index: props.index,\n indexPath,\n active,\n})\n\nconst handleClick = () => {\n if (!props.disabled) {\n rootMenu.handleMenuItemClick({\n index: props.index,\n indexPath: indexPath.value,\n route: props.route,\n })\n emit('click', item)\n }\n}\n\nonMounted(() => {\n subMenu.addSubMenu(item)\n rootMenu.addMenuItem(item)\n})\n\nonBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeMenuItem(item)\n})\n\ndefineExpose({\n parentMenu,\n rootMenu,\n active,\n nsMenu,\n nsMenuItem,\n handleClick,\n})\n</script>\n"],"names":["getCurrentInstance","inject","useNamespace","throwError","useMenu","computed","reactive","onMounted","onBeforeUnmount"],"mappings":";;;;;;;;;;;;;uCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAIA,IAAA,MAAM,WAAWA,sBAAmB,EAAA,CAAA;AACpC,IAAM,MAAA,QAAA,GAAWC,WAAqB,UAAU,CAAA,CAAA;AAChD,IAAM,MAAA,MAAA,GAASC,mBAAa,MAAM,CAAA,CAAA;AAClC,IAAM,MAAA,UAAA,GAAaA,mBAAa,WAAW,CAAA,CAAA;AAC3C,IAAA,IAAI,CAAC,QAAA;AAEL,MAAMC,+BAAwB,EAAA,0BAAsB,CAAA,CAAA;AAEpD,IAAA,MAAM,YAAkC,EAAA,SAAA,EAAA,GAAWC,kBAAW,CAAA,QAAA,WAAW,CAAA,KAAA,EAAA,OAAA,CAAA,CAAA,CAAA;AACzE,IAAA,MAAK,OAAS,GAAWH,UAAA,CAAA,CAAA,QAAA,EAAA,UAAyC,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAElE,IAAA,IAAA,CAAA;AACA,MAAAE,iBAAiC,cAAS,EAAA,yBAAA,CAAA,CAAA;AAAA,IAAA,YAC3B,GAAAE,YAAA,CAAA,MAAA,KAAA,CAAA,KAAA,KAAA,QAAA,CAAA,WAAA,CAAA,CAAA;AAAA,IACb,MAAA,IAAA,GAAAC,YAAA,CAAA;AAAA,MACA,KAAA,EAAA,KAAA,CAAA,KAAA;AAAA,MACD,SAAA;AAED,MAAA;AACE,KAAI,CAAA,CAAA;AACF,IAAA,MAAA,WAA6B,GAAA,MAAA;AAAA,MAAA,IAC3B,OAAO,QAAM,EAAA;AAAA,QAAA,4BACQ,CAAA;AAAA,UACrB,OAAO,KAAM,CAAA,KAAA;AAAA,UACd,SAAA,EAAA,SAAA,CAAA,KAAA;AACD,UAAA,YAAc,CAAI,KAAA;AAAA,SACpB,CAAA,CAAA;AAAA,QACF,IAAA,CAAA,OAAA,EAAA,IAAA,CAAA,CAAA;AAEA,OAAA;AACE,KAAA,CAAA;AACA,IAAAC,aAAA,CAAA;AAAyB,MAC1B,OAAA,CAAA,UAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAA,QAAA,CAAA,WAAsB,CAAA,IAAA,CAAA,CAAA;AACpB,KAAA,CAAA,CAAA;AACA,IAAAC;AAA4B,MAC7B,OAAA,CAAA,aAAA,CAAA,IAAA,CAAA,CAAA;AAED,MAAa,QAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAAA,IACA,MAAA,CAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,104 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var useMenu = require('./use-menu.js');
|
|
8
|
-
var menuItem = require('./menu-item.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
11
|
-
var error = require('../../../utils/error.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var shared = require('@vue/shared');
|
|
12
7
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
const menuItemProps = runtime.buildProps({
|
|
9
|
+
index: {
|
|
10
|
+
type: runtime.definePropType([String, null]),
|
|
11
|
+
default: null
|
|
12
|
+
},
|
|
13
|
+
route: {
|
|
14
|
+
type: runtime.definePropType([String, Object])
|
|
15
|
+
},
|
|
16
|
+
disabled: Boolean
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
emits: menuItem.menuItemEmits,
|
|
21
|
-
setup(__props, { expose, emit }) {
|
|
22
|
-
const props = __props;
|
|
23
|
-
const instance = vue.getCurrentInstance();
|
|
24
|
-
const rootMenu = vue.inject("rootMenu");
|
|
25
|
-
const nsMenu = index.useNamespace("menu");
|
|
26
|
-
const nsMenuItem = index.useNamespace("menu-item");
|
|
27
|
-
if (!rootMenu)
|
|
28
|
-
error.throwError(COMPONENT_NAME, "can not inject root menu");
|
|
29
|
-
const { parentMenu, indexPath } = useMenu["default"](instance, vue.toRef(props, "index"));
|
|
30
|
-
const subMenu = vue.inject(`subMenu:${parentMenu.value.uid}`);
|
|
31
|
-
if (!subMenu)
|
|
32
|
-
error.throwError(COMPONENT_NAME, "can not inject sub menu");
|
|
33
|
-
const active = vue.computed(() => props.index === rootMenu.activeIndex);
|
|
34
|
-
const item = vue.reactive({
|
|
35
|
-
index: props.index,
|
|
36
|
-
indexPath,
|
|
37
|
-
active
|
|
38
|
-
});
|
|
39
|
-
const handleClick = () => {
|
|
40
|
-
if (!props.disabled) {
|
|
41
|
-
rootMenu.handleMenuItemClick({
|
|
42
|
-
index: props.index,
|
|
43
|
-
indexPath: indexPath.value,
|
|
44
|
-
route: props.route
|
|
45
|
-
});
|
|
46
|
-
emit("click", item);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
vue.onMounted(() => {
|
|
50
|
-
subMenu.addSubMenu(item);
|
|
51
|
-
rootMenu.addMenuItem(item);
|
|
52
|
-
});
|
|
53
|
-
vue.onBeforeUnmount(() => {
|
|
54
|
-
subMenu.removeSubMenu(item);
|
|
55
|
-
rootMenu.removeMenuItem(item);
|
|
56
|
-
});
|
|
57
|
-
expose({
|
|
58
|
-
parentMenu,
|
|
59
|
-
rootMenu,
|
|
60
|
-
active,
|
|
61
|
-
nsMenu,
|
|
62
|
-
nsMenuItem,
|
|
63
|
-
handleClick
|
|
64
|
-
});
|
|
65
|
-
return (_ctx, _cache) => {
|
|
66
|
-
return vue.openBlock(), vue.createElementBlock("li", {
|
|
67
|
-
class: vue.normalizeClass([
|
|
68
|
-
vue.unref(nsMenuItem).b(),
|
|
69
|
-
vue.unref(nsMenuItem).is("active", vue.unref(active)),
|
|
70
|
-
vue.unref(nsMenuItem).is("disabled", _ctx.disabled)
|
|
71
|
-
]),
|
|
72
|
-
role: "menuitem",
|
|
73
|
-
tabindex: "-1",
|
|
74
|
-
onClick: handleClick
|
|
75
|
-
}, [
|
|
76
|
-
vue.unref(parentMenu).type.name === "ElMenu" && vue.unref(rootMenu).props.collapse && _ctx.$slots.title ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.ElTooltip), {
|
|
77
|
-
key: 0,
|
|
78
|
-
effect: vue.unref(rootMenu).props.popperEffect,
|
|
79
|
-
placement: "right",
|
|
80
|
-
"fallback-placements": ["left"],
|
|
81
|
-
persistent: vue.unref(rootMenu).props.persistent
|
|
82
|
-
}, {
|
|
83
|
-
content: vue.withCtx(() => [
|
|
84
|
-
vue.renderSlot(_ctx.$slots, "title")
|
|
85
|
-
]),
|
|
86
|
-
default: vue.withCtx(() => [
|
|
87
|
-
vue.createElementVNode("div", {
|
|
88
|
-
class: vue.normalizeClass(vue.unref(nsMenu).be("tooltip", "trigger"))
|
|
89
|
-
}, [
|
|
90
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
91
|
-
], 2)
|
|
92
|
-
]),
|
|
93
|
-
_: 3
|
|
94
|
-
}, 8, ["effect", "persistent"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
95
|
-
vue.renderSlot(_ctx.$slots, "default"),
|
|
96
|
-
vue.renderSlot(_ctx.$slots, "title")
|
|
97
|
-
], 64))
|
|
98
|
-
], 2);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
var MenuItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "menu-item.vue"]]);
|
|
18
|
+
const menuItemEmits = {
|
|
19
|
+
click: (item) => shared.isString(item.index) && shared.isArray(item.indexPath)
|
|
20
|
+
};
|
|
103
21
|
|
|
104
|
-
exports
|
|
22
|
+
exports.menuItemEmits = menuItemEmits;
|
|
23
|
+
exports.menuItemProps = menuItemProps;
|
|
105
24
|
//# sourceMappingURL=menu-item2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item2.js","sources":["../../../../../../packages/components/menu/src/menu-item.
|
|
1
|
+
{"version":3,"file":"menu-item2.js","sources":["../../../../../../packages/components/menu/src/menu-item.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\n\nexport const menuItemProps = buildProps({\n /**\n * @description unique identification\n */\n index: {\n type: definePropType<string | null>([String, null]),\n default: null,\n },\n /**\n * @description Vue Router object\n */\n route: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n },\n /**\n * @description whether disabled\n */\n disabled: Boolean,\n} as const)\nexport type MenuItemProps = ExtractPropTypes<typeof menuItemProps>\n\nexport const menuItemEmits = {\n click: (item: MenuItemRegistered) =>\n isString(item.index) && isArray(item.indexPath),\n}\nexport type MenuItemEmits = typeof menuItemEmits\n"],"names":["buildProps","definePropType","isString","isArray"],"mappings":";;;;;;;AAMY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACxC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,KAAK,EAAE,CAAC,IAAI,KAAKC,eAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAIC,cAAO,CAAC,IAAI,CAAC,SAAS,CAAC;AAClE;;;;;"}
|
|
@@ -70,7 +70,11 @@ const showMessage = (options, appContext) => {
|
|
|
70
70
|
const vm = instance.proxy;
|
|
71
71
|
for (const prop in options) {
|
|
72
72
|
if (shared.hasOwn(options, prop) && !shared.hasOwn(vm.$props, prop)) {
|
|
73
|
-
|
|
73
|
+
if (prop === "closeIcon" && shared.isObject(options[prop])) {
|
|
74
|
+
vm[prop] = vue.markRaw(options[prop]);
|
|
75
|
+
} else {
|
|
76
|
+
vm[prop] = options[prop];
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
vm.visible = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageBox.js","sources":["../../../../../../packages/components/message-box/src/messageBox.ts"],"sourcesContent":["import { createVNode, isVNode, render } from 'vue'\nimport {\n debugWarn,\n hasOwn,\n isClient,\n isElement,\n isFunction,\n isObject,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport MessageBoxConstructor from './index.vue'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type {\n Action,\n Callback,\n ElMessageBoxOptions,\n ElMessageBoxShortcutMethod,\n IElMessageBox,\n MessageBoxData,\n MessageBoxState,\n} from './message-box.type'\n\n// component default merge props & data\n\nconst messageInstance = new Map<\n ComponentPublicInstance<{ doClose: () => void }>, // marking doClose as function\n {\n options: any\n callback: Callback | undefined\n resolve: (res: any) => void\n reject: (reason?: any) => void\n }\n>()\n\nconst getAppendToElement = (props: any): HTMLElement => {\n let appendTo: HTMLElement | null = document.body\n if (props.appendTo) {\n if (isString(props.appendTo)) {\n appendTo = document.querySelector<HTMLElement>(props.appendTo)\n }\n if (isElement(props.appendTo)) {\n appendTo = props.appendTo\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessageBox',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n }\n return appendTo\n}\n\nconst initInstance = (\n props: any,\n container: HTMLElement,\n appContext: AppContext | null = null\n) => {\n const vnode = createVNode(\n MessageBoxConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = appContext\n render(vnode, container)\n getAppendToElement(props).appendChild(container.firstElementChild!)\n return vnode.component\n}\n\nconst genContainer = () => {\n return document.createElement('div')\n}\n\nconst showMessage = (options: any, appContext?: AppContext | null) => {\n const container = genContainer()\n // Adding destruct method.\n // when transition leaves emitting `vanish` evt. so that we can do the clean job.\n options.onVanish = () => {\n // not sure if this causes mem leak, need proof to verify that.\n // maybe calling out like 1000 msg-box then close them all.\n render(null, container)\n messageInstance.delete(vm) // Remove vm to avoid mem leak.\n // here we were suppose to call document.body.removeChild(container.firstElementChild)\n // but render(null, container) did that job for us. so that we do not call that directly\n }\n\n options.onAction = (action: Action) => {\n const currentMsg = messageInstance.get(vm)!\n let resolve: Action | { value: string; action: Action }\n if (options.showInput) {\n resolve = { value: vm.inputValue, action }\n } else {\n resolve = action\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy)\n } else {\n if (action === 'cancel' || action === 'close') {\n if (options.distinguishCancelAndClose && action !== 'cancel') {\n currentMsg.reject('close')\n } else {\n currentMsg.reject('cancel')\n }\n } else {\n currentMsg.resolve(resolve)\n }\n }\n }\n\n const instance = initInstance(options, container, appContext)!\n\n // This is how we use message box programmatically.\n // Maybe consider releasing a template version?\n // get component instance like v2.\n const vm = instance.proxy as ComponentPublicInstance<\n {\n visible: boolean\n doClose: () => void\n } & MessageBoxState\n >\n\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop as keyof ComponentPublicInstance] = options[prop]\n }\n }\n\n // change visibility after everything is settled\n vm.visible = true\n return vm\n}\n\nasync function MessageBox(\n options: ElMessageBoxOptions,\n appContext?: AppContext | null\n): Promise<MessageBoxData>\nfunction MessageBox(\n options: ElMessageBoxOptions | string | VNode,\n appContext: AppContext | null = null\n): Promise<{ value: string; action: Action } | Action> {\n if (!isClient) return Promise.reject()\n let callback: Callback | undefined\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n } else {\n callback = options.callback\n }\n\n return new Promise((resolve, reject) => {\n const vm = showMessage(\n options,\n appContext ?? (MessageBox as IElMessageBox)._context\n )\n // collect this vm in order to handle upcoming events.\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject,\n })\n })\n}\n\nconst MESSAGE_BOX_VARIANTS = ['alert', 'confirm', 'prompt'] as const\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<\n typeof MESSAGE_BOX_VARIANTS[number],\n Partial<ElMessageBoxOptions>\n> = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true },\n}\n\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n ;(MessageBox as IElMessageBox)[boxType] = messageBoxFactory(\n boxType\n ) as ElMessageBoxShortcutMethod\n})\n\nfunction messageBoxFactory(boxType: typeof MESSAGE_BOX_VARIANTS[number]) {\n return (\n message: string | VNode,\n title: string | ElMessageBoxOptions,\n options?: ElMessageBoxOptions,\n appContext?: AppContext | null\n ) => {\n let titleOrOpts = ''\n if (isObject(title)) {\n options = title as ElMessageBoxOptions\n titleOrOpts = ''\n } else if (isUndefined(title)) {\n titleOrOpts = ''\n } else {\n titleOrOpts = title as string\n }\n\n return MessageBox(\n Object.assign(\n {\n title: titleOrOpts,\n message,\n type: '',\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType],\n },\n options,\n {\n boxType,\n }\n ),\n appContext\n )\n }\n}\n\nMessageBox.close = () => {\n // instance.setupInstall.doClose()\n // instance.setupInstall.state.visible = false\n\n messageInstance.forEach((_, vm) => {\n vm.doClose()\n })\n\n messageInstance.clear()\n}\n;(MessageBox as IElMessageBox)._context = null\n\nexport default MessageBox as IElMessageBox\n"],"names":["isString","isElement","debugWarn","createVNode","MessageBoxConstructor","isFunction","isVNode","render","hasOwn","isClient","isObject","isUndefined"],"mappings":";;;;;;;;;;;AAYA,MAAM,eAAe,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAClD,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACtC,EAAE,IAAI,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE;AACtB,IAAI,IAAIA,eAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACxD,KAAK;AACL,IAAI,IAAIC,eAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AAChC,KAAK;AACL,IAAI,IAAI,CAACA,eAAS,CAAC,QAAQ,CAAC,EAAE;AAC9B,MAAMC,eAAS,CAAC,cAAc,EAAE,2EAA2E,CAAC,CAAC;AAC7G,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,KAAK;AACL,GAAG;AACH,EAAE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AACF,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,GAAG,IAAI,KAAK;AAC9D,EAAE,MAAM,KAAK,GAAGC,eAAW,CAACC,gBAAqB,EAAE,KAAK,EAAEC,iBAAU,CAAC,KAA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C,EAAE;AACzB,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,KAAK,MAAM,IAAIC,iBAAW,CAAC,KAAK,CAAC,EAAE;AACnC,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,KAAK,MAAM;AACX,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,KAAK;AACL,IAAI,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC;AACpC,MAAM,KAAK,EAAE,WAAW;AACxB,MAAM,OAAO;AACb,MAAM,IAAI,EAAE,EAAE;AACd,MAAM,GAAG,wBAAwB,CAAC,OAAO,CAAC;AAC1C,KAAK,EAAE,OAAO,EAAE;AAChB,MAAM,OAAO;AACb,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AACpB,GAAG,CAAC;AACJ,CAAC;AACD,UAAU,CAAC,KAAK,GAAG,MAAM;AACzB,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK;AACrC,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;AACjB,GAAG,CAAC,CAAC;AACL,EAAE,eAAe,CAAC,KAAK,EAAE,CAAC;AAC1B,CAAC,CAAC;AACF,UAAU,CAAC,QAAQ,GAAG,IAAI;;;;"}
|
|
1
|
+
{"version":3,"file":"messageBox.js","sources":["../../../../../../packages/components/message-box/src/messageBox.ts"],"sourcesContent":["import { createVNode, isVNode, markRaw, render } from 'vue'\nimport {\n debugWarn,\n hasOwn,\n isClient,\n isElement,\n isFunction,\n isObject,\n isString,\n isUndefined,\n} from '@element-plus/utils'\nimport MessageBoxConstructor from './index.vue'\n\nimport type { AppContext, ComponentPublicInstance, VNode } from 'vue'\nimport type {\n Action,\n Callback,\n ElMessageBoxOptions,\n ElMessageBoxShortcutMethod,\n IElMessageBox,\n MessageBoxData,\n MessageBoxState,\n} from './message-box.type'\n\n// component default merge props & data\n\nconst messageInstance = new Map<\n ComponentPublicInstance<{ doClose: () => void }>, // marking doClose as function\n {\n options: any\n callback: Callback | undefined\n resolve: (res: any) => void\n reject: (reason?: any) => void\n }\n>()\n\nconst getAppendToElement = (props: any): HTMLElement => {\n let appendTo: HTMLElement | null = document.body\n if (props.appendTo) {\n if (isString(props.appendTo)) {\n appendTo = document.querySelector<HTMLElement>(props.appendTo)\n }\n if (isElement(props.appendTo)) {\n appendTo = props.appendTo\n }\n\n // should fallback to default value with a warning\n if (!isElement(appendTo)) {\n debugWarn(\n 'ElMessageBox',\n 'the appendTo option is not an HTMLElement. Falling back to document.body.'\n )\n appendTo = document.body\n }\n }\n return appendTo\n}\n\nconst initInstance = (\n props: any,\n container: HTMLElement,\n appContext: AppContext | null = null\n) => {\n const vnode = createVNode(\n MessageBoxConstructor,\n props,\n isFunction(props.message) || isVNode(props.message)\n ? {\n default: isFunction(props.message)\n ? props.message\n : () => props.message,\n }\n : null\n )\n vnode.appContext = appContext\n render(vnode, container)\n getAppendToElement(props).appendChild(container.firstElementChild!)\n return vnode.component\n}\n\nconst genContainer = () => {\n return document.createElement('div')\n}\n\nconst showMessage = (options: any, appContext?: AppContext | null) => {\n const container = genContainer()\n // Adding destruct method.\n // when transition leaves emitting `vanish` evt. so that we can do the clean job.\n options.onVanish = () => {\n // not sure if this causes mem leak, need proof to verify that.\n // maybe calling out like 1000 msg-box then close them all.\n render(null, container)\n messageInstance.delete(vm) // Remove vm to avoid mem leak.\n // here we were suppose to call document.body.removeChild(container.firstElementChild)\n // but render(null, container) did that job for us. so that we do not call that directly\n }\n\n options.onAction = (action: Action) => {\n const currentMsg = messageInstance.get(vm)!\n let resolve: Action | { value: string; action: Action }\n if (options.showInput) {\n resolve = { value: vm.inputValue, action }\n } else {\n resolve = action\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy)\n } else {\n if (action === 'cancel' || action === 'close') {\n if (options.distinguishCancelAndClose && action !== 'cancel') {\n currentMsg.reject('close')\n } else {\n currentMsg.reject('cancel')\n }\n } else {\n currentMsg.resolve(resolve)\n }\n }\n }\n\n const instance = initInstance(options, container, appContext)!\n\n // This is how we use message box programmatically.\n // Maybe consider releasing a template version?\n // get component instance like v2.\n const vm = instance.proxy as ComponentPublicInstance<\n {\n visible: boolean\n doClose: () => void\n } & MessageBoxState\n >\n\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n if (prop === 'closeIcon' && isObject(options[prop])) {\n vm[prop as keyof ComponentPublicInstance] = markRaw(options[prop])\n } else {\n vm[prop as keyof ComponentPublicInstance] = options[prop]\n }\n }\n }\n\n // change visibility after everything is settled\n vm.visible = true\n return vm\n}\n\nasync function MessageBox(\n options: ElMessageBoxOptions,\n appContext?: AppContext | null\n): Promise<MessageBoxData>\nfunction MessageBox(\n options: ElMessageBoxOptions | string | VNode,\n appContext: AppContext | null = null\n): Promise<{ value: string; action: Action } | Action> {\n if (!isClient) return Promise.reject()\n let callback: Callback | undefined\n if (isString(options) || isVNode(options)) {\n options = {\n message: options,\n }\n } else {\n callback = options.callback\n }\n\n return new Promise((resolve, reject) => {\n const vm = showMessage(\n options,\n appContext ?? (MessageBox as IElMessageBox)._context\n )\n // collect this vm in order to handle upcoming events.\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject,\n })\n })\n}\n\nconst MESSAGE_BOX_VARIANTS = ['alert', 'confirm', 'prompt'] as const\nconst MESSAGE_BOX_DEFAULT_OPTS: Record<\n typeof MESSAGE_BOX_VARIANTS[number],\n Partial<ElMessageBoxOptions>\n> = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true },\n}\n\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n ;(MessageBox as IElMessageBox)[boxType] = messageBoxFactory(\n boxType\n ) as ElMessageBoxShortcutMethod\n})\n\nfunction messageBoxFactory(boxType: typeof MESSAGE_BOX_VARIANTS[number]) {\n return (\n message: string | VNode,\n title: string | ElMessageBoxOptions,\n options?: ElMessageBoxOptions,\n appContext?: AppContext | null\n ) => {\n let titleOrOpts = ''\n if (isObject(title)) {\n options = title as ElMessageBoxOptions\n titleOrOpts = ''\n } else if (isUndefined(title)) {\n titleOrOpts = ''\n } else {\n titleOrOpts = title as string\n }\n\n return MessageBox(\n Object.assign(\n {\n title: titleOrOpts,\n message,\n type: '',\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType],\n },\n options,\n {\n boxType,\n }\n ),\n appContext\n )\n }\n}\n\nMessageBox.close = () => {\n // instance.setupInstall.doClose()\n // instance.setupInstall.state.visible = false\n\n messageInstance.forEach((_, vm) => {\n vm.doClose()\n })\n\n messageInstance.clear()\n}\n;(MessageBox as IElMessageBox)._context = null\n\nexport default MessageBox as IElMessageBox\n"],"names":["isString","isElement","debugWarn","createVNode","MessageBoxConstructor","isFunction","isVNode","render","hasOwn","isObject","markRaw","isClient","isUndefined"],"mappings":";;;;;;;;;;;AAYA,MAAM,eAAe,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAClD,MAAM,kBAAkB,GAAG,CAAC,KAAK,KAAK;AACtC,EAAE,IAAI,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE;AACtB,IAAI,IAAIA,eAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AAClC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACxD,KAAK;AACL,IAAI,IAAIC,eAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AAChC,KAAK;AACL,IAAI,IAAI,CAACA,eAAS,CAAC,QAAQ,CAAC,EAAE;AAC9B,MAAMC,eAAS,CAAC,cAAc,EAAE,2EAA2E,CAAC,CAAC;AAC7G,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC;AAC/B,KAAK;AACL,GAAG;AACH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
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var radio$1 = require('./src/
|
|
6
|
-
var radioButton$1 = require('./src/radio-
|
|
7
|
-
var radioGroup$1 = require('./src/radio-
|
|
8
|
-
var radio = require('./src/
|
|
9
|
-
var radioGroup = require('./src/radio-
|
|
10
|
-
var radioButton = require('./src/radio-
|
|
5
|
+
var radio$1 = require('./src/radio2.js');
|
|
6
|
+
var radioButton$1 = require('./src/radio-button2.js');
|
|
7
|
+
var radioGroup$1 = require('./src/radio-group2.js');
|
|
8
|
+
var radio = require('./src/radio.js');
|
|
9
|
+
var radioGroup = require('./src/radio-group.js');
|
|
10
|
+
var radioButton = require('./src/radio-button.js');
|
|
11
11
|
var constants = require('./src/constants.js');
|
|
12
12
|
var install = require('../../utils/vue/install.js');
|
|
13
13
|
|
|
@@ -2,72 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var radioButton = require('./radio-button2.js');
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
5
|
+
var radio = require('./radio.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
10
7
|
|
|
11
|
-
const
|
|
12
|
-
|
|
8
|
+
const radioButtonProps = runtime.buildProps({
|
|
9
|
+
...radio.radioPropsBase
|
|
13
10
|
});
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
-
...__default__,
|
|
16
|
-
props: radioButton.radioButtonProps,
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const ns = index.useNamespace("radio");
|
|
20
|
-
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio.useRadio(props);
|
|
21
|
-
const activeStyle = vue.computed(() => {
|
|
22
|
-
return {
|
|
23
|
-
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
24
|
-
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
25
|
-
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
26
|
-
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
27
|
-
};
|
|
28
|
-
});
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
var _a;
|
|
31
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
32
|
-
class: vue.normalizeClass([
|
|
33
|
-
vue.unref(ns).b("button"),
|
|
34
|
-
vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
|
|
35
|
-
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
|
36
|
-
vue.unref(ns).is("focus", vue.unref(focus)),
|
|
37
|
-
vue.unref(ns).bm("button", vue.unref(size))
|
|
38
|
-
])
|
|
39
|
-
}, [
|
|
40
|
-
vue.withDirectives(vue.createElementVNode("input", {
|
|
41
|
-
ref_key: "radioRef",
|
|
42
|
-
ref: radioRef,
|
|
43
|
-
"onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
|
|
44
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
|
|
45
|
-
value: vue.unref(actualValue),
|
|
46
|
-
type: "radio",
|
|
47
|
-
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
|
48
|
-
disabled: vue.unref(disabled),
|
|
49
|
-
onFocus: ($event) => focus.value = true,
|
|
50
|
-
onBlur: ($event) => focus.value = false,
|
|
51
|
-
onClick: vue.withModifiers(() => {
|
|
52
|
-
}, ["stop"])
|
|
53
|
-
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
|
|
54
|
-
[vue.vModelRadio, vue.unref(modelValue)]
|
|
55
|
-
]),
|
|
56
|
-
vue.createElementVNode("span", {
|
|
57
|
-
class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
|
|
58
|
-
style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
|
|
59
|
-
onKeydown: vue.withModifiers(() => {
|
|
60
|
-
}, ["stop"])
|
|
61
|
-
}, [
|
|
62
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
63
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
64
|
-
])
|
|
65
|
-
], 46, ["onKeydown"])
|
|
66
|
-
], 2);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var RadioButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-button.vue"]]);
|
|
71
11
|
|
|
72
|
-
exports
|
|
12
|
+
exports.radioButtonProps = radioButtonProps;
|
|
73
13
|
//# sourceMappingURL=radio-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button.js","sources":["../../../../../../packages/components/radio/src/radio-button.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { radioPropsBase } from './radio'\nimport type { ExtractPropTypes } from 'vue'\nimport type RadioButton from './radio-button.vue'\n\nexport const radioButtonProps = buildProps({\n ...radioPropsBase,\n} as const)\n\nexport type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>\nexport type RadioButtonInstance = InstanceType<typeof RadioButton>\n"],"names":["buildProps","radioPropsBase"],"mappings":";;;;;;;AAEY,MAAC,gBAAgB,GAAGA,kBAAU,CAAC;AAC3C,EAAE,GAAGC,oBAAc;AACnB,CAAC;;;;"}
|
|
@@ -2,12 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var useRadio = require('./use-radio.js');
|
|
7
|
+
var radioButton = require('./radio-button.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "ElRadioButton"
|
|
10
13
|
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: radioButton.radioButtonProps,
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const ns = index.useNamespace("radio");
|
|
20
|
+
const { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } = useRadio.useRadio(props);
|
|
21
|
+
const activeStyle = vue.computed(() => {
|
|
22
|
+
return {
|
|
23
|
+
backgroundColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
24
|
+
borderColor: (radioGroup == null ? void 0 : radioGroup.fill) || "",
|
|
25
|
+
boxShadow: (radioGroup == null ? void 0 : radioGroup.fill) ? `-1px 0 0 0 ${radioGroup.fill}` : "",
|
|
26
|
+
color: (radioGroup == null ? void 0 : radioGroup.textColor) || ""
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return vue.openBlock(), vue.createElementBlock("label", {
|
|
32
|
+
class: vue.normalizeClass([
|
|
33
|
+
vue.unref(ns).b("button"),
|
|
34
|
+
vue.unref(ns).is("active", vue.unref(modelValue) === vue.unref(actualValue)),
|
|
35
|
+
vue.unref(ns).is("disabled", vue.unref(disabled)),
|
|
36
|
+
vue.unref(ns).is("focus", vue.unref(focus)),
|
|
37
|
+
vue.unref(ns).bm("button", vue.unref(size))
|
|
38
|
+
])
|
|
39
|
+
}, [
|
|
40
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
41
|
+
ref_key: "radioRef",
|
|
42
|
+
ref: radioRef,
|
|
43
|
+
"onUpdate:modelValue": ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null,
|
|
44
|
+
class: vue.normalizeClass(vue.unref(ns).be("button", "original-radio")),
|
|
45
|
+
value: vue.unref(actualValue),
|
|
46
|
+
type: "radio",
|
|
47
|
+
name: _ctx.name || ((_a = vue.unref(radioGroup)) == null ? void 0 : _a.name),
|
|
48
|
+
disabled: vue.unref(disabled),
|
|
49
|
+
onFocus: ($event) => focus.value = true,
|
|
50
|
+
onBlur: ($event) => focus.value = false,
|
|
51
|
+
onClick: vue.withModifiers(() => {
|
|
52
|
+
}, ["stop"])
|
|
53
|
+
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
|
|
54
|
+
[vue.vModelRadio, vue.unref(modelValue)]
|
|
55
|
+
]),
|
|
56
|
+
vue.createElementVNode("span", {
|
|
57
|
+
class: vue.normalizeClass(vue.unref(ns).be("button", "inner")),
|
|
58
|
+
style: vue.normalizeStyle(vue.unref(modelValue) === vue.unref(actualValue) ? vue.unref(activeStyle) : {}),
|
|
59
|
+
onKeydown: vue.withModifiers(() => {
|
|
60
|
+
}, ["stop"])
|
|
61
|
+
}, [
|
|
62
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
63
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
64
|
+
])
|
|
65
|
+
], 46, ["onKeydown"])
|
|
66
|
+
], 2);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
var RadioButton = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-button.vue"]]);
|
|
11
71
|
|
|
12
|
-
exports
|
|
72
|
+
exports["default"] = RadioButton;
|
|
13
73
|
//# sourceMappingURL=radio-button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.
|
|
1
|
+
{"version":3,"file":"radio-button2.js","sources":["../../../../../../packages/components/radio/src/radio-button.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b('button'),\n ns.is('active', modelValue === actualValue),\n ns.is('disabled', disabled),\n ns.is('focus', focus),\n ns.bm('button', size),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.be('button', 'original-radio')\"\n :value=\"actualValue\"\n type=\"radio\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"disabled\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @click.stop\n />\n <span\n :class=\"ns.be('button', 'inner')\"\n :style=\"modelValue === actualValue ? activeStyle : {}\"\n @keydown.stop\n >\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useRadio } from './use-radio'\nimport { radioButtonProps } from './radio-button'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElRadioButton',\n})\n\nconst props = defineProps(radioButtonProps)\n\nconst ns = useNamespace('radio')\nconst { radioRef, focus, size, disabled, modelValue, radioGroup, actualValue } =\n useRadio(props)\n\nconst activeStyle = computed<CSSProperties>(() => {\n return {\n backgroundColor: radioGroup?.fill || '',\n borderColor: radioGroup?.fill || '',\n boxShadow: radioGroup?.fill ? `-1px 0 0 0 ${radioGroup.fill}` : '',\n color: radioGroup?.textColor || '',\n }\n})\n</script>\n"],"names":["useNamespace","useRadio","computed"],"mappings":";;;;;;;;;;uCAyCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAU,EAAA,KAAA,EAAO,IAAM,EAAA,QAAA,EAAU,YAAY,UAAY,EAAA,WAAA,EAC/D,GAAAC,iBAAA,CAAS,KAAK,CAAA,CAAA;AAEhB,IAAM,MAAA,WAAA,GAAcC,aAAwB,MAAM;AAChD,MAAO,OAAA;AAAA,QACL,eAAA,EAAiB,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACrC,WAAA,EAAa,eAAoB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,IAAA,KAAA,EAAA;AAAA,QACjC,WAAW,CAAY,UAAA,IAAA,IAAO,GAAc,KAAA,CAAA,GAAA,UAAA,CAAA,QAAoB,CAAA,WAAA,EAAA,UAAA,CAAA,IAAA,CAAA,CAAA,GAAA,EAAA;AAAA,QAChE,KAAA,EAAO,eAAyB,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,SAAA,KAAA,EAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|