yc-design-vue 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +1 -0
- package/dist/style.css +1 -0
- package/es/Affix/index.vue.js +1 -1
- package/es/Alert/index.d.ts +3 -3
- package/es/Alert/index.vue.d.ts +1 -1
- package/es/Alert/type.d.ts +2 -2
- package/es/Anchor/Anchor.vue.d.ts +1 -1
- package/es/Anchor/Anchor.vue.js +2 -2
- package/es/Anchor/AnchorLink.vue.js +2 -2
- package/es/Anchor/hooks/useContext.d.ts +3 -3
- package/es/Anchor/hooks/useContext.js +3 -3
- package/es/Anchor/index.d.ts +3 -3
- package/es/Anchor/type.d.ts +3 -2
- package/es/AutoComplete/index.d.ts +40 -31
- package/es/AutoComplete/index.vue.d.ts +72 -54
- package/es/Avatar/Avatar.vue.d.ts +1 -1
- package/es/Avatar/Avatar.vue.js +3 -3
- package/es/Avatar/AvatarGroup.vue.js +2 -2
- package/es/Avatar/hooks/useContext.d.ts +1 -2
- package/es/Avatar/hooks/useContext.js +3 -3
- package/es/Avatar/index.d.ts +3 -3
- package/es/Avatar/type.d.ts +3 -2
- package/es/BackTop/index.vue.js +1 -1
- package/es/Badge/index.d.ts +3 -3
- package/es/Badge/index.vue.d.ts +1 -1
- package/es/Badge/type.d.ts +2 -2
- package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/es/Button/Button.vue.d.ts +2 -2
- package/es/Button/Button.vue.js +2 -2
- package/es/Button/ButtonGroup.vue.d.ts +1 -1
- package/es/Button/ButtonGroup.vue.js +2 -2
- package/es/Button/hooks/useContext.d.ts +4 -5
- package/es/Button/hooks/useContext.js +3 -3
- package/es/Button/index.d.ts +9 -9
- package/es/Button/type.d.ts +6 -6
- package/es/Card/Card.vue.d.ts +1 -1
- package/es/Card/Card.vue.js +2 -2
- package/es/Card/CardMeta.vue.js +2 -2
- package/es/Card/hooks/useContext.d.ts +2 -2
- package/es/Card/hooks/useContext.js +3 -3
- package/es/Card/index.d.ts +3 -3
- package/es/Card/type.d.ts +1 -2
- package/es/Carousel/Carousel.vue.d.ts +2 -2
- package/es/Carousel/Carousel.vue.js +2 -2
- package/es/Carousel/CarouselArrow.vue.js +2 -2
- package/es/Carousel/CarouselIndicator.vue.js +2 -2
- package/es/Carousel/CarouselItem.vue.js +2 -2
- package/es/Carousel/hooks/useContext.d.ts +5 -5
- package/es/Carousel/hooks/useContext.js +3 -3
- package/es/Carousel/index.d.ts +6 -6
- package/es/Carousel/type.d.ts +6 -6
- package/es/Cascader/Cascader.vue.d.ts +23 -23
- package/es/Cascader/Cascader.vue.js +2 -2
- package/es/Cascader/CascaderIcon.vue.js +2 -2
- package/es/Cascader/CascaderOption.vue.js +2 -2
- package/es/Cascader/CascaderPanel.vue.js +2 -2
- package/es/Cascader/CascaderSearchPanel.vue.js +2 -2
- package/es/Cascader/hooks/useContext.d.ts +2 -2
- package/es/Cascader/hooks/useContext.js +3 -3
- package/es/Cascader/index.d.ts +26 -26
- package/es/Checkbox/Checkbox.vue.js +2 -2
- package/es/Checkbox/CheckboxGroup.vue.js +2 -2
- package/es/Checkbox/hooks/useContext.d.ts +2 -2
- package/es/Checkbox/hooks/useContext.js +3 -3
- package/es/Collapse/Collapse.vue.js +2 -2
- package/es/Collapse/CollapseItem.vue.js +2 -2
- package/es/Collapse/hooks/useContext.d.ts +3 -15
- package/es/Collapse/hooks/useContext.js +3 -4
- package/es/Collapse/type.d.ts +2 -1
- package/es/ColorPicker/ColorControl.vue.js +1 -1
- package/es/ColorPicker/ColorPalette.vue.js +1 -1
- package/es/ColorPicker/ColorPanel.vue.js +2 -2
- package/es/ColorPicker/ColorPicker.vue.js +2 -2
- package/es/ColorPicker/hooks/useContext.d.ts +2 -2
- package/es/ColorPicker/hooks/useContext.js +3 -3
- package/es/Comment/hooks/useContext.d.ts +1 -2
- package/es/Comment/hooks/useContext.js +3 -3
- package/es/Comment/index.vue.js +2 -2
- package/es/Descriptions/Descriptions.vue.d.ts +3 -3
- package/es/Descriptions/Descriptions.vue.js +2 -2
- package/es/Descriptions/ReuseItem.vue.js +2 -2
- package/es/Descriptions/ReuseTd.vue.js +2 -2
- package/es/Descriptions/hooks/useContext.d.ts +3 -3
- package/es/Descriptions/hooks/useContext.js +3 -3
- package/es/Descriptions/index.d.ts +9 -9
- package/es/Descriptions/type.d.ts +7 -6
- package/es/Divider/index.d.ts +6 -6
- package/es/Divider/index.vue.d.ts +2 -2
- package/es/Divider/type.d.ts +4 -3
- package/es/Drawer/Drawer.vue.d.ts +1 -1
- package/es/Drawer/DrawerService.vue.d.ts +1 -1
- package/es/Drawer/index.d.ts +5 -9
- package/es/Drawer/type.d.ts +8 -4
- package/es/Dropdown/Doption.vue.js +2 -2
- package/es/Dropdown/Dropdown.vue.d.ts +3 -3
- package/es/Dropdown/Dropdown.vue.js +2 -2
- package/es/Dropdown/DropdownButton.vue.d.ts +3 -3
- package/es/Dropdown/Dsubmenu.vue.d.ts +1 -1
- package/es/Dropdown/Dsubmenu.vue.js +1 -1
- package/es/Dropdown/hooks/useContext.d.ts +2 -2
- package/es/Dropdown/hooks/useContext.js +3 -3
- package/es/Dropdown/index.d.ts +19 -19
- package/es/Dropdown/type.d.ts +4 -6
- package/es/Grid/Grid.vue.js +2 -2
- package/es/Grid/GridCol.vue.js +2 -2
- package/es/Grid/GridItem.vue.js +2 -2
- package/es/Grid/GridRow.vue.js +2 -2
- package/es/Grid/hooks/useContext.d.ts +1 -13
- package/es/Grid/hooks/useContext.js +3 -4
- package/es/Image/Image.vue.d.ts +2 -2
- package/es/Image/Image.vue.js +2 -2
- package/es/Image/ImagePreview.vue.js +2 -2
- package/es/Image/ImagePreviewGroup.vue.js +2 -2
- package/es/Image/hooks/useContext.d.ts +2 -2
- package/es/Image/hooks/useContext.js +3 -3
- package/es/Image/index.d.ts +6 -6
- package/es/Image/type.d.ts +3 -2
- package/es/Input/Input.vue.d.ts +3 -3
- package/es/Input/InputSuffix.vue.js +1 -1
- package/es/Input/index.d.ts +8 -8
- package/es/InputNumber/InputNumber.vue.d.ts +20 -20
- package/es/InputNumber/InputOperaBtn.vue.d.ts +2 -2
- package/es/InputNumber/index.d.ts +19 -19
- package/es/InputNumber/type.d.ts +5 -4
- package/es/InputTag/index.d.ts +20 -11
- package/es/InputTag/index.vue.d.ts +7 -4
- package/es/InputTag/index.vue.js +1 -1
- package/es/InputTag/type.d.ts +2 -1
- package/es/Layout/LayoutSider.vue.d.ts +3 -3
- package/es/Layout/LayoutSider.vue.js +2 -2
- package/es/Layout/hooks/useSiderContext.d.ts +1 -2
- package/es/Layout/hooks/useSiderContext.js +3 -3
- package/es/Layout/index.d.ts +8 -8
- package/es/Layout/type.d.ts +3 -4
- package/es/Link/index.d.ts +3 -3
- package/es/Link/index.vue.d.ts +1 -1
- package/es/Link/type.d.ts +2 -2
- package/es/List/List.vue.d.ts +7 -7
- package/es/List/hooks/useScrollReach.js +1 -0
- package/es/List/index.d.ts +6 -6
- package/es/List/type.d.ts +2 -3
- package/es/Mention/index.d.ts +49 -40
- package/es/Mention/index.vue.d.ts +85 -67
- package/es/Mention/type.d.ts +3 -2
- package/es/Menu/Menu.vue.d.ts +2 -2
- package/es/Menu/MenuItem.vue.js +1 -1
- package/es/Menu/hooks/useContext.d.ts +2 -2
- package/es/Menu/hooks/useContext.js +5 -5
- package/es/Menu/index.d.ts +5 -5
- package/es/Menu/type.d.ts +2 -2
- package/es/Message/type.d.ts +3 -3
- package/es/Modal/Modal.vue.d.ts +1 -1
- package/es/Modal/ModalService.vue.d.ts +1 -1
- package/es/Modal/index.d.ts +13 -13
- package/es/Modal/index.js +1 -4
- package/es/Modal/type.d.ts +6 -9
- package/es/Notification/Notification.vue.d.ts +1 -1
- package/es/Notification/index.d.ts +4 -4
- package/es/Notification/type.d.ts +3 -4
- package/es/OverflowList/index.d.ts +3 -3
- package/es/OverflowList/index.vue.d.ts +1 -1
- package/es/OverflowList/index.vue.js +2 -2
- package/es/OverflowList/type.d.ts +3 -2
- package/es/Pagination/Pagination.vue.js +2 -2
- package/es/Pagination/PaginationItem.vue.js +2 -2
- package/es/Pagination/hooks/useContext.d.ts +2 -2
- package/es/Pagination/hooks/useContext.js +3 -3
- package/es/Popconfirm/index.d.ts +8 -8
- package/es/Popconfirm/index.vue.d.ts +3 -3
- package/es/Popconfirm/type.d.ts +2 -3
- package/es/Progress/Progress.vue.d.ts +1 -1
- package/es/Progress/ProgressCircle.vue.d.ts +3 -3
- package/es/Progress/ProgressLine.vue.d.ts +3 -3
- package/es/Progress/index.d.ts +3 -3
- package/es/Progress/type.d.ts +2 -3
- package/es/Radio/Radio.vue.js +2 -2
- package/es/Radio/RadioGroup.vue.js +2 -2
- package/es/Radio/hooks/useContext.d.ts +2 -2
- package/es/Radio/hooks/useContext.js +3 -3
- package/es/Radio/type.d.ts +1 -1
- package/es/ResizeBox/index.d.ts +3 -3
- package/es/ResizeBox/index.vue.d.ts +2 -2
- package/es/ResizeBox/type.d.ts +4 -4
- package/es/Result/index.d.ts +3 -3
- package/es/Result/index.vue.d.ts +1 -1
- package/es/Result/type.d.ts +3 -2
- package/es/Scrollbar/Scrollbar.vue.d.ts +1 -1
- package/es/Scrollbar/Scrollbar.vue.js +2 -2
- package/es/Scrollbar/ScrollbarTrack.vue.js +2 -2
- package/es/Scrollbar/hooks/useContext.d.ts +2 -2
- package/es/Scrollbar/hooks/useContext.js +3 -3
- package/es/Scrollbar/index.d.ts +3 -3
- package/es/Scrollbar/type.d.ts +2 -1
- package/es/Select/Option.vue.js +2 -2
- package/es/Select/Select.vue.d.ts +45 -27
- package/es/Select/Select.vue.js +2 -2
- package/es/Select/SelectIcon.vue.js +2 -2
- package/es/Select/SelectRealList.vue.js +2 -2
- package/es/Select/SelectView.vue.js +2 -2
- package/es/Select/SelectVirtualList.vue.js +3 -3
- package/es/Select/hooks/useContext.d.ts +4 -4
- package/es/Select/hooks/useContext.js +3 -3
- package/es/Select/hooks/useSelectOptions.d.ts +2 -2
- package/es/Select/index.d.ts +33 -24
- package/es/Skeleton/SkeletonShape.vue.d.ts +2 -2
- package/es/Skeleton/index.d.ts +2 -2
- package/es/Skeleton/type.d.ts +2 -4
- package/es/Slider/Slider.vue.js +2 -2
- package/es/Slider/SliderBtn.vue.js +2 -2
- package/es/Slider/SliderInput.vue.js +2 -2
- package/es/Slider/SliderTicks.vue.js +2 -2
- package/es/Slider/hooks/useContext.d.ts +2 -2
- package/es/Slider/hooks/useContext.js +3 -3
- package/es/Space/index.d.ts +6 -6
- package/es/Space/index.vue.d.ts +2 -2
- package/es/Space/type.d.ts +5 -4
- package/es/Spin/index.vue.js +1 -1
- package/es/Steps/Step.vue.js +2 -2
- package/es/Steps/Steps.vue.js +2 -2
- package/es/Steps/hooks/useContext.d.ts +1 -2
- package/es/Steps/hooks/useContext.js +3 -3
- package/es/Switch/index.d.ts +14 -14
- package/es/Switch/index.vue.d.ts +5 -5
- package/es/Switch/type.d.ts +4 -4
- package/es/Tabs/TabPane.vue.js +2 -2
- package/es/Tabs/Tabs.vue.d.ts +1 -1
- package/es/Tabs/Tabs.vue.js +2 -2
- package/es/Tabs/TabsNavInk.vue.js +2 -2
- package/es/Tabs/TabsTab.vue.js +2 -2
- package/es/Tabs/hooks/useContext.d.ts +6 -6
- package/es/Tabs/hooks/useContext.js +3 -3
- package/es/Tabs/index.d.ts +3 -3
- package/es/Tabs/type.d.ts +2 -3
- package/es/Tag/index.d.ts +3 -3
- package/es/Tag/index.vue.d.ts +1 -1
- package/es/Tag/type.d.ts +1 -2
- package/es/Textarea/hooks/useTextareaHeight.js +1 -1
- package/es/Textarea/index.d.ts +5 -5
- package/es/Textarea/index.vue.d.ts +2 -2
- package/es/Textarea/type.d.ts +2 -2
- package/es/TimePicker/TimePicker.vue.d.ts +5 -5
- package/es/TimePicker/TimePicker.vue.js +2 -2
- package/es/TimePicker/TimePickerPanel.vue.js +2 -2
- package/es/TimePicker/hooks/useContext.d.ts +2 -2
- package/es/TimePicker/hooks/useContext.js +3 -3
- package/es/TimePicker/index.d.ts +13 -13
- package/es/Timeline/Timeline.vue.js +2 -2
- package/es/Timeline/TimelineItem.vue.d.ts +1 -1
- package/es/Timeline/TimelineItem.vue.js +2 -2
- package/es/Timeline/hooks/useContext.d.ts +2 -2
- package/es/Timeline/hooks/useContext.js +3 -3
- package/es/Timeline/index.d.ts +3 -3
- package/es/Timeline/type.d.ts +3 -4
- package/es/Transfer/Transfer.vue.js +2 -2
- package/es/Transfer/TransferPanel.vue.js +3 -3
- package/es/Transfer/hooks/useContext.d.ts +2 -2
- package/es/Transfer/hooks/useContext.js +3 -3
- package/es/Trigger/hooks/useContext.d.ts +2 -3
- package/es/Trigger/hooks/useContext.js +4 -4
- package/es/Trigger/hooks/useTriggerPosition.js +1 -1
- package/es/Trigger/hooks/useTriggerVisible.js +2 -2
- package/es/Typography/TypographyBase.vue.d.ts +17 -17
- package/es/Typography/TypographyBase.vue.js +1 -1
- package/es/Typography/TypographyParagraph.vue.d.ts +1 -1
- package/es/Typography/TypographyTitle.vue.d.ts +1 -1
- package/es/Typography/type.d.ts +5 -4
- package/es/Upload/Upload.vue.d.ts +53 -0
- package/es/Upload/Upload.vue.js +110 -0
- package/es/Upload/Upload.vue3.js +5 -0
- package/es/Upload/UploadButton.vue.d.ts +2 -0
- package/es/Upload/UploadButton.vue.js +39 -0
- package/es/Upload/UploadButton.vue3.js +5 -0
- package/es/Upload/UploadDrag.vue.d.ts +2 -0
- package/es/Upload/UploadDrag.vue.js +37 -0
- package/es/Upload/UploadDrag.vue3.js +5 -0
- package/es/Upload/UploadFileList.vue.d.ts +24 -0
- package/es/Upload/UploadFileList.vue.js +7 -0
- package/es/Upload/UploadFileList.vue2.js +126 -0
- package/es/Upload/UploadPictureCard.vue.d.ts +4 -0
- package/es/Upload/UploadPictureCard.vue.js +7 -0
- package/es/Upload/UploadPictureCard.vue2.js +132 -0
- package/es/Upload/hooks/useContext.d.ts +49 -0
- package/es/Upload/hooks/useContext.js +92 -0
- package/es/Upload/hooks/useUpload.d.ts +47 -0
- package/es/Upload/hooks/useUpload.js +80 -0
- package/es/Upload/index.css +1 -0
- package/es/Upload/index.d.ts +123 -0
- package/es/Upload/index.js +10 -0
- package/es/Upload/type.d.ts +72 -0
- package/es/VerificationCode/index.d.ts +3 -3
- package/es/VerificationCode/index.vue.d.ts +1 -1
- package/es/VerificationCode/type.d.ts +5 -4
- package/es/Watermark/index.vue.js +1 -1
- package/es/_shared/icons/IconDelete.vue.js +19 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -19
- package/es/_shared/icons/IconEyeOpen.vue.js +1 -20
- package/es/_shared/icons/IconEyeOpen.vue2.js +20 -1
- package/es/_shared/icons/IconFile.vue.d.ts +2 -0
- package/es/_shared/icons/IconFile.vue.js +22 -0
- package/es/_shared/icons/IconFile.vue2.js +4 -0
- package/es/_shared/icons/IconSeparator.vue.js +1 -19
- package/es/_shared/icons/IconSeparator.vue2.js +19 -1
- package/es/_shared/icons/IconUpload.vue.d.ts +2 -0
- package/es/_shared/icons/IconUpload.vue.js +22 -0
- package/es/_shared/icons/IconUpload.vue2.js +4 -0
- package/es/_shared/icons/index.d.ts +2 -0
- package/es/_shared/type/index.d.ts +3 -1
- package/es/_shared/utils/is.d.ts +0 -15
- package/es/_shared/utils/vue-utils.d.ts +1 -0
- package/es/_virtual/_plugin-vue_export-helper.js +10 -0
- package/es/index.d.ts +36 -35
- package/es/index.js +5 -3
- package/es/node_modules/@vueuse/core/index.js +171 -9
- package/es/node_modules/@vueuse/shared/index.js +29 -0
- package/es/style.css +1 -1
- package/lib/Affix/index.vue.js +1 -1
- package/lib/Alert/index.d.ts +3 -3
- package/lib/Alert/index.vue.d.ts +1 -1
- package/lib/Alert/type.d.ts +2 -2
- package/lib/Anchor/Anchor.vue.d.ts +1 -1
- package/lib/Anchor/hooks/useContext.d.ts +3 -3
- package/lib/Anchor/hooks/useContext.js +1 -1
- package/lib/Anchor/index.d.ts +3 -3
- package/lib/Anchor/type.d.ts +3 -2
- package/lib/AutoComplete/index.d.ts +40 -31
- package/lib/AutoComplete/index.vue.d.ts +72 -54
- package/lib/Avatar/Avatar.vue.d.ts +1 -1
- package/lib/Avatar/Avatar.vue.js +1 -1
- package/lib/Avatar/hooks/useContext.d.ts +1 -2
- package/lib/Avatar/hooks/useContext.js +1 -1
- package/lib/Avatar/index.d.ts +3 -3
- package/lib/Avatar/type.d.ts +3 -2
- package/lib/BackTop/index.vue.js +1 -1
- package/lib/Badge/index.d.ts +3 -3
- package/lib/Badge/index.vue.d.ts +1 -1
- package/lib/Badge/type.d.ts +2 -2
- package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/lib/Button/Button.vue.d.ts +2 -2
- package/lib/Button/ButtonGroup.vue.d.ts +1 -1
- package/lib/Button/hooks/useContext.d.ts +4 -5
- package/lib/Button/hooks/useContext.js +1 -1
- package/lib/Button/index.d.ts +9 -9
- package/lib/Button/type.d.ts +6 -6
- package/lib/Card/Card.vue.d.ts +1 -1
- package/lib/Card/hooks/useContext.d.ts +2 -2
- package/lib/Card/hooks/useContext.js +1 -1
- package/lib/Card/index.d.ts +3 -3
- package/lib/Card/type.d.ts +1 -2
- package/lib/Carousel/Carousel.vue.d.ts +2 -2
- package/lib/Carousel/hooks/useContext.d.ts +5 -5
- package/lib/Carousel/hooks/useContext.js +1 -1
- package/lib/Carousel/index.d.ts +6 -6
- package/lib/Carousel/type.d.ts +6 -6
- package/lib/Cascader/Cascader.vue.d.ts +23 -23
- package/lib/Cascader/hooks/useContext.d.ts +2 -2
- package/lib/Cascader/hooks/useContext.js +1 -1
- package/lib/Cascader/index.d.ts +26 -26
- package/lib/Checkbox/hooks/useContext.d.ts +2 -2
- package/lib/Checkbox/hooks/useContext.js +1 -1
- package/lib/Collapse/hooks/useContext.d.ts +3 -15
- package/lib/Collapse/hooks/useContext.js +1 -1
- package/lib/Collapse/type.d.ts +2 -1
- package/lib/ColorPicker/ColorControl.vue.js +1 -1
- package/lib/ColorPicker/ColorPalette.vue.js +1 -1
- package/lib/ColorPicker/hooks/useContext.d.ts +2 -2
- package/lib/ColorPicker/hooks/useContext.js +1 -1
- package/lib/Comment/hooks/useContext.d.ts +1 -2
- package/lib/Comment/hooks/useContext.js +1 -1
- package/lib/Descriptions/Descriptions.vue.d.ts +3 -3
- package/lib/Descriptions/hooks/useContext.d.ts +3 -3
- package/lib/Descriptions/hooks/useContext.js +1 -1
- package/lib/Descriptions/index.d.ts +9 -9
- package/lib/Descriptions/type.d.ts +7 -6
- package/lib/Divider/index.d.ts +6 -6
- package/lib/Divider/index.vue.d.ts +2 -2
- package/lib/Divider/type.d.ts +4 -3
- package/lib/Drawer/Drawer.vue.d.ts +1 -1
- package/lib/Drawer/DrawerService.vue.d.ts +1 -1
- package/lib/Drawer/index.d.ts +5 -9
- package/lib/Drawer/type.d.ts +8 -4
- package/lib/Dropdown/Dropdown.vue.d.ts +3 -3
- package/lib/Dropdown/DropdownButton.vue.d.ts +3 -3
- package/lib/Dropdown/Dsubmenu.vue.d.ts +1 -1
- package/lib/Dropdown/Dsubmenu.vue.js +1 -1
- package/lib/Dropdown/hooks/useContext.d.ts +2 -2
- package/lib/Dropdown/hooks/useContext.js +1 -1
- package/lib/Dropdown/index.d.ts +19 -19
- package/lib/Dropdown/type.d.ts +4 -6
- package/lib/Grid/hooks/useContext.d.ts +1 -13
- package/lib/Grid/hooks/useContext.js +1 -1
- package/lib/Image/Image.vue.d.ts +2 -2
- package/lib/Image/ImagePreview.vue.js +1 -1
- package/lib/Image/hooks/useContext.d.ts +2 -2
- package/lib/Image/hooks/useContext.js +1 -1
- package/lib/Image/index.d.ts +6 -6
- package/lib/Image/type.d.ts +3 -2
- package/lib/Input/Input.vue.d.ts +3 -3
- package/lib/Input/InputSuffix.vue.js +1 -1
- package/lib/Input/index.d.ts +8 -8
- package/lib/InputNumber/InputNumber.vue.d.ts +20 -20
- package/lib/InputNumber/InputOperaBtn.vue.d.ts +2 -2
- package/lib/InputNumber/index.d.ts +19 -19
- package/lib/InputNumber/type.d.ts +5 -4
- package/lib/InputTag/index.d.ts +20 -11
- package/lib/InputTag/index.vue.d.ts +7 -4
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/InputTag/type.d.ts +2 -1
- package/lib/Layout/LayoutSider.vue.d.ts +3 -3
- package/lib/Layout/hooks/useSiderContext.d.ts +1 -2
- package/lib/Layout/hooks/useSiderContext.js +1 -1
- package/lib/Layout/index.d.ts +8 -8
- package/lib/Layout/type.d.ts +3 -4
- package/lib/Link/index.d.ts +3 -3
- package/lib/Link/index.vue.d.ts +1 -1
- package/lib/Link/type.d.ts +2 -2
- package/lib/List/List.vue.d.ts +7 -7
- package/lib/List/hooks/useScrollReach.js +1 -1
- package/lib/List/index.d.ts +6 -6
- package/lib/List/type.d.ts +2 -3
- package/lib/Mention/index.d.ts +49 -40
- package/lib/Mention/index.vue.d.ts +85 -67
- package/lib/Mention/type.d.ts +3 -2
- package/lib/Menu/Menu.vue.d.ts +2 -2
- package/lib/Menu/MenuItem.vue.js +1 -1
- package/lib/Menu/hooks/useContext.d.ts +2 -2
- package/lib/Menu/hooks/useContext.js +1 -1
- package/lib/Menu/index.d.ts +5 -5
- package/lib/Menu/type.d.ts +2 -2
- package/lib/Message/type.d.ts +3 -3
- package/lib/Modal/Modal.vue.d.ts +1 -1
- package/lib/Modal/ModalService.vue.d.ts +1 -1
- package/lib/Modal/index.d.ts +13 -13
- package/lib/Modal/index.js +1 -1
- package/lib/Modal/type.d.ts +6 -9
- package/lib/Notification/Notification.vue.d.ts +1 -1
- package/lib/Notification/index.d.ts +4 -4
- package/lib/Notification/type.d.ts +3 -4
- package/lib/OverflowList/index.d.ts +3 -3
- package/lib/OverflowList/index.vue.d.ts +1 -1
- package/lib/OverflowList/index.vue.js +1 -1
- package/lib/OverflowList/type.d.ts +3 -2
- package/lib/Pagination/hooks/useContext.d.ts +2 -2
- package/lib/Pagination/hooks/useContext.js +1 -1
- package/lib/Popconfirm/index.d.ts +8 -8
- package/lib/Popconfirm/index.vue.d.ts +3 -3
- package/lib/Popconfirm/type.d.ts +2 -3
- package/lib/Progress/Progress.vue.d.ts +1 -1
- package/lib/Progress/ProgressCircle.vue.d.ts +3 -3
- package/lib/Progress/ProgressLine.vue.d.ts +3 -3
- package/lib/Progress/index.d.ts +3 -3
- package/lib/Progress/type.d.ts +2 -3
- package/lib/Radio/hooks/useContext.d.ts +2 -2
- package/lib/Radio/hooks/useContext.js +1 -1
- package/lib/Radio/type.d.ts +1 -1
- package/lib/ResizeBox/index.d.ts +3 -3
- package/lib/ResizeBox/index.vue.d.ts +2 -2
- package/lib/ResizeBox/type.d.ts +4 -4
- package/lib/Result/index.d.ts +3 -3
- package/lib/Result/index.vue.d.ts +1 -1
- package/lib/Result/type.d.ts +3 -2
- package/lib/Scrollbar/Scrollbar.vue.d.ts +1 -1
- package/lib/Scrollbar/hooks/useContext.d.ts +2 -2
- package/lib/Scrollbar/hooks/useContext.js +1 -1
- package/lib/Scrollbar/index.d.ts +3 -3
- package/lib/Scrollbar/type.d.ts +2 -1
- package/lib/Select/Select.vue.d.ts +45 -27
- package/lib/Select/SelectVirtualList.vue.js +1 -1
- package/lib/Select/hooks/useContext.d.ts +4 -4
- package/lib/Select/hooks/useContext.js +1 -1
- package/lib/Select/hooks/useSelectOptions.d.ts +2 -2
- package/lib/Select/index.d.ts +33 -24
- package/lib/Skeleton/SkeletonShape.vue.d.ts +2 -2
- package/lib/Skeleton/index.d.ts +2 -2
- package/lib/Skeleton/type.d.ts +2 -4
- package/lib/Slider/hooks/useContext.d.ts +2 -2
- package/lib/Slider/hooks/useContext.js +1 -1
- package/lib/Space/index.d.ts +6 -6
- package/lib/Space/index.vue.d.ts +2 -2
- package/lib/Space/type.d.ts +5 -4
- package/lib/Spin/index.vue.js +1 -1
- package/lib/Steps/hooks/useContext.d.ts +1 -2
- package/lib/Steps/hooks/useContext.js +1 -1
- package/lib/Switch/index.d.ts +14 -14
- package/lib/Switch/index.vue.d.ts +5 -5
- package/lib/Switch/type.d.ts +4 -4
- package/lib/Tabs/Tabs.vue.d.ts +1 -1
- package/lib/Tabs/hooks/useContext.d.ts +6 -6
- package/lib/Tabs/hooks/useContext.js +1 -1
- package/lib/Tabs/index.d.ts +3 -3
- package/lib/Tabs/type.d.ts +2 -3
- package/lib/Tag/index.d.ts +3 -3
- package/lib/Tag/index.vue.d.ts +1 -1
- package/lib/Tag/type.d.ts +1 -2
- package/lib/Textarea/hooks/useTextareaHeight.js +1 -1
- package/lib/Textarea/index.d.ts +5 -5
- package/lib/Textarea/index.vue.d.ts +2 -2
- package/lib/Textarea/type.d.ts +2 -2
- package/lib/TimePicker/TimePicker.vue.d.ts +5 -5
- package/lib/TimePicker/hooks/useContext.d.ts +2 -2
- package/lib/TimePicker/hooks/useContext.js +1 -1
- package/lib/TimePicker/index.d.ts +13 -13
- package/lib/Timeline/TimelineItem.vue.d.ts +1 -1
- package/lib/Timeline/hooks/useContext.d.ts +2 -2
- package/lib/Timeline/hooks/useContext.js +1 -1
- package/lib/Timeline/index.d.ts +3 -3
- package/lib/Timeline/type.d.ts +3 -4
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Transfer/hooks/useContext.d.ts +2 -2
- package/lib/Transfer/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useContext.d.ts +2 -3
- package/lib/Trigger/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
- package/lib/Trigger/hooks/useTriggerVisible.js +1 -1
- package/lib/Typography/TypographyBase.vue.d.ts +17 -17
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/Typography/TypographyParagraph.vue.d.ts +1 -1
- package/lib/Typography/TypographyTitle.vue.d.ts +1 -1
- package/lib/Typography/type.d.ts +5 -4
- package/lib/Upload/Upload.vue.d.ts +53 -0
- package/lib/Upload/Upload.vue.js +1 -0
- package/lib/Upload/Upload.vue3.js +1 -0
- package/lib/Upload/UploadButton.vue.d.ts +2 -0
- package/lib/Upload/UploadButton.vue.js +1 -0
- package/lib/Upload/UploadButton.vue3.js +1 -0
- package/lib/Upload/UploadDrag.vue.d.ts +2 -0
- package/lib/Upload/UploadDrag.vue.js +1 -0
- package/lib/Upload/UploadDrag.vue3.js +1 -0
- package/lib/Upload/UploadFileList.vue.d.ts +24 -0
- package/lib/Upload/UploadFileList.vue.js +1 -0
- package/lib/Upload/UploadFileList.vue2.js +1 -0
- package/lib/Upload/UploadPictureCard.vue.d.ts +4 -0
- package/lib/Upload/UploadPictureCard.vue.js +1 -0
- package/lib/Upload/UploadPictureCard.vue2.js +1 -0
- package/lib/Upload/hooks/useContext.d.ts +49 -0
- package/lib/Upload/hooks/useContext.js +1 -0
- package/lib/Upload/hooks/useUpload.d.ts +47 -0
- package/lib/Upload/hooks/useUpload.js +1 -0
- package/lib/Upload/index.css +1 -0
- package/lib/Upload/index.d.ts +123 -0
- package/lib/Upload/index.js +1 -0
- package/lib/Upload/type.d.ts +72 -0
- package/lib/VerificationCode/index.d.ts +3 -3
- package/lib/VerificationCode/index.vue.d.ts +1 -1
- package/lib/VerificationCode/type.d.ts +5 -4
- package/lib/Watermark/index.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
- package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
- package/lib/_shared/icons/IconFile.vue.d.ts +2 -0
- package/lib/_shared/icons/IconFile.vue.js +1 -0
- package/lib/_shared/icons/IconFile.vue2.js +1 -0
- package/lib/_shared/icons/IconSeparator.vue.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
- package/lib/_shared/icons/IconUpload.vue.d.ts +2 -0
- package/lib/_shared/icons/IconUpload.vue.js +1 -0
- package/lib/_shared/icons/IconUpload.vue2.js +1 -0
- package/lib/_shared/icons/index.d.ts +2 -0
- package/lib/_shared/type/index.d.ts +3 -1
- package/lib/_shared/utils/is.d.ts +0 -15
- package/lib/_shared/utils/vue-utils.d.ts +1 -0
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/index.d.ts +36 -35
- package/lib/index.js +1 -1
- package/lib/node_modules/@vueuse/core/index.js +1 -1
- package/lib/node_modules/@vueuse/shared/index.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
@@ -0,0 +1,126 @@
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, renderSlot, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, createVNode, withCtx } from "vue";
|
2
|
+
import useUploadContext from "./hooks/useContext.js";
|
3
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
4
|
+
/* empty css */
|
5
|
+
import "../_shared/utils/dom.js";
|
6
|
+
/* empty css */
|
7
|
+
/* empty css */
|
8
|
+
import _sfc_main$3 from "../_shared/icons/IconDelete.vue.js";
|
9
|
+
import _sfc_main$2 from "../_shared/icons/IconFile.vue.js";
|
10
|
+
const _hoisted_1 = { class: "yc-upload-list-item-content" };
|
11
|
+
const _hoisted_2 = {
|
12
|
+
key: 0,
|
13
|
+
class: "yc-upload-list-item-thumbnail"
|
14
|
+
};
|
15
|
+
const _hoisted_3 = ["src", "alt", "loading"];
|
16
|
+
const _hoisted_4 = { class: "yc-upload-list-item-name" };
|
17
|
+
const _hoisted_5 = {
|
18
|
+
key: 0,
|
19
|
+
class: "yc-upload-list-item-file-icon"
|
20
|
+
};
|
21
|
+
const _hoisted_6 = { class: "yc-upload-list-item-name-text text-ellipsis" };
|
22
|
+
const _hoisted_7 = ["href", "download"];
|
23
|
+
const _hoisted_8 = {
|
24
|
+
key: 0,
|
25
|
+
class: "yc-upload-list-item-operation"
|
26
|
+
};
|
27
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
28
|
+
__name: "UploadFileList",
|
29
|
+
setup(__props) {
|
30
|
+
const {
|
31
|
+
computedFileList,
|
32
|
+
showRemoveButton,
|
33
|
+
listType,
|
34
|
+
imageLoading,
|
35
|
+
showLink,
|
36
|
+
download,
|
37
|
+
customIcon,
|
38
|
+
slots,
|
39
|
+
emits
|
40
|
+
} = useUploadContext().inject();
|
41
|
+
const handleDel = (uid) => {
|
42
|
+
computedFileList.value = computedFileList.value.filter((v) => v.uid != uid);
|
43
|
+
emits("change", computedFileList.value, []);
|
44
|
+
};
|
45
|
+
const renderFileIcon = (fileItem) => {
|
46
|
+
var _a, _b;
|
47
|
+
if (slots["file-icon"]) {
|
48
|
+
return slots["file-icon"]({
|
49
|
+
fileItem
|
50
|
+
});
|
51
|
+
}
|
52
|
+
return ((_b = (_a = customIcon.value).fileIcon) == null ? void 0 : _b.call(_a, fileItem)) || _sfc_main$2;
|
53
|
+
};
|
54
|
+
const renderName = (fileItem) => {
|
55
|
+
if (slots["file-name"]) {
|
56
|
+
return slots["file-name"]({
|
57
|
+
fileItem
|
58
|
+
});
|
59
|
+
}
|
60
|
+
return () => {
|
61
|
+
var _a, _b;
|
62
|
+
return ((_b = (_a = customIcon.value).fileName) == null ? void 0 : _b.call(_a, fileItem)) || fileItem.name;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
const renderDelIcon = () => {
|
66
|
+
return slots["remove-icon"] ?? (customIcon.value.removeIcon || _sfc_main$3);
|
67
|
+
};
|
68
|
+
return (_ctx, _cache) => {
|
69
|
+
return openBlock(), createElementBlock("div", {
|
70
|
+
class: normalizeClass(["yc-upload-list", `yc-upload-list-type-${unref(listType)}`])
|
71
|
+
}, [
|
72
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedFileList), (item, i) => {
|
73
|
+
return openBlock(), createElementBlock("div", {
|
74
|
+
key: item.uid,
|
75
|
+
class: "yc-upload-list-item"
|
76
|
+
}, [
|
77
|
+
renderSlot(_ctx.$slots, "upload-item", {
|
78
|
+
fileItem: item,
|
79
|
+
index: i
|
80
|
+
}, () => [
|
81
|
+
createElementVNode("div", _hoisted_1, [
|
82
|
+
unref(listType) == "picture" ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
83
|
+
createElementVNode("img", {
|
84
|
+
src: item.url,
|
85
|
+
alt: item.name,
|
86
|
+
loading: unref(imageLoading)
|
87
|
+
}, null, 8, _hoisted_3)
|
88
|
+
])) : createCommentVNode("", true),
|
89
|
+
createElementVNode("div", _hoisted_4, [
|
90
|
+
unref(listType) == "text" ? (openBlock(), createElementBlock("span", _hoisted_5, [
|
91
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderFileIcon(item))))
|
92
|
+
])) : createCommentVNode("", true),
|
93
|
+
createElementVNode("span", _hoisted_6, [
|
94
|
+
unref(showLink) ? (openBlock(), createElementBlock("a", {
|
95
|
+
key: 0,
|
96
|
+
href: item.url,
|
97
|
+
download: unref(download) ? item.name : void 0,
|
98
|
+
class: "yc-upload-list-item-name-link",
|
99
|
+
target: "_blank"
|
100
|
+
}, [
|
101
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderName(item))))
|
102
|
+
], 8, _hoisted_7)) : (openBlock(), createBlock(resolveDynamicComponent(renderName(item)), { key: 1 }))
|
103
|
+
])
|
104
|
+
])
|
105
|
+
])
|
106
|
+
], true),
|
107
|
+
_ctx.$slots["extra-button"] || unref(showRemoveButton) ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
108
|
+
createVNode(unref(_sfc_main$1), {
|
109
|
+
onClick: ($event) => handleDel(item.uid)
|
110
|
+
}, {
|
111
|
+
default: withCtx(() => [
|
112
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderDelIcon())))
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}, 8, ["onClick"]),
|
116
|
+
renderSlot(_ctx.$slots, "extra-button", { fileItem: item }, void 0, true)
|
117
|
+
])) : createCommentVNode("", true)
|
118
|
+
]);
|
119
|
+
}), 128))
|
120
|
+
], 2);
|
121
|
+
};
|
122
|
+
}
|
123
|
+
});
|
124
|
+
export {
|
125
|
+
_sfc_main as default
|
126
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
2
|
+
uploadRef: HTMLSpanElement;
|
3
|
+
}, HTMLDivElement>;
|
4
|
+
export default _default;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from "./UploadPictureCard.vue2.js";
|
2
|
+
/* empty css */
|
3
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
|
4
|
+
const UploadPictureCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-499f701f"]]);
|
5
|
+
export {
|
6
|
+
UploadPictureCard as default
|
7
|
+
};
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, Fragment, renderList, createCommentVNode, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
|
2
|
+
import "../_shared/utils/dom.js";
|
3
|
+
/* empty css */
|
4
|
+
/* empty css */
|
5
|
+
/* empty css */
|
6
|
+
import _sfc_main$3 from "../_shared/icons/IconDelete.vue.js";
|
7
|
+
import _sfc_main$4 from "../_shared/icons/IconEyeClose.vue.js";
|
8
|
+
import _sfc_main$2 from "../_shared/icons/IconPlus.vue.js";
|
9
|
+
import useUpload from "./hooks/useUpload.js";
|
10
|
+
import "../Image/index.js";
|
11
|
+
import _sfc_main$1 from "../Image/ImagePreview.vue.js";
|
12
|
+
/* empty css */
|
13
|
+
const _hoisted_1 = ["src", "alt"];
|
14
|
+
const _hoisted_2 = { class: "yc-upload-list-picture-mask" };
|
15
|
+
const _hoisted_3 = { class: "yc-upload-list-picture-operation" };
|
16
|
+
const _hoisted_4 = ["onClick"];
|
17
|
+
const _hoisted_5 = ["onClick"];
|
18
|
+
const _hoisted_6 = { class: "yc-upload-picture-card-text" };
|
19
|
+
const _hoisted_7 = {
|
20
|
+
key: 0,
|
21
|
+
class: "yc-upload-tip"
|
22
|
+
};
|
23
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
24
|
+
__name: "UploadPictureCard",
|
25
|
+
setup(__props) {
|
26
|
+
const uploadRef = ref();
|
27
|
+
const visible = ref(false);
|
28
|
+
const url = ref("");
|
29
|
+
const {
|
30
|
+
computedFileList,
|
31
|
+
tip,
|
32
|
+
slots,
|
33
|
+
customIcon,
|
34
|
+
disabled,
|
35
|
+
imagePreview,
|
36
|
+
showPreviewButton,
|
37
|
+
showRemoveButton,
|
38
|
+
listType,
|
39
|
+
open,
|
40
|
+
emits
|
41
|
+
} = useUpload(uploadRef);
|
42
|
+
const renderDelIcon = () => {
|
43
|
+
return slots["remove-icon"] ?? (customIcon.value.removeIcon || _sfc_main$3);
|
44
|
+
};
|
45
|
+
const renderPreviewIcon = () => {
|
46
|
+
return slots["preview-icon"] ?? (customIcon.value.previewIcon || _sfc_main$4);
|
47
|
+
};
|
48
|
+
const handleUpload = () => {
|
49
|
+
if (disabled.value) return;
|
50
|
+
open();
|
51
|
+
};
|
52
|
+
const handlePreview = (fileItem) => {
|
53
|
+
url.value = fileItem.url;
|
54
|
+
emits("preview", fileItem);
|
55
|
+
if (!imagePreview.value) return;
|
56
|
+
visible.value = true;
|
57
|
+
};
|
58
|
+
const handleDel = (uid) => {
|
59
|
+
computedFileList.value = computedFileList.value.filter((v) => v.uid != uid);
|
60
|
+
emits("change", computedFileList.value, []);
|
61
|
+
};
|
62
|
+
return (_ctx, _cache) => {
|
63
|
+
return openBlock(), createElementBlock("div", {
|
64
|
+
class: normalizeClass([
|
65
|
+
"yc-upload-list",
|
66
|
+
`yc-upload-list-type-${unref(listType)}`,
|
67
|
+
{
|
68
|
+
"yc-upload-list-disabled": unref(disabled)
|
69
|
+
}
|
70
|
+
])
|
71
|
+
}, [
|
72
|
+
createVNode(unref(_sfc_main$1), {
|
73
|
+
visible: visible.value,
|
74
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
75
|
+
src: url.value
|
76
|
+
}, null, 8, ["visible", "src"]),
|
77
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedFileList), (item) => {
|
78
|
+
return openBlock(), createElementBlock("div", {
|
79
|
+
key: item.uid,
|
80
|
+
class: "yc-upload-list-picture"
|
81
|
+
}, [
|
82
|
+
createElementVNode("img", {
|
83
|
+
src: item.url,
|
84
|
+
alt: item.name
|
85
|
+
}, null, 8, _hoisted_1),
|
86
|
+
createElementVNode("div", _hoisted_2, [
|
87
|
+
createElementVNode("div", _hoisted_3, [
|
88
|
+
unref(showPreviewButton) ? (openBlock(), createElementBlock("span", {
|
89
|
+
key: 0,
|
90
|
+
class: normalizeClass(["yc-upload-icon", "yc-upload-icon-preview"]),
|
91
|
+
onClick: ($event) => handlePreview(item)
|
92
|
+
}, [
|
93
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderPreviewIcon())))
|
94
|
+
], 8, _hoisted_4)) : createCommentVNode("", true),
|
95
|
+
unref(showRemoveButton) ? (openBlock(), createElementBlock("span", {
|
96
|
+
key: 1,
|
97
|
+
class: normalizeClass(["yc-upload-icon", "yc-upload-icon-remove"]),
|
98
|
+
onClick: ($event) => handleDel(item.uid)
|
99
|
+
}, [
|
100
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderDelIcon())))
|
101
|
+
], 8, _hoisted_5)) : createCommentVNode("", true)
|
102
|
+
])
|
103
|
+
])
|
104
|
+
]);
|
105
|
+
}), 128)),
|
106
|
+
createElementVNode("span", {
|
107
|
+
class: "yc-upload",
|
108
|
+
ref_key: "uploadRef",
|
109
|
+
ref: uploadRef,
|
110
|
+
onClick: handleUpload
|
111
|
+
}, [
|
112
|
+
createElementVNode("div", {
|
113
|
+
class: normalizeClass([
|
114
|
+
"yc-upload-picture-card",
|
115
|
+
{
|
116
|
+
"yc-upload-picture-card-disabled": unref(disabled)
|
117
|
+
}
|
118
|
+
])
|
119
|
+
}, [
|
120
|
+
createElementVNode("div", _hoisted_6, [
|
121
|
+
createVNode(unref(_sfc_main$2))
|
122
|
+
]),
|
123
|
+
unref(tip) ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(tip)), 1)) : createCommentVNode("", true)
|
124
|
+
], 2)
|
125
|
+
], 512)
|
126
|
+
], 2);
|
127
|
+
};
|
128
|
+
}
|
129
|
+
});
|
130
|
+
export {
|
131
|
+
_sfc_main as default
|
132
|
+
};
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import { UploadEmits, FileItem, FileListType, ImageLoading, UploadSlots, CustomIcon, FileName } from '../type';
|
3
|
+
import { RecordType } from '../../_shared/type';
|
4
|
+
type UploadContext = {
|
5
|
+
computedFileList: Ref<FileItem[]>;
|
6
|
+
disabled: Ref<boolean>;
|
7
|
+
tip: Ref<string>;
|
8
|
+
listType: Ref<FileListType>;
|
9
|
+
imageLoading: Ref<ImageLoading>;
|
10
|
+
showRemoveButton: Ref<boolean>;
|
11
|
+
showLink: Ref<boolean>;
|
12
|
+
download: Ref<boolean>;
|
13
|
+
customIcon: Ref<CustomIcon>;
|
14
|
+
limit: Ref<number>;
|
15
|
+
accept: Ref<string>;
|
16
|
+
name: FileName;
|
17
|
+
multiple: Ref<boolean>;
|
18
|
+
draggable: Ref<boolean>;
|
19
|
+
directory: Ref<boolean>;
|
20
|
+
showPreviewButton: Ref<boolean>;
|
21
|
+
imagePreview: Ref<boolean>;
|
22
|
+
slots: UploadSlots;
|
23
|
+
emits: UploadEmits;
|
24
|
+
};
|
25
|
+
export default function useUploadContext(): {
|
26
|
+
provide: (props: RecordType, emits: UploadEmits) => {
|
27
|
+
computedFileList: import('vue').WritableComputedRef<FileItem[], FileItem[]>;
|
28
|
+
accept: import('vue').ComputedRef<string>;
|
29
|
+
disabled: Ref<boolean, boolean>;
|
30
|
+
directory: Ref<boolean, boolean>;
|
31
|
+
multiple: Ref<boolean, boolean>;
|
32
|
+
draggable: Ref<boolean, boolean>;
|
33
|
+
limit: Ref<number, number>;
|
34
|
+
tip: Ref<string, string>;
|
35
|
+
listType: Ref<FileListType, FileListType>;
|
36
|
+
imageLoading: Ref<ImageLoading, ImageLoading>;
|
37
|
+
showLink: Ref<boolean, boolean>;
|
38
|
+
download: Ref<boolean, boolean>;
|
39
|
+
customIcon: Ref<CustomIcon, CustomIcon>;
|
40
|
+
imagePreview: Ref<boolean, boolean>;
|
41
|
+
showRemoveButton: Ref<boolean, boolean>;
|
42
|
+
showPreviewButton: Ref<boolean, boolean>;
|
43
|
+
name: any;
|
44
|
+
slots: UploadSlots;
|
45
|
+
emits: UploadEmits;
|
46
|
+
};
|
47
|
+
inject: () => UploadContext;
|
48
|
+
};
|
49
|
+
export {};
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { toRefs, useSlots, computed, provide, inject, ref } from "vue";
|
2
|
+
import { useControlValue } from "../../_shared/utils/control.js";
|
3
|
+
const UPLOAD_CONTEXT_KEY = "upload-context";
|
4
|
+
function useUploadContext() {
|
5
|
+
const provide$1 = (props, emits) => {
|
6
|
+
const {
|
7
|
+
fileList,
|
8
|
+
defaultFileList,
|
9
|
+
disabled,
|
10
|
+
multiple,
|
11
|
+
draggable,
|
12
|
+
directory,
|
13
|
+
limit,
|
14
|
+
tip,
|
15
|
+
listType,
|
16
|
+
imageLoading,
|
17
|
+
download,
|
18
|
+
showLink,
|
19
|
+
customIcon,
|
20
|
+
imagePreview,
|
21
|
+
showRemoveButton,
|
22
|
+
showPreviewButton,
|
23
|
+
accept: _accept
|
24
|
+
} = toRefs(props);
|
25
|
+
const { name } = props;
|
26
|
+
const slots = useSlots();
|
27
|
+
const computedFileList = useControlValue(
|
28
|
+
fileList,
|
29
|
+
defaultFileList.value,
|
30
|
+
(val) => {
|
31
|
+
emits("update:fileList", val);
|
32
|
+
}
|
33
|
+
);
|
34
|
+
const accept = computed(() => {
|
35
|
+
return listType.value != "text" ? "image/*" : _accept.value;
|
36
|
+
});
|
37
|
+
const context = {
|
38
|
+
computedFileList,
|
39
|
+
accept,
|
40
|
+
disabled,
|
41
|
+
directory,
|
42
|
+
multiple,
|
43
|
+
draggable,
|
44
|
+
limit,
|
45
|
+
tip,
|
46
|
+
listType,
|
47
|
+
imageLoading,
|
48
|
+
showLink,
|
49
|
+
download,
|
50
|
+
customIcon,
|
51
|
+
imagePreview,
|
52
|
+
showRemoveButton,
|
53
|
+
showPreviewButton,
|
54
|
+
name,
|
55
|
+
slots,
|
56
|
+
emits
|
57
|
+
};
|
58
|
+
provide(UPLOAD_CONTEXT_KEY, context);
|
59
|
+
return context;
|
60
|
+
};
|
61
|
+
const inject$1 = () => {
|
62
|
+
return inject(UPLOAD_CONTEXT_KEY, {
|
63
|
+
computedFileList: ref([]),
|
64
|
+
accept: ref(""),
|
65
|
+
disabled: ref(false),
|
66
|
+
directory: ref(false),
|
67
|
+
multiple: ref(false),
|
68
|
+
draggable: ref(false),
|
69
|
+
limit: ref(0),
|
70
|
+
tip: ref(""),
|
71
|
+
listType: ref("text"),
|
72
|
+
imageLoading: ref("lazy"),
|
73
|
+
showLink: ref(true),
|
74
|
+
download: ref(false),
|
75
|
+
customIcon: ref({}),
|
76
|
+
imagePreview: ref(true),
|
77
|
+
showRemoveButton: ref(true),
|
78
|
+
showPreviewButton: ref(true),
|
79
|
+
name: "",
|
80
|
+
slots: {},
|
81
|
+
emits: () => {
|
82
|
+
}
|
83
|
+
});
|
84
|
+
};
|
85
|
+
return {
|
86
|
+
provide: provide$1,
|
87
|
+
inject: inject$1
|
88
|
+
};
|
89
|
+
}
|
90
|
+
export {
|
91
|
+
useUploadContext as default
|
92
|
+
};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { FileItem, UploadEmits, UploadProps } from '../type';
|
2
|
+
import { Ref } from 'vue';
|
3
|
+
export default function useUpload(uploadRef: Ref<HTMLDivElement | undefined>, _props?: UploadProps, _emits?: UploadEmits): {
|
4
|
+
open: (localOptions?: Partial<import('@vueuse/core').UseFileDialogOptions>) => void;
|
5
|
+
handleFiles: (fileData: File[] | FileList | null) => void;
|
6
|
+
computedFileList: Ref<FileItem[]>;
|
7
|
+
disabled: Ref<boolean>;
|
8
|
+
tip: Ref<string>;
|
9
|
+
listType: Ref<import('..').FileListType>;
|
10
|
+
imageLoading: Ref<import('..').ImageLoading>;
|
11
|
+
showRemoveButton: Ref<boolean>;
|
12
|
+
showLink: Ref<boolean>;
|
13
|
+
download: Ref<boolean>;
|
14
|
+
customIcon: Ref<import('..').CustomIcon>;
|
15
|
+
limit: Ref<number>;
|
16
|
+
accept: Ref<string>;
|
17
|
+
name: import('..').FileName;
|
18
|
+
multiple: Ref<boolean>;
|
19
|
+
draggable: Ref<boolean>;
|
20
|
+
directory: Ref<boolean>;
|
21
|
+
showPreviewButton: Ref<boolean>;
|
22
|
+
imagePreview: Ref<boolean>;
|
23
|
+
slots: import('..').UploadSlots;
|
24
|
+
emits: UploadEmits;
|
25
|
+
} | {
|
26
|
+
open: (localOptions?: Partial<import('@vueuse/core').UseFileDialogOptions>) => void;
|
27
|
+
handleFiles: (fileData: File[] | FileList | null) => void;
|
28
|
+
computedFileList: import('vue').WritableComputedRef<FileItem[], FileItem[]>;
|
29
|
+
accept: import('vue').ComputedRef<string>;
|
30
|
+
disabled: Ref<boolean, boolean>;
|
31
|
+
directory: Ref<boolean, boolean>;
|
32
|
+
multiple: Ref<boolean, boolean>;
|
33
|
+
draggable: Ref<boolean, boolean>;
|
34
|
+
limit: Ref<number, number>;
|
35
|
+
tip: Ref<string, string>;
|
36
|
+
listType: Ref<import('..').FileListType, import('..').FileListType>;
|
37
|
+
imageLoading: Ref<import('..').ImageLoading, import('..').ImageLoading>;
|
38
|
+
showLink: Ref<boolean, boolean>;
|
39
|
+
download: Ref<boolean, boolean>;
|
40
|
+
customIcon: Ref<import('..').CustomIcon, import('..').CustomIcon>;
|
41
|
+
imagePreview: Ref<boolean, boolean>;
|
42
|
+
showRemoveButton: Ref<boolean, boolean>;
|
43
|
+
showPreviewButton: Ref<boolean, boolean>;
|
44
|
+
name: any;
|
45
|
+
slots: import('..').UploadSlots;
|
46
|
+
emits: UploadEmits;
|
47
|
+
};
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { nanoid } from "../../node_modules/nanoid/index.browser.js";
|
2
|
+
import "vue";
|
3
|
+
import { isString } from "../../_shared/utils/is.js";
|
4
|
+
import { useFileDialog, useDropZone } from "../../node_modules/@vueuse/core/index.js";
|
5
|
+
import useUploadContext from "./useContext.js";
|
6
|
+
function useUpload(uploadRef, _props, _emits) {
|
7
|
+
let context;
|
8
|
+
if (_props && _emits) {
|
9
|
+
context = useUploadContext().provide(_props, _emits);
|
10
|
+
} else {
|
11
|
+
context = useUploadContext().inject();
|
12
|
+
}
|
13
|
+
const {
|
14
|
+
computedFileList,
|
15
|
+
disabled,
|
16
|
+
limit,
|
17
|
+
accept,
|
18
|
+
directory,
|
19
|
+
multiple,
|
20
|
+
name,
|
21
|
+
emits
|
22
|
+
} = context;
|
23
|
+
const { onChange, open } = useFileDialog({
|
24
|
+
directory: directory.value,
|
25
|
+
multiple: multiple.value,
|
26
|
+
accept: accept.value,
|
27
|
+
reset: true
|
28
|
+
});
|
29
|
+
onChange((files) => handleFiles(files));
|
30
|
+
useDropZone(uploadRef, {
|
31
|
+
dataTypes: accept.value ? accept.value.split(",") : void 0,
|
32
|
+
multiple: multiple.value,
|
33
|
+
preventDefaultForUnhandled: true,
|
34
|
+
onDrop: (files) => handleFiles(files)
|
35
|
+
});
|
36
|
+
const isOutOfLimit = (length = 0) => {
|
37
|
+
return limit.value > 0 && length + computedFileList.value.length > limit.value;
|
38
|
+
};
|
39
|
+
const getFileName = (fileItem) => {
|
40
|
+
if (name) {
|
41
|
+
return isString(name) ? name : name(fileItem);
|
42
|
+
}
|
43
|
+
return fileItem.name;
|
44
|
+
};
|
45
|
+
const handleFiles = (fileData) => {
|
46
|
+
const files = [...fileData || []];
|
47
|
+
if (!(files == null ? void 0 : files.length) || disabled.value || isOutOfLimit(files.length)) {
|
48
|
+
if (!isOutOfLimit(files == null ? void 0 : files.length)) return;
|
49
|
+
emits("exceed-limit", computedFileList.value, files);
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
computedFileList.value = [
|
53
|
+
...computedFileList.value,
|
54
|
+
...files.map((v) => {
|
55
|
+
const fileItem = {
|
56
|
+
name: v.name,
|
57
|
+
uid: nanoid(),
|
58
|
+
file: v,
|
59
|
+
status: "init",
|
60
|
+
percent: 0,
|
61
|
+
url: URL.createObjectURL(v)
|
62
|
+
};
|
63
|
+
return {
|
64
|
+
...fileItem,
|
65
|
+
name: getFileName(fileItem)
|
66
|
+
};
|
67
|
+
})
|
68
|
+
];
|
69
|
+
console.dir(computedFileList.value, "files");
|
70
|
+
emits("change", computedFileList.value, [...files]);
|
71
|
+
};
|
72
|
+
return {
|
73
|
+
...context,
|
74
|
+
open,
|
75
|
+
handleFiles
|
76
|
+
};
|
77
|
+
}
|
78
|
+
export {
|
79
|
+
useUpload as default
|
80
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
.yc-upload-wrapper{width:100%;display:flex;flex-direction:column}.yc-upload-wrapper .yc-upload{cursor:pointer;max-width:100%}.yc-upload-wrapper .yc-upload .yc-upload-tip{max-width:100%;color:var(--color-text-3);font-size:12px;line-height:1.5}.yc-upload-wrapper .yc-upload .yc-upload-button{display:flex;flex-direction:column;gap:4px}.yc-upload-wrapper .yc-upload .yc-upload-button .yc-button{width:fit-content;max-width:100%}.yc-upload-wrapper .yc-upload .yc-upload-drag{width:100%;padding:50px 0;background-color:var(--color-fill-1);border:1px dashed var(--color-neutral-3);border-radius:var(--border-radius-small);color:var(--color-text-1);transition:all .2s ease;display:flex;flex-direction:column;align-items:center}.yc-upload-wrapper .yc-upload .yc-upload-drag:not(.yc-upload-drag-disabled):hover{background-color:var(--color-fill-3);border-color:var(--color-neutral-4)}.yc-upload-wrapper .yc-upload .yc-upload-drag .yc-upload-drag-icon{color:var(--color-text-2)}.yc-upload-wrapper .yc-upload .yc-upload-drag .yc-upload-drag-icon .yc-icon{margin-bottom:24px;font-size:14px}.yc-upload-wrapper .yc-upload .yc-upload-drag .yc-upload-drag-text{color:var(--color-text-1);font-size:14px;line-height:1.5}.yc-upload-list-type-text,.yc-upload-list-type-picture{width:100%;margin-top:24px;display:flex;flex-direction:column;gap:12px}.yc-upload-list-type-text .yc-upload-list-item,.yc-upload-list-type-picture .yc-upload-list-item{overflow:hidden;display:flex;align-items:center;gap:12px}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content{overflow:hidden;flex:1;width:100%;padding:8px 10px 8px 12px;background-color:var(--color-fill-1);transition:background-color .1s cubic-bezier(0, 0, 1, 1);font-size:14px;display:flex;align-items:center}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-thumbnail,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-thumbnail{flex-shrink:0;width:40px;height:40px;margin-right:12px}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-thumbnail img,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-thumbnail img{width:100%;height:100%}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name{flex:1;overflow:hidden;color:var(--color-text-1);font-size:14px;line-height:1.4286;display:flex;align-items:center;gap:12px}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name .yc-upload-list-item-file-icon,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name .yc-upload-list-item-file-icon{color:rgb(var(--primary-6));font-size:16px;display:flex;justify-content:center;align-items:center}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name .yc-upload-list-item-name-link,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-content .yc-upload-list-item-name .yc-upload-list-item-name-link{cursor:pointer;color:rgb(var(--link-6))}.yc-upload-list-type-text .yc-upload-list-item .yc-upload-list-item-operation,.yc-upload-list-type-picture .yc-upload-list-item .yc-upload-list-item-operation{color:var(--color-text-2);font-size:12px}.yc-upload-list-type-picture-card{display:flex;flex-wrap:wrap;gap:8px}.yc-upload-list-type-picture-card .yc-upload-list-picture{position:relative;width:80px;height:80px;overflow:hidden;line-height:80px;text-align:center;border-radius:var(--border-radius-small);transition:all .2s cubic-bezier(.34, .69, .1, 1)}.yc-upload-list-type-picture-card .yc-upload-list-picture:hover .yc-upload-list-picture-mask{opacity:1}.yc-upload-list-type-picture-card .yc-upload-list-picture img{width:100%;height:100%}.yc-upload-list-type-picture-card .yc-upload-list-picture .yc-upload-list-picture-mask{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.5);color:var(--color-white);font-size:16px;line-height:80px;cursor:pointer;opacity:0;transition:opacity .1s cubic-bezier(0, 0, 1, 1)}.yc-upload-list-type-picture-card .yc-upload-list-picture .yc-upload-list-picture-mask .yc-upload-list-picture-operation{width:100%;display:flex;justify-content:space-evenly;align-items:center}.yc-upload-list-type-picture-card .yc-upload-list-picture .yc-upload-list-picture-mask .yc-upload-list-picture-operation .yc-upload-icon{cursor:pointer}.yc-upload-list-type-picture-card .yc-upload-picture-card{min-width:80px;height:80px;background:var(--color-fill-2);border:1px dashed var(--color-neutral-3);border-radius:var(--border-radius-small);color:var(--color-text-2);transition:all .1s cubic-bezier(0, 0, 1, 1);display:flex;flex-direction:column;justify-content:center;align-items:center}.yc-upload-list-type-picture-card .yc-upload-picture-card:not(.yc-upload-picture-card-disabled):hover{color:var(--color-text-2);background-color:var(--color-fill-3);border-color:var(--color-neutral-4)}.yc-upload-disabled .yc-upload{cursor:not-allowed}.yc-upload-disabled .yc-upload .yc-upload-drag,.yc-upload-disabled .yc-upload .yc-upload-picture-card{border-color:var(--color-text-4)}.yc-upload-disabled .yc-upload .yc-upload-drag .yc-upload-drag-text,.yc-upload-disabled .yc-upload .yc-upload-picture-card .yc-upload-drag-text,.yc-upload-disabled .yc-upload .yc-upload-drag .yc-upload-tip,.yc-upload-disabled .yc-upload .yc-upload-picture-card .yc-upload-tip,.yc-upload-disabled .yc-upload .yc-upload-drag .yc-upload-drag-icon,.yc-upload-disabled .yc-upload .yc-upload-picture-card .yc-upload-drag-icon,.yc-upload-disabled .yc-upload .yc-upload-drag .yc-upload-picture-card-text,.yc-upload-disabled .yc-upload .yc-upload-picture-card .yc-upload-picture-card-text{color:var(--color-text-4)}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import { App } from 'vue';
|
2
|
+
import { default as _Upload } from './Upload.vue';
|
3
|
+
export type UploadInstance = InstanceType<typeof _Upload>;
|
4
|
+
export * from './type';
|
5
|
+
declare const Upload: {
|
6
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').UploadProps> & Readonly<{
|
7
|
+
onChange?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
8
|
+
onPreview?: ((fileItem: import('./type').FileItem) => any) | undefined;
|
9
|
+
"onUpdate:fileList"?: ((value: import('./type').FileItem[]) => any) | undefined;
|
10
|
+
"onExceed-limit"?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
11
|
+
}>, {
|
12
|
+
updateFile: (id: string, File: File) => void;
|
13
|
+
upload: (files: File[]) => void;
|
14
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
15
|
+
change: (fileList: import('./type').FileItem[], files: File[]) => any;
|
16
|
+
preview: (fileItem: import('./type').FileItem) => any;
|
17
|
+
"update:fileList": (value: import('./type').FileItem[]) => any;
|
18
|
+
"exceed-limit": (fileList: import('./type').FileItem[], files: File[]) => any;
|
19
|
+
}, import('vue').PublicProps, {
|
20
|
+
name: import('./type').FileName;
|
21
|
+
disabled: boolean;
|
22
|
+
multiple: boolean;
|
23
|
+
tip: string;
|
24
|
+
limit: number;
|
25
|
+
draggable: boolean;
|
26
|
+
fileList: import('./type').FileItem[];
|
27
|
+
defaultFileList: import('./type').FileItem[];
|
28
|
+
directory: boolean;
|
29
|
+
listType: import('./type').FileListType;
|
30
|
+
imageLoading: import('./type').ImageLoading;
|
31
|
+
download: boolean;
|
32
|
+
showLink: boolean;
|
33
|
+
customIcon: import('./type').CustomIcon;
|
34
|
+
showRemoveButton: boolean;
|
35
|
+
showPreviewButton: boolean;
|
36
|
+
accept: string;
|
37
|
+
showFileList: boolean;
|
38
|
+
showUploadButton: boolean;
|
39
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
40
|
+
uploadRef: HTMLDivElement;
|
41
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
42
|
+
P: {};
|
43
|
+
B: {};
|
44
|
+
D: {};
|
45
|
+
C: {};
|
46
|
+
M: {};
|
47
|
+
Defaults: {};
|
48
|
+
}, Readonly<import('./type').UploadProps> & Readonly<{
|
49
|
+
onChange?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
50
|
+
onPreview?: ((fileItem: import('./type').FileItem) => any) | undefined;
|
51
|
+
"onUpdate:fileList"?: ((value: import('./type').FileItem[]) => any) | undefined;
|
52
|
+
"onExceed-limit"?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
53
|
+
}>, {
|
54
|
+
updateFile: (id: string, File: File) => void;
|
55
|
+
upload: (files: File[]) => void;
|
56
|
+
}, {}, {}, {}, {
|
57
|
+
name: import('./type').FileName;
|
58
|
+
disabled: boolean;
|
59
|
+
multiple: boolean;
|
60
|
+
tip: string;
|
61
|
+
limit: number;
|
62
|
+
draggable: boolean;
|
63
|
+
fileList: import('./type').FileItem[];
|
64
|
+
defaultFileList: import('./type').FileItem[];
|
65
|
+
directory: boolean;
|
66
|
+
listType: import('./type').FileListType;
|
67
|
+
imageLoading: import('./type').ImageLoading;
|
68
|
+
download: boolean;
|
69
|
+
showLink: boolean;
|
70
|
+
customIcon: import('./type').CustomIcon;
|
71
|
+
showRemoveButton: boolean;
|
72
|
+
showPreviewButton: boolean;
|
73
|
+
accept: string;
|
74
|
+
showFileList: boolean;
|
75
|
+
showUploadButton: boolean;
|
76
|
+
}>;
|
77
|
+
__isFragment?: never;
|
78
|
+
__isTeleport?: never;
|
79
|
+
__isSuspense?: never;
|
80
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./type').UploadProps> & Readonly<{
|
81
|
+
onChange?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
82
|
+
onPreview?: ((fileItem: import('./type').FileItem) => any) | undefined;
|
83
|
+
"onUpdate:fileList"?: ((value: import('./type').FileItem[]) => any) | undefined;
|
84
|
+
"onExceed-limit"?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
85
|
+
}>, {
|
86
|
+
updateFile: (id: string, File: File) => void;
|
87
|
+
upload: (files: File[]) => void;
|
88
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
89
|
+
change: (fileList: import('./type').FileItem[], files: File[]) => any;
|
90
|
+
preview: (fileItem: import('./type').FileItem) => any;
|
91
|
+
"update:fileList": (value: import('./type').FileItem[]) => any;
|
92
|
+
"exceed-limit": (fileList: import('./type').FileItem[], files: File[]) => any;
|
93
|
+
}, string, {
|
94
|
+
name: import('./type').FileName;
|
95
|
+
disabled: boolean;
|
96
|
+
multiple: boolean;
|
97
|
+
tip: string;
|
98
|
+
limit: number;
|
99
|
+
draggable: boolean;
|
100
|
+
fileList: import('./type').FileItem[];
|
101
|
+
defaultFileList: import('./type').FileItem[];
|
102
|
+
directory: boolean;
|
103
|
+
listType: import('./type').FileListType;
|
104
|
+
imageLoading: import('./type').ImageLoading;
|
105
|
+
download: boolean;
|
106
|
+
showLink: boolean;
|
107
|
+
customIcon: import('./type').CustomIcon;
|
108
|
+
showRemoveButton: boolean;
|
109
|
+
showPreviewButton: boolean;
|
110
|
+
accept: string;
|
111
|
+
showFileList: boolean;
|
112
|
+
showUploadButton: boolean;
|
113
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
114
|
+
$slots: any;
|
115
|
+
}) & {
|
116
|
+
install: (app: App) => void;
|
117
|
+
};
|
118
|
+
declare module 'vue' {
|
119
|
+
interface GlobalComponents {
|
120
|
+
YcUpload: typeof Upload;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
export default Upload;
|