yc-design-vue 2.0.5 → 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 -1
- package/dist/style.css +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/hooks/useContext.d.ts +1 -1
- package/es/Anchor/index.d.ts +3 -3
- package/es/Anchor/type.d.ts +3 -2
- package/es/AutoComplete/index.d.ts +18 -9
- package/es/AutoComplete/index.vue.d.ts +36 -18
- package/es/Avatar/Avatar.vue.d.ts +1 -1
- package/es/Avatar/index.d.ts +3 -3
- package/es/Avatar/type.d.ts +3 -2
- 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/Button/Button.vue.d.ts +2 -2
- package/es/Button/ButtonGroup.vue.d.ts +1 -1
- package/es/Button/hooks/useContext.d.ts +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/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/hooks/useContext.d.ts +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 +7 -7
- package/es/Cascader/index.d.ts +6 -6
- package/es/Collapse/hooks/useContext.d.ts +2 -13
- package/es/Collapse/hooks/useContext.js +0 -1
- package/es/Collapse/type.d.ts +2 -1
- package/es/Descriptions/Descriptions.vue.d.ts +3 -3
- package/es/Descriptions/hooks/useContext.d.ts +1 -1
- 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/Dropdown.vue.d.ts +1 -1
- package/es/Dropdown/DropdownButton.vue.d.ts +1 -1
- package/es/Dropdown/Dsubmenu.vue.d.ts +1 -1
- package/es/Dropdown/index.d.ts +9 -9
- package/es/Dropdown/type.d.ts +4 -6
- package/es/Grid/hooks/useContext.d.ts +0 -11
- package/es/Grid/hooks/useContext.js +0 -1
- package/es/Image/Image.vue.d.ts +2 -2
- package/es/Image/ImagePreview.vue.js +1 -1
- package/es/Image/index.d.ts +6 -6
- package/es/Image/type.d.ts +3 -2
- package/es/Input/Input.vue.d.ts +1 -1
- package/es/Input/InputSuffix.vue.js +1 -1
- package/es/Input/index.d.ts +3 -3
- package/es/InputNumber/InputNumber.vue.d.ts +8 -8
- package/es/InputNumber/InputOperaBtn.vue.d.ts +2 -2
- package/es/InputNumber/index.d.ts +9 -9
- package/es/InputNumber/type.d.ts +5 -4
- package/es/InputTag/index.d.ts +15 -6
- package/es/InputTag/index.vue.d.ts +5 -2
- package/es/InputTag/type.d.ts +2 -1
- package/es/Layout/LayoutSider.vue.d.ts +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/index.d.ts +6 -6
- package/es/List/type.d.ts +2 -3
- package/es/Mention/index.d.ts +21 -12
- package/es/Mention/index.vue.d.ts +37 -19
- package/es/Mention/type.d.ts +3 -2
- package/es/Menu/Menu.vue.d.ts +2 -2
- 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/type.d.ts +3 -2
- package/es/Popconfirm/index.d.ts +3 -3
- package/es/Popconfirm/index.vue.d.ts +1 -1
- 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/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/index.d.ts +3 -3
- package/es/Scrollbar/type.d.ts +2 -1
- package/es/Select/Select.vue.d.ts +31 -13
- package/es/Select/hooks/useContext.d.ts +2 -2
- package/es/Select/hooks/useSelectOptions.d.ts +2 -2
- package/es/Select/index.d.ts +18 -9
- 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/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/Switch/index.d.ts +9 -9
- package/es/Switch/index.vue.d.ts +3 -3
- package/es/Switch/type.d.ts +4 -4
- package/es/Tabs/Tabs.vue.d.ts +1 -1
- package/es/Tabs/hooks/useContext.d.ts +4 -4
- 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/type.d.ts +2 -2
- package/es/TimePicker/TimePicker.vue.d.ts +1 -1
- package/es/TimePicker/index.d.ts +3 -3
- package/es/Timeline/TimelineItem.vue.d.ts +1 -1
- package/es/Timeline/index.d.ts +3 -3
- package/es/Timeline/type.d.ts +3 -4
- package/es/Transfer/TransferPanel.vue.js +1 -1
- package/es/Typography/TypographyBase.vue.d.ts +7 -7
- package/es/Typography/TypographyBase.vue.js +2 -2
- 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/_shared/icons/IconCopy.vue.js +1 -19
- package/es/_shared/icons/IconCopy.vue2.js +19 -1
- package/es/_shared/icons/IconDelete.vue.js +19 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -19
- package/es/_shared/icons/IconEdit.vue.js +1 -19
- package/es/_shared/icons/IconEdit.vue2.js +19 -1
- package/es/_shared/icons/IconEyeClose.vue.js +23 -1
- package/es/_shared/icons/IconEyeClose.vue2.js +1 -23
- 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/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/vue-utils.d.ts +1 -1
- package/es/_virtual/_plugin-vue_export-helper.js +10 -0
- package/es/index.d.ts +31 -30
- 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/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 +1 -1
- package/lib/Anchor/index.d.ts +3 -3
- package/lib/Anchor/type.d.ts +3 -2
- package/lib/AutoComplete/index.d.ts +18 -9
- package/lib/AutoComplete/index.vue.d.ts +36 -18
- package/lib/Avatar/Avatar.vue.d.ts +1 -1
- package/lib/Avatar/index.d.ts +3 -3
- package/lib/Avatar/type.d.ts +3 -2
- 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/Button/Button.vue.d.ts +2 -2
- package/lib/Button/ButtonGroup.vue.d.ts +1 -1
- package/lib/Button/hooks/useContext.d.ts +3 -3
- 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/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 +3 -3
- package/lib/Carousel/index.d.ts +6 -6
- package/lib/Carousel/type.d.ts +6 -6
- package/lib/Cascader/Cascader.vue.d.ts +7 -7
- package/lib/Cascader/index.d.ts +6 -6
- package/lib/Collapse/hooks/useContext.d.ts +2 -13
- package/lib/Collapse/hooks/useContext.js +1 -1
- package/lib/Collapse/type.d.ts +2 -1
- package/lib/Descriptions/Descriptions.vue.d.ts +3 -3
- package/lib/Descriptions/hooks/useContext.d.ts +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 +1 -1
- package/lib/Dropdown/DropdownButton.vue.d.ts +1 -1
- package/lib/Dropdown/Dsubmenu.vue.d.ts +1 -1
- package/lib/Dropdown/index.d.ts +9 -9
- package/lib/Dropdown/type.d.ts +4 -6
- package/lib/Grid/hooks/useContext.d.ts +0 -11
- 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/index.d.ts +6 -6
- package/lib/Image/type.d.ts +3 -2
- package/lib/Input/Input.vue.d.ts +1 -1
- package/lib/Input/InputSuffix.vue.js +1 -1
- package/lib/Input/index.d.ts +3 -3
- package/lib/InputNumber/InputNumber.vue.d.ts +8 -8
- package/lib/InputNumber/InputOperaBtn.vue.d.ts +2 -2
- package/lib/InputNumber/index.d.ts +9 -9
- package/lib/InputNumber/type.d.ts +5 -4
- package/lib/InputTag/index.d.ts +15 -6
- package/lib/InputTag/index.vue.d.ts +5 -2
- package/lib/InputTag/type.d.ts +2 -1
- package/lib/Layout/LayoutSider.vue.d.ts +3 -3
- 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/index.d.ts +6 -6
- package/lib/List/type.d.ts +2 -3
- package/lib/Mention/index.d.ts +21 -12
- package/lib/Mention/index.vue.d.ts +37 -19
- package/lib/Mention/type.d.ts +3 -2
- package/lib/Menu/Menu.vue.d.ts +2 -2
- 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/type.d.ts +3 -2
- package/lib/Popconfirm/index.d.ts +3 -3
- package/lib/Popconfirm/index.vue.d.ts +1 -1
- 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/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/index.d.ts +3 -3
- package/lib/Scrollbar/type.d.ts +2 -1
- package/lib/Select/Select.vue.d.ts +31 -13
- package/lib/Select/hooks/useContext.d.ts +2 -2
- package/lib/Select/hooks/useSelectOptions.d.ts +2 -2
- package/lib/Select/index.d.ts +18 -9
- 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/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/Switch/index.d.ts +9 -9
- package/lib/Switch/index.vue.d.ts +3 -3
- package/lib/Switch/type.d.ts +4 -4
- package/lib/Tabs/Tabs.vue.d.ts +1 -1
- package/lib/Tabs/hooks/useContext.d.ts +4 -4
- 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/type.d.ts +2 -2
- package/lib/TimePicker/TimePicker.vue.d.ts +1 -1
- package/lib/TimePicker/index.d.ts +3 -3
- package/lib/Timeline/TimelineItem.vue.d.ts +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/Typography/TypographyBase.vue.d.ts +7 -7
- 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/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.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/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
- package/lib/_shared/icons/IconEyeClose.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/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/vue-utils.d.ts +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/index.d.ts +31 -30
- 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
package/lib/Tag/index.d.ts
CHANGED
@@ -14,7 +14,7 @@ declare const Tag: {
|
|
14
14
|
"update:checked": (value: boolean) => any;
|
15
15
|
check: (value: boolean, ev: MouseEvent) => any;
|
16
16
|
}, import('vue').PublicProps, {
|
17
|
-
size: import('
|
17
|
+
size: Exclude<import('..').Size, "mini">;
|
18
18
|
visible: boolean;
|
19
19
|
color: string;
|
20
20
|
nowrap: boolean;
|
@@ -38,7 +38,7 @@ declare const Tag: {
|
|
38
38
|
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
39
39
|
onCheck?: ((value: boolean, ev: MouseEvent) => any) | undefined;
|
40
40
|
}>, {}, {}, {}, {}, {
|
41
|
-
size: import('
|
41
|
+
size: Exclude<import('..').Size, "mini">;
|
42
42
|
visible: boolean;
|
43
43
|
color: string;
|
44
44
|
nowrap: boolean;
|
@@ -64,7 +64,7 @@ declare const Tag: {
|
|
64
64
|
"update:checked": (value: boolean) => any;
|
65
65
|
check: (value: boolean, ev: MouseEvent) => any;
|
66
66
|
}, string, {
|
67
|
-
size: import('
|
67
|
+
size: Exclude<import('..').Size, "mini">;
|
68
68
|
visible: boolean;
|
69
69
|
color: string;
|
70
70
|
nowrap: boolean;
|
package/lib/Tag/index.vue.d.ts
CHANGED
@@ -17,7 +17,7 @@ declare const __VLS_component: import('vue').DefineComponent<TagProps, {}, {}, {
|
|
17
17
|
"onUpdate:checked"?: ((value: boolean) => any) | undefined;
|
18
18
|
onCheck?: ((value: boolean, ev: MouseEvent) => any) | undefined;
|
19
19
|
}>, {
|
20
|
-
size: import('
|
20
|
+
size: Exclude<import('..').Size, "mini">;
|
21
21
|
visible: boolean;
|
22
22
|
color: string;
|
23
23
|
nowrap: boolean;
|
package/lib/Tag/type.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { VNode } from 'vue';
|
|
2
2
|
import { Size } from '../_shared/type';
|
3
3
|
export interface TagProps {
|
4
4
|
color?: string;
|
5
|
-
size?:
|
5
|
+
size?: Exclude<Size, 'mini'>;
|
6
6
|
bordered?: boolean;
|
7
7
|
visible?: boolean;
|
8
8
|
defaultVisible?: boolean;
|
@@ -24,4 +24,3 @@ export interface TagSlots {
|
|
24
24
|
icon?: () => VNode[];
|
25
25
|
'close-icon'?: () => VNode[];
|
26
26
|
}
|
27
|
-
export type TagSize = Exclude<Size, 'mini'>;
|
package/lib/Textarea/type.d.ts
CHANGED
@@ -24,12 +24,12 @@ export interface TextareaEmits {
|
|
24
24
|
(e: 'blur', ev: FocusEvent): void;
|
25
25
|
(e: 'keydown', ev: KeyboardEvent): void;
|
26
26
|
}
|
27
|
-
export
|
27
|
+
export interface TextareaExpose {
|
28
28
|
focus(): void;
|
29
29
|
blur(): void;
|
30
30
|
getInputRef(): HTMLTextAreaElement;
|
31
31
|
getMirrorRef(): HTMLDivElement;
|
32
|
-
}
|
32
|
+
}
|
33
33
|
export type AutoSize = boolean | {
|
34
34
|
minRows?: number;
|
35
35
|
maxRows?: number;
|
@@ -69,9 +69,9 @@ declare const __VLS_component: import('vue').DefineComponent<TimePickerProps, {}
|
|
69
69
|
"onPopup-visible-change"?: ((value: boolean) => any) | undefined;
|
70
70
|
"onUpdate:modelValue"?: ((value: import('./type').TimePickerValue) => any) | undefined;
|
71
71
|
}>, {
|
72
|
+
error: boolean;
|
72
73
|
size: import('..').Size;
|
73
74
|
type: import('./type').TimePickerType;
|
74
|
-
error: boolean;
|
75
75
|
popupContainer: import('..').PopupContainer;
|
76
76
|
popupVisible: boolean;
|
77
77
|
defaultPopupVisible: boolean;
|
@@ -18,9 +18,9 @@ declare const TimePicker: {
|
|
18
18
|
"popup-visible-change": (value: boolean) => any;
|
19
19
|
"update:modelValue": (value: import('./type').TimePickerValue) => any;
|
20
20
|
}, import('vue').PublicProps, {
|
21
|
+
error: boolean;
|
21
22
|
size: import('..').Size;
|
22
23
|
type: import('./type').TimePickerType;
|
23
|
-
error: boolean;
|
24
24
|
popupContainer: import('..').PopupContainer;
|
25
25
|
popupVisible: boolean;
|
26
26
|
defaultPopupVisible: boolean;
|
@@ -101,9 +101,9 @@ declare const TimePicker: {
|
|
101
101
|
"onPopup-visible-change"?: ((value: boolean) => any) | undefined;
|
102
102
|
"onUpdate:modelValue"?: ((value: import('./type').TimePickerValue) => any) | undefined;
|
103
103
|
}>, {}, {}, {}, {}, {
|
104
|
+
error: boolean;
|
104
105
|
size: import('..').Size;
|
105
106
|
type: import('./type').TimePickerType;
|
106
|
-
error: boolean;
|
107
107
|
popupContainer: import('..').PopupContainer;
|
108
108
|
popupVisible: boolean;
|
109
109
|
defaultPopupVisible: boolean;
|
@@ -140,9 +140,9 @@ declare const TimePicker: {
|
|
140
140
|
"popup-visible-change": (value: boolean) => any;
|
141
141
|
"update:modelValue": (value: import('./type').TimePickerValue) => any;
|
142
142
|
}, string, {
|
143
|
+
error: boolean;
|
143
144
|
size: import('..').Size;
|
144
145
|
type: import('./type').TimePickerType;
|
145
|
-
error: boolean;
|
146
146
|
popupContainer: import('..').PopupContainer;
|
147
147
|
popupVisible: boolean;
|
148
148
|
defaultPopupVisible: boolean;
|
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
9
|
declare const __VLS_component: import('vue').DefineComponent<TimelineItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
|
10
10
|
label: string;
|
11
|
-
position: import('
|
11
|
+
position: import('..').Position;
|
12
12
|
dotColor: string;
|
13
13
|
dotType: import('./type').TimelineDotType;
|
14
14
|
lineType: import('./type').TimelineLineType;
|
package/lib/Timeline/index.d.ts
CHANGED
@@ -40,7 +40,7 @@ declare const Timeline: {
|
|
40
40
|
item: {
|
41
41
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./type').TimelineItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
42
42
|
label: string;
|
43
|
-
position: import('
|
43
|
+
position: import('..').Position;
|
44
44
|
dotColor: string;
|
45
45
|
dotType: import('./type').TimelineDotType;
|
46
46
|
lineType: import('./type').TimelineLineType;
|
@@ -55,7 +55,7 @@ declare const Timeline: {
|
|
55
55
|
Defaults: {};
|
56
56
|
}, Readonly<import('./type').TimelineItemProps> & Readonly<{}>, {}, {}, {}, {}, {
|
57
57
|
label: string;
|
58
|
-
position: import('
|
58
|
+
position: import('..').Position;
|
59
59
|
dotColor: string;
|
60
60
|
dotType: import('./type').TimelineDotType;
|
61
61
|
lineType: import('./type').TimelineLineType;
|
@@ -67,7 +67,7 @@ declare const Timeline: {
|
|
67
67
|
__isSuspense?: never;
|
68
68
|
} & import('vue').ComponentOptionsBase<Readonly<import('./type').TimelineItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
69
69
|
label: string;
|
70
|
-
position: import('
|
70
|
+
position: import('..').Position;
|
71
71
|
dotColor: string;
|
72
72
|
dotType: import('./type').TimelineDotType;
|
73
73
|
lineType: import('./type').TimelineLineType;
|
package/lib/Timeline/type.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Direction } from '../_shared/type';
|
1
|
+
import { Direction, Position } from '../_shared/type';
|
2
2
|
import { VNode } from 'vue';
|
3
3
|
export interface TimelineProps {
|
4
4
|
reverse?: boolean;
|
@@ -17,7 +17,7 @@ export interface TimelineItemProps {
|
|
17
17
|
lineType?: TimelineLineType;
|
18
18
|
lineColor?: string;
|
19
19
|
label?: string;
|
20
|
-
position?:
|
20
|
+
position?: Position;
|
21
21
|
isGhost?: boolean;
|
22
22
|
}
|
23
23
|
export interface TimelineItemSlots {
|
@@ -25,8 +25,7 @@ export interface TimelineItemSlots {
|
|
25
25
|
label?: () => VNode[];
|
26
26
|
default?: () => VNode[];
|
27
27
|
}
|
28
|
-
export type TimelineMode =
|
28
|
+
export type TimelineMode = Position | 'alternate';
|
29
29
|
export type TimelineLabelPosition = 'relative' | 'same';
|
30
30
|
export type TimelineDotType = 'hollow' | 'solid';
|
31
31
|
export type TimelineLineType = 'solid' | 'dashed' | 'dotted';
|
32
|
-
export type TimelinePositon = 'left' | 'right' | 'top' | 'bottom';
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=;/* empty css */,/* empty css */require("../_shared/utils/dom.js"),/* empty css */;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=;/* empty css */,/* empty css */require("../_shared/utils/dom.js"),/* empty css */;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.vue.js"),r=require("../_shared/icons/IconSearch.vue2.js"),n=require("./hooks/useContext.js"),o=require("../Checkbox/index.js"),u=require("../Scrollbar/index.js"),c=require("../Input/index.js"),s=require("../Empty/index.js"),i={class:"yc-transfer-view"},d={class:"yc-transfer-view-header"},v={class:"yc-transfer-view-header-title"},m={class:"yc-transfer-view-header-count"},f={key:0,class:"yc-transfer-view-search"},p={class:"yc-transfer-view-body"},k={key:1,role:"list",class:"yc-transfer-list"},h=["onClick"],y={class:"yc-transfer-list-item-content text-ellipsis"},B=e.defineComponent({__name:"TransferPanel",props:{type:{}},setup(B){const g=B,{type:C}=e.toRefs(g),{computedValue:x,computedSelected:V,targetChecked:E,sourceChecked:S,sourceOptions:b,targetOptions:N,disabled:_,oneWay:w,showSearch:j,showSelectAll:q,simple:D,sourceInputSearchProps:I,targetInputSearchProps:T,slots:F,title:P,emits:O}=n.default().inject(),z=e.ref(""),L=e.computed(()=>("source"==C.value?b.value:N.value).filter(e=>{var l;return null==(l=e.label)?void 0:l.toLowerCase().includes(z.value.toLowerCase())})),A=e.computed(()=>"source"==C.value?S.value:E.value),M=e.computed(()=>"source"==C.value?I.value:T.value),U=e.computed(()=>"source"==C.value?P.value[0]:P.value[1]),K=e.computed({get:()=>!!A.value.length&&A.value.length==L.value.length,set(e){if(e)V.value=[...new Set([...V.value,...L.value.map(e=>e.value)])];else{const e=Object.fromEntries(L.value.map(e=>[e.value,e]));V.value=V.value.filter(l=>!e[l])}}}),R=e.computed(()=>!!A.value.length&&A.value.length<=L.value.length),W=()=>{!_.value&&x.value.length&&(x.value=[])},$=()=>{var e;return null==(e=F["source"==C.value?"source-title":"target-title"])?void 0:e.call(F,{countTotal:"source"==C.value?b.value.length:N.value.length,countSelected:"source"==C.value?S.value.length:E.value.length,searchValue:z.value,checked:K.value,indeterminate:R.value,onSelectAllChange:e=>{K.value=e},onClear:W})},G=()=>{var e;return null==(e=F[C.value])?void 0:e.call(F,{selectedKeys:A.value,data:L.value,onSelect:e=>{V.value=e}})},H=e=>()=>{var l;return null==(l=F.item)?void 0:l.call(F,e)};return(n,B)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",d,[e.unref(F)[`${e.unref(C)}-title`]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent($),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",v,[!e.unref(q)||e.unref(D)||e.unref(w)&&"target"==e.unref(C)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(U.value),1)],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,modelValue:K.value,"onUpdate:modelValue":B[0]||(B[0]=e=>K.value=e),indeterminate:R.value,disabled:!L.value.length||e.unref(_)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(U.value),1)]),_:1},8,["modelValue","indeterminate","disabled"]))]),e.createElementVNode("span",m,[e.unref(D)||e.unref(w)&&"target"==e.unref(C)?"target"!=e.unref(C)||e.unref(D)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(l.default),{key:1,size:14,onClick:W},{default:e.withCtx(()=>[e.createVNode(e.unref(a.default))]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(A.value.length)+" / "+e.toDisplayString(L.value.length),1)],64))])],64))]),e.unref(j)?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(e.unref(c.default),e.mergeProps({modelValue:z.value,"onUpdate:modelValue":B[1]||(B[1]=e=>z.value=e)},M.value,{onInput:B[2]||(B[2]=l=>e.unref(O)("search",l,e.unref(C)))}),{suffix:e.withCtx(()=>[e.createVNode(e.unref(r.default))]),_:1},16,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[L.value.length?(e.openBlock(),e.createBlock(e.unref(u.default),{key:0},{default:e.withCtx(()=>[e.unref(F)[e.unref(C)]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G),{key:0})):(e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,role:"listitem",class:e.normalizeClass(["yc-transfer-list-item",{"yc-transfer-list-item-disabled":a.disabled||e.unref(_)}]),onClick:e=>(e=>{const{value:l}=e;_.value||e.disabled||(w.value&&"source"!=C.value||D.value)&&(x.value="source"==C.value?[...x.value,l]:x.value.filter(e=>e!=l))})(a)},[e.unref(w)&&(!e.unref(w)||"source"!=e.unref(C))||e.unref(D)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",y,[e.unref(F).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(a)),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.label),1)],64))]),"target"!=e.unref(C)||e.unref(D)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(l.default),{key:0,"hover-size":20},{default:e.withCtx(()=>[e.createVNode(e.unref(t.default))]),_:1}))],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,"model-value":A.value.includes(a.value),disabled:a.disabled||e.unref(_),onChange:e=>((e,l)=>{V.value=e?[...V.value,l]:V.value.filter(e=>e!=l),O("select",V.value)})(e,a.value)},{default:e.withCtx(()=>[e.unref(F).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H(a)),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(a.label),1)],64))]),_:2},1032,["model-value","disabled","onChange"]))],10,h))),128))]))]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(s.default))))])]))}});exports.default=B;
|
@@ -80,8 +80,8 @@ declare function __VLS_template(): {
|
|
80
80
|
"visibility-change": (value: boolean) => any;
|
81
81
|
pressEnter: (ev: KeyboardEvent) => any;
|
82
82
|
}, string, {
|
83
|
-
size: import('..').Size;
|
84
83
|
error: boolean;
|
84
|
+
size: import('..').Size;
|
85
85
|
disabled: boolean;
|
86
86
|
placeholder: string;
|
87
87
|
modelValue: string;
|
@@ -119,8 +119,8 @@ declare function __VLS_template(): {
|
|
119
119
|
$nextTick: typeof import('vue').nextTick;
|
120
120
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
121
121
|
} & Readonly<{
|
122
|
-
size: import('..').Size;
|
123
122
|
error: boolean;
|
123
|
+
size: import('..').Size;
|
124
124
|
disabled: boolean;
|
125
125
|
placeholder: string;
|
126
126
|
modelValue: string;
|
@@ -148,7 +148,7 @@ declare function __VLS_template(): {
|
|
148
148
|
"onUpdate:visibility"?: ((value: boolean) => any) | undefined;
|
149
149
|
"onVisibility-change"?: ((value: boolean) => any) | undefined;
|
150
150
|
onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
|
151
|
-
}>, "blur" | "focus" | "getInputRef" | ("
|
151
|
+
}>, "blur" | "focus" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "isPassword" | "visibility" | "defaultVisibility" | "invisibleButton" | "showInput")> & import('vue').ShallowUnwrapRef<{
|
152
152
|
focus(): void;
|
153
153
|
blur(): void;
|
154
154
|
getInputRef(): HTMLInputElement;
|
@@ -175,7 +175,7 @@ declare const __VLS_component: import('vue').DefineComponent<TypographyBaseProps
|
|
175
175
|
"onEdit-end"?: (() => any) | undefined;
|
176
176
|
}>, {
|
177
177
|
delete: boolean;
|
178
|
-
type:
|
178
|
+
type: "success" | "warning" | "danger" | "primary" | "secondary";
|
179
179
|
code: boolean;
|
180
180
|
mark: boolean;
|
181
181
|
bold: boolean;
|
@@ -268,8 +268,8 @@ declare const __VLS_component: import('vue').DefineComponent<TypographyBaseProps
|
|
268
268
|
"visibility-change": (value: boolean) => any;
|
269
269
|
pressEnter: (ev: KeyboardEvent) => any;
|
270
270
|
}, string, {
|
271
|
-
size: import('..').Size;
|
272
271
|
error: boolean;
|
272
|
+
size: import('..').Size;
|
273
273
|
disabled: boolean;
|
274
274
|
placeholder: string;
|
275
275
|
modelValue: string;
|
@@ -307,8 +307,8 @@ declare const __VLS_component: import('vue').DefineComponent<TypographyBaseProps
|
|
307
307
|
$nextTick: typeof import('vue').nextTick;
|
308
308
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
309
309
|
} & Readonly<{
|
310
|
-
size: import('..').Size;
|
311
310
|
error: boolean;
|
311
|
+
size: import('..').Size;
|
312
312
|
disabled: boolean;
|
313
313
|
placeholder: string;
|
314
314
|
modelValue: string;
|
@@ -336,7 +336,7 @@ declare const __VLS_component: import('vue').DefineComponent<TypographyBaseProps
|
|
336
336
|
"onUpdate:visibility"?: ((value: boolean) => any) | undefined;
|
337
337
|
"onVisibility-change"?: ((value: boolean) => any) | undefined;
|
338
338
|
onPressEnter?: ((ev: KeyboardEvent) => any) | undefined;
|
339
|
-
}>, "blur" | "focus" | "getInputRef" | ("
|
339
|
+
}>, "blur" | "focus" | "getInputRef" | ("error" | "size" | "disabled" | "placeholder" | "modelValue" | "defaultValue" | "maxLength" | "showWordLimit" | "allowClear" | "readonly" | "wordLength" | "wordSlice" | "inputAttrs" | "isPassword" | "visibility" | "defaultVisibility" | "invisibleButton" | "showInput")> & import('vue').ShallowUnwrapRef<{
|
340
340
|
focus(): void;
|
341
341
|
blur(): void;
|
342
342
|
getInputRef(): HTMLInputElement;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../_shared/utils/dom.js"),o=require("../_shared/utils/locale.js"),l=require("../_shared/utils/control.js"),a=require("../node_modules/@vueuse/core/index.js");,/* empty css */,/* empty css */;/* empty css */const n=require("../_shared/icons/IconCopy.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../_shared/utils/dom.js"),o=require("../_shared/utils/locale.js"),l=require("../_shared/utils/control.js"),a=require("../node_modules/@vueuse/core/index.js");,/* empty css */,/* empty css */;/* empty css */const n=require("../_shared/icons/IconCopy.vue2.js"),r=require("../_shared/icons/IconEdit.vue2.js"),u=require("../_shared/icons/IconInfo.vue.js"),d=require("../Input/index.js"),p=require("../Tooltip/index.js"),s=e.defineComponent({name:"TypographyBase",__name:"TypographyBase",props:{tag:{default:"span"},type:{default:void 0},bold:{type:Boolean,default:!1},disabled:{type:Boolean},mark:{type:Boolean,default:!1},underline:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},code:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:void 0},defaultEditing:{type:Boolean,default:!1},editText:{default:""},copyable:{type:Boolean,default:!1},copyText:{default:""},copyDelay:{default:3e3},editTooltiProps:{default:()=>({})},copyTooltiProps:{default:()=>({})}},emits:["update:editing","update:editText","edit-start","change","copy","edit-end"],setup(s,{emit:i}){const c=s,y=i,{editing:f,defaultEditing:v,editText:g,copyText:m,copyable:h,copyDelay:B,code:k,mark:x,delete:_,underline:T,bold:C}=e.toRefs(c),{t:b}=o.useI18n(),{isSupported:j,copy:q}=a.useClipboard(),V=e.ref(!1),E=e.ref(),I=e.ref(),N=l.useControlValue(f,v.value,e=>{y("update:editing",e)}),w=l.useControlValue(g,"",e=>{y("update:editText",e),y("change",e)}),P=e.computed(()=>{const e=[x.value,k.value,_.value,T.value,C.value];return["mark","code","del","u","b"].filter((t,o)=>e[o])}),S=e.defineComponent({props:{tags:{type:Array,default:()=>[]}},setup:(t,{slots:o})=>()=>{var l;const{tags:a}=e.toRefs(t),n=(t,o)=>o>=a.value.length?t:e.h(a.value[o],null,n(t,o+1));return n(null==(l=o.default)?void 0:l.call(o),0)}}),D=async()=>{var e;N.value=!0,w.value=w.value?w.value:t.getDomText(E),y("edit-start"),await t.sleep(0),null==(e=I.value)||e.focus()},R=()=>{N.value=!1,y("edit-end")},$=async()=>{if(!h.value||!j.value||V.value)return;const e=m.value||t.getDomText(E);q(e),y("copy",e),V.value=!0,await t.sleep(B.value),V.value=!1};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(["yc-typography",{[`yc-typography-${t.type}`]:t.type,"yc-typography-bold":e.unref(C),"yc-typography-disabled":t.disabled,"yc-typography-underline":e.unref(T),"yc-typography-delete":e.unref(_)}]),ref_key:"contentRef",ref:E},{default:e.withCtx(()=>[e.unref(N)?(e.openBlock(),e.createBlock(e.unref(d.default),{key:0,modelValue:e.unref(w),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(w)?w.value=t:null),ref_key:"inputRef",ref:I,onBlur:R},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(S),{key:1,tags:P.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["tags"])),t.editable&&!e.unref(N)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"yc-typography-operation-edit",onClick:D},[e.createVNode(e.unref(p.default),e.mergeProps({content:e.unref(b)("typography.edit"),position:"top"},t.editTooltiProps),{default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createVNode(e.unref(r.default))])]),_:1},16,["content"])])):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"yc-typography-operation-copy",onClick:$},[e.createVNode(e.unref(p.default),e.mergeProps({position:"top"},t.copyTooltiProps),{content:e.withCtx(()=>[e.renderSlot(t.$slots,"copy-tooltip",{copied:V.value},()=>[e.createTextVNode(e.toDisplayString(e.unref(b)("typography."+(V.value?"copied":"copy"))),1)])]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"copy-icon",{copied:V.value},()=>[V.value?(e.openBlock(),e.createBlock(e.unref(u.default),{key:0,color:"rgb(0, 180, 42)"})):(e.openBlock(),e.createBlock(e.unref(n.default),{key:1}))])])]),_:3},16)])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});exports.default=s;
|
@@ -8,7 +8,7 @@ declare function __VLS_template(): {
|
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
9
|
declare const __VLS_component: import('vue').DefineComponent<TypographyParagraphProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TypographyParagraphProps> & Readonly<{}>, {
|
10
10
|
blockquote: boolean;
|
11
|
-
spacing:
|
11
|
+
spacing: "close" | "default";
|
12
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
13
13
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
14
14
|
export default _default;
|
@@ -7,7 +7,7 @@ declare function __VLS_template(): {
|
|
7
7
|
};
|
8
8
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
9
9
|
declare const __VLS_component: import('vue').DefineComponent<TypographyTitleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TypographyTitleProps> & Readonly<{}>, {
|
10
|
-
heading:
|
10
|
+
heading: 1 | 2 | 3 | 4 | 5 | 6;
|
11
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
12
12
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
13
13
|
export default _default;
|
package/lib/Typography/type.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { TooltipProps } from '../Tooltip';
|
|
2
2
|
import { VNode } from 'vue';
|
3
3
|
export interface TypographyBaseProps {
|
4
4
|
tag?: string;
|
5
|
-
type?:
|
5
|
+
type?: BaseType;
|
6
6
|
bold?: boolean;
|
7
7
|
disabled?: boolean;
|
8
8
|
mark?: boolean;
|
@@ -43,6 +43,7 @@ export interface TypographyParagraphProps {
|
|
43
43
|
export interface TypographyTitleProps {
|
44
44
|
heading?: Heading;
|
45
45
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
type Heading = 1 | 2 | 3 | 4 | 5 | 6;
|
47
|
+
type Spacing = 'default' | 'close';
|
48
|
+
type BaseType = 'success' | 'warning' | 'danger' | 'primary' | 'secondary';
|
49
|
+
export {};
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { UploadProps } from './type';
|
2
|
+
declare function __VLS_template(): {
|
3
|
+
attrs: Partial<{}>;
|
4
|
+
slots: any;
|
5
|
+
refs: {
|
6
|
+
uploadRef: HTMLDivElement;
|
7
|
+
};
|
8
|
+
rootEl: HTMLDivElement;
|
9
|
+
};
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<UploadProps, {
|
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
|
+
}, string, import('vue').PublicProps, Readonly<UploadProps> & Readonly<{
|
20
|
+
onChange?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
21
|
+
onPreview?: ((fileItem: import('./type').FileItem) => any) | undefined;
|
22
|
+
"onUpdate:fileList"?: ((value: import('./type').FileItem[]) => any) | undefined;
|
23
|
+
"onExceed-limit"?: ((fileList: import('./type').FileItem[], files: File[]) => any) | undefined;
|
24
|
+
}>, {
|
25
|
+
name: import('./type').FileName;
|
26
|
+
disabled: boolean;
|
27
|
+
multiple: boolean;
|
28
|
+
tip: string;
|
29
|
+
limit: number;
|
30
|
+
draggable: boolean;
|
31
|
+
fileList: import('./type').FileItem[];
|
32
|
+
defaultFileList: import('./type').FileItem[];
|
33
|
+
directory: boolean;
|
34
|
+
listType: import('./type').FileListType;
|
35
|
+
imageLoading: import('./type').ImageLoading;
|
36
|
+
download: boolean;
|
37
|
+
showLink: boolean;
|
38
|
+
customIcon: import('./type').CustomIcon;
|
39
|
+
showRemoveButton: boolean;
|
40
|
+
showPreviewButton: boolean;
|
41
|
+
accept: string;
|
42
|
+
showFileList: boolean;
|
43
|
+
showUploadButton: boolean;
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
45
|
+
uploadRef: HTMLDivElement;
|
46
|
+
}, HTMLDivElement>;
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
48
|
+
export default _default;
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
50
|
+
new (): {
|
51
|
+
$slots: S;
|
52
|
+
};
|
53
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("./hooks/useUpload.js"),o=require("./UploadButton.vue.js");;/* empty css */const l=require("./UploadDrag.vue.js");;/* empty css */const a=require("./UploadFileList.vue.js"),u=require("./UploadPictureCard.vue.js"),d=e.defineComponent({name:"Upload",__name:"Upload",props:{fileList:{default:void 0},defaultFileList:{default:()=>[]},accept:{default:void 0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},tip:{default:""},name:{type:[String,Function],default:void 0},limit:{default:0},showFileList:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showUploadButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},download:{type:Boolean,default:!1},showLink:{type:Boolean,default:!0},imageLoading:{default:"lazy"},listType:{default:"text"},customIcon:{default:()=>({})},imagePreview:{type:Boolean}},emits:["update:fileList","exceed-limit","change","preview"],setup(d,{expose:r,emit:n}){const i=e.useSlots(),p=d,s=n,c=e.ref(),{computedFileList:f,limit:m,draggable:y,disabled:B,handleFiles:k,open:v}=t.default(c,p,s);return r({updateFile(e,t){const o=f.value.findIndex(t=>t.uid==e);-1!=o&&(f.value[o]={...f.value[o],name:t.name,file:t,status:"init",percent:0,url:URL.createObjectURL(t)})},upload(e){k(e)}}),(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-upload-wrapper",`yc-upload-wrapper-type-${t.listType}`,{"yc-upload-disabled":e.unref(B)}])},["picture-card"!=t.listType?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.showUploadButton?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yc-upload",{"yc-upload-draggable":e.unref(y)}]),ref_key:"uploadRef",ref:c,onClick:d[0]||(d[0]=t=>!e.unref(B)&&e.unref(v)())},[e.unref(m)<=0||e.unref(f).length<e.unref(m)?e.renderSlot(t.$slots,"upload-button",{key:0},()=>[e.unref(y)?(e.openBlock(),e.createBlock(l.default,{key:0})):(e.openBlock(),e.createBlock(o.default,{key:1}))]):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),t.showFileList&&e.unref(f).length?(e.openBlock(),e.createBlock(a.default,{key:1},e.createSlots({_:2},[i["extra-button"]?{name:"extra-button",fn:e.withCtx(o=>[e.renderSlot(t.$slots,"extra-button",e.normalizeProps(e.guardReactiveProps(o)))]),key:"0"}:void 0,i["upload-item"]?{name:"upload-item",fn:e.withCtx(o=>[e.renderSlot(t.$slots,"upload-item",e.normalizeProps(e.guardReactiveProps(o)))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(u.default,{key:1}))],2))}});exports.default=d;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Upload.vue.js");,/* empty css */exports.default=e.default;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
2
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("./hooks/useContext.js");require("../_shared/utils/dom.js"),/* empty css */,/* empty css */;/* empty css */const o=require("../_shared/icons/IconUpload.vue.js"),n=require("../Button/index.js"),r={class:"yc-upload-button"},s={key:0,class:"yc-upload-tip text-ellipsis"},u=e.defineComponent({__name:"UploadButton",setup(u){const{tip:i,disabled:d}=t.default().inject();return(t,u)=>(e.openBlock(),e.createElementBlock("div",r,[e.createVNode(e.unref(n.default),{disabled:e.unref(d),type:"primary"},{icon:e.withCtx(()=>[e.createVNode(e.unref(o.default))]),default:e.withCtx(()=>[u[0]||(u[0]=e.createTextVNode(" 点击上传 ",-1))]),_:1},8,["disabled"]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",s,e.toDisplayString(e.unref(i)),1)):e.createCommentVNode("",!0)]))}});exports.default=u;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./UploadButton.vue.js");,/* empty css */exports.default=e.default;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
2
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("./hooks/useContext.js");require("../_shared/utils/dom.js"),/* empty css */,/* empty css */;/* empty css */const t=require("../_shared/icons/IconPlus.vue.js"),r={class:"yc-upload-drag-icon"},s={key:0,class:"yc-upload-tip text-ellipsis"},n=e.defineComponent({__name:"UploadDrag",setup(n){const{tip:a,disabled:d}=o.default().inject();return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-upload-drag",{"yc-upload-drag-disabled":e.unref(d)}])},[e.createElementVNode("div",r,[e.createVNode(e.unref(t.default))]),n[0]||(n[0]=e.createElementVNode("div",{class:"yc-upload-drag-text"},"点击或拖拽文件到此处上传",-1)),e.unref(a)?(e.openBlock(),e.createElementBlock("div",s,e.toDisplayString(e.unref(a)),1)):e.createCommentVNode("",!0)],2))}});exports.default=n;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./UploadDrag.vue.js");,/* empty css */exports.default=e.default;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { FileItem } from './type';
|
2
|
+
declare function __VLS_template(): {
|
3
|
+
attrs: Partial<{}>;
|
4
|
+
slots: {
|
5
|
+
'upload-item'?(_: {
|
6
|
+
fileItem: FileItem;
|
7
|
+
index: number;
|
8
|
+
}): any;
|
9
|
+
'extra-button'?(_: {
|
10
|
+
fileItem: FileItem;
|
11
|
+
}): any;
|
12
|
+
};
|
13
|
+
refs: {};
|
14
|
+
rootEl: HTMLDivElement;
|
15
|
+
};
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
19
|
+
export default _default;
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
21
|
+
new (): {
|
22
|
+
$slots: S;
|
23
|
+
};
|
24
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.js").default(e.default,[["__scopeId","data-v-da3b0aaf"]]);exports.default=t;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("./hooks/useContext.js"),l=;/* empty css */,/* empty css */require("../_shared/utils/dom.js"),/* empty css */;/* empty css */const t=require("../_shared/icons/IconDelete.vue.js"),n=require("../_shared/icons/IconFile.vue.js"),a={class:"yc-upload-list-item-content"},i={key:0,class:"yc-upload-list-item-thumbnail"},c=["src","alt","loading"],r={class:"yc-upload-list-item-name"},s={key:0,class:"yc-upload-list-item-file-icon"},u={class:"yc-upload-list-item-name-text text-ellipsis"},d=["href","download"],m={key:0,class:"yc-upload-list-item-operation"},p=e.defineComponent({__name:"UploadFileList",setup(p){const{computedFileList:k,showRemoveButton:v,listType:f,imageLoading:B,showLink:y,download:h,customIcon:x,slots:C,emits:_}=o.default().inject(),E=e=>C["file-name"]?C["file-name"]({fileItem:e}):()=>{var o,l;return(null==(l=(o=x.value).fileName)?void 0:l.call(o,e))||e.name};return(o,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-upload-list",`yc-upload-list-type-${e.unref(f)}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(p,I)=>(e.openBlock(),e.createElementBlock("div",{key:p.uid,class:"yc-upload-list-item"},[e.renderSlot(o.$slots,"upload-item",{fileItem:p,index:I},()=>{return[e.createElementVNode("div",a,["picture"==e.unref(f)?(e.openBlock(),e.createElementBlock("span",i,[e.createElementVNode("img",{src:p.url,alt:p.name,loading:e.unref(B)},null,8,c)])):e.createCommentVNode("",!0),e.createElementVNode("div",r,["text"==e.unref(f)?(e.openBlock(),e.createElementBlock("span",s,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((o=p,C["file-icon"]?C["file-icon"]({fileItem:o}):(null==(t=(l=x.value).fileIcon)?void 0:t.call(l,o))||n.default))))])):e.createCommentVNode("",!0),e.createElementVNode("span",u,[e.unref(y)?(e.openBlock(),e.createElementBlock("a",{key:0,href:p.url,download:e.unref(h)?p.name:void 0,class:"yc-upload-list-item-name-link",target:"_blank"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(p))))],8,d)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(p)),{key:1}))])])])];var o,l,t},!0),o.$slots["extra-button"]||e.unref(v)?(e.openBlock(),e.createElementBlock("span",m,[e.createVNode(e.unref(l.default),{onClick:e=>{return o=p.uid,k.value=k.value.filter(e=>e.uid!=o),void _("change",k.value,[]);var o}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C["remove-icon"]??(x.value.removeIcon||t.default))))]),_:1},8,["onClick"]),e.renderSlot(o.$slots,"extra-button",{fileItem:p},void 0,!0)])):e.createCommentVNode("",!0)]))),128))],2))}});exports.default=p;
|
@@ -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 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const r=require("../_virtual/_plugin-vue_export-helper.js").default(e.default,[["__scopeId","data-v-499f701f"]]);exports.default=r;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../_shared/utils/dom.js"),/* empty css */,/* empty css */;/* empty css */const o=require("../_shared/icons/IconDelete.vue.js"),l=require("../_shared/icons/IconEyeClose.vue.js"),r=require("../_shared/icons/IconPlus.vue.js"),a=require("./hooks/useUpload.js");require("../Image/index.js");const c=require("../Image/ImagePreview.vue.js");;/* empty css */const n=["src","alt"],t={class:"yc-upload-list-picture-mask"},s={class:"yc-upload-list-picture-operation"},i=["onClick"],u=["onClick"],d={class:"yc-upload-picture-card-text"},p={key:0,class:"yc-upload-tip"},v=e.defineComponent({__name:"UploadPictureCard",setup(v){const m=e.ref(),k=e.ref(!1),y=e.ref(""),{computedFileList:f,tip:B,slots:C,customIcon:E,disabled:I,imagePreview:g,showPreviewButton:j,showRemoveButton:q,listType:_,open:h,emits:N}=a.default(m),V=()=>{I.value||h()};return(a,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-upload-list",`yc-upload-list-type-${e.unref(_)}`,{"yc-upload-list-disabled":e.unref(I)}])},[e.createVNode(e.unref(c.default),{visible:k.value,"onUpdate:visible":v[0]||(v[0]=e=>k.value=e),src:y.value},null,8,["visible","src"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),r=>(e.openBlock(),e.createElementBlock("div",{key:r.uid,class:"yc-upload-list-picture"},[e.createElementVNode("img",{src:r.url,alt:r.name},null,8,n),e.createElementVNode("div",t,[e.createElementVNode("div",s,[e.unref(j)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["yc-upload-icon","yc-upload-icon-preview"]),onClick:e=>{return o=r,y.value=o.url,N("preview",o),void(g.value&&(k.value=!0));var o}},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C["preview-icon"]??(E.value.previewIcon||l.default))))],8,i)):e.createCommentVNode("",!0),e.unref(q)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["yc-upload-icon","yc-upload-icon-remove"]),onClick:e=>{return o=r.uid,f.value=f.value.filter(e=>e.uid!=o),void N("change",f.value,[]);var o}},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C["remove-icon"]??(E.value.removeIcon||o.default))))],8,u)):e.createCommentVNode("",!0)])])]))),128)),e.createElementVNode("span",{class:"yc-upload",ref_key:"uploadRef",ref:m,onClick:V},[e.createElementVNode("div",{class:e.normalizeClass(["yc-upload-picture-card",{"yc-upload-picture-card-disabled":e.unref(I)}])},[e.createElementVNode("div",d,[e.createVNode(e.unref(r.default))]),e.unref(B)?(e.openBlock(),e.createElementBlock("div",p,e.toDisplayString(e.unref(B)),1)):e.createCommentVNode("",!0)],2)],512)],2))}});exports.default=v;
|
@@ -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 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("../../_shared/utils/control.js"),i="upload-context";exports.default=function(){return{provide:(o,r)=>{const{fileList:l,defaultFileList:s,disabled:a,multiple:u,draggable:d,directory:n,limit:m,tip:c,listType:f,imageLoading:p,download:g,showLink:w,customIcon:v,imagePreview:L,showRemoveButton:h,showPreviewButton:b,accept:y}=e.toRefs(o),{name:P}=o,B=e.useSlots(),x={computedFileList:t.useControlValue(l,s.value,e=>{r("update:fileList",e)}),accept:e.computed(()=>"text"!=f.value?"image/*":y.value),disabled:a,directory:n,multiple:u,draggable:d,limit:m,tip:c,listType:f,imageLoading:p,showLink:w,download:g,customIcon:v,imagePreview:L,showRemoveButton:h,showPreviewButton:b,name:P,slots:B,emits:r};return e.provide(i,x),x},inject:()=>e.inject(i,{computedFileList:e.ref([]),accept:e.ref(""),disabled:e.ref(!1),directory:e.ref(!1),multiple:e.ref(!1),draggable:e.ref(!1),limit:e.ref(0),tip:e.ref(""),listType:e.ref("text"),imageLoading:e.ref("lazy"),showLink:e.ref(!0),download:e.ref(!1),customIcon:e.ref({}),imagePreview:e.ref(!0),showRemoveButton:e.ref(!0),showPreviewButton:e.ref(!0),name:"",slots:{},emits:()=>{}})}};
|
@@ -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 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../node_modules/nanoid/index.browser.js");require("vue");const l=require("../../_shared/utils/is.js"),t=require("../../node_modules/@vueuse/core/index.js"),u=require("./useContext.js");exports.default=function(n,i,a){let r;r=i&&a?u.default().provide(i,a):u.default().inject();const{computedFileList:o,disabled:s,limit:d,accept:c,directory:v,multiple:p,name:m,emits:g}=r,{onChange:f,open:h}=t.useFileDialog({directory:v.value,multiple:p.value,accept:c.value,reset:!0});f(e=>b(e)),t.useDropZone(n,{dataTypes:c.value?c.value.split(","):void 0,multiple:p.value,preventDefaultForUnhandled:!0,onDrop:e=>b(e)});const j=(e=0)=>d.value>0&&e+o.value.length>d.value,x=e=>m?l.isString(m)?m:m(e):e.name,b=l=>{const t=[...l||[]];if(!(null==t?void 0:t.length)||s.value||j(t.length)){if(!j(null==t?void 0:t.length))return;g("exceed-limit",o.value,t)}else o.value=[...o.value,...t.map(l=>{const t={name:l.name,uid:e.nanoid(),file:l,status:"init",percent:0,url:URL.createObjectURL(l)};return{...t,name:x(t)}})],g("change",o.value,[...t])};return{...r,open:h,handleFiles:b}};
|