@element-plus/nightly 0.0.20220123 → 0.0.20220127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +1248 -1000
- 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 +1248 -1000
- package/dist/locale/af.js +6 -8
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.js.map +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +6 -8
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.js.map +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/bg.js +6 -8
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.js.map +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +6 -8
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.js.map +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +6 -8
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.js.map +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +6 -8
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.js.map +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +6 -8
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.js.map +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +6 -8
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.js.map +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +6 -8
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.js.map +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +6 -8
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.js.map +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +6 -8
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.js.map +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +6 -8
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.js.map +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +6 -8
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.js.map +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +6 -8
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.js.map +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +6 -8
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.js.map +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +6 -8
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.js.map +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +6 -8
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.js.map +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +6 -8
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.js.map +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +6 -8
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.js.map +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +6 -8
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.js.map +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +6 -8
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.js.map +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +6 -8
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.js.map +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +6 -8
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.js.map +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +6 -8
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.js.map +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +6 -8
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.js.map +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +6 -8
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.js.map +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +6 -8
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.js.map +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +6 -8
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.js.map +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +6 -8
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.js.map +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +6 -8
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.js.map +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +6 -8
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.js.map +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mn.js +6 -8
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.js.map +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +6 -8
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.js.map +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +6 -8
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.js.map +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +6 -8
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.js.map +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +6 -8
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.js.map +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +6 -8
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.js.map +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +6 -8
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.js.map +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +6 -8
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.js.map +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +6 -8
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.js.map +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +6 -8
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.js.map +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +6 -8
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.js.map +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +6 -8
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.js.map +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +6 -8
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.js.map +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +6 -8
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.js.map +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +6 -8
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.js.map +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +6 -8
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.js.map +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +6 -8
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.js.map +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +6 -8
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.js.map +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +6 -8
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.js.map +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +6 -8
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.js.map +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +6 -8
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.js.map +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +6 -8
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +6 -8
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix2.mjs +2 -1
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/autocomplete/src/index.mjs +2 -1
- package/es/components/autocomplete/src/index.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +2 -1
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +11 -7
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +11 -0
- package/es/components/carousel/src/item.mjs +21 -15
- package/es/components/carousel/src/item.mjs.map +1 -1
- package/es/components/carousel/src/main.mjs +25 -23
- package/es/components/carousel/src/main.mjs.map +1 -1
- package/es/components/carousel/src/main.vue.d.ts +11 -0
- package/es/components/cascader/index.d.ts +4 -0
- package/es/components/cascader/src/index.mjs +38 -21
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +2 -0
- package/es/components/cascader-panel/src/index.mjs +16 -13
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/cascader-panel/src/menu.mjs +25 -22
- package/es/components/cascader-panel/src/menu.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +6 -2
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +36 -3
- package/es/components/checkbox/src/checkbox-button.mjs +21 -15
- package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +12 -1
- package/es/components/checkbox/src/checkbox-group.mjs +5 -2
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.mjs +36 -28
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +12 -1
- package/es/components/checkbox/src/useCheckbox.d.ts +1 -1
- package/es/components/checkbox/src/useCheckbox.mjs +2 -2
- package/es/components/checkbox/src/useCheckbox.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item.mjs +3 -3
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +8 -5
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs +2 -1
- package/es/components/date-picker/src/date-picker-com/basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-month-table.mjs +2 -1
- package/es/components/date-picker/src/date-picker-com/basic-month-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/descriptions/src/index.mjs +7 -2
- package/es/components/descriptions/src/index.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -3
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/drawer/index.d.ts +11 -0
- package/es/components/drawer/src/drawer.vue.d.ts +11 -0
- package/es/components/drawer/src/drawer2.mjs +33 -29
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +12 -6
- package/es/components/dropdown/src/dropdown-item.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +2 -1
- package/es/components/dropdown/src/dropdown-menu.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +9 -5
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/empty/src/img-empty.mjs +13 -13
- package/es/components/empty/src/img-empty.mjs.map +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
- package/es/components/form/src/form-item.mjs +6 -4
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +3 -2
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +3 -2
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/input/src/input2.mjs +17 -8
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +12 -6
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +1 -1
- package/es/components/message-box/src/index.mjs +9 -4
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/message-box/src/index.vue.d.ts +1 -0
- package/es/components/notification/src/notification2.mjs +1 -1
- package/es/components/pagination/src/components/jumper.mjs +11 -5
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +9 -4
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +3 -0
- package/es/components/pagination/src/components/total.mjs +10 -4
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total.vue.d.ts +1 -0
- package/es/components/pagination/src/pagination.mjs +12 -1
- package/es/components/pagination/src/pagination.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +45 -104
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +107 -45
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/index.d.ts +0 -6
- package/es/components/popover/src/index.mjs +4 -2
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +0 -3
- package/es/components/popover/src/popover.d.ts +0 -1
- package/es/components/popover/src/popover.mjs +0 -4
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +5 -3
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/trigger.mjs +1 -1
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +2 -1
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +4 -4
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +1 -1
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/rate/index.d.ts +8 -8
- package/es/components/rate/src/rate.d.ts +4 -4
- package/es/components/rate/src/rate.mjs +8 -4
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +8 -8
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +10 -6
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +2 -1
- package/es/components/scrollbar/index.mjs +1 -1
- package/es/components/scrollbar/index.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.d.ts +5 -5
- package/es/components/scrollbar/src/bar.mjs +18 -6
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.vue.d.ts +18 -37
- package/es/components/scrollbar/src/bar2.mjs +34 -117
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +1 -0
- package/es/components/scrollbar/src/scrollbar2.mjs +16 -22
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.d.ts +9 -0
- package/es/components/scrollbar/src/thumb.mjs +15 -0
- package/es/components/scrollbar/src/thumb.mjs.map +1 -0
- package/es/components/scrollbar/src/thumb.vue.d.ts +43 -0
- package/es/components/scrollbar/src/thumb2.mjs +135 -0
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -0
- package/es/components/select/src/option-group.mjs +2 -1
- package/es/components/select/src/option-group.mjs.map +1 -1
- package/es/components/select/src/select-dropdown.mjs +2 -1
- package/es/components/select/src/select-dropdown.mjs.map +1 -1
- package/es/components/select/src/select.mjs +5 -1
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select-v2/src/select-dropdown.mjs +2 -1
- package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +192 -186
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/slider/src/index.mjs +3 -2
- package/es/components/slider/src/index.mjs.map +1 -1
- package/es/components/slider/src/marker.mjs +2 -1
- package/es/components/slider/src/marker.mjs.map +1 -1
- package/es/components/steps/src/item.mjs +2 -1
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +4 -2
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/filter-panel.mjs +7 -3
- package/es/components/table/src/filter-panel.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +1 -1
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs +3 -2
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +3 -2
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tag/index.d.ts +12 -1
- package/es/components/tag/src/tag.vue.d.ts +12 -1
- package/es/components/tag/src/tag2.mjs +23 -18
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.mjs +16 -8
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-select/src/time-select.mjs +4 -2
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +9 -4
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +2 -1
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +492 -0
- package/es/components/transfer/src/index.mjs +13 -7
- package/es/components/transfer/src/index.mjs.map +1 -1
- package/es/components/transfer/src/index.vue.d.ts +246 -0
- package/es/components/tree/src/tree.mjs +2 -1
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree-node.mjs +11 -7
- package/es/components/tree-v2/src/tree-node.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.mjs +2 -1
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/components/upload/src/index.mjs +3 -2
- package/es/components/upload/src/index.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger.mjs +2 -1
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/index.mjs +2 -2
- package/es/utils/validators.d.ts +0 -1
- package/es/utils/validators.mjs +1 -9
- package/es/utils/validators.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix2.js +2 -1
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/autocomplete/src/index.js +2 -1
- package/lib/components/autocomplete/src/index.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +2 -1
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/src/button2.js +11 -7
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/carousel/index.d.ts +11 -0
- package/lib/components/carousel/src/item.js +21 -15
- package/lib/components/carousel/src/item.js.map +1 -1
- package/lib/components/carousel/src/main.js +25 -23
- package/lib/components/carousel/src/main.js.map +1 -1
- package/lib/components/carousel/src/main.vue.d.ts +11 -0
- package/lib/components/cascader/index.d.ts +4 -0
- package/lib/components/cascader/src/index.js +38 -21
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +2 -0
- package/lib/components/cascader-panel/src/index.js +16 -13
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/cascader-panel/src/menu.js +25 -22
- package/lib/components/cascader-panel/src/menu.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +6 -2
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +36 -3
- package/lib/components/checkbox/src/checkbox-button.js +21 -15
- package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +12 -1
- package/lib/components/checkbox/src/checkbox-group.js +5 -2
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +35 -27
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +12 -1
- package/lib/components/checkbox/src/useCheckbox.d.ts +1 -1
- package/lib/components/checkbox/src/useCheckbox.js +2 -2
- package/lib/components/checkbox/src/useCheckbox.js.map +1 -1
- package/lib/components/collapse/src/collapse-item.js +3 -3
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/color-picker/src/index.js +8 -5
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js +2 -1
- package/lib/components/date-picker/src/date-picker-com/basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-month-table.js +2 -1
- package/lib/components/date-picker/src/date-picker-com/basic-month-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/descriptions/src/index.js +7 -2
- package/lib/components/descriptions/src/index.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -3
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/drawer/index.d.ts +11 -0
- package/lib/components/drawer/src/drawer.vue.d.ts +11 -0
- package/lib/components/drawer/src/drawer2.js +33 -29
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +12 -6
- package/lib/components/dropdown/src/dropdown-item.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +2 -1
- package/lib/components/dropdown/src/dropdown-menu.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +9 -5
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/empty/src/img-empty.js +13 -13
- package/lib/components/empty/src/img-empty.js.map +1 -1
- package/lib/components/focus-trap/src/focus-trap.js +1 -1
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
- package/lib/components/form/src/form-item.js +6 -4
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/image/src/image2.js +3 -2
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +3 -2
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +3 -3
- package/lib/components/input/src/input2.js +17 -8
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +12 -6
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/message/src/message2.js +1 -1
- package/lib/components/message-box/src/index.js +17 -12
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +1 -0
- package/lib/components/notification/src/notification2.js +1 -1
- package/lib/components/pagination/src/components/jumper.js +11 -5
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +9 -4
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +3 -0
- package/lib/components/pagination/src/components/total.js +10 -4
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total.vue.d.ts +1 -0
- package/lib/components/pagination/src/pagination.js +12 -1
- package/lib/components/pagination/src/pagination.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +45 -104
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +107 -45
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/index.d.ts +0 -6
- package/lib/components/popover/src/index.js +4 -2
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +0 -3
- package/lib/components/popover/src/popover.d.ts +0 -1
- package/lib/components/popover/src/popover.js +0 -4
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popper/src/content.js +5 -3
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/trigger.js +1 -1
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/progress/src/progress2.js +2 -1
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +4 -4
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +1 -1
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/rate/index.d.ts +8 -8
- package/lib/components/rate/src/rate.d.ts +4 -4
- package/lib/components/rate/src/rate.js +8 -4
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +8 -8
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +10 -6
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +2 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/index.js.map +1 -1
- package/lib/components/scrollbar/src/bar.d.ts +5 -5
- package/lib/components/scrollbar/src/bar.js +18 -6
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar.vue.d.ts +18 -37
- package/lib/components/scrollbar/src/bar2.js +33 -116
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +1 -0
- package/lib/components/scrollbar/src/scrollbar2.js +15 -21
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.d.ts +9 -0
- package/lib/components/scrollbar/src/thumb.js +19 -0
- package/lib/components/scrollbar/src/thumb.js.map +1 -0
- package/lib/components/scrollbar/src/thumb.vue.d.ts +43 -0
- package/lib/components/scrollbar/src/thumb2.js +139 -0
- package/lib/components/scrollbar/src/thumb2.js.map +1 -0
- package/lib/components/select/src/option-group.js +2 -1
- package/lib/components/select/src/option-group.js.map +1 -1
- package/lib/components/select/src/select-dropdown.js +2 -1
- package/lib/components/select/src/select-dropdown.js.map +1 -1
- package/lib/components/select/src/select.js +5 -1
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select-v2/src/select-dropdown.js +2 -1
- package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
- package/lib/components/select-v2/src/select.js +192 -186
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/slider/src/index.js +3 -2
- package/lib/components/slider/src/index.js.map +1 -1
- package/lib/components/slider/src/marker.js +2 -1
- package/lib/components/slider/src/marker.js.map +1 -1
- package/lib/components/steps/src/item.js +2 -1
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/switch/src/switch2.js +4 -2
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/filter-panel.js +7 -3
- package/lib/components/table/src/filter-panel.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +1 -1
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table.js +3 -2
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +3 -2
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tag/index.d.ts +12 -1
- package/lib/components/tag/src/tag.vue.d.ts +12 -1
- package/lib/components/tag/src/tag2.js +23 -18
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.js +16 -8
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-select/src/time-select.js +4 -2
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/tooltip/src/content.js +9 -4
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +2 -1
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +492 -0
- package/lib/components/transfer/src/index.js +13 -7
- package/lib/components/transfer/src/index.js.map +1 -1
- package/lib/components/transfer/src/index.vue.d.ts +246 -0
- package/lib/components/tree/src/tree.js +2 -1
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree-v2/src/tree-node.js +11 -7
- package/lib/components/tree-v2/src/tree-node.js.map +1 -1
- package/lib/components/tree-v2/src/tree.js +2 -1
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/components/upload/src/index.js +3 -2
- package/lib/components/upload/src/index.js.map +1 -1
- package/lib/components/upload/src/upload-dragger.js +2 -1
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/utils/validators.d.ts +0 -1
- package/lib/utils/validators.js +0 -9
- package/lib/utils/validators.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-breadcrumb.css +1 -1
- package/theme-chalk/el-empty.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-tooltip.css +0 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/breadcrumb.scss +2 -0
- package/theme-chalk/src/common/var.scss +18 -19
- package/theme-chalk/src/pagination.scss +73 -56
- package/theme-chalk/src/popper.scss +20 -2
- package/theme-chalk/src/select.scss +3 -3
- package/theme-chalk/src/table.scss +0 -12
- package/theme-chalk/src/tooltip.scss +0 -95
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/components/message-box/src/index.vue"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":["defineComponent","TrapFocus","ElButton","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","useLocale","ref","reactive","PopupManager","computed","TypeComponentsMap","nextTick","EVENT_CODE","toRefs","_openBlock","_Transition","_createVNode","_createElementBlock","_createCommentVNode","_withModifiers","_withCtx","_createElementVNode","_normalizeClass"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2JA,MAAK,YAAaA,oBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,eACVC;AAAA;AAAA,EAEF,YAAY;AAAA,cACVC;AAAA,aACAC;AAAA,eACAC;AAAA,YACAC;AAAA,OACGC;AAAA;AAAA,EAEL,cAAc;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WAAWC;AAAA;AAAA,IAEb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AAAA,kBACX,aAAK;AAAA,kBACL,0BAAO,gBAAgB;AAAA;mBAE1B,SAOM;AAAA,uCANE;AAAA,kBACL,OAAK;AAAA,4CAAkC;AAAA;;;uBAXtB;AAAA;;;mCAqBd,OAAgB;AAAA;gBACrB;AAAA,gBACA,SAAK;AAAA,gBACL,OAAOC,mBAAW;AAAA,gBAClB,OAAM;AAAA,gBACN,WAAK;AAAA,gBACL,SAAO;AAAA;;;;;;qFAIV,QAaY;AAAA,iCAXNN,gBAAY;AAAA,gBAChB,KAAI;AAAA,gBACH;AAAA,gBACA,SAAK;AAAA,gBACL,OAAOM,mBAAW;AAAA,gBAClB,YAAU;AAAA,gBACV,UAAM;AAAA,gBACN,WAAK;AAAA,gBACL,SAAO;AAAA;;;;;;oBATA,qBAAiB;AAAA;;;;;;;;YAhGvB,YAAO;AAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/components/message-box/src/index.vue"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"btnSize\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"btnSize\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n useSize,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const btnSize = useSize(\n computed(() => props.buttonSize),\n { prop: true, form: true, formItem: true }\n )\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":["defineComponent","TrapFocus","ElButton","ElInput","ElOverlay","ElIcon","TypeComponents","isValidComponentSize","useLocale","ref","reactive","PopupManager","computed","TypeComponentsMap","useSize","nextTick","_withCtx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4JA,MAAK,YAAaA,oBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,eACVC;AAAA;AAAA,EAEF,YAAY;AAAA,cACVC;AAAA,aACAC;AAAA,eACAC;AAAA,YACAC;AAAA,OACGC;AAAA;AAAA,EAEL,cAAc;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WAAWC;AAAA;AAAA,IAEb,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,QAAQ;AAAA,IACR,aAAa;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA;AAAA,IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;AAAA,IAEX,SAA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AAGM,iBAENC;AAAA;AACH,YACD;AAAiB,YAChB,cAAK;AAAA;;AAA0C;;;;aAQxC;AAAA,sCADR;AAaQ;AAP2B;;AACxB;;;AAGL;;;;AAEsB;;;gBAIxB;AAAI;AACC,gBACL;AAAA,gBACC,cAAK;AAAA,gBAAiB;gBAGgB;;AAIvC,iDAAgD;AAAA;AAAA;;;;;kBAGpD;AAAA;AAeQ;AAZ4B;;AACzB;;;AAGL;;;;AAEmB;AAIZ,8BAFK;AAAwB,0EAClC,oBAA+B;;AAArB;;;;;;AAYZ;AANc;;kBAEb;AAAe,kBACf;AAAW,kBACX;AAAK,kBACL;AAAuB;;AASpB;AANE,yBACA;AAAA,4CAAkC;AAAA;;;;AAXtB;;;;AAqBE;;AACrB;AACK,gBACL;AAAkB,gBAClB,OAAM;AAAA,gBACN;AAAK,gBACL;AAAO;;;;;;;AAiBE;AAXM,qBACZ;AAAA;AACH,gBACA;AAAK,gBACL;AAAkB,gBAClB;AAAU,gBACV;AAAM,gBACN,WAAK;AAAA,gBACL;AAAO;;;;;;;AATiB;;;;;;;;;AAhGhB;;;;;;;;;;;;"}
|
|
@@ -47,6 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
47
|
visible: import("vue").Ref<boolean>;
|
|
48
48
|
hasMessage: import("vue").ComputedRef<boolean>;
|
|
49
49
|
typeClass: import("vue").ComputedRef<string>;
|
|
50
|
+
btnSize: import("vue").ComputedRef<ComponentSize>;
|
|
50
51
|
iconComponent: import("vue").ComputedRef<any>;
|
|
51
52
|
confirmButtonClasses: import("vue").ComputedRef<string>;
|
|
52
53
|
inputRef: import("vue").Ref<ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>>;
|
|
@@ -18,13 +18,16 @@ const _sfc_main = vue.defineComponent({
|
|
|
18
18
|
const { t } = index$1.useLocale();
|
|
19
19
|
const { pageCount, disabled, currentPage, changeEvent } = usePagination.usePagination();
|
|
20
20
|
const userInput = vue.ref();
|
|
21
|
-
const innerValue = vue.computed(() =>
|
|
21
|
+
const innerValue = vue.computed(() => {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = userInput.value) != null ? _a : currentPage == null ? void 0 : currentPage.value;
|
|
24
|
+
});
|
|
22
25
|
function handleInput(val) {
|
|
23
26
|
userInput.value = +val;
|
|
24
27
|
}
|
|
25
28
|
function handleChange(val) {
|
|
26
29
|
val = Math.trunc(+val);
|
|
27
|
-
changeEvent
|
|
30
|
+
changeEvent == null ? void 0 : changeEvent(+val);
|
|
28
31
|
userInput.value = void 0;
|
|
29
32
|
}
|
|
30
33
|
return {
|
|
@@ -37,10 +40,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
37
40
|
};
|
|
38
41
|
}
|
|
39
42
|
});
|
|
40
|
-
const _hoisted_1 =
|
|
43
|
+
const _hoisted_1 = ["disabled"];
|
|
41
44
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
42
45
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
43
|
-
return vue.openBlock(), vue.createElementBlock("span",
|
|
46
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
47
|
+
class: "el-pagination__jump",
|
|
48
|
+
disabled: _ctx.disabled
|
|
49
|
+
}, [
|
|
44
50
|
vue.createTextVNode(vue.toDisplayString(_ctx.t("el.pagination.goto")) + " ", 1),
|
|
45
51
|
vue.createVNode(_component_el_input, {
|
|
46
52
|
size: "small",
|
|
@@ -54,7 +60,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
54
60
|
onChange: _ctx.handleChange
|
|
55
61
|
}, null, 8, ["max", "disabled", "model-value", "onUpdate:modelValue", "onChange"]),
|
|
56
62
|
vue.createTextVNode(" " + vue.toDisplayString(_ctx.t("el.pagination.pageClassifier")), 1)
|
|
57
|
-
]);
|
|
63
|
+
], 8, _hoisted_1);
|
|
58
64
|
}
|
|
59
65
|
var Jumper = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
60
66
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jumper.js","sources":["../../../../../../../packages/components/pagination/src/components/jumper.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__jump\">\n {{ t('el.pagination.goto') }}\n <el-input\n size=\"small\"\n class=\"el-pagination__editor is-in-pagination\"\n :min=\"1\"\n :max=\"pageCount\"\n :disabled=\"disabled\"\n :model-value=\"innerValue\"\n type=\"number\"\n @update:model-value=\"handleInput\"\n @change=\"handleChange\"\n />\n {{ t('el.pagination.pageClassifier') }}\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { usePagination } from '../usePagination'\n\nexport default defineComponent({\n name: 'ElPaginationJumper',\n components: {\n ElInput,\n },\n\n setup() {\n const { t } = useLocale()\n const { pageCount, disabled, currentPage, changeEvent } = usePagination()\n const userInput = ref<number>()\n const innerValue = computed(() => userInput.value ?? currentPage?.value)\n\n function handleInput(val: number | string) {\n userInput.value = +val\n }\n\n function handleChange(val: number | string) {\n val = Math.trunc(+val)\n changeEvent?.(+val)\n userInput.value = undefined\n }\n\n return {\n pageCount,\n disabled,\n innerValue,\n\n t,\n handleInput,\n handleChange,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ElInput","useLocale","usePagination","ref","computed"
|
|
1
|
+
{"version":3,"file":"jumper.js","sources":["../../../../../../../packages/components/pagination/src/components/jumper.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__jump\" :disabled=\"disabled\">\n {{ t('el.pagination.goto') }}\n <el-input\n size=\"small\"\n class=\"el-pagination__editor is-in-pagination\"\n :min=\"1\"\n :max=\"pageCount\"\n :disabled=\"disabled\"\n :model-value=\"innerValue\"\n type=\"number\"\n @update:model-value=\"handleInput\"\n @change=\"handleChange\"\n />\n {{ t('el.pagination.pageClassifier') }}\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { usePagination } from '../usePagination'\n\nexport default defineComponent({\n name: 'ElPaginationJumper',\n components: {\n ElInput,\n },\n\n setup() {\n const { t } = useLocale()\n const { pageCount, disabled, currentPage, changeEvent } = usePagination()\n const userInput = ref<number>()\n const innerValue = computed(() => userInput.value ?? currentPage?.value)\n\n function handleInput(val: number | string) {\n userInput.value = +val\n }\n\n function handleChange(val: number | string) {\n val = Math.trunc(+val)\n changeEvent?.(+val)\n userInput.value = undefined\n }\n\n return {\n pageCount,\n disabled,\n innerValue,\n\n t,\n handleInput,\n handleChange,\n }\n },\n})\n</script>\n"],"names":["defineComponent","ElInput","useLocale","usePagination","ref","computed"],"mappings":";;;;;;;;;;;AAwBA,MAAK,YAAaA,oBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,aACVC;AAAA;AAAA,EAGF,QAAQ;AACN,UAAM,EAAE,MAAMC;AACd,UAAM,EAAE,WAAW,UAAU,aAAa,gBAAgBC;AAC1D,UAAM,YAAYC;AAClB,UAAM,aAAaC,aAAS,MAAM;AAElC;AACE,gBAAU;AAAS;AAGrB;AACE,wBAAkB;AAClB;AACA;AAAkB;AAGpB;AAAO,MACL;AAAA;AACA;AACA,MAEA;AAAA,MACA;AAAA,MACA;AAAA;AAAA;AAAA;;;;;AApD6B;AAAE;;IAEjC;AAUE;AATY;AACP;AACE;AACD,MACL;AAAU,MACV;AAAa,MACd;AAAa,MACZ;AAAA,MACA,uBAAQ;AAAY;;AAEnB;;;;;;;;;;"}
|
|
@@ -28,7 +28,11 @@ const paginationSizesProps = props.buildProps({
|
|
|
28
28
|
type: String,
|
|
29
29
|
default: ""
|
|
30
30
|
},
|
|
31
|
-
disabled: Boolean
|
|
31
|
+
disabled: Boolean,
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "default"
|
|
35
|
+
}
|
|
32
36
|
});
|
|
33
37
|
const _sfc_main = vue.defineComponent({
|
|
34
38
|
name: "ElPaginationSizes",
|
|
@@ -55,9 +59,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
55
59
|
});
|
|
56
60
|
const innerPagesizes = vue.computed(() => props.pageSizes);
|
|
57
61
|
function handleChange(val) {
|
|
62
|
+
var _a;
|
|
58
63
|
if (val !== innerPageSize.value) {
|
|
59
64
|
innerPageSize.value = val;
|
|
60
|
-
pagination.handleSizeChange
|
|
65
|
+
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
return {
|
|
@@ -77,7 +82,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
77
82
|
"model-value": _ctx.innerPageSize,
|
|
78
83
|
disabled: _ctx.disabled,
|
|
79
84
|
"popper-class": _ctx.popperClass,
|
|
80
|
-
size:
|
|
85
|
+
size: _ctx.size,
|
|
81
86
|
onChange: _ctx.handleChange
|
|
82
87
|
}, {
|
|
83
88
|
default: vue.withCtx(() => [
|
|
@@ -90,7 +95,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
95
|
}), 128))
|
|
91
96
|
]),
|
|
92
97
|
_: 1
|
|
93
|
-
}, 8, ["model-value", "disabled", "popper-class", "onChange"])
|
|
98
|
+
}, 8, ["model-value", "disabled", "popper-class", "size", "onChange"])
|
|
94
99
|
]);
|
|
95
100
|
}
|
|
96
101
|
var Sizes = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.js","sources":["../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__sizes\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n size=\"
|
|
1
|
+
{"version":3,"file":"sizes.js","sources":["../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__sizes\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n :size=\"size\"\n @change=\"handleChange\"\n >\n <el-option\n v-for=\"item in innerPagesizes\"\n :key=\"item\"\n :value=\"item\"\n :label=\"item + t('el.pagination.pagesize')\"\n />\n </el-select>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, watch, computed, ref } from 'vue'\nimport isEqual from 'lodash/isEqual'\nimport { ElSelect, ElOption } from '@element-plus/components/select'\nimport { useLocale } from '@element-plus/hooks'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils/props'\nimport { usePagination } from '../usePagination'\n\nimport type { Nullable } from '@element-plus/utils/types'\n\nconst paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n default: '',\n },\n disabled: Boolean,\n size: {\n type: String,\n default: 'default',\n },\n} as const)\n\nexport default defineComponent({\n name: 'ElPaginationSizes',\n\n components: {\n ElSelect,\n ElOption,\n },\n\n props: paginationSizesProps,\n emits: ['page-size-change'],\n\n setup(props, { emit }) {\n const { t } = useLocale()\n const pagination = usePagination()\n const innerPageSize = ref<Nullable<number>>(props.pageSize)\n\n watch(\n () => props.pageSizes,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n if (Array.isArray(newVal)) {\n const pageSize =\n newVal.indexOf(props.pageSize) > -1\n ? props.pageSize\n : props.pageSizes[0]\n emit('page-size-change', pageSize)\n }\n }\n )\n\n watch(\n () => props.pageSize,\n (newVal) => {\n innerPageSize.value = newVal\n }\n )\n\n const innerPagesizes = computed(() => props.pageSizes)\n\n function handleChange(val: number) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val\n pagination.handleSizeChange?.(Number(val))\n }\n }\n\n return {\n innerPagesizes,\n innerPageSize,\n\n t,\n handleChange,\n }\n },\n})\n</script>\n"],"names":["buildProps","definePropType","mutable","defineComponent","ElSelect","ElOption","useLocale","usePagination","ref","isEqual","computed","_openBlock"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,MAAM,uBAAuBA,iBAAW;AAAA,EACtC,UAAU;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,EAEZ,WAAW;AAAA,IACT,MAAMC,qBAAyB;AAAA,IAC/B,SAAS,MAAMC,cAAQ,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI;AAAA;AAAA,EAE9C,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA;AAAA,EAEX,UAAU;AAAA,EACV,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA;AAAA;AAIb,MAAK,YAAaC,oBAAa;AAAA,EAC7B,MAAM;AAAA,EAEN,YAAY;AAAA,cACVC;AAAA,cACAC;AAAA;AAAA,EAGF,OAAO;AAAA,EACP,OAAO,CAAC;AAAA,EAER,MAAM,OAAO,EAAE,QAAQ;AACrB,UAAM,EAAE,MAAMC;AACd,UAAM,aAAaC;AACnB,UAAM,gBAAgBC,QAAsB,MAAM;AAElD,cACE,MAAM,MAAM,WACZ,CAAC,QAAQ,WAAW;AAClB,UAAIC,4BAAQ,QAAQ;AAAS;AAC7B,UAAI,MAAM,QAAQ,SAAS;AACzB,cAAM,WACJ,OAAO,QAAQ,MAAM,YAAY,KAC7B,MAAM,WACN,MAAM,UAAU;AACtB,aAAK,oBAAoB;AAAA;AAAA;AAK/B,cACE,MAAM,MAAM,UACZ,CAAC,WAAW;AACV,oBAAc,QAAQ;AAAA;AAI1B,UAAM,iBAAiBC,aAAS,MAAM,MAAM;AAE5C,0BAAsB,KAAa;AACjC,UAAI;AACF;AACA;AAAqC;AAAA;AAIzC;AAAO;AACL,MACA;AAAA,MAEA;AAAA,MACA;AAAA;AAAA;AAAA;;;;;;AArFU;AAZiB;AAChB,MACV,eAAY;AAAA,MACZ;AAAU,MACV;AAAQ;;;AAET;;AAEY,iBACJC;AAAA,YACL;AAAO;;;;;;;;;;;;;"}
|
|
@@ -4,6 +4,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4
4
|
readonly pageSizes: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<number[]>, () => [10, 20, 30, 40, 50, 100], unknown, unknown, unknown>;
|
|
5
5
|
readonly popperClass: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
6
6
|
readonly disabled: BooleanConstructor;
|
|
7
|
+
readonly size: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "default", unknown, unknown, unknown>;
|
|
7
8
|
}, {
|
|
8
9
|
innerPagesizes: import("vue").ComputedRef<number[]>;
|
|
9
10
|
innerPageSize: import("vue").Ref<Nullable<number>>;
|
|
@@ -14,9 +15,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
15
|
readonly pageSizes: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<number[]>, () => [10, 20, 30, 40, 50, 100], unknown, unknown, unknown>;
|
|
15
16
|
readonly popperClass: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
|
|
16
17
|
readonly disabled: BooleanConstructor;
|
|
18
|
+
readonly size: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "default", unknown, unknown, unknown>;
|
|
17
19
|
}>> & {
|
|
18
20
|
"onPage-size-change"?: ((...args: any[]) => any) | undefined;
|
|
19
21
|
}, {
|
|
22
|
+
size: string;
|
|
20
23
|
disabled: boolean;
|
|
21
24
|
popperClass: string;
|
|
22
25
|
pageSizes: number[];
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
require('../../../../hooks/index.js');
|
|
7
|
+
var usePagination = require('../usePagination.js');
|
|
7
8
|
var pluginVue_exportHelper = require('../../../../_virtual/plugin-vue_export-helper.js');
|
|
8
9
|
var index = require('../../../../hooks/use-locale/index.js');
|
|
9
10
|
|
|
@@ -18,16 +19,21 @@ const _sfc_main = vue.defineComponent({
|
|
|
18
19
|
props: paginationTotalProps,
|
|
19
20
|
setup() {
|
|
20
21
|
const { t } = index.useLocale();
|
|
22
|
+
const { disabled } = usePagination.usePagination();
|
|
21
23
|
return {
|
|
22
|
-
t
|
|
24
|
+
t,
|
|
25
|
+
disabled
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
});
|
|
26
|
-
const _hoisted_1 =
|
|
29
|
+
const _hoisted_1 = ["disabled"];
|
|
27
30
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
28
|
-
return vue.openBlock(), vue.createElementBlock("span",
|
|
31
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
32
|
+
class: "el-pagination__total",
|
|
33
|
+
disabled: _ctx.disabled
|
|
34
|
+
}, vue.toDisplayString(_ctx.t("el.pagination.total", {
|
|
29
35
|
total: _ctx.total
|
|
30
|
-
})),
|
|
36
|
+
})), 9, _hoisted_1);
|
|
31
37
|
}
|
|
32
38
|
var Total = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
33
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"total.js","sources":["../../../../../../../packages/components/pagination/src/components/total.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__total\">\n {{\n t('el.pagination.total', {\n total,\n })\n }}\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\
|
|
1
|
+
{"version":3,"file":"total.js","sources":["../../../../../../../packages/components/pagination/src/components/total.vue"],"sourcesContent":["<template>\n <span class=\"el-pagination__total\" :disabled=\"disabled\">\n {{\n t('el.pagination.total', {\n total,\n })\n }}\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { usePagination } from '../usePagination'\nimport type { ExtractPropTypes } from 'vue'\n\nconst paginationTotalProps = {\n total: {\n type: Number,\n default: 1000,\n },\n} as const\nexport type PaginationTotalProps = ExtractPropTypes<typeof paginationTotalProps>\n\nexport default defineComponent({\n name: 'ElPaginationTotal',\n\n props: paginationTotalProps,\n\n setup() {\n const { t } = useLocale()\n const { disabled } = usePagination()\n return {\n t,\n disabled,\n }\n },\n})\n</script>\n"],"names":["defineComponent","useLocale","usePagination","_openBlock","_createElementBlock"],"mappings":";;;;;;;;;;AAgBA,MAAM,uBAAuB;AAAA,EAC3B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA;AAAA;AAKb,MAAK,YAAaA,oBAAa;AAAA,EAC7B,MAAM;AAAA,EAEN,OAAO;AAAA,EAEP,QAAQ;AACN,UAAM,EAAE,MAAMC;AACd,UAAM,EAAE,aAAaC;AACrB,WAAO;AAAA,MACL;AAAA,MACA;AAAA;AAAA;AAAA;;2BAjCJ,wBAMO;SANIC,iBAACC,uBAAsB;AAAA,IAAE;AAAA;yBAEG,KAAK;AAAA;;;;;;;"}
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
15
|
t: import("element-plus/es/hooks").Translator;
|
|
16
|
+
disabled: import("vue").ComputedRef<boolean> | undefined;
|
|
16
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
17
18
|
readonly total: {
|
|
18
19
|
readonly type: NumberConstructor;
|
|
@@ -165,6 +165,14 @@ var Pagination = vue.defineComponent({
|
|
|
165
165
|
currentPageBridge.value += 1;
|
|
166
166
|
emit("next-click", currentPageBridge.value);
|
|
167
167
|
}
|
|
168
|
+
function addClass(element, cls) {
|
|
169
|
+
if (element) {
|
|
170
|
+
if (!element.props) {
|
|
171
|
+
element.props = {};
|
|
172
|
+
}
|
|
173
|
+
element.props.class = [element.props.class, cls].join(" ");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
168
176
|
vue.provide(pagination.elPaginationKey, {
|
|
169
177
|
pageCount: pageCountBridge,
|
|
170
178
|
disabled: vue.computed(() => props.disabled),
|
|
@@ -211,7 +219,8 @@ var Pagination = vue.defineComponent({
|
|
|
211
219
|
pageSize: pageSizeBridge.value,
|
|
212
220
|
pageSizes: props.pageSizes,
|
|
213
221
|
popperClass: props.popperClass,
|
|
214
|
-
disabled: props.disabled
|
|
222
|
+
disabled: props.disabled,
|
|
223
|
+
size: props.small ? "small" : "default"
|
|
215
224
|
}),
|
|
216
225
|
slot: (_b = (_a = slots == null ? void 0 : slots.default) == null ? void 0 : _a.call(slots)) != null ? _b : null,
|
|
217
226
|
total: vue.h(total["default"], { total: isAbsent(props.total) ? 0 : props.total })
|
|
@@ -232,6 +241,8 @@ var Pagination = vue.defineComponent({
|
|
|
232
241
|
if (haveRightWrapper && rightWrapperChildren.length > 0) {
|
|
233
242
|
rootChildren.unshift(rightWrapperRoot);
|
|
234
243
|
}
|
|
244
|
+
addClass(rootChildren[0], "is-first");
|
|
245
|
+
addClass(rootChildren[rootChildren.length - 1], "is-last");
|
|
235
246
|
return vue.h("div", {
|
|
236
247
|
role: "pagination",
|
|
237
248
|
"aria-label": "pagination",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../../../../../packages/components/pagination/src/pagination.ts"],"sourcesContent":["import {\n h,\n ref,\n provide,\n computed,\n defineComponent,\n getCurrentInstance,\n watch,\n} from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils/error'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils/props'\nimport { elPaginationKey } from '@element-plus/tokens'\n\nimport Prev from './components/prev.vue'\nimport Next from './components/next.vue'\nimport Sizes from './components/sizes.vue'\nimport Jumper from './components/jumper.vue'\nimport Total from './components/total.vue'\nimport Pager from './components/pager.vue'\n\nimport type { VNode, ExtractPropTypes } from 'vue'\n\n/**\n * It it user's responsibility to guarantee that the value of props.total... is number\n * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)\n * Otherwise we can reasonable infer that the corresponding field is absent\n */\nconst isAbsent = (v: unknown): v is undefined => typeof v !== 'number'\n\ntype LayoutKey =\n | 'prev'\n | 'pager'\n | 'next'\n | 'jumper'\n | '->'\n | 'total'\n | 'sizes'\n | 'slot'\n\nexport const paginationProps = buildProps({\n total: Number,\n pageSize: Number,\n defaultPageSize: Number,\n currentPage: Number,\n defaultCurrentPage: Number,\n pageCount: Number,\n pagerCount: {\n type: Number,\n validator: (value: unknown) => {\n return (\n typeof value === 'number' &&\n (value | 0) === value &&\n value > 4 &&\n value < 22 &&\n value % 2 === 1\n )\n },\n default: 7,\n },\n layout: {\n type: String,\n default: (\n ['prev', 'pager', 'next', 'jumper', '->', 'total'] as LayoutKey[]\n ).join(', '),\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n default: '',\n },\n prevText: {\n type: String,\n default: '',\n },\n nextText: {\n type: String,\n default: '',\n },\n small: Boolean,\n background: Boolean,\n disabled: Boolean,\n hideOnSinglePage: Boolean,\n} as const)\nexport type PaginationProps = ExtractPropTypes<typeof paginationProps>\n\nexport const paginationEmits = {\n 'update:current-page': (val: number) => typeof val === 'number',\n 'update:page-size': (val: number) => typeof val === 'number',\n 'size-change': (val: number) => typeof val === 'number',\n 'current-change': (val: number) => typeof val === 'number',\n 'prev-click': (val: number) => typeof val === 'number',\n 'next-click': (val: number) => typeof val === 'number',\n}\nexport type PaginationEmits = typeof paginationEmits\n\nconst componentName = 'ElPagination'\nexport default defineComponent({\n name: componentName,\n\n props: paginationProps,\n emits: paginationEmits,\n\n setup(props, { emit, slots }) {\n const { t } = useLocale()\n const vnodeProps = getCurrentInstance()!.vnode.props || {}\n // we can find @xxx=\"xxx\" props on `vnodeProps` to check if user bind corresponding events\n const hasCurrentPageListener =\n 'onUpdate:currentPage' in vnodeProps ||\n 'onUpdate:current-page' in vnodeProps ||\n 'onCurrentChange' in vnodeProps\n const hasPageSizeListener =\n 'onUpdate:pageSize' in vnodeProps ||\n 'onUpdate:page-size' in vnodeProps ||\n 'onSizeChange' in vnodeProps\n const assertValidUsage = computed(() => {\n // Users have to set either one, otherwise count of pages cannot be determined\n if (isAbsent(props.total) && isAbsent(props.pageCount)) return false\n // <el-pagination ...otherProps :current-page=\"xxx\" /> without corresponding listener is forbidden now\n // Users have to use two way binding of `currentPage`\n // If users just want to provide a default value, `defaultCurrentPage` is here for you\n if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false\n // When you want to change sizes, things get more complex, detailed below\n // Basically the most important value we need is page count\n // either directly from props.pageCount\n // or calculated from props.total\n // we will take props.pageCount precedence over props.total\n if (props.layout.includes('sizes')) {\n if (!isAbsent(props.pageCount)) {\n // if props.pageCount is assign by user, then user have to watch pageSize change\n // and recalculate pageCount\n if (!hasPageSizeListener) return false\n } else if (!isAbsent(props.total)) {\n // Otherwise, we will see if user have props.pageSize defined\n // If so, meaning user want to have pageSize controlled himself/herself from component\n // Thus page size listener is required\n // users are account for page size change\n if (!isAbsent(props.pageSize)) {\n if (!hasPageSizeListener) {\n return false\n }\n } else {\n // (else block just for explaination)\n // else page size is controlled by el-pagination internally\n }\n }\n }\n return true\n })\n\n const innerPageSize = ref(\n isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize\n )\n const innerCurrentPage = ref(\n isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage\n )\n\n const pageSizeBridge = computed({\n get() {\n return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize\n },\n set(v: number) {\n if (isAbsent(props.pageSize)) {\n innerPageSize.value = v\n }\n if (hasPageSizeListener) {\n emit('update:page-size', v)\n emit('size-change', v)\n }\n },\n })\n\n const pageCountBridge = computed<number>(() => {\n let pageCount = 0\n if (!isAbsent(props.pageCount)) {\n pageCount = props.pageCount\n } else if (!isAbsent(props.total)) {\n pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value))\n }\n return pageCount\n })\n\n const currentPageBridge = computed<number>({\n get() {\n return isAbsent(props.currentPage)\n ? innerCurrentPage.value\n : props.currentPage\n },\n set(v) {\n let newCurrentPage = v\n if (v < 1) {\n newCurrentPage = 1\n } else if (v > pageCountBridge.value) {\n newCurrentPage = pageCountBridge.value\n }\n if (isAbsent(props.currentPage)) {\n innerCurrentPage.value = newCurrentPage\n }\n if (hasCurrentPageListener) {\n emit('update:current-page', newCurrentPage)\n emit('current-change', newCurrentPage)\n }\n },\n })\n\n watch(pageCountBridge, (val) => {\n if (currentPageBridge.value > val) currentPageBridge.value = val\n })\n\n function handleCurrentChange(val: number) {\n currentPageBridge.value = val\n }\n\n function handleSizeChange(val: number) {\n pageSizeBridge.value = val\n const newPageCount = pageCountBridge.value\n if (currentPageBridge.value > newPageCount) {\n currentPageBridge.value = newPageCount\n }\n }\n\n function prev() {\n if (props.disabled) return\n currentPageBridge.value -= 1\n emit('prev-click', currentPageBridge.value)\n }\n\n function next() {\n if (props.disabled) return\n currentPageBridge.value += 1\n emit('next-click', currentPageBridge.value)\n }\n\n provide(elPaginationKey, {\n pageCount: pageCountBridge,\n disabled: computed(() => props.disabled),\n currentPage: currentPageBridge,\n changeEvent: handleCurrentChange,\n handleSizeChange,\n })\n\n return () => {\n if (!assertValidUsage.value) {\n debugWarn(componentName, t('el.pagination.deprecationWarning'))\n return null\n }\n if (!props.layout) return null\n if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null\n const rootChildren: Array<VNode | VNode[] | null> = []\n const rightWrapperChildren: Array<VNode | VNode[] | null> = []\n const rightWrapperRoot = h(\n 'div',\n { class: 'el-pagination__rightwrapper' },\n rightWrapperChildren\n )\n const TEMPLATE_MAP: Record<\n Exclude<LayoutKey, '->'>,\n VNode | VNode[] | null\n > = {\n prev: h(Prev, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n prevText: props.prevText,\n onClick: prev,\n }),\n jumper: h(Jumper),\n pager: h(Pager, {\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n pagerCount: props.pagerCount,\n onChange: handleCurrentChange,\n disabled: props.disabled,\n }),\n next: h(Next, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n nextText: props.nextText,\n onClick: next,\n }),\n sizes: h(Sizes, {\n pageSize: pageSizeBridge.value,\n pageSizes: props.pageSizes,\n popperClass: props.popperClass,\n disabled: props.disabled,\n }),\n slot: slots?.default?.() ?? null,\n total: h(Total, { total: isAbsent(props.total) ? 0 : props.total }),\n }\n\n const components = props.layout\n .split(',')\n .map((item: string) => item.trim()) as LayoutKey[]\n\n let haveRightWrapper = false\n\n components.forEach((c) => {\n if (c === '->') {\n haveRightWrapper = true\n return\n }\n if (!haveRightWrapper) {\n rootChildren.push(TEMPLATE_MAP[c])\n } else {\n rightWrapperChildren.push(TEMPLATE_MAP[c])\n }\n })\n\n if (haveRightWrapper && rightWrapperChildren.length > 0) {\n rootChildren.unshift(rightWrapperRoot)\n }\n\n return h(\n 'div',\n {\n role: 'pagination',\n 'aria-label': 'pagination',\n class: [\n 'el-pagination',\n {\n 'is-background': props.background,\n 'el-pagination--small': props.small,\n },\n ],\n },\n rootChildren\n )\n }\n },\n})\n"],"names":["buildProps","definePropType","mutable","defineComponent","useLocale","getCurrentInstance","computed","ref","watch","prev","next","provide","elPaginationKey","debugWarn","h","Prev","Jumper","Pager","Next","Sizes","Total"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,K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
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../../../../../packages/components/pagination/src/pagination.ts"],"sourcesContent":["import {\n h,\n ref,\n provide,\n computed,\n defineComponent,\n getCurrentInstance,\n watch,\n} from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils/error'\nimport { buildProps, definePropType, mutable } from '@element-plus/utils/props'\nimport { elPaginationKey } from '@element-plus/tokens'\n\nimport Prev from './components/prev.vue'\nimport Next from './components/next.vue'\nimport Sizes from './components/sizes.vue'\nimport Jumper from './components/jumper.vue'\nimport Total from './components/total.vue'\nimport Pager from './components/pager.vue'\n\nimport type { VNode, ExtractPropTypes } from 'vue'\n\n/**\n * It it user's responsibility to guarantee that the value of props.total... is number\n * (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)\n * Otherwise we can reasonable infer that the corresponding field is absent\n */\nconst isAbsent = (v: unknown): v is undefined => typeof v !== 'number'\n\ntype LayoutKey =\n | 'prev'\n | 'pager'\n | 'next'\n | 'jumper'\n | '->'\n | 'total'\n | 'sizes'\n | 'slot'\n\nexport const paginationProps = buildProps({\n total: Number,\n pageSize: Number,\n defaultPageSize: Number,\n currentPage: Number,\n defaultCurrentPage: Number,\n pageCount: Number,\n pagerCount: {\n type: Number,\n validator: (value: unknown) => {\n return (\n typeof value === 'number' &&\n (value | 0) === value &&\n value > 4 &&\n value < 22 &&\n value % 2 === 1\n )\n },\n default: 7,\n },\n layout: {\n type: String,\n default: (\n ['prev', 'pager', 'next', 'jumper', '->', 'total'] as LayoutKey[]\n ).join(', '),\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n default: '',\n },\n prevText: {\n type: String,\n default: '',\n },\n nextText: {\n type: String,\n default: '',\n },\n small: Boolean,\n background: Boolean,\n disabled: Boolean,\n hideOnSinglePage: Boolean,\n} as const)\nexport type PaginationProps = ExtractPropTypes<typeof paginationProps>\n\nexport const paginationEmits = {\n 'update:current-page': (val: number) => typeof val === 'number',\n 'update:page-size': (val: number) => typeof val === 'number',\n 'size-change': (val: number) => typeof val === 'number',\n 'current-change': (val: number) => typeof val === 'number',\n 'prev-click': (val: number) => typeof val === 'number',\n 'next-click': (val: number) => typeof val === 'number',\n}\nexport type PaginationEmits = typeof paginationEmits\n\nconst componentName = 'ElPagination'\nexport default defineComponent({\n name: componentName,\n\n props: paginationProps,\n emits: paginationEmits,\n\n setup(props, { emit, slots }) {\n const { t } = useLocale()\n const vnodeProps = getCurrentInstance()!.vnode.props || {}\n // we can find @xxx=\"xxx\" props on `vnodeProps` to check if user bind corresponding events\n const hasCurrentPageListener =\n 'onUpdate:currentPage' in vnodeProps ||\n 'onUpdate:current-page' in vnodeProps ||\n 'onCurrentChange' in vnodeProps\n const hasPageSizeListener =\n 'onUpdate:pageSize' in vnodeProps ||\n 'onUpdate:page-size' in vnodeProps ||\n 'onSizeChange' in vnodeProps\n const assertValidUsage = computed(() => {\n // Users have to set either one, otherwise count of pages cannot be determined\n if (isAbsent(props.total) && isAbsent(props.pageCount)) return false\n // <el-pagination ...otherProps :current-page=\"xxx\" /> without corresponding listener is forbidden now\n // Users have to use two way binding of `currentPage`\n // If users just want to provide a default value, `defaultCurrentPage` is here for you\n if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false\n // When you want to change sizes, things get more complex, detailed below\n // Basically the most important value we need is page count\n // either directly from props.pageCount\n // or calculated from props.total\n // we will take props.pageCount precedence over props.total\n if (props.layout.includes('sizes')) {\n if (!isAbsent(props.pageCount)) {\n // if props.pageCount is assign by user, then user have to watch pageSize change\n // and recalculate pageCount\n if (!hasPageSizeListener) return false\n } else if (!isAbsent(props.total)) {\n // Otherwise, we will see if user have props.pageSize defined\n // If so, meaning user want to have pageSize controlled himself/herself from component\n // Thus page size listener is required\n // users are account for page size change\n if (!isAbsent(props.pageSize)) {\n if (!hasPageSizeListener) {\n return false\n }\n } else {\n // (else block just for explaination)\n // else page size is controlled by el-pagination internally\n }\n }\n }\n return true\n })\n\n const innerPageSize = ref(\n isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize\n )\n const innerCurrentPage = ref(\n isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage\n )\n\n const pageSizeBridge = computed({\n get() {\n return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize\n },\n set(v: number) {\n if (isAbsent(props.pageSize)) {\n innerPageSize.value = v\n }\n if (hasPageSizeListener) {\n emit('update:page-size', v)\n emit('size-change', v)\n }\n },\n })\n\n const pageCountBridge = computed<number>(() => {\n let pageCount = 0\n if (!isAbsent(props.pageCount)) {\n pageCount = props.pageCount\n } else if (!isAbsent(props.total)) {\n pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value))\n }\n return pageCount\n })\n\n const currentPageBridge = computed<number>({\n get() {\n return isAbsent(props.currentPage)\n ? innerCurrentPage.value\n : props.currentPage\n },\n set(v) {\n let newCurrentPage = v\n if (v < 1) {\n newCurrentPage = 1\n } else if (v > pageCountBridge.value) {\n newCurrentPage = pageCountBridge.value\n }\n if (isAbsent(props.currentPage)) {\n innerCurrentPage.value = newCurrentPage\n }\n if (hasCurrentPageListener) {\n emit('update:current-page', newCurrentPage)\n emit('current-change', newCurrentPage)\n }\n },\n })\n\n watch(pageCountBridge, (val) => {\n if (currentPageBridge.value > val) currentPageBridge.value = val\n })\n\n function handleCurrentChange(val: number) {\n currentPageBridge.value = val\n }\n\n function handleSizeChange(val: number) {\n pageSizeBridge.value = val\n const newPageCount = pageCountBridge.value\n if (currentPageBridge.value > newPageCount) {\n currentPageBridge.value = newPageCount\n }\n }\n\n function prev() {\n if (props.disabled) return\n currentPageBridge.value -= 1\n emit('prev-click', currentPageBridge.value)\n }\n\n function next() {\n if (props.disabled) return\n currentPageBridge.value += 1\n emit('next-click', currentPageBridge.value)\n }\n\n function addClass(element: any, cls: string) {\n if (element) {\n if (!element.props) {\n element.props = {}\n }\n element.props.class = [element.props.class, cls].join(' ')\n }\n }\n\n provide(elPaginationKey, {\n pageCount: pageCountBridge,\n disabled: computed(() => props.disabled),\n currentPage: currentPageBridge,\n changeEvent: handleCurrentChange,\n handleSizeChange,\n })\n\n return () => {\n if (!assertValidUsage.value) {\n debugWarn(componentName, t('el.pagination.deprecationWarning'))\n return null\n }\n if (!props.layout) return null\n if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null\n const rootChildren: Array<VNode | VNode[] | null> = []\n const rightWrapperChildren: Array<VNode | VNode[] | null> = []\n const rightWrapperRoot = h(\n 'div',\n { class: 'el-pagination__rightwrapper' },\n rightWrapperChildren\n )\n const TEMPLATE_MAP: Record<\n Exclude<LayoutKey, '->'>,\n VNode | VNode[] | null\n > = {\n prev: h(Prev, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n prevText: props.prevText,\n onClick: prev,\n }),\n jumper: h(Jumper),\n pager: h(Pager, {\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n pagerCount: props.pagerCount,\n onChange: handleCurrentChange,\n disabled: props.disabled,\n }),\n next: h(Next, {\n disabled: props.disabled,\n currentPage: currentPageBridge.value,\n pageCount: pageCountBridge.value,\n nextText: props.nextText,\n onClick: next,\n }),\n sizes: h(Sizes, {\n pageSize: pageSizeBridge.value,\n pageSizes: props.pageSizes,\n popperClass: props.popperClass,\n disabled: props.disabled,\n size: props.small ? 'small' : 'default',\n }),\n slot: slots?.default?.() ?? null,\n total: h(Total, { total: isAbsent(props.total) ? 0 : props.total }),\n }\n\n const components = props.layout\n .split(',')\n .map((item: string) => item.trim()) as LayoutKey[]\n\n let haveRightWrapper = false\n\n components.forEach((c) => {\n if (c === '->') {\n haveRightWrapper = true\n return\n }\n if (!haveRightWrapper) {\n rootChildren.push(TEMPLATE_MAP[c])\n } else {\n rightWrapperChildren.push(TEMPLATE_MAP[c])\n }\n })\n\n if (haveRightWrapper && rightWrapperChildren.length > 0) {\n rootChildren.unshift(rightWrapperRoot)\n }\n\n addClass(rootChildren[0], 'is-first')\n addClass(rootChildren[rootChildren.length - 1], 'is-last')\n\n return h(\n 'div',\n {\n role: 'pagination',\n 'aria-label': 'pagination',\n class: [\n 'el-pagination',\n {\n 'is-background': props.background,\n 'el-pagination--small': props.small,\n },\n ],\n },\n rootChildren\n )\n }\n },\n})\n"],"names":["buildProps","definePropType","mutable","defineComponent","useLocale","getCurrentInstance","computed","ref","watch","prev","next","provide","elPaginationKey","debugWarn","h","Prev","Jumper","Pager","Next","Sizes","Total"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,OAAO,CAAC,KAAK,QAAQ,CAAC;AAClC,MAAC,eAAe,GAAGA,gBAAU,CAAC;AAC1C,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,QAAQ,EAAE,MAAM;AAClB,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,kBAAkB,EAAE,MAAM;AAC5B,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAE,CAAC,KAAK,KAAK;AAC1B,MAAM,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,KAAK,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9G,KAAK;AACL,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1E,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,oBAAc,CAAC,KAAK,CAAC;A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EAAE;AACxB,UAAU,gBAAgB,GAAG,IAAI,CAAC;AAClC,UAAU,OAAO;AACjB,SAAS;AACT,QAAQ,IAAI,CAAC,gBAAgB,EAAE;AAC/B,UAAU,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,SAAS,MAAM;AACf,UAAU,oBAAoB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,OAAO,CAAC,CAAC;AACT,MAAM,IAAI,gBAAgB,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;AAC/D,QAAQ,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC/C,OAAO;AACP,MAAM,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AAC5C,MAAM,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACjE,MAAM,OAAON,KAAC,CAAC,KAAK,EAAE;AACtB,QAAQ,IAAI,EAAE,YAAY;AAC1B,QAAQ,YAAY,EAAE,YAAY;AAClC,QAAQ,KAAK,EAAE;AACf,UAAU,eAAe;AACzB,UAAU;AACV,YAAY,eAAe,EAAE,KAAK,CAAC,UAAU;AAC7C,YAAY,sBAAsB,EAAE,KAAK,CAAC,KAAK;AAC/C,WAAW;AACX,SAAS;AACT,OAAO,EAAE,YAAY,CAAC,CAAC;AACvB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var withInstall = require('../../utils/with-install.js');
|
|
6
|
-
var popconfirm$1 = require('./src/
|
|
7
|
-
var popconfirm = require('./src/
|
|
6
|
+
var popconfirm$1 = require('./src/popconfirm2.js');
|
|
7
|
+
var popconfirm = require('./src/popconfirm.js');
|
|
8
8
|
|
|
9
9
|
const ElPopconfirm = withInstall.withInstall(popconfirm$1["default"]);
|
|
10
10
|
|
|
@@ -2,113 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
require('../../../hooks/index.js');
|
|
10
|
-
var popconfirm = require('./popconfirm2.js');
|
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
-
var index$3 = require('../../../hooks/use-locale/index.js');
|
|
5
|
+
require('../../button/index.js');
|
|
6
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
7
|
+
var props = require('../../../utils/props.js');
|
|
8
|
+
var button = require('../../button/src/button.js');
|
|
13
9
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ElButton: index.ElButton,
|
|
18
|
-
ElTooltip: index$1.ElTooltip,
|
|
19
|
-
ElIcon: index$2.ElIcon
|
|
10
|
+
const popconfirmProps = props.buildProps({
|
|
11
|
+
title: {
|
|
12
|
+
type: String
|
|
20
13
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
14
|
+
confirmButtonText: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
cancelButtonText: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
confirmButtonType: {
|
|
21
|
+
type: String,
|
|
22
|
+
values: button.buttonType,
|
|
23
|
+
default: "primary"
|
|
24
|
+
},
|
|
25
|
+
cancelButtonType: {
|
|
26
|
+
type: String,
|
|
27
|
+
values: button.buttonType,
|
|
28
|
+
default: "text"
|
|
29
|
+
},
|
|
30
|
+
icon: {
|
|
31
|
+
type: props.definePropType([String, Object]),
|
|
32
|
+
default: iconsVue.QuestionFilled
|
|
33
|
+
},
|
|
34
|
+
iconColor: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "#f90"
|
|
37
|
+
},
|
|
38
|
+
hideIcon: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
hideAfter: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 200
|
|
45
|
+
},
|
|
46
|
+
onConfirm: {
|
|
47
|
+
type: props.definePropType(Function)
|
|
48
|
+
},
|
|
49
|
+
onCancel: {
|
|
50
|
+
type: props.definePropType(Function)
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
|
-
const _hoisted_1 = { class: "el-popconfirm" };
|
|
51
|
-
const _hoisted_2 = { class: "el-popconfirm__main" };
|
|
52
|
-
const _hoisted_3 = { class: "el-popconfirm__action" };
|
|
53
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
54
|
-
const _component_el_icon = vue.resolveComponent("el-icon");
|
|
55
|
-
const _component_el_button = vue.resolveComponent("el-button");
|
|
56
|
-
const _component_el_tooltip = vue.resolveComponent("el-tooltip");
|
|
57
|
-
return vue.openBlock(), vue.createBlock(_component_el_tooltip, vue.mergeProps({ ref: "tooltipRef" }, _ctx.$attrs, {
|
|
58
|
-
trigger: "click",
|
|
59
|
-
effect: "light",
|
|
60
|
-
"popper-class": "el-popover",
|
|
61
|
-
"append-to-body": "",
|
|
62
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
63
|
-
"hide-after": _ctx.hideAfter,
|
|
64
|
-
persistent: ""
|
|
65
|
-
}), {
|
|
66
|
-
content: vue.withCtx(() => [
|
|
67
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
68
|
-
vue.createElementVNode("div", _hoisted_2, [
|
|
69
|
-
!_ctx.hideIcon && _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
|
|
70
|
-
key: 0,
|
|
71
|
-
class: "el-popconfirm__icon",
|
|
72
|
-
style: vue.normalizeStyle({ color: _ctx.iconColor })
|
|
73
|
-
}, {
|
|
74
|
-
default: vue.withCtx(() => [
|
|
75
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
76
|
-
]),
|
|
77
|
-
_: 1
|
|
78
|
-
}, 8, ["style"])) : vue.createCommentVNode("v-if", true),
|
|
79
|
-
vue.createTextVNode(" " + vue.toDisplayString(_ctx.title), 1)
|
|
80
|
-
]),
|
|
81
|
-
vue.createElementVNode("div", _hoisted_3, [
|
|
82
|
-
vue.createVNode(_component_el_button, {
|
|
83
|
-
size: "small",
|
|
84
|
-
type: _ctx.cancelButtonType,
|
|
85
|
-
onClick: _ctx.cancel
|
|
86
|
-
}, {
|
|
87
|
-
default: vue.withCtx(() => [
|
|
88
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.finalCancelButtonText), 1)
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["type", "onClick"]),
|
|
92
|
-
vue.createVNode(_component_el_button, {
|
|
93
|
-
size: "small",
|
|
94
|
-
type: _ctx.confirmButtonType,
|
|
95
|
-
onClick: _ctx.confirm
|
|
96
|
-
}, {
|
|
97
|
-
default: vue.withCtx(() => [
|
|
98
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.finalConfirmButtonText), 1)
|
|
99
|
-
]),
|
|
100
|
-
_: 1
|
|
101
|
-
}, 8, ["type", "onClick"])
|
|
102
|
-
])
|
|
103
|
-
])
|
|
104
|
-
]),
|
|
105
|
-
default: vue.withCtx(() => [
|
|
106
|
-
_ctx.$slots.reference ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
|
107
|
-
]),
|
|
108
|
-
_: 3
|
|
109
|
-
}, 16, ["hide-after"]);
|
|
110
|
-
}
|
|
111
|
-
var Popconfirm = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render]]);
|
|
112
53
|
|
|
113
|
-
exports
|
|
54
|
+
exports.popconfirmProps = popconfirmProps;
|
|
114
55
|
//# sourceMappingURL=popconfirm.js.map
|