@element-plus/nightly 0.0.20220303 → 0.0.20220306
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/README.md +1 -1
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +1980 -2030
- 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 +1965 -2029
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.d.ts +4 -4
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
- package/es/components/button/index.d.ts +1 -1
- package/es/components/button/src/button.vue.d.ts +1 -1
- package/es/components/cascader/index.d.ts +18 -18
- package/es/components/cascader/src/index.mjs +5 -4
- package/es/components/cascader/src/index.mjs.map +1 -1
- package/es/components/cascader/src/index.vue.d.ts +9 -9
- package/es/components/checkbox/src/checkbox-group.mjs +2 -1
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/useCheckbox.d.ts +4 -4
- package/es/components/checkbox/src/useCheckbox.mjs +6 -4
- package/es/components/checkbox/src/useCheckbox.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +6 -5
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/dropdown/index.d.ts +3 -0
- package/es/components/dropdown/src/dropdown.d.ts +1 -0
- package/es/components/dropdown/src/dropdown.mjs +4 -0
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +3 -0
- package/es/components/dropdown/src/dropdown2.mjs +8 -5
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/form/index.d.ts +285 -210
- package/es/components/form/index.mjs +8 -5
- package/es/components/form/index.mjs.map +1 -1
- package/es/components/form/src/form-item.d.ts +21 -0
- package/es/components/form/src/form-item.mjs +41 -301
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item.vue.d.ts +104 -73
- package/es/components/form/src/form-item2.mjs +249 -0
- package/es/components/form/src/form-item2.mjs.map +1 -0
- package/es/components/form/src/form-label-wrap.d.ts +11 -0
- package/es/components/form/src/form-label-wrap.mjs +96 -0
- package/es/components/form/src/form-label-wrap.mjs.map +1 -0
- package/es/components/form/src/form.d.ts +25 -0
- package/es/components/form/src/form.mjs +43 -208
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form.vue.d.ts +86 -76
- package/es/components/form/src/form2.mjs +130 -0
- package/es/components/form/src/form2.mjs.map +1 -0
- package/es/components/form/src/types.d.ts +9 -0
- package/es/components/form/src/types.mjs +2 -0
- package/es/components/form/src/types.mjs.map +1 -0
- package/es/components/form/src/utils.d.ts +9 -0
- package/es/components/form/src/utils.mjs +48 -0
- package/es/components/form/src/utils.mjs.map +1 -0
- package/es/components/index.mjs +6 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/index.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +1 -1
- package/es/components/input/src/input2.mjs +3 -2
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +2 -2
- package/es/components/input-number/src/input-number.vue.d.ts +2 -2
- package/es/components/input-number/src/input-number2.mjs +2 -2
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/message-box/index.mjs +1 -0
- package/es/components/message-box/index.mjs.map +1 -1
- package/es/components/message-box/src/index.vue.d.ts +2 -2
- package/es/components/message-box/src/message-box.type.d.ts +4 -3
- package/es/components/message-box/src/messageBox.mjs +39 -56
- package/es/components/message-box/src/messageBox.mjs.map +1 -1
- package/es/components/popover/index.d.ts +2 -0
- package/es/components/popover/src/index.mjs +6 -1
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +1 -0
- package/es/components/radio/index.d.ts +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +10 -10
- package/es/components/radio/src/radio-group2.mjs +3 -1
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +1 -1
- package/es/components/rate/index.d.ts +1 -1
- package/es/components/rate/src/rate.vue.d.ts +1 -1
- package/es/components/rate/src/rate2.mjs +2 -2
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +3 -3
- package/es/components/scrollbar/src/scrollbar.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +3 -3
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select/src/select.mjs +6 -2
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +9 -0
- package/es/components/select/src/useSelect.mjs +7 -6
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +24 -6
- package/es/components/select-v2/src/defaults.d.ts +5 -1
- package/es/components/select-v2/src/defaults.mjs +4 -0
- package/es/components/select-v2/src/defaults.mjs.map +1 -1
- package/es/components/select-v2/src/select.mjs +3 -3
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +12 -3
- package/es/components/select-v2/src/useSelect.mjs +2 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/slider/src/index.mjs +3 -3
- package/es/components/slider/src/index.mjs.map +1 -1
- package/es/components/slider/src/index.vue.d.ts +1 -1
- package/es/components/slider/src/useSlide.d.ts +2 -2
- package/es/components/slider/src/useSlide.mjs +3 -3
- package/es/components/slider/src/useSlide.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +2 -2
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/index.d.ts +4 -0
- package/es/components/table/src/config.mjs +2 -2
- package/es/components/table/src/config.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +4 -0
- package/es/components/table/src/table/style-helper.mjs +6 -1
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/index.mjs +11 -4
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs +7 -4
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +4 -0
- package/es/components/time-picker/src/common/picker.mjs +6 -5
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +1 -1
- package/es/components/transfer/src/index.mjs +6 -4
- package/es/components/transfer/src/index.mjs.map +1 -1
- package/es/components/upload/index.d.ts +807 -727
- package/es/components/upload/index.mjs +9 -7
- package/es/components/upload/index.mjs.map +1 -1
- package/es/components/upload/src/ajax.d.ts +8 -2
- package/es/components/upload/src/ajax.mjs +39 -34
- package/es/components/upload/src/ajax.mjs.map +1 -1
- package/es/components/upload/src/upload-content.d.ts +32 -0
- package/es/components/upload/src/upload-content.mjs +39 -0
- package/es/components/upload/src/upload-content.mjs.map +1 -0
- package/es/components/upload/src/upload-content.vue.d.ts +165 -0
- package/es/components/upload/src/upload-content2.mjs +172 -0
- package/es/components/upload/src/upload-content2.mjs.map +1 -0
- package/es/components/upload/src/upload-dragger.d.ts +11 -0
- package/es/components/upload/src/upload-dragger.mjs +11 -67
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger.vue.d.ts +15 -11
- package/es/components/upload/src/upload-dragger2.mjs +73 -0
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -0
- package/es/components/upload/src/upload-list.d.ts +15 -0
- package/es/components/upload/src/upload-list.mjs +23 -207
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list.vue.d.ts +148 -44
- package/es/components/upload/src/upload-list2.mjs +173 -0
- package/es/components/upload/src/upload-list2.mjs.map +1 -0
- package/es/components/upload/src/upload.d.ts +97 -0
- package/es/components/upload/src/upload.mjs +103 -266
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +830 -292
- package/es/components/upload/src/upload2.mjs +122 -0
- package/es/components/upload/src/upload2.mjs.map +1 -0
- package/es/components/upload/src/{useHandlers.d.ts → use-handlers.d.ts} +10 -13
- package/es/components/upload/src/use-handlers.mjs +142 -0
- package/es/components/upload/src/use-handlers.mjs.map +1 -0
- package/es/hooks/use-common-props/index.mjs +4 -4
- package/es/hooks/use-common-props/index.mjs.map +1 -1
- package/es/hooks/use-form-item/index.d.ts +2 -2
- package/es/hooks/use-form-item/index.mjs +3 -3
- package/es/hooks/use-form-item/index.mjs.map +1 -1
- package/es/index.mjs +8 -1
- package/es/index.mjs.map +1 -1
- package/es/tokens/form.d.ts +17 -37
- package/es/tokens/form.mjs +3 -3
- package/es/tokens/form.mjs.map +1 -1
- package/es/tokens/index.d.ts +1 -0
- package/es/tokens/index.mjs +2 -1
- package/es/tokens/index.mjs.map +1 -1
- package/es/tokens/upload.d.ts +5 -0
- package/es/tokens/upload.mjs +4 -0
- package/es/tokens/upload.mjs.map +1 -0
- package/es/utils/error.d.ts +1 -0
- package/es/utils/error.mjs +5 -1
- package/es/utils/error.mjs.map +1 -1
- package/es/utils/index.mjs +1 -1
- package/es/utils/objects.d.ts +3 -5
- package/es/utils/objects.mjs +10 -35
- package/es/utils/objects.mjs.map +1 -1
- package/es/utils/typescript.d.ts +1 -0
- package/es/utils/typescript.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/autocomplete/index.d.ts +4 -4
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +4 -4
- package/lib/components/button/index.d.ts +1 -1
- package/lib/components/button/src/button.vue.d.ts +1 -1
- package/lib/components/cascader/index.d.ts +18 -18
- package/lib/components/cascader/src/index.js +4 -3
- package/lib/components/cascader/src/index.js.map +1 -1
- package/lib/components/cascader/src/index.vue.d.ts +9 -9
- package/lib/components/checkbox/src/checkbox-group.js +2 -1
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/useCheckbox.d.ts +4 -4
- package/lib/components/checkbox/src/useCheckbox.js +5 -3
- package/lib/components/checkbox/src/useCheckbox.js.map +1 -1
- package/lib/components/color-picker/src/index.js +5 -4
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/dropdown/index.d.ts +3 -0
- package/lib/components/dropdown/src/dropdown.d.ts +1 -0
- package/lib/components/dropdown/src/dropdown.js +4 -0
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -0
- package/lib/components/dropdown/src/dropdown2.js +8 -5
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/form/index.d.ts +285 -210
- package/lib/components/form/index.js +10 -3
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/form/src/form-item.d.ts +21 -0
- package/lib/components/form/src/form-item.js +42 -305
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item.vue.d.ts +104 -73
- package/lib/components/form/src/form-item2.js +257 -0
- package/lib/components/form/src/form-item2.js.map +1 -0
- package/lib/components/form/src/form-label-wrap.d.ts +11 -0
- package/lib/components/form/src/form-label-wrap.js +100 -0
- package/lib/components/form/src/form-label-wrap.js.map +1 -0
- package/lib/components/form/src/form.d.ts +25 -0
- package/lib/components/form/src/form.js +44 -208
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form.vue.d.ts +86 -76
- package/lib/components/form/src/form2.js +134 -0
- package/lib/components/form/src/form2.js.map +1 -0
- package/lib/components/form/src/types.d.ts +9 -0
- package/lib/components/form/src/types.js +3 -0
- package/lib/components/form/src/types.js.map +1 -0
- package/lib/components/form/src/utils.d.ts +9 -0
- package/lib/components/form/src/utils.js +53 -0
- package/lib/components/form/src/utils.js.map +1 -0
- package/lib/components/index.js +19 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +1 -1
- package/lib/components/input/src/input2.js +3 -2
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.d.ts +2 -2
- package/lib/components/input-number/src/input-number.vue.d.ts +2 -2
- package/lib/components/input-number/src/input-number2.js +2 -2
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/message-box/index.js +1 -0
- package/lib/components/message-box/index.js.map +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +2 -2
- package/lib/components/message-box/src/message-box.type.d.ts +4 -3
- package/lib/components/message-box/src/messageBox.js +38 -55
- package/lib/components/message-box/src/messageBox.js.map +1 -1
- package/lib/components/popover/index.d.ts +2 -0
- package/lib/components/popover/src/index.js +6 -1
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +1 -0
- package/lib/components/radio/index.d.ts +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +10 -10
- package/lib/components/radio/src/radio-group2.js +3 -1
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +1 -1
- package/lib/components/rate/index.d.ts +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +1 -1
- package/lib/components/rate/src/rate2.js +1 -1
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +3 -3
- package/lib/components/scrollbar/src/scrollbar.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +1 -1
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +3 -3
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select/src/select.js +6 -2
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +9 -0
- package/lib/components/select/src/useSelect.js +6 -5
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +24 -6
- package/lib/components/select-v2/src/defaults.d.ts +5 -1
- package/lib/components/select-v2/src/defaults.js +4 -0
- package/lib/components/select-v2/src/defaults.js.map +1 -1
- package/lib/components/select-v2/src/select.js +3 -3
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +12 -3
- package/lib/components/select-v2/src/useSelect.js +2 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/slider/src/index.js +2 -2
- package/lib/components/slider/src/index.js.map +1 -1
- package/lib/components/slider/src/index.vue.d.ts +1 -1
- package/lib/components/slider/src/useSlide.d.ts +2 -2
- package/lib/components/slider/src/useSlide.js +2 -2
- package/lib/components/slider/src/useSlide.js.map +1 -1
- package/lib/components/switch/src/switch2.js +2 -2
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/index.d.ts +4 -0
- package/lib/components/table/src/config.js +1 -1
- package/lib/components/table/src/config.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +4 -0
- package/lib/components/table/src/table/style-helper.js +6 -1
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-column/index.js +11 -4
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table.js +7 -4
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +4 -0
- package/lib/components/time-picker/src/common/picker.js +5 -4
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +1 -1
- package/lib/components/transfer/src/index.js +5 -3
- package/lib/components/transfer/src/index.js.map +1 -1
- package/lib/components/upload/index.d.ts +807 -727
- package/lib/components/upload/index.js +18 -7
- package/lib/components/upload/index.js.map +1 -1
- package/lib/components/upload/src/ajax.d.ts +8 -2
- package/lib/components/upload/src/ajax.js +40 -34
- package/lib/components/upload/src/ajax.js.map +1 -1
- package/lib/components/upload/src/upload-content.d.ts +32 -0
- package/lib/components/upload/src/upload-content.js +43 -0
- package/lib/components/upload/src/upload-content.js.map +1 -0
- package/lib/components/upload/src/upload-content.vue.d.ts +165 -0
- package/lib/components/upload/src/upload-content2.js +176 -0
- package/lib/components/upload/src/upload-content2.js.map +1 -0
- package/lib/components/upload/src/upload-dragger.d.ts +11 -0
- package/lib/components/upload/src/upload-dragger.js +12 -67
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger.vue.d.ts +15 -11
- package/lib/components/upload/src/upload-dragger2.js +77 -0
- package/lib/components/upload/src/upload-dragger2.js.map +1 -0
- package/lib/components/upload/src/upload-list.d.ts +15 -0
- package/lib/components/upload/src/upload-list.js +24 -207
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list.vue.d.ts +148 -44
- package/lib/components/upload/src/upload-list2.js +177 -0
- package/lib/components/upload/src/upload-list2.js.map +1 -0
- package/lib/components/upload/src/upload.d.ts +97 -0
- package/lib/components/upload/src/upload.js +104 -264
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +830 -292
- package/lib/components/upload/src/upload2.js +126 -0
- package/lib/components/upload/src/upload2.js.map +1 -0
- package/lib/components/upload/src/{useHandlers.d.ts → use-handlers.d.ts} +10 -13
- package/lib/components/upload/src/use-handlers.js +146 -0
- package/lib/components/upload/src/use-handlers.js.map +1 -0
- package/lib/hooks/use-common-props/index.js +3 -3
- package/lib/hooks/use-common-props/index.js.map +1 -1
- package/lib/hooks/use-form-item/index.d.ts +2 -2
- package/lib/hooks/use-form-item/index.js +2 -2
- package/lib/hooks/use-form-item/index.js.map +1 -1
- package/lib/index.js +24 -3
- package/lib/index.js.map +1 -1
- package/lib/tokens/form.d.ts +17 -37
- package/lib/tokens/form.js +4 -4
- package/lib/tokens/form.js.map +1 -1
- package/lib/tokens/index.d.ts +1 -0
- package/lib/tokens/index.js +4 -2
- package/lib/tokens/index.js.map +1 -1
- package/lib/tokens/upload.d.ts +5 -0
- package/lib/tokens/upload.js +8 -0
- package/lib/tokens/upload.js.map +1 -0
- package/lib/utils/error.d.ts +1 -0
- package/lib/utils/error.js +5 -1
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/objects.d.ts +3 -5
- package/lib/utils/objects.js +10 -34
- package/lib/utils/objects.js.map +1 -1
- package/lib/utils/typescript.d.ts +1 -0
- package/lib/utils/typescript.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-cascader.css +1 -1
- package/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/el-dropdown.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/cascader-panel.scss +1 -1
- package/theme-chalk/src/cascader.scss +1 -1
- package/theme-chalk/src/common/transition.scss +2 -2
- package/theme-chalk/src/common/var.scss +1 -0
- package/theme-chalk/src/date-picker/date-table.scss +4 -4
- package/theme-chalk/src/dialog.scss +1 -1
- package/theme-chalk/src/dropdown.scss +5 -0
- package/theme-chalk/src/input.scss +12 -4
- package/theme-chalk/src/menu.scss +1 -1
- package/theme-chalk/src/option-item.scss +2 -2
- package/theme-chalk/src/page-header.scss +1 -1
- package/theme-chalk/src/pagination.scss +2 -2
- package/theme-chalk/src/select-v2.scss +8 -0
- package/theme-chalk/src/select.scss +0 -4
- package/theme-chalk/src/table.scss +2 -1
- package/web-types.json +1 -1
- package/es/components/form/src/form.type.d.ts +0 -5
- package/es/components/form/src/form.type.mjs +0 -2
- package/es/components/form/src/form.type.mjs.map +0 -1
- package/es/components/form/src/label-wrap.d.ts +0 -13
- package/es/components/form/src/label-wrap.mjs +0 -83
- package/es/components/form/src/label-wrap.mjs.map +0 -1
- package/es/components/upload/src/index.mjs +0 -220
- package/es/components/upload/src/index.mjs.map +0 -1
- package/es/components/upload/src/index.vue.d.ts +0 -282
- package/es/components/upload/src/upload.type.d.ts +0 -72
- package/es/components/upload/src/upload.type.mjs +0 -2
- package/es/components/upload/src/upload.type.mjs.map +0 -1
- package/es/components/upload/src/useHandlers.mjs +0 -143
- package/es/components/upload/src/useHandlers.mjs.map +0 -1
- package/lib/components/form/src/form.type.d.ts +0 -5
- package/lib/components/form/src/form.type.js +0 -3
- package/lib/components/form/src/form.type.js.map +0 -1
- package/lib/components/form/src/label-wrap.d.ts +0 -13
- package/lib/components/form/src/label-wrap.js +0 -87
- package/lib/components/form/src/label-wrap.js.map +0 -1
- package/lib/components/upload/src/index.js +0 -224
- package/lib/components/upload/src/index.js.map +0 -1
- package/lib/components/upload/src/index.vue.d.ts +0 -282
- package/lib/components/upload/src/upload.type.d.ts +0 -72
- package/lib/components/upload/src/upload.type.js +0 -3
- package/lib/components/upload/src/upload.type.js.map +0 -1
- package/lib/components/upload/src/useHandlers.js +0 -147
- package/lib/components/upload/src/useHandlers.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form.type.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
isAutoWidth: BooleanConstructor;
|
|
3
|
-
updateAll: BooleanConstructor;
|
|
4
|
-
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}> | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
-
isAutoWidth: BooleanConstructor;
|
|
8
|
-
updateAll: BooleanConstructor;
|
|
9
|
-
}>>, {
|
|
10
|
-
isAutoWidth: boolean;
|
|
11
|
-
updateAll: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
export default _default;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, watch, nextTick, onMounted, onUpdated, onBeforeUnmount, h, Fragment } from 'vue';
|
|
2
|
-
import '../../../utils/index.mjs';
|
|
3
|
-
import '../../../tokens/index.mjs';
|
|
4
|
-
import { elFormKey, elFormItemKey } from '../../../tokens/form.mjs';
|
|
5
|
-
import { addResizeListener, removeResizeListener } from '../../../utils/dom/resize-event.mjs';
|
|
6
|
-
|
|
7
|
-
var LabelWrap = defineComponent({
|
|
8
|
-
name: "ElLabelWrap",
|
|
9
|
-
props: {
|
|
10
|
-
isAutoWidth: Boolean,
|
|
11
|
-
updateAll: Boolean
|
|
12
|
-
},
|
|
13
|
-
setup(props, { slots }) {
|
|
14
|
-
const el = ref(null);
|
|
15
|
-
const elForm = inject(elFormKey);
|
|
16
|
-
const elFormItem = inject(elFormItemKey);
|
|
17
|
-
const computedWidth = ref(0);
|
|
18
|
-
watch(computedWidth, (val, oldVal) => {
|
|
19
|
-
if (props.updateAll) {
|
|
20
|
-
elForm.registerLabelWidth(val, oldVal);
|
|
21
|
-
elFormItem.updateComputedLabelWidth(val);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const getLabelWidth = () => {
|
|
25
|
-
var _a;
|
|
26
|
-
if ((_a = el.value) == null ? void 0 : _a.firstElementChild) {
|
|
27
|
-
const width = window.getComputedStyle(el.value.firstElementChild).width;
|
|
28
|
-
return Math.ceil(parseFloat(width));
|
|
29
|
-
} else {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const updateLabelWidth = (action = "update") => {
|
|
34
|
-
nextTick(() => {
|
|
35
|
-
if (slots.default && props.isAutoWidth) {
|
|
36
|
-
if (action === "update") {
|
|
37
|
-
computedWidth.value = getLabelWidth();
|
|
38
|
-
} else if (action === "remove") {
|
|
39
|
-
elForm.deregisterLabelWidth(computedWidth.value);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
const updateLabelWidthFn = () => updateLabelWidth("update");
|
|
45
|
-
onMounted(() => {
|
|
46
|
-
addResizeListener(el.value.firstElementChild, updateLabelWidthFn);
|
|
47
|
-
updateLabelWidthFn();
|
|
48
|
-
});
|
|
49
|
-
onUpdated(updateLabelWidthFn);
|
|
50
|
-
onBeforeUnmount(() => {
|
|
51
|
-
var _a;
|
|
52
|
-
updateLabelWidth("remove");
|
|
53
|
-
removeResizeListener((_a = el.value) == null ? void 0 : _a.firstElementChild, updateLabelWidthFn);
|
|
54
|
-
});
|
|
55
|
-
function render() {
|
|
56
|
-
var _a, _b;
|
|
57
|
-
if (!slots)
|
|
58
|
-
return null;
|
|
59
|
-
if (props.isAutoWidth) {
|
|
60
|
-
const autoLabelWidth = elForm.autoLabelWidth;
|
|
61
|
-
const style = {};
|
|
62
|
-
if (autoLabelWidth && autoLabelWidth !== "auto") {
|
|
63
|
-
const marginWidth = Math.max(0, parseInt(autoLabelWidth, 10) - computedWidth.value);
|
|
64
|
-
const marginPosition = elForm.labelPosition === "left" ? "marginRight" : "marginLeft";
|
|
65
|
-
if (marginWidth) {
|
|
66
|
-
style[marginPosition] = `${marginWidth}px`;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return h("div", {
|
|
70
|
-
ref: el,
|
|
71
|
-
class: ["el-form-item__label-wrap"],
|
|
72
|
-
style
|
|
73
|
-
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
|
74
|
-
} else {
|
|
75
|
-
return h(Fragment, { ref: el }, (_b = slots.default) == null ? void 0 : _b.call(slots));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return render;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
export { LabelWrap as default };
|
|
83
|
-
//# sourceMappingURL=label-wrap.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label-wrap.mjs","sources":["../../../../../../packages/components/form/src/label-wrap.ts"],"sourcesContent":["import {\n defineComponent,\n Fragment,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n ref,\n watch,\n} from 'vue'\nimport { addResizeListener, removeResizeListener } from '@element-plus/utils'\nimport { elFormItemKey, elFormKey } from '@element-plus/tokens'\nimport type { ResizableElement, Nullable } from '@element-plus/utils'\n\nimport type { CSSProperties } from 'vue'\n\nexport default defineComponent({\n name: 'ElLabelWrap',\n props: {\n isAutoWidth: Boolean,\n updateAll: Boolean,\n },\n setup(props, { slots }) {\n const el = ref<Nullable<HTMLElement>>(null)\n const elForm = inject(elFormKey)\n const elFormItem = inject(elFormItemKey)\n\n const computedWidth = ref(0)\n watch(computedWidth, (val, oldVal) => {\n if (props.updateAll) {\n elForm.registerLabelWidth(val, oldVal)\n elFormItem.updateComputedLabelWidth(val)\n }\n })\n\n const getLabelWidth = () => {\n if (el.value?.firstElementChild) {\n const width = window.getComputedStyle(el.value.firstElementChild).width\n return Math.ceil(parseFloat(width))\n } else {\n return 0\n }\n }\n const updateLabelWidth = (action = 'update') => {\n nextTick(() => {\n if (slots.default && props.isAutoWidth) {\n if (action === 'update') {\n computedWidth.value = getLabelWidth()\n } else if (action === 'remove') {\n elForm.deregisterLabelWidth(computedWidth.value)\n }\n }\n })\n }\n const updateLabelWidthFn = () => updateLabelWidth('update')\n\n onMounted(() => {\n addResizeListener(\n el.value.firstElementChild as ResizableElement,\n updateLabelWidthFn\n )\n updateLabelWidthFn()\n })\n\n onUpdated(updateLabelWidthFn)\n\n onBeforeUnmount(() => {\n updateLabelWidth('remove')\n removeResizeListener(\n el.value?.firstElementChild as ResizableElement,\n updateLabelWidthFn\n )\n })\n\n function render() {\n if (!slots) return null\n if (props.isAutoWidth) {\n const autoLabelWidth = elForm.autoLabelWidth\n const style = {} as CSSProperties\n if (autoLabelWidth && autoLabelWidth !== 'auto') {\n const marginWidth = Math.max(\n 0,\n parseInt(autoLabelWidth, 10) - computedWidth.value\n )\n const marginPosition =\n elForm.labelPosition === 'left' ? 'marginRight' : 'marginLeft'\n if (marginWidth) {\n style[marginPosition] = `${marginWidth}px`\n }\n }\n return h(\n 'div',\n {\n ref: el,\n class: ['el-form-item__label-wrap'],\n style,\n },\n slots.default?.()\n )\n } else {\n return h(Fragment, { ref: el }, slots.default?.())\n }\n }\n\n return render\n },\n})\n"],"names":[],"mappings":";;;;;;AAcA,gBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,aAAa;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,WAAW,EAAE,OAAO;AACxB,IAAI,SAAS,EAAE,OAAO;AACtB,GAAG;AACH,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,CAA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GAAG,YAAY,CAAC;AAChG,UAAU,IAAI,WAAW,EAAE;AAC3B,YAAY,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;AACvD,WAAW;AACX,SAAS;AACT,QAAQ,OAAO,CAAC,CAAC,KAAK,EAAE;AACxB,UAAU,GAAG,EAAE,EAAE;AACjB,UAAU,KAAK,EAAE,CAAC,0BAA0B,CAAC;AAC7C,UAAU,KAAK;AACf,SAAS,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACnE,OAAO,MAAM;AACb,QAAQ,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { defineComponent, inject, computed, provide, getCurrentInstance, onBeforeUnmount, ref, h } from 'vue';
|
|
2
|
-
import { NOOP } from '@vue/shared';
|
|
3
|
-
import '../../../tokens/index.mjs';
|
|
4
|
-
import upload from './ajax.mjs';
|
|
5
|
-
import UploadList from './upload-list.mjs';
|
|
6
|
-
import Upload from './upload.mjs';
|
|
7
|
-
import useHandlers from './useHandlers.mjs';
|
|
8
|
-
import { elFormKey } from '../../../tokens/form.mjs';
|
|
9
|
-
|
|
10
|
-
const _sfc_main = defineComponent({
|
|
11
|
-
name: "ElUpload",
|
|
12
|
-
components: {
|
|
13
|
-
Upload,
|
|
14
|
-
UploadList
|
|
15
|
-
},
|
|
16
|
-
props: {
|
|
17
|
-
action: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
headers: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default: () => ({})
|
|
24
|
-
},
|
|
25
|
-
method: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: "post"
|
|
28
|
-
},
|
|
29
|
-
data: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => ({})
|
|
32
|
-
},
|
|
33
|
-
multiple: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
name: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "file"
|
|
40
|
-
},
|
|
41
|
-
drag: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false
|
|
44
|
-
},
|
|
45
|
-
withCredentials: Boolean,
|
|
46
|
-
showFileList: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: true
|
|
49
|
-
},
|
|
50
|
-
accept: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: ""
|
|
53
|
-
},
|
|
54
|
-
type: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: "select"
|
|
57
|
-
},
|
|
58
|
-
beforeUpload: {
|
|
59
|
-
type: Function,
|
|
60
|
-
default: NOOP
|
|
61
|
-
},
|
|
62
|
-
beforeRemove: {
|
|
63
|
-
type: Function,
|
|
64
|
-
default: NOOP
|
|
65
|
-
},
|
|
66
|
-
onRemove: {
|
|
67
|
-
type: Function,
|
|
68
|
-
default: NOOP
|
|
69
|
-
},
|
|
70
|
-
onChange: {
|
|
71
|
-
type: Function,
|
|
72
|
-
default: NOOP
|
|
73
|
-
},
|
|
74
|
-
onPreview: {
|
|
75
|
-
type: Function,
|
|
76
|
-
default: NOOP
|
|
77
|
-
},
|
|
78
|
-
onSuccess: {
|
|
79
|
-
type: Function,
|
|
80
|
-
default: NOOP
|
|
81
|
-
},
|
|
82
|
-
onProgress: {
|
|
83
|
-
type: Function,
|
|
84
|
-
default: NOOP
|
|
85
|
-
},
|
|
86
|
-
onError: {
|
|
87
|
-
type: Function,
|
|
88
|
-
default: NOOP
|
|
89
|
-
},
|
|
90
|
-
fileList: {
|
|
91
|
-
type: Array,
|
|
92
|
-
default: () => {
|
|
93
|
-
return [];
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
autoUpload: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: true
|
|
99
|
-
},
|
|
100
|
-
listType: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: "text"
|
|
103
|
-
},
|
|
104
|
-
httpRequest: {
|
|
105
|
-
type: Function,
|
|
106
|
-
default: upload
|
|
107
|
-
},
|
|
108
|
-
disabled: Boolean,
|
|
109
|
-
limit: {
|
|
110
|
-
type: Number,
|
|
111
|
-
default: null
|
|
112
|
-
},
|
|
113
|
-
onExceed: {
|
|
114
|
-
type: Function,
|
|
115
|
-
default: () => NOOP
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
setup(props) {
|
|
119
|
-
const elForm = inject(elFormKey, {});
|
|
120
|
-
const uploadDisabled = computed(() => {
|
|
121
|
-
return props.disabled || elForm.disabled;
|
|
122
|
-
});
|
|
123
|
-
const {
|
|
124
|
-
abort,
|
|
125
|
-
clearFiles,
|
|
126
|
-
handleError,
|
|
127
|
-
handleProgress,
|
|
128
|
-
handleStart,
|
|
129
|
-
handleSuccess,
|
|
130
|
-
handleRemove,
|
|
131
|
-
submit,
|
|
132
|
-
uploadRef,
|
|
133
|
-
uploadFiles
|
|
134
|
-
} = useHandlers(props);
|
|
135
|
-
provide("uploader", getCurrentInstance());
|
|
136
|
-
onBeforeUnmount(() => {
|
|
137
|
-
uploadFiles.value.forEach((file) => {
|
|
138
|
-
if (file.url && file.url.indexOf("blob:") === 0) {
|
|
139
|
-
URL.revokeObjectURL(file.url);
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
return {
|
|
144
|
-
abort,
|
|
145
|
-
dragOver: ref(false),
|
|
146
|
-
draging: ref(false),
|
|
147
|
-
handleError,
|
|
148
|
-
handleProgress,
|
|
149
|
-
handleRemove,
|
|
150
|
-
handleStart,
|
|
151
|
-
handleSuccess,
|
|
152
|
-
uploadDisabled,
|
|
153
|
-
uploadFiles,
|
|
154
|
-
uploadRef,
|
|
155
|
-
submit,
|
|
156
|
-
clearFiles
|
|
157
|
-
};
|
|
158
|
-
},
|
|
159
|
-
render() {
|
|
160
|
-
var _a, _b;
|
|
161
|
-
let uploadList;
|
|
162
|
-
if (this.showFileList) {
|
|
163
|
-
uploadList = h(UploadList, {
|
|
164
|
-
disabled: this.uploadDisabled,
|
|
165
|
-
listType: this.listType,
|
|
166
|
-
files: this.uploadFiles,
|
|
167
|
-
onRemove: this.handleRemove,
|
|
168
|
-
handlePreview: this.onPreview
|
|
169
|
-
}, this.$slots.file ? {
|
|
170
|
-
default: (props) => {
|
|
171
|
-
return this.$slots.file({
|
|
172
|
-
file: props.file
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
} : null);
|
|
176
|
-
} else {
|
|
177
|
-
uploadList = null;
|
|
178
|
-
}
|
|
179
|
-
const uploadData = {
|
|
180
|
-
type: this.type,
|
|
181
|
-
drag: this.drag,
|
|
182
|
-
action: this.action,
|
|
183
|
-
multiple: this.multiple,
|
|
184
|
-
"before-upload": this.beforeUpload,
|
|
185
|
-
"with-credentials": this.withCredentials,
|
|
186
|
-
headers: this.headers,
|
|
187
|
-
method: this.method,
|
|
188
|
-
name: this.name,
|
|
189
|
-
data: this.data,
|
|
190
|
-
accept: this.accept,
|
|
191
|
-
fileList: this.uploadFiles,
|
|
192
|
-
autoUpload: this.autoUpload,
|
|
193
|
-
listType: this.listType,
|
|
194
|
-
disabled: this.uploadDisabled,
|
|
195
|
-
limit: this.limit,
|
|
196
|
-
"on-exceed": this.onExceed,
|
|
197
|
-
"on-start": this.handleStart,
|
|
198
|
-
"on-progress": this.handleProgress,
|
|
199
|
-
"on-success": this.handleSuccess,
|
|
200
|
-
"on-error": this.handleError,
|
|
201
|
-
"on-preview": this.onPreview,
|
|
202
|
-
"on-remove": this.handleRemove,
|
|
203
|
-
"http-request": this.httpRequest,
|
|
204
|
-
ref: "uploadRef"
|
|
205
|
-
};
|
|
206
|
-
const trigger = this.$slots.trigger || this.$slots.default;
|
|
207
|
-
const uploadComponent = h(Upload, uploadData, {
|
|
208
|
-
default: () => trigger == null ? void 0 : trigger()
|
|
209
|
-
});
|
|
210
|
-
return h("div", [
|
|
211
|
-
this.listType === "picture-card" ? uploadList : null,
|
|
212
|
-
this.$slots.trigger ? [uploadComponent, this.$slots.default()] : uploadComponent,
|
|
213
|
-
(_b = (_a = this.$slots).tip) == null ? void 0 : _b.call(_a),
|
|
214
|
-
this.listType !== "picture-card" ? uploadList : null
|
|
215
|
-
]);
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
export { _sfc_main as default };
|
|
220
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/upload/src/index.vue"],"sourcesContent":["<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n h,\n getCurrentInstance,\n inject,\n ref,\n provide,\n onBeforeUnmount,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\n\nimport ajax from './ajax'\nimport UploadList from './upload-list.vue'\nimport Upload from './upload.vue'\nimport useHandlers from './useHandlers'\n\nimport type { PropType } from 'vue'\nimport type { ElFormContext } from '@element-plus/tokens'\nimport type { Nullable } from '@element-plus/utils'\nimport type {\n ListType,\n UploadFile,\n FileHandler,\n FileResultHandler,\n} from './upload.type'\n\ntype PFileHandler<T> = PropType<FileHandler<T>>\ntype PFileResultHandler<T = any> = PropType<FileResultHandler<T>>\n\nexport default defineComponent({\n name: 'ElUpload',\n components: {\n Upload,\n UploadList,\n },\n props: {\n action: {\n type: String,\n required: true,\n },\n headers: {\n type: Object as PropType<Headers>,\n default: () => ({}),\n },\n method: {\n type: String,\n default: 'post',\n },\n data: {\n type: Object,\n default: () => ({}),\n },\n multiple: {\n type: Boolean,\n default: false,\n },\n name: {\n type: String,\n default: 'file',\n },\n drag: {\n type: Boolean,\n default: false,\n },\n withCredentials: Boolean,\n showFileList: {\n type: Boolean,\n default: true,\n },\n accept: {\n type: String,\n default: '',\n },\n type: {\n type: String,\n default: 'select',\n },\n beforeUpload: {\n type: Function as PFileHandler<void>,\n default: NOOP,\n },\n beforeRemove: {\n type: Function as PFileHandler<boolean>,\n default: NOOP,\n },\n onRemove: {\n type: Function as PFileHandler<void>,\n default: NOOP,\n },\n onChange: {\n type: Function as PFileHandler<void>,\n default: NOOP,\n },\n onPreview: {\n type: Function as PropType<() => void>,\n default: NOOP,\n },\n onSuccess: {\n type: Function as PFileResultHandler,\n default: NOOP,\n },\n onProgress: {\n type: Function as PFileResultHandler<ProgressEvent>,\n default: NOOP,\n },\n onError: {\n type: Function as PFileResultHandler<Error>,\n default: NOOP,\n },\n fileList: {\n type: Array as PropType<UploadFile[]>,\n default: () => {\n return [] as UploadFile[]\n },\n },\n autoUpload: {\n type: Boolean,\n default: true,\n },\n listType: {\n type: String as PropType<ListType>,\n default: 'text' as ListType, // text,picture,picture-card\n },\n httpRequest: {\n type: Function,\n default: ajax,\n },\n disabled: Boolean,\n limit: {\n type: Number as PropType<Nullable<number>>,\n default: null,\n },\n onExceed: {\n type: Function,\n default: () => NOOP,\n },\n },\n setup(props) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n\n const uploadDisabled = computed(() => {\n return props.disabled || elForm.disabled\n })\n\n const {\n abort,\n clearFiles,\n handleError,\n handleProgress,\n handleStart,\n handleSuccess,\n handleRemove,\n submit,\n uploadRef,\n uploadFiles,\n } = useHandlers(props)\n\n provide('uploader', getCurrentInstance())\n\n onBeforeUnmount(() => {\n uploadFiles.value.forEach((file) => {\n if (file.url && file.url.indexOf('blob:') === 0) {\n URL.revokeObjectURL(file.url)\n }\n })\n })\n\n return {\n abort,\n dragOver: ref(false),\n draging: ref(false),\n handleError,\n handleProgress,\n handleRemove,\n handleStart,\n handleSuccess,\n uploadDisabled,\n uploadFiles,\n uploadRef,\n submit,\n clearFiles,\n }\n },\n render() {\n let uploadList\n if (this.showFileList) {\n uploadList = h(\n UploadList,\n {\n disabled: this.uploadDisabled,\n listType: this.listType,\n files: this.uploadFiles,\n onRemove: this.handleRemove,\n handlePreview: this.onPreview,\n },\n this.$slots.file\n ? {\n default: (props: { file: UploadFile }) => {\n return this.$slots.file({\n file: props.file,\n })\n },\n }\n : null\n )\n } else {\n uploadList = null\n }\n\n const uploadData = {\n type: this.type,\n drag: this.drag,\n action: this.action,\n multiple: this.multiple,\n 'before-upload': this.beforeUpload,\n 'with-credentials': this.withCredentials,\n headers: this.headers,\n method: this.method,\n name: this.name,\n data: this.data,\n accept: this.accept,\n fileList: this.uploadFiles,\n autoUpload: this.autoUpload,\n listType: this.listType,\n disabled: this.uploadDisabled,\n limit: this.limit,\n 'on-exceed': this.onExceed,\n 'on-start': this.handleStart,\n 'on-progress': this.handleProgress,\n 'on-success': this.handleSuccess,\n 'on-error': this.handleError,\n 'on-preview': this.onPreview,\n 'on-remove': this.handleRemove,\n 'http-request': this.httpRequest,\n ref: 'uploadRef',\n }\n const trigger = this.$slots.trigger || this.$slots.default\n const uploadComponent = h(Upload, uploadData, {\n default: () => trigger?.(),\n })\n return h('div', [\n this.listType === 'picture-card' ? uploadList : null,\n this.$slots.trigger\n ? [uploadComponent, this.$slots.default()]\n : uploadComponent,\n this.$slots.tip?.(),\n this.listType !== 'picture-card' ? uploadList : null,\n ])\n },\n})\n</script>\n"],"names":["ajax"],"mappings":";;;;;;;;;MAgCK,YAAa,gBAAa;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA;AAAA,EAEF,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA;AAAA,IAEZ,SAAS;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MACf;AAAY,MACZ;AAAkB,MAClB,iBAAiB;AAAA,MACjB;AAAoB,MACpB,mBAAmB;AAAA,MACnB,YAAY;AAAK,MACjB;AAAmB,MACnB,kBAAkB;AAAA,MAClB;AAAqB,MACrB;AAAK;AAEP;AACA,UAAM;AAAwC;AAC7B;AAEjB;AAAgB,WACT;AAA2C,MAChD,KAAK,wCACsB,OAAO;AAC9B,MACJ,KAAK,OAAO;AAAA,MACZ;AAAgD;AAAA;AAAA;;;;;"}
|
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import ajax from './ajax';
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
|
-
import type { Nullable } from 'element-plus/es/utils';
|
|
5
|
-
import type { ListType, UploadFile, FileHandler, FileResultHandler } from './upload.type';
|
|
6
|
-
declare type PFileHandler<T> = PropType<FileHandler<T>>;
|
|
7
|
-
declare type PFileResultHandler<T = any> = PropType<FileResultHandler<T>>;
|
|
8
|
-
declare const _default: import("vue").DefineComponent<{
|
|
9
|
-
action: {
|
|
10
|
-
type: StringConstructor;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
headers: {
|
|
14
|
-
type: PropType<Headers>;
|
|
15
|
-
default: () => {};
|
|
16
|
-
};
|
|
17
|
-
method: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
data: {
|
|
22
|
-
type: ObjectConstructor;
|
|
23
|
-
default: () => {};
|
|
24
|
-
};
|
|
25
|
-
multiple: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
|
-
name: {
|
|
30
|
-
type: StringConstructor;
|
|
31
|
-
default: string;
|
|
32
|
-
};
|
|
33
|
-
drag: {
|
|
34
|
-
type: BooleanConstructor;
|
|
35
|
-
default: boolean;
|
|
36
|
-
};
|
|
37
|
-
withCredentials: BooleanConstructor;
|
|
38
|
-
showFileList: {
|
|
39
|
-
type: BooleanConstructor;
|
|
40
|
-
default: boolean;
|
|
41
|
-
};
|
|
42
|
-
accept: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
default: string;
|
|
45
|
-
};
|
|
46
|
-
type: {
|
|
47
|
-
type: StringConstructor;
|
|
48
|
-
default: string;
|
|
49
|
-
};
|
|
50
|
-
beforeUpload: {
|
|
51
|
-
type: PFileHandler<void>;
|
|
52
|
-
default: () => void;
|
|
53
|
-
};
|
|
54
|
-
beforeRemove: {
|
|
55
|
-
type: PFileHandler<boolean>;
|
|
56
|
-
default: () => void;
|
|
57
|
-
};
|
|
58
|
-
onRemove: {
|
|
59
|
-
type: PFileHandler<void>;
|
|
60
|
-
default: () => void;
|
|
61
|
-
};
|
|
62
|
-
onChange: {
|
|
63
|
-
type: PFileHandler<void>;
|
|
64
|
-
default: () => void;
|
|
65
|
-
};
|
|
66
|
-
onPreview: {
|
|
67
|
-
type: PropType<() => void>;
|
|
68
|
-
default: () => void;
|
|
69
|
-
};
|
|
70
|
-
onSuccess: {
|
|
71
|
-
type: PFileResultHandler<any>;
|
|
72
|
-
default: () => void;
|
|
73
|
-
};
|
|
74
|
-
onProgress: {
|
|
75
|
-
type: PFileResultHandler<ProgressEvent<EventTarget>>;
|
|
76
|
-
default: () => void;
|
|
77
|
-
};
|
|
78
|
-
onError: {
|
|
79
|
-
type: PFileResultHandler<Error>;
|
|
80
|
-
default: () => void;
|
|
81
|
-
};
|
|
82
|
-
fileList: {
|
|
83
|
-
type: PropType<UploadFile[]>;
|
|
84
|
-
default: () => UploadFile[];
|
|
85
|
-
};
|
|
86
|
-
autoUpload: {
|
|
87
|
-
type: BooleanConstructor;
|
|
88
|
-
default: boolean;
|
|
89
|
-
};
|
|
90
|
-
listType: {
|
|
91
|
-
type: PropType<ListType>;
|
|
92
|
-
default: ListType;
|
|
93
|
-
};
|
|
94
|
-
httpRequest: {
|
|
95
|
-
type: FunctionConstructor;
|
|
96
|
-
default: typeof ajax;
|
|
97
|
-
};
|
|
98
|
-
disabled: BooleanConstructor;
|
|
99
|
-
limit: {
|
|
100
|
-
type: PropType<Nullable<number>>;
|
|
101
|
-
default: null;
|
|
102
|
-
};
|
|
103
|
-
onExceed: {
|
|
104
|
-
type: FunctionConstructor;
|
|
105
|
-
default: () => () => void;
|
|
106
|
-
};
|
|
107
|
-
}, {
|
|
108
|
-
abort: (file: UploadFile) => void;
|
|
109
|
-
dragOver: import("vue").Ref<boolean>;
|
|
110
|
-
draging: import("vue").Ref<boolean>;
|
|
111
|
-
handleError: (err: Error, rawFile: import("./upload.type").ElFile) => void;
|
|
112
|
-
handleProgress: (ev: import("./upload.type").ElUploadProgressEvent, rawFile: import("./upload.type").ElFile) => void;
|
|
113
|
-
handleRemove: (file: UploadFile, raw: import("./upload.type").ElFile) => void;
|
|
114
|
-
handleStart: (rawFile: import("./upload.type").ElFile) => void;
|
|
115
|
-
handleSuccess: (res: any, rawFile: import("./upload.type").ElFile) => void;
|
|
116
|
-
uploadDisabled: import("vue").ComputedRef<boolean | undefined>;
|
|
117
|
-
uploadFiles: import("vue").Ref<{
|
|
118
|
-
name: string;
|
|
119
|
-
percentage?: number | undefined;
|
|
120
|
-
status: import("./upload.type").UploadStatus;
|
|
121
|
-
size: number;
|
|
122
|
-
response?: unknown;
|
|
123
|
-
uid: number;
|
|
124
|
-
url?: string | undefined;
|
|
125
|
-
raw: {
|
|
126
|
-
uid: number;
|
|
127
|
-
readonly lastModified: number;
|
|
128
|
-
readonly name: string;
|
|
129
|
-
readonly webkitRelativePath: string;
|
|
130
|
-
readonly size: number;
|
|
131
|
-
readonly type: string;
|
|
132
|
-
arrayBuffer: {
|
|
133
|
-
(): Promise<ArrayBuffer>;
|
|
134
|
-
(): Promise<ArrayBuffer>;
|
|
135
|
-
};
|
|
136
|
-
slice: {
|
|
137
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
138
|
-
(start?: number | undefined, end?: number | undefined, contentType?: string | undefined): Blob;
|
|
139
|
-
};
|
|
140
|
-
stream: {
|
|
141
|
-
(): ReadableStream<any>;
|
|
142
|
-
(): NodeJS.ReadableStream;
|
|
143
|
-
};
|
|
144
|
-
text: {
|
|
145
|
-
(): Promise<string>;
|
|
146
|
-
(): Promise<string>;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
}[]>;
|
|
150
|
-
uploadRef: import("vue").Ref<{
|
|
151
|
-
abort: (file: UploadFile) => void;
|
|
152
|
-
upload: (file: import("./upload.type").ElFile) => void;
|
|
153
|
-
}>;
|
|
154
|
-
submit: () => void;
|
|
155
|
-
clearFiles: (status?: import("./upload.type").UploadStatus[]) => void;
|
|
156
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
157
|
-
action: {
|
|
158
|
-
type: StringConstructor;
|
|
159
|
-
required: true;
|
|
160
|
-
};
|
|
161
|
-
headers: {
|
|
162
|
-
type: PropType<Headers>;
|
|
163
|
-
default: () => {};
|
|
164
|
-
};
|
|
165
|
-
method: {
|
|
166
|
-
type: StringConstructor;
|
|
167
|
-
default: string;
|
|
168
|
-
};
|
|
169
|
-
data: {
|
|
170
|
-
type: ObjectConstructor;
|
|
171
|
-
default: () => {};
|
|
172
|
-
};
|
|
173
|
-
multiple: {
|
|
174
|
-
type: BooleanConstructor;
|
|
175
|
-
default: boolean;
|
|
176
|
-
};
|
|
177
|
-
name: {
|
|
178
|
-
type: StringConstructor;
|
|
179
|
-
default: string;
|
|
180
|
-
};
|
|
181
|
-
drag: {
|
|
182
|
-
type: BooleanConstructor;
|
|
183
|
-
default: boolean;
|
|
184
|
-
};
|
|
185
|
-
withCredentials: BooleanConstructor;
|
|
186
|
-
showFileList: {
|
|
187
|
-
type: BooleanConstructor;
|
|
188
|
-
default: boolean;
|
|
189
|
-
};
|
|
190
|
-
accept: {
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
default: string;
|
|
193
|
-
};
|
|
194
|
-
type: {
|
|
195
|
-
type: StringConstructor;
|
|
196
|
-
default: string;
|
|
197
|
-
};
|
|
198
|
-
beforeUpload: {
|
|
199
|
-
type: PFileHandler<void>;
|
|
200
|
-
default: () => void;
|
|
201
|
-
};
|
|
202
|
-
beforeRemove: {
|
|
203
|
-
type: PFileHandler<boolean>;
|
|
204
|
-
default: () => void;
|
|
205
|
-
};
|
|
206
|
-
onRemove: {
|
|
207
|
-
type: PFileHandler<void>;
|
|
208
|
-
default: () => void;
|
|
209
|
-
};
|
|
210
|
-
onChange: {
|
|
211
|
-
type: PFileHandler<void>;
|
|
212
|
-
default: () => void;
|
|
213
|
-
};
|
|
214
|
-
onPreview: {
|
|
215
|
-
type: PropType<() => void>;
|
|
216
|
-
default: () => void;
|
|
217
|
-
};
|
|
218
|
-
onSuccess: {
|
|
219
|
-
type: PFileResultHandler<any>;
|
|
220
|
-
default: () => void;
|
|
221
|
-
};
|
|
222
|
-
onProgress: {
|
|
223
|
-
type: PFileResultHandler<ProgressEvent<EventTarget>>;
|
|
224
|
-
default: () => void;
|
|
225
|
-
};
|
|
226
|
-
onError: {
|
|
227
|
-
type: PFileResultHandler<Error>;
|
|
228
|
-
default: () => void;
|
|
229
|
-
};
|
|
230
|
-
fileList: {
|
|
231
|
-
type: PropType<UploadFile[]>;
|
|
232
|
-
default: () => UploadFile[];
|
|
233
|
-
};
|
|
234
|
-
autoUpload: {
|
|
235
|
-
type: BooleanConstructor;
|
|
236
|
-
default: boolean;
|
|
237
|
-
};
|
|
238
|
-
listType: {
|
|
239
|
-
type: PropType<ListType>;
|
|
240
|
-
default: ListType;
|
|
241
|
-
};
|
|
242
|
-
httpRequest: {
|
|
243
|
-
type: FunctionConstructor;
|
|
244
|
-
default: typeof ajax;
|
|
245
|
-
};
|
|
246
|
-
disabled: BooleanConstructor;
|
|
247
|
-
limit: {
|
|
248
|
-
type: PropType<Nullable<number>>;
|
|
249
|
-
default: null;
|
|
250
|
-
};
|
|
251
|
-
onExceed: {
|
|
252
|
-
type: FunctionConstructor;
|
|
253
|
-
default: () => () => void;
|
|
254
|
-
};
|
|
255
|
-
}>>, {
|
|
256
|
-
type: string;
|
|
257
|
-
disabled: boolean;
|
|
258
|
-
name: string;
|
|
259
|
-
data: Record<string, any>;
|
|
260
|
-
onChange: FileHandler<void>;
|
|
261
|
-
drag: boolean;
|
|
262
|
-
multiple: boolean;
|
|
263
|
-
onError: FileResultHandler<Error>;
|
|
264
|
-
onProgress: FileResultHandler<ProgressEvent<EventTarget>>;
|
|
265
|
-
headers: Headers;
|
|
266
|
-
method: string;
|
|
267
|
-
withCredentials: boolean;
|
|
268
|
-
accept: string;
|
|
269
|
-
onSuccess: FileResultHandler<any>;
|
|
270
|
-
beforeUpload: FileHandler<void>;
|
|
271
|
-
onPreview: () => void;
|
|
272
|
-
onRemove: FileHandler<void>;
|
|
273
|
-
fileList: UploadFile[];
|
|
274
|
-
autoUpload: boolean;
|
|
275
|
-
listType: ListType;
|
|
276
|
-
httpRequest: Function;
|
|
277
|
-
limit: Nullable<number>;
|
|
278
|
-
onExceed: Function;
|
|
279
|
-
showFileList: boolean;
|
|
280
|
-
beforeRemove: FileHandler<boolean>;
|
|
281
|
-
}>;
|
|
282
|
-
export default _default;
|