yc-design-vue 2.2.1 → 2.2.3
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/lang-es/zh-cn.js +26 -26
- package/dist/style.css +1 -1
- package/es/Alert/index.vue.js +3 -3
- package/es/Anchor/hooks/useContext.d.ts +1 -1
- package/es/Anchor/hooks/useContext.js +5 -9
- package/es/Avatar/Avatar.vue.js +2 -2
- package/es/BackTop/index.vue.js +2 -2
- package/es/Breadcrumb/BreadcrumbItem.vue.js +2 -2
- package/es/Breadcrumb/BreadcrumbMore.vue.js +2 -2
- package/es/Breadcrumb/BreadcrumbSeparator.vue.js +2 -2
- package/es/Calendar/Calendar.vue.js +3 -3
- package/es/Carousel/CarouselArrow.vue.js +2 -2
- package/es/Carousel/hooks/useContext.d.ts +11 -2
- package/es/Carousel/hooks/useContext.js +4 -4
- package/es/Cascader/Cascader.vue.d.ts +2 -1
- package/es/Cascader/Cascader.vue.js +5 -3
- package/es/Cascader/CascaderDataPanel.vue.d.ts +33 -0
- package/es/Cascader/CascaderDataPanel.vue.js +48 -0
- package/es/Cascader/CascaderDataPanel.vue2.js +4 -0
- package/es/Cascader/CascaderIcon.vue.js +3 -3
- package/es/Cascader/CascaderOption.vue.js +2 -2
- package/es/Cascader/CascaderPanel.vue.js +8 -2
- package/es/Cascader/hooks/useContext.d.ts +69 -8
- package/es/Cascader/hooks/useContext.js +5 -13
- package/es/Cascader/index.css +1 -1
- package/es/Cascader/index.d.ts +9 -3
- package/es/Cascader/index.js +3 -0
- package/es/Cascader/type.d.ts +9 -0
- package/es/Checkbox/Checkbox.vue.js +3 -3
- package/es/Collapse/CollapseItem.vue.js +4 -4
- package/es/ColorPicker/hooks/useContext.d.ts +12 -1
- package/es/ColorPicker/hooks/useContext.js +5 -5
- package/es/DatePicker/PickerRange.vue.d.ts +2 -0
- package/es/DatePicker/PickerRange.vue.js +15 -0
- package/es/DatePicker/PickerRange.vue2.js +4 -0
- package/es/DatePicker/YcDatePicker.vue.d.ts +2 -0
- package/es/DatePicker/YcDatePicker.vue.js +15 -0
- package/es/DatePicker/YcDatePicker.vue2.js +4 -0
- package/es/DatePicker/YcMonthPicker.vue.d.ts +64 -0
- package/es/DatePicker/YcMonthPicker.vue.js +234 -0
- package/es/DatePicker/YcMonthPicker.vue3.js +5 -0
- package/es/DatePicker/YcWeekPicker.vue.d.ts +65 -0
- package/es/DatePicker/YcWeekPicker.vue.js +7 -0
- package/es/DatePicker/YcWeekPicker.vue2.js +319 -0
- package/es/DatePicker/YcYearPicker.vue.d.ts +63 -0
- package/es/DatePicker/YcYearPicker.vue.js +200 -0
- package/es/DatePicker/YcYearPicker.vue3.js +5 -0
- package/es/DatePicker/component/PickerCell.vue.d.ts +36 -0
- package/es/DatePicker/component/PickerCell.vue.js +7 -0
- package/es/DatePicker/component/PickerCell.vue2.js +41 -0
- package/es/DatePicker/component/PickerInput.vue.d.ts +297 -0
- package/es/DatePicker/component/PickerInput.vue.js +7 -0
- package/es/DatePicker/component/PickerInput.vue2.js +125 -0
- package/es/DatePicker/component/PickerPanel.vue.d.ts +33 -0
- package/es/DatePicker/component/PickerPanel.vue.js +108 -0
- package/es/DatePicker/component/PickerPanel.vue3.js +5 -0
- package/es/DatePicker/hooks/useContext.d.ts +19 -0
- package/es/DatePicker/hooks/useContext.js +37 -0
- package/es/DatePicker/hooks/userPicker.d.ts +44 -0
- package/es/DatePicker/hooks/userPicker.js +221 -0
- package/es/DatePicker/index.css +3 -0
- package/es/DatePicker/index.d.ts +38 -0
- package/es/DatePicker/index.js +23 -0
- package/es/DatePicker/type.d.ts +104 -0
- package/es/Drawer/Drawer.vue.js +3 -3
- package/es/Drawer/DrawerService.vue.js +1 -1
- package/es/Dropdown/DropdownButton.vue.js +2 -2
- package/es/Dropdown/Dsubmenu.vue.js +2 -2
- package/es/Empty/index.vue.js +2 -2
- package/es/Grid/hooks/useContext.d.ts +6 -2
- package/es/Grid/hooks/useContext.js +5 -7
- package/es/Image/Image.vue.js +2 -2
- package/es/Image/ImagePreview.vue.js +2 -2
- package/es/Image/ImagePreviewArrow.vue.js +2 -2
- package/es/Image/ImagePreviewToolbar.vue.js +2 -2
- package/es/Input/Input.vue.js +3 -3
- package/es/Input/InputPassword.vue.js +3 -3
- package/es/Input/InputSearch.vue.js +3 -3
- package/es/InputNumber/InputOperaBtn.vue.js +2 -2
- package/es/InputTag/index.vue.js +3 -3
- package/es/Layout/LayoutSider.vue.js +2 -2
- package/es/Link/index.vue.js +2 -2
- package/es/Menu/Menu.vue.js +2 -2
- package/es/Menu/MenuEllipsis.vue.js +2 -2
- package/es/Menu/SubMenu.vue.js +3 -3
- package/es/Menu/hooks/useContext.d.ts +17 -2
- package/es/Menu/hooks/useContext.js +5 -7
- package/es/Message/Message.vue.js +4 -4
- package/es/Modal/Modal.vue.js +3 -3
- package/es/Modal/ModalService.vue.js +2 -2
- package/es/Notification/Notification.vue.js +5 -5
- package/es/PageHeader/index.vue.js +3 -3
- package/es/Pagination/PaginationItem.vue.js +2 -2
- package/es/Progress/ProgressCircle.vue.js +3 -3
- package/es/Radio/Radio.vue.js +3 -3
- package/es/Rate/index.vue.js +2 -2
- package/es/ResizeBox/index.vue.js +2 -2
- package/es/Select/SelectIcon.vue.js +3 -3
- package/es/Select/hooks/useContext.d.ts +2 -2
- package/es/Select/hooks/useSelectOptions.d.ts +2 -2
- package/es/Slider/hooks/useContext.d.ts +12 -6
- package/es/Slider/hooks/useContext.js +5 -12
- package/es/Spin/index.vue.js +2 -2
- package/es/Split/index.vue.js +2 -2
- package/es/Statistic/Statistic.vue.js +3 -3
- package/es/Steps/Step.vue.js +2 -2
- package/es/Steps/hooks/useContext.d.ts +9 -1
- package/es/Steps/hooks/useContext.js +3 -6
- package/es/Tabs/TabButton.vue.js +3 -3
- package/es/Tabs/Tabs.vue.js +2 -2
- package/es/Tabs/hooks/useContext.d.ts +9 -2
- package/es/Tabs/hooks/useContext.js +5 -9
- package/es/Tag/index.vue.js +3 -3
- package/es/Textarea/index.vue.js +3 -3
- package/es/TimePicker/TimePicker.vue.js +4 -4
- package/es/TimePicker/hooks/useContext.d.ts +17 -7
- package/es/TimePicker/hooks/useContext.js +4 -9
- package/es/Timeline/hooks/useContext.d.ts +4 -2
- package/es/Timeline/hooks/useContext.js +3 -6
- package/es/Transfer/Transfer.vue.js +2 -2
- package/es/Transfer/TransferPanel.vue.js +3 -3
- package/es/Transfer/hooks/useContext.d.ts +1 -6
- package/es/Transfer/hooks/useContext.js +3 -7
- package/es/Trigger/index.vue.js +2 -2
- package/es/Typography/TypographyBase.vue.js +2 -2
- package/es/Upload/Upload.vue.js +6 -4
- package/es/Upload/UploadButton.vue.js +2 -2
- package/es/Upload/UploadDrag.vue.js +2 -2
- package/es/Upload/UploadFileList.vue.js +129 -5
- package/es/Upload/UploadFileList.vue3.js +5 -0
- package/es/Upload/UploadPictureCard.vue.js +135 -5
- package/es/Upload/UploadPictureCard.vue3.js +5 -0
- package/es/_shared/components/ExpandTransition/index.vue3.js +2 -2
- package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +2 -2
- package/es/_shared/components/IconButton/index.vue3.js +2 -2
- package/es/_shared/constants/index.js +2 -2
- package/es/_shared/icons/IconArrowDown.vue.js +2 -2
- package/es/_shared/icons/IconArrowRight.vue.js +2 -2
- package/es/_shared/icons/IconCalendar.vue.d.ts +2 -0
- package/es/_shared/icons/IconCalendar.vue.js +4 -0
- package/es/_shared/icons/IconCalendar.vue2.js +31 -0
- package/es/_shared/icons/IconCheck.vue.js +2 -2
- package/es/_shared/icons/IconCheckboxChecked.vue.js +2 -2
- package/es/_shared/icons/IconClose.vue.js +2 -2
- package/es/_shared/icons/IconCopy.vue2.js +2 -2
- package/es/_shared/icons/IconDelete.vue2.js +2 -2
- package/es/_shared/icons/IconDoubleLeft.vue.d.ts +2 -0
- package/es/_shared/icons/IconDoubleLeft.vue.js +31 -0
- package/es/_shared/icons/IconDoubleLeft.vue2.js +4 -0
- package/es/_shared/icons/IconDoubleRight.vue.d.ts +2 -0
- package/es/_shared/icons/IconDoubleRight.vue.js +31 -0
- package/es/_shared/icons/IconDoubleRight.vue2.js +4 -0
- package/es/_shared/icons/IconDragDot.vue.js +2 -2
- package/es/_shared/icons/IconEdit.vue2.js +2 -2
- package/es/_shared/icons/IconEmpty.vue.js +2 -2
- package/es/_shared/icons/IconError.vue.js +2 -2
- package/es/_shared/icons/IconExclamation.vue.js +1 -39
- package/es/_shared/icons/IconExclamation.vue2.js +39 -1
- package/es/_shared/icons/IconEyeClose.vue.js +2 -2
- package/es/_shared/icons/IconEyeOpen.vue.js +2 -2
- package/es/_shared/icons/IconFaceSmile.vue.js +2 -2
- package/es/_shared/icons/IconFile.vue2.js +2 -2
- package/es/_shared/icons/IconFullScreen.vue2.js +2 -2
- package/es/_shared/icons/IconImageClose.vue.js +2 -2
- package/es/_shared/icons/IconInfo.vue.js +2 -2
- package/es/_shared/icons/IconInfoLine.vue.js +2 -2
- package/es/_shared/icons/IconLink.vue.js +2 -2
- package/es/_shared/icons/IconLoading.vue.js +2 -2
- package/es/_shared/icons/IconMenuFold.vue.js +2 -2
- package/es/_shared/icons/IconMenuUnfold.vue.js +2 -2
- package/es/_shared/icons/IconMinus.vue2.js +2 -2
- package/es/_shared/icons/IconMore.vue.js +2 -2
- package/es/_shared/icons/IconOriginSize.vue2.js +2 -2
- package/es/_shared/icons/IconPlus.vue.js +2 -2
- package/es/_shared/icons/IconRight.vue.js +2 -2
- package/es/_shared/icons/IconRotateLeft.vue2.js +2 -2
- package/es/_shared/icons/IconRotateRight.vue2.js +2 -2
- package/es/_shared/icons/IconSearch.vue.js +2 -2
- package/es/_shared/icons/IconSeparator.vue2.js +2 -2
- package/es/_shared/icons/IconStar.vue.js +2 -2
- package/es/_shared/icons/IconSuccess.vue.js +2 -2
- package/es/_shared/icons/IconTime.vue.js +2 -2
- package/es/_shared/icons/IconToTop.vue.js +2 -2
- package/es/_shared/icons/IconUpload.vue2.js +2 -2
- package/es/_shared/icons/IconWarning.vue.js +2 -2
- package/es/_shared/icons/IconZoomIn.vue2.js +2 -2
- package/es/_shared/icons/IconZoomOut.vue2.js +2 -2
- package/es/_shared/icons/index.d.ts +3 -0
- package/es/_shared/type/index.d.ts +1 -1
- package/es/_shared/utils/hooks.js +1 -1
- package/es/_shared/utils/time.d.ts +0 -1
- package/es/_shared/utils/time.js +0 -4
- package/es/_shared/utils/vue-utils.d.ts +1 -1
- package/es/_virtual/isoWeek.js +4 -0
- package/es/index.d.ts +295 -1
- package/es/index.js +50 -39
- package/es/lang-es/zh-cn.js +26 -26
- package/es/node_modules/dayjs/plugin/isoWeek.js +33 -0
- package/es/src/lang/lang-es/zh-cn.js +26 -26
- package/es/style.css +1 -1
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Anchor/hooks/useContext.d.ts +1 -1
- package/lib/Anchor/hooks/useContext.js +1 -1
- package/lib/Avatar/Avatar.vue.js +1 -1
- package/lib/BackTop/index.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Carousel/CarouselArrow.vue.js +1 -1
- package/lib/Carousel/hooks/useContext.d.ts +11 -2
- package/lib/Carousel/hooks/useContext.js +1 -1
- package/lib/Cascader/Cascader.vue.d.ts +2 -1
- package/lib/Cascader/Cascader.vue.js +1 -1
- package/lib/Cascader/CascaderDataPanel.vue.d.ts +33 -0
- package/lib/Cascader/CascaderDataPanel.vue.js +1 -0
- package/lib/Cascader/CascaderDataPanel.vue2.js +1 -0
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Cascader/CascaderOption.vue.js +1 -1
- package/lib/Cascader/CascaderPanel.vue.js +1 -1
- package/lib/Cascader/hooks/useContext.d.ts +69 -8
- package/lib/Cascader/hooks/useContext.js +1 -1
- package/lib/Cascader/index.css +1 -1
- package/lib/Cascader/index.d.ts +9 -3
- package/lib/Cascader/index.js +1 -1
- package/lib/Cascader/type.d.ts +9 -0
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/ColorPicker/hooks/useContext.d.ts +12 -1
- package/lib/ColorPicker/hooks/useContext.js +1 -1
- package/lib/DatePicker/PickerRange.vue.d.ts +2 -0
- package/lib/DatePicker/PickerRange.vue.js +1 -0
- package/lib/DatePicker/PickerRange.vue2.js +1 -0
- package/lib/DatePicker/YcDatePicker.vue.d.ts +2 -0
- package/lib/DatePicker/YcDatePicker.vue.js +1 -0
- package/lib/DatePicker/YcDatePicker.vue2.js +1 -0
- package/lib/DatePicker/YcMonthPicker.vue.d.ts +64 -0
- package/lib/DatePicker/YcMonthPicker.vue.js +1 -0
- package/lib/DatePicker/YcMonthPicker.vue3.js +1 -0
- package/lib/DatePicker/YcWeekPicker.vue.d.ts +65 -0
- package/lib/DatePicker/YcWeekPicker.vue.js +1 -0
- package/lib/DatePicker/YcWeekPicker.vue2.js +1 -0
- package/lib/DatePicker/YcYearPicker.vue.d.ts +63 -0
- package/lib/DatePicker/YcYearPicker.vue.js +1 -0
- package/lib/DatePicker/YcYearPicker.vue3.js +1 -0
- package/lib/DatePicker/component/PickerCell.vue.d.ts +36 -0
- package/lib/DatePicker/component/PickerCell.vue.js +1 -0
- package/lib/DatePicker/component/PickerCell.vue2.js +1 -0
- package/lib/DatePicker/component/PickerInput.vue.d.ts +297 -0
- package/lib/DatePicker/component/PickerInput.vue.js +1 -0
- package/lib/DatePicker/component/PickerInput.vue2.js +1 -0
- package/lib/DatePicker/component/PickerPanel.vue.d.ts +33 -0
- package/lib/DatePicker/component/PickerPanel.vue.js +1 -0
- package/lib/DatePicker/component/PickerPanel.vue3.js +1 -0
- package/lib/DatePicker/hooks/useContext.d.ts +19 -0
- package/lib/DatePicker/hooks/useContext.js +1 -0
- package/lib/DatePicker/hooks/userPicker.d.ts +44 -0
- package/lib/DatePicker/hooks/userPicker.js +1 -0
- package/lib/DatePicker/index.css +3 -0
- package/lib/DatePicker/index.d.ts +38 -0
- package/lib/DatePicker/index.js +1 -0
- package/lib/DatePicker/type.d.ts +104 -0
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Drawer/DrawerService.vue.js +1 -1
- package/lib/Dropdown/DropdownButton.vue.js +1 -1
- package/lib/Dropdown/Dsubmenu.vue.js +1 -1
- package/lib/Empty/index.vue.js +1 -1
- package/lib/Grid/hooks/useContext.d.ts +6 -2
- package/lib/Grid/hooks/useContext.js +1 -1
- package/lib/Image/Image.vue.js +1 -1
- package/lib/Image/ImagePreview.vue.js +1 -1
- package/lib/Image/ImagePreviewArrow.vue.js +1 -1
- package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
- package/lib/Input/Input.vue.js +1 -1
- package/lib/Input/InputPassword.vue.js +1 -1
- package/lib/Input/InputSearch.vue.js +1 -1
- package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/Layout/LayoutSider.vue.js +1 -1
- package/lib/Link/index.vue.js +1 -1
- package/lib/Menu/Menu.vue.js +1 -1
- package/lib/Menu/MenuEllipsis.vue.js +1 -1
- package/lib/Menu/SubMenu.vue.js +1 -1
- package/lib/Menu/hooks/useContext.d.ts +17 -2
- package/lib/Menu/hooks/useContext.js +1 -1
- package/lib/Message/Message.vue.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Modal/ModalService.vue.js +1 -1
- package/lib/Notification/Notification.vue.js +1 -1
- package/lib/PageHeader/index.vue.js +1 -1
- package/lib/Pagination/PaginationItem.vue.js +1 -1
- package/lib/Progress/ProgressCircle.vue.js +1 -1
- package/lib/Radio/Radio.vue.js +1 -1
- package/lib/Rate/index.vue.js +1 -1
- package/lib/ResizeBox/index.vue.js +1 -1
- package/lib/Select/SelectIcon.vue.js +1 -1
- package/lib/Select/hooks/useContext.d.ts +2 -2
- package/lib/Select/hooks/useSelectOptions.d.ts +2 -2
- package/lib/Slider/hooks/useContext.d.ts +12 -6
- package/lib/Slider/hooks/useContext.js +1 -1
- package/lib/Spin/index.vue.js +1 -1
- package/lib/Split/index.vue.js +1 -1
- package/lib/Statistic/Statistic.vue.js +1 -1
- package/lib/Steps/Step.vue.js +1 -1
- package/lib/Steps/hooks/useContext.d.ts +9 -1
- package/lib/Steps/hooks/useContext.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tabs/Tabs.vue.js +1 -1
- package/lib/Tabs/hooks/useContext.d.ts +9 -2
- package/lib/Tabs/hooks/useContext.js +1 -1
- package/lib/Tag/index.vue.js +1 -1
- package/lib/Textarea/index.vue.js +1 -1
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/TimePicker/hooks/useContext.d.ts +17 -7
- package/lib/TimePicker/hooks/useContext.js +1 -1
- package/lib/Timeline/hooks/useContext.d.ts +4 -2
- package/lib/Timeline/hooks/useContext.js +1 -1
- package/lib/Transfer/Transfer.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Transfer/hooks/useContext.d.ts +1 -6
- package/lib/Transfer/hooks/useContext.js +1 -1
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/Upload/Upload.vue.js +1 -1
- package/lib/Upload/UploadButton.vue.js +1 -1
- package/lib/Upload/UploadDrag.vue.js +1 -1
- package/lib/Upload/UploadFileList.vue.js +1 -1
- package/lib/Upload/UploadFileList.vue3.js +1 -0
- package/lib/Upload/UploadPictureCard.vue.js +1 -1
- package/lib/Upload/UploadPictureCard.vue3.js +1 -0
- package/lib/_shared/components/ExpandTransition/index.vue3.js +1 -1
- package/lib/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
- package/lib/_shared/components/IconButton/index.vue3.js +1 -1
- package/lib/_shared/constants/index.js +1 -1
- package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
- package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
- package/lib/_shared/icons/IconCalendar.vue.d.ts +2 -0
- package/lib/_shared/icons/IconCalendar.vue.js +1 -0
- package/lib/_shared/icons/IconCalendar.vue2.js +1 -0
- package/lib/_shared/icons/IconCheck.vue.js +1 -1
- package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
- package/lib/_shared/icons/IconClose.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconDoubleLeft.vue.d.ts +2 -0
- package/lib/_shared/icons/IconDoubleLeft.vue.js +1 -0
- package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -0
- package/lib/_shared/icons/IconDoubleRight.vue.d.ts +2 -0
- package/lib/_shared/icons/IconDoubleRight.vue.js +1 -0
- package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -0
- package/lib/_shared/icons/IconDragDot.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconEmpty.vue.js +1 -1
- package/lib/_shared/icons/IconError.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
- package/lib/_shared/icons/IconEyeClose.vue.js +1 -1
- package/lib/_shared/icons/IconEyeOpen.vue.js +1 -1
- package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
- package/lib/_shared/icons/IconFile.vue2.js +1 -1
- package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
- package/lib/_shared/icons/IconImageClose.vue.js +1 -1
- package/lib/_shared/icons/IconInfo.vue.js +1 -1
- package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
- package/lib/_shared/icons/IconLink.vue.js +1 -1
- package/lib/_shared/icons/IconLoading.vue.js +1 -1
- package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
- package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
- package/lib/_shared/icons/IconMinus.vue2.js +1 -1
- package/lib/_shared/icons/IconMore.vue.js +1 -1
- package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
- package/lib/_shared/icons/IconPlus.vue.js +1 -1
- package/lib/_shared/icons/IconRight.vue.js +1 -1
- package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
- package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
- package/lib/_shared/icons/IconStar.vue.js +1 -1
- package/lib/_shared/icons/IconSuccess.vue.js +1 -1
- package/lib/_shared/icons/IconTime.vue.js +1 -1
- package/lib/_shared/icons/IconToTop.vue.js +1 -1
- package/lib/_shared/icons/IconUpload.vue2.js +1 -1
- package/lib/_shared/icons/IconWarning.vue.js +1 -1
- package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
- package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
- package/lib/_shared/icons/index.d.ts +3 -0
- package/lib/_shared/type/index.d.ts +1 -1
- package/lib/_shared/utils/hooks.js +1 -1
- package/lib/_shared/utils/time.d.ts +0 -1
- package/lib/_shared/utils/time.js +1 -1
- package/lib/_shared/utils/vue-utils.d.ts +1 -1
- package/lib/_virtual/isoWeek.js +1 -0
- package/lib/index.d.ts +295 -1
- package/lib/index.js +1 -1
- package/lib/lang-es/zh-cn.js +26 -26
- package/lib/node_modules/dayjs/plugin/isoWeek.js +1 -0
- package/lib/src/lang/lang-es/zh-cn.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/Upload/UploadFileList.vue2.js +0 -131
- package/es/Upload/UploadPictureCard.vue2.js +0 -137
- package/lib/Upload/UploadFileList.vue2.js +0 -1
- package/lib/Upload/UploadPictureCard.vue2.js +0 -1
- /package/es/_shared/components/ExpandTransition/{index.vue.js → index.vue2.js} +0 -0
- /package/lib/_shared/components/ExpandTransition/{index.vue.js → index.vue2.js} +0 -0
@@ -44,7 +44,7 @@ function useTabsContext() {
|
|
44
44
|
}
|
45
45
|
return _direction.value;
|
46
46
|
});
|
47
|
-
|
47
|
+
const context = {
|
48
48
|
computedActiveKey,
|
49
49
|
editable,
|
50
50
|
direction,
|
@@ -58,15 +58,11 @@ function useTabsContext() {
|
|
58
58
|
titleRefs,
|
59
59
|
tabRefs,
|
60
60
|
emits
|
61
|
-
}
|
61
|
+
};
|
62
|
+
provide(TABS_CONTEXT_KEY, context);
|
62
63
|
return {
|
63
|
-
|
64
|
-
|
65
|
-
direction,
|
66
|
-
position,
|
67
|
-
autoSwitch,
|
68
|
-
titleRefs,
|
69
|
-
tabRefs
|
64
|
+
...context,
|
65
|
+
autoSwitch
|
70
66
|
};
|
71
67
|
};
|
72
68
|
const inject$1 = () => {
|
package/es/Tag/index.vue.js
CHANGED
@@ -13,9 +13,9 @@ import { useControlValue } from "../_shared/utils/hooks.js";
|
|
13
13
|
import "../_shared/utils/locale.js";
|
14
14
|
import "../_shared/utils/time.js";
|
15
15
|
import Spin from "../Spin/index.js";
|
16
|
-
import _sfc_main$1 from "../_shared/components/IconButton/index.
|
17
|
-
/* empty css
|
18
|
-
/* empty css
|
16
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
17
|
+
/* empty css */
|
18
|
+
/* empty css */
|
19
19
|
/* empty css */
|
20
20
|
const _hoisted_1 = {
|
21
21
|
key: 0,
|
package/es/Textarea/index.vue.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { defineComponent, toRefs, ref, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, createBlock, toDisplayString, normalizeStyle, withCtx, createTextVNode } from "vue";
|
2
2
|
import useTextareaHeight from "./hooks/useTextareaHeight.js";
|
3
3
|
import useLimitedInput from "../Input/hooks/useLimitedInput.js";
|
4
|
-
import _sfc_main$2 from "../_shared/components/IconButton/index.
|
5
|
-
/* empty css
|
4
|
+
import _sfc_main$2 from "../_shared/components/IconButton/index.vue.js";
|
5
|
+
/* empty css */
|
6
6
|
import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
|
7
7
|
import "../node_modules/b-tween/dist/b-tween.es.js";
|
8
8
|
import "../node_modules/dayjs/dayjs.min.js";
|
@@ -14,7 +14,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
14
14
|
import "../_shared/utils/dom.js";
|
15
15
|
import "../_shared/utils/locale.js";
|
16
16
|
import "../_shared/utils/time.js";
|
17
|
-
/* empty css
|
17
|
+
/* empty css */
|
18
18
|
/* empty css */
|
19
19
|
const _hoisted_1 = ["value", "disabled", "readonly", "placeholder"];
|
20
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
@@ -12,9 +12,9 @@ import { isArray } from "../_shared/utils/is.js";
|
|
12
12
|
import "../_shared/utils/locale.js";
|
13
13
|
import { isValidTimeRange } from "../_shared/utils/time.js";
|
14
14
|
import useTimePickerContext from "./hooks/useContext.js";
|
15
|
-
import _sfc_main$1 from "../_shared/components/IconButton/index.
|
16
|
-
/* empty css
|
17
|
-
/* empty css
|
15
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
16
|
+
/* empty css */
|
17
|
+
/* empty css */
|
18
18
|
/* empty css */
|
19
19
|
import _sfc_main$2 from "../_shared/icons/IconTime.vue.js";
|
20
20
|
import _sfc_main$3 from "./TimePickerPanel.vue.js";
|
@@ -172,7 +172,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
172
172
|
value: unref(isArray)(unref(computedValue)) ? unref(computedValue)[0] : unref(computedValue),
|
173
173
|
placeholder: unref(isArray)(unref(placeholder)) ? unref(placeholder)[0] : unref(placeholder),
|
174
174
|
disabled: unref(disabled),
|
175
|
-
readonly: unref(readonly),
|
175
|
+
readonly: unref(readonly) || true,
|
176
176
|
ref: (el) => unref(inputRefs)[0] = el,
|
177
177
|
class: "yc-picker-start-time"
|
178
178
|
}, null, 8, _hoisted_2)
|
@@ -26,17 +26,27 @@ type TimePickerCell = {
|
|
26
26
|
};
|
27
27
|
export default function useTimePickerContext(): {
|
28
28
|
provide: (props: RecordType, emits: TimePickerEmits) => {
|
29
|
-
computedValue: import('vue').WritableComputedRef<TimePickerValue, TimePickerValue>;
|
30
|
-
computedVisible: import('vue').WritableComputedRef<boolean, boolean>;
|
31
29
|
showClearBtn: import('vue').ComputedRef<boolean | "" | 0>;
|
32
|
-
curValue: Ref<number[], number[]>;
|
33
30
|
readonly: Ref<boolean, boolean>;
|
34
31
|
disabled: Ref<boolean, boolean>;
|
35
|
-
type: Ref<TimePickerType, TimePickerType>;
|
36
|
-
curIndex: Ref<number, number>;
|
37
|
-
inputRefs: Ref<HTMLInputElement[], HTMLInputElement[]>;
|
38
|
-
format: Ref<string, string>;
|
39
32
|
placeholder: import('vue').ComputedRef<string | string[]>;
|
33
|
+
type: Ref<TimePickerType>;
|
34
|
+
format: Ref<string>;
|
35
|
+
computedValue: Ref<TimePickerValue>;
|
36
|
+
computedVisible: Ref<boolean>;
|
37
|
+
curIndex: Ref<number>;
|
38
|
+
curValue: Ref<number[]>;
|
39
|
+
timeColumn: Ref<TimeUnit[]>;
|
40
|
+
timeColumnCells: Ref<{
|
41
|
+
unit: TimeUnit;
|
42
|
+
cells: TimePickerCell[];
|
43
|
+
}[]>;
|
44
|
+
inputRefs: Ref<HTMLInputElement[]>;
|
45
|
+
disableConfirm: Ref<boolean>;
|
46
|
+
hideDisabledOptions: Ref<boolean>;
|
47
|
+
disabledHours: DisabledHours;
|
48
|
+
disabledMinutes: DisabledMinutes;
|
49
|
+
disabledSeconds: DisabledSeconds;
|
40
50
|
};
|
41
51
|
inject: () => TimePickerContext;
|
42
52
|
};
|
@@ -87,7 +87,7 @@ function useTimePickerContext() {
|
|
87
87
|
);
|
88
88
|
});
|
89
89
|
const inputRefs = ref([]);
|
90
|
-
|
90
|
+
const context = {
|
91
91
|
computedValue,
|
92
92
|
computedVisible,
|
93
93
|
timeColumn,
|
@@ -102,18 +102,13 @@ function useTimePickerContext() {
|
|
102
102
|
disabledHours,
|
103
103
|
disabledMinutes,
|
104
104
|
disabledSeconds
|
105
|
-
}
|
105
|
+
};
|
106
|
+
provide(TIME_PICKER_CONTEXT_KEY, context);
|
106
107
|
return {
|
107
|
-
|
108
|
-
computedVisible,
|
108
|
+
...context,
|
109
109
|
showClearBtn,
|
110
|
-
curValue,
|
111
110
|
readonly,
|
112
111
|
disabled,
|
113
|
-
type,
|
114
|
-
curIndex,
|
115
|
-
inputRefs,
|
116
|
-
format,
|
117
112
|
placeholder
|
118
113
|
};
|
119
114
|
};
|
@@ -9,11 +9,13 @@ type TimelineContext = {
|
|
9
9
|
};
|
10
10
|
export default function useTimelineContext(): {
|
11
11
|
provide: (props: RecordType) => {
|
12
|
-
direction: Ref<Direction, Direction>;
|
13
|
-
mode: import('vue').ComputedRef<TimelineMode>;
|
14
12
|
timelineItems: import('vue').ComputedRef<(import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
15
13
|
[key: string]: any;
|
16
14
|
}> | RecordType)[]>;
|
15
|
+
direction: Ref<Direction, Direction>;
|
16
|
+
mode: import('vue').ComputedRef<TimelineMode>;
|
17
|
+
labelPosition: Ref<TimelineLabelPosition, TimelineLabelPosition>;
|
18
|
+
reverse: Ref<boolean, boolean>;
|
17
19
|
};
|
18
20
|
inject: () => TimelineContext;
|
19
21
|
};
|
@@ -43,17 +43,14 @@ function useTimelineContext() {
|
|
43
43
|
);
|
44
44
|
return pending.value ? [...nodes, pendingNodes.value] : nodes;
|
45
45
|
});
|
46
|
-
|
46
|
+
const context = {
|
47
47
|
direction,
|
48
48
|
mode,
|
49
49
|
labelPosition,
|
50
50
|
reverse
|
51
|
-
});
|
52
|
-
return {
|
53
|
-
direction,
|
54
|
-
mode,
|
55
|
-
timelineItems
|
56
51
|
};
|
52
|
+
provide(TIMELINE_CONTEXT_KEY, context);
|
53
|
+
return { ...context, timelineItems };
|
57
54
|
};
|
58
55
|
const inject$1 = () => {
|
59
56
|
return inject(TIMELINE_CONTEXT_KEY, {
|
@@ -10,8 +10,8 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
10
10
|
import "../_shared/utils/dom.js";
|
11
11
|
import "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
14
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
|
+
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
|
17
17
|
import _sfc_main$1 from "./TransferPanel.vue.js";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { defineComponent, toRefs, ref, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, unref, normalizeProps, guardReactiveProps, createBlock, withCtx, createTextVNode, toDisplayString, Fragment, createVNode, mergeProps, renderList, normalizeClass } from "vue";
|
2
|
-
import _sfc_main$1 from "../_shared/components/IconButton/index.
|
3
|
-
/* empty css
|
2
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
3
|
+
/* empty css */
|
4
4
|
import "../node_modules/b-tween/dist/b-tween.es.js";
|
5
5
|
import "../node_modules/dayjs/dayjs.min.js";
|
6
6
|
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
@@ -11,7 +11,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
11
11
|
import "../_shared/utils/dom.js";
|
12
12
|
import "../_shared/utils/locale.js";
|
13
13
|
import "../_shared/utils/time.js";
|
14
|
-
/* empty css
|
14
|
+
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$4 from "../_shared/icons/IconClose.vue.js";
|
17
17
|
import _sfc_main$2 from "../_shared/icons/IconDelete.vue2.js";
|
@@ -20,12 +20,7 @@ type TransferContext = {
|
|
20
20
|
emits: TransferEmits;
|
21
21
|
};
|
22
22
|
export default function useTransferContext(): {
|
23
|
-
provide: (props: RecordType, emits: TransferEmits) =>
|
24
|
-
computedValue: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
|
25
|
-
computedSelected: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
|
26
|
-
targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
|
27
|
-
sourceChecked: import('vue').ComputedRef<TransferItemValue[]>;
|
28
|
-
};
|
23
|
+
provide: (props: RecordType, emits: TransferEmits) => TransferContext;
|
29
24
|
inject: () => TransferContext;
|
30
25
|
};
|
31
26
|
export {};
|
@@ -73,7 +73,7 @@ function useTransferContext() {
|
|
73
73
|
return computedValueMap.value.has(item);
|
74
74
|
});
|
75
75
|
});
|
76
|
-
|
76
|
+
const context = {
|
77
77
|
computedValue,
|
78
78
|
computedSelected,
|
79
79
|
targetChecked,
|
@@ -89,13 +89,9 @@ function useTransferContext() {
|
|
89
89
|
disabled,
|
90
90
|
title,
|
91
91
|
emits
|
92
|
-
});
|
93
|
-
return {
|
94
|
-
computedValue,
|
95
|
-
computedSelected,
|
96
|
-
targetChecked,
|
97
|
-
sourceChecked
|
98
92
|
};
|
93
|
+
provide(TRANSFER_CONTEXT_KEY, context);
|
94
|
+
return context;
|
99
95
|
};
|
100
96
|
const inject$1 = () => {
|
101
97
|
return inject(TRANSFER_CONTEXT_KEY, {
|
package/es/Trigger/index.vue.js
CHANGED
@@ -13,9 +13,9 @@ import "../_shared/utils/time.js";
|
|
13
13
|
import { findFirstLegitChild } from "../_shared/utils/vue-utils.js";
|
14
14
|
import useTriggerVisible from "./hooks/useTriggerVisible.js";
|
15
15
|
import useTriggerPosition from "./hooks/useTriggerPosition.js";
|
16
|
-
/* empty css
|
16
|
+
/* empty css */
|
17
17
|
import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
|
18
|
-
/* empty css
|
18
|
+
/* empty css */
|
19
19
|
/* empty css */
|
20
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
21
21
|
...{
|
@@ -11,8 +11,8 @@ import { innerText, sleep } from "../_shared/utils/dom.js";
|
|
11
11
|
import { useControlValue } from "../_shared/utils/hooks.js";
|
12
12
|
import { useI18n } from "../_shared/utils/locale.js";
|
13
13
|
import "../_shared/utils/time.js";
|
14
|
-
/* empty css
|
15
|
-
/* empty css
|
14
|
+
/* empty css */
|
15
|
+
/* empty css */
|
16
16
|
/* empty css */
|
17
17
|
import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
|
18
18
|
import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
|
package/es/Upload/Upload.vue.js
CHANGED
@@ -4,8 +4,10 @@ import _sfc_main$2 from "./UploadButton.vue.js";
|
|
4
4
|
/* empty css */
|
5
5
|
import _sfc_main$1 from "./UploadDrag.vue.js";
|
6
6
|
/* empty css */
|
7
|
-
import
|
8
|
-
|
7
|
+
import _sfc_main$3 from "./UploadFileList.vue.js";
|
8
|
+
/* empty css */
|
9
|
+
import _sfc_main$4 from "./UploadPictureCard.vue.js";
|
10
|
+
/* empty css */
|
9
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
12
|
...{
|
11
13
|
name: "Upload"
|
@@ -100,7 +102,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
100
102
|
}, null, 8, ["is-over-drop-zone"])) : (openBlock(), createBlock(_sfc_main$2, { key: 1 }))
|
101
103
|
]) : createCommentVNode("", true)
|
102
104
|
], 2)) : createCommentVNode("", true),
|
103
|
-
_ctx.showFileList && unref(computedFileList).length ? (openBlock(), createBlock(
|
105
|
+
_ctx.showFileList && unref(computedFileList).length ? (openBlock(), createBlock(_sfc_main$3, { key: 1 }, createSlots({ _: 2 }, [
|
104
106
|
$slots["extra-button"] ? {
|
105
107
|
name: "extra-button",
|
106
108
|
fn: withCtx((scope) => [
|
@@ -116,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
116
118
|
key: "1"
|
117
119
|
} : void 0
|
118
120
|
]), 1024)) : createCommentVNode("", true)
|
119
|
-
], 64)) : (openBlock(), createBlock(
|
121
|
+
], 64)) : (openBlock(), createBlock(_sfc_main$4, { key: 1 }))
|
120
122
|
], 2);
|
121
123
|
};
|
122
124
|
}
|
@@ -10,8 +10,8 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
10
10
|
import "../_shared/utils/dom.js";
|
11
11
|
import { useI18n } from "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
14
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
|
+
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$1 from "../_shared/icons/IconUpload.vue2.js";
|
17
17
|
import Button from "../Button/index.js";
|
@@ -10,8 +10,8 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
10
10
|
import "../_shared/utils/dom.js";
|
11
11
|
import { useI18n } from "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
14
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
|
+
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$1 from "../_shared/icons/IconPlus.vue.js";
|
17
17
|
const _hoisted_1 = { class: "yc-upload-drag-icon" };
|
@@ -1,7 +1,131 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import
|
4
|
-
|
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 "../node_modules/b-tween/dist/b-tween.es.js";
|
6
|
+
import "../node_modules/dayjs/dayjs.min.js";
|
7
|
+
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
8
|
+
import "../node_modules/dayjs/plugin/duration.js";
|
9
|
+
import "../node_modules/dayjs/plugin/toObject.js";
|
10
|
+
import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
11
|
+
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
12
|
+
import "../_shared/utils/dom.js";
|
13
|
+
import "../_shared/utils/locale.js";
|
14
|
+
import "../_shared/utils/time.js";
|
15
|
+
/* empty css */
|
16
|
+
/* empty css */
|
17
|
+
import _sfc_main$3 from "../_shared/icons/IconDelete.vue2.js";
|
18
|
+
import _sfc_main$2 from "../_shared/icons/IconFile.vue2.js";
|
19
|
+
const _hoisted_1 = { class: "yc-upload-list-item-content" };
|
20
|
+
const _hoisted_2 = {
|
21
|
+
key: 0,
|
22
|
+
class: "yc-upload-list-item-thumbnail"
|
23
|
+
};
|
24
|
+
const _hoisted_3 = ["src", "alt", "loading"];
|
25
|
+
const _hoisted_4 = { class: "yc-upload-list-item-name" };
|
26
|
+
const _hoisted_5 = {
|
27
|
+
key: 0,
|
28
|
+
class: "yc-upload-list-item-file-icon"
|
29
|
+
};
|
30
|
+
const _hoisted_6 = { class: "yc-upload-list-item-name-text text-ellipsis" };
|
31
|
+
const _hoisted_7 = ["href", "download"];
|
32
|
+
const _hoisted_8 = {
|
33
|
+
key: 0,
|
34
|
+
class: "yc-upload-list-item-operation"
|
35
|
+
};
|
36
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
37
|
+
__name: "UploadFileList",
|
38
|
+
setup(__props) {
|
39
|
+
const {
|
40
|
+
computedFileList,
|
41
|
+
showRemoveButton,
|
42
|
+
listType,
|
43
|
+
imageLoading,
|
44
|
+
showLink,
|
45
|
+
download,
|
46
|
+
customIcon,
|
47
|
+
slots,
|
48
|
+
handleDelFile
|
49
|
+
} = useUploadContext().inject();
|
50
|
+
const renderFileIcon = (fileItem) => {
|
51
|
+
var _a, _b;
|
52
|
+
if (slots["file-icon"]) {
|
53
|
+
return slots["file-icon"]({
|
54
|
+
fileItem
|
55
|
+
});
|
56
|
+
}
|
57
|
+
return ((_b = (_a = customIcon.value).fileIcon) == null ? void 0 : _b.call(_a, fileItem)) || _sfc_main$2;
|
58
|
+
};
|
59
|
+
const renderName = (fileItem) => {
|
60
|
+
if (slots["file-name"]) {
|
61
|
+
return slots["file-name"]({
|
62
|
+
fileItem
|
63
|
+
});
|
64
|
+
}
|
65
|
+
return () => {
|
66
|
+
var _a, _b;
|
67
|
+
return ((_b = (_a = customIcon.value).fileName) == null ? void 0 : _b.call(_a, fileItem)) || fileItem.name;
|
68
|
+
};
|
69
|
+
};
|
70
|
+
const renderDelIcon = () => {
|
71
|
+
return slots["remove-icon"] ?? (customIcon.value.removeIcon || _sfc_main$3);
|
72
|
+
};
|
73
|
+
return (_ctx, _cache) => {
|
74
|
+
return openBlock(), createElementBlock("div", {
|
75
|
+
class: normalizeClass(["yc-upload-list", `yc-upload-list-type-${unref(listType)}`])
|
76
|
+
}, [
|
77
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedFileList), (item, i) => {
|
78
|
+
return openBlock(), createElementBlock("div", {
|
79
|
+
key: item.uid,
|
80
|
+
class: "yc-upload-list-item"
|
81
|
+
}, [
|
82
|
+
renderSlot(_ctx.$slots, "upload-item", {
|
83
|
+
fileItem: item,
|
84
|
+
index: i
|
85
|
+
}, () => [
|
86
|
+
createElementVNode("div", _hoisted_1, [
|
87
|
+
unref(listType) == "picture" ? (openBlock(), createElementBlock("span", _hoisted_2, [
|
88
|
+
createElementVNode("img", {
|
89
|
+
src: item.url,
|
90
|
+
alt: item.name,
|
91
|
+
loading: unref(imageLoading)
|
92
|
+
}, null, 8, _hoisted_3)
|
93
|
+
])) : createCommentVNode("", true),
|
94
|
+
createElementVNode("div", _hoisted_4, [
|
95
|
+
unref(listType) == "text" ? (openBlock(), createElementBlock("span", _hoisted_5, [
|
96
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderFileIcon(item))))
|
97
|
+
])) : createCommentVNode("", true),
|
98
|
+
createElementVNode("span", _hoisted_6, [
|
99
|
+
unref(showLink) ? (openBlock(), createElementBlock("a", {
|
100
|
+
key: 0,
|
101
|
+
href: item.url,
|
102
|
+
download: unref(download) ? item.name : void 0,
|
103
|
+
class: "yc-upload-list-item-name-link",
|
104
|
+
target: "_blank"
|
105
|
+
}, [
|
106
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderName(item))))
|
107
|
+
], 8, _hoisted_7)) : (openBlock(), createBlock(resolveDynamicComponent(renderName(item)), { key: 1 }))
|
108
|
+
])
|
109
|
+
])
|
110
|
+
])
|
111
|
+
]),
|
112
|
+
_ctx.$slots["extra-button"] || unref(showRemoveButton) ? (openBlock(), createElementBlock("span", _hoisted_8, [
|
113
|
+
createVNode(unref(_sfc_main$1), {
|
114
|
+
onClick: ($event) => unref(handleDelFile)(item)
|
115
|
+
}, {
|
116
|
+
default: withCtx(() => [
|
117
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderDelIcon())))
|
118
|
+
]),
|
119
|
+
_: 1
|
120
|
+
}, 8, ["onClick"]),
|
121
|
+
renderSlot(_ctx.$slots, "extra-button", { fileItem: item })
|
122
|
+
])) : createCommentVNode("", true)
|
123
|
+
]);
|
124
|
+
}), 128))
|
125
|
+
], 2);
|
126
|
+
};
|
127
|
+
}
|
128
|
+
});
|
5
129
|
export {
|
6
|
-
|
130
|
+
_sfc_main as default
|
7
131
|
};
|
@@ -1,7 +1,137 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import
|
4
|
-
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, normalizeClass, unref, createVNode, createCommentVNode, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString } from "vue";
|
2
|
+
import useUpload from "./hooks/useUpload.js";
|
3
|
+
import "../node_modules/b-tween/dist/b-tween.es.js";
|
4
|
+
import "../node_modules/dayjs/dayjs.min.js";
|
5
|
+
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
6
|
+
import "../node_modules/dayjs/plugin/duration.js";
|
7
|
+
import "../node_modules/dayjs/plugin/toObject.js";
|
8
|
+
import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
9
|
+
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
|
+
import "../_shared/utils/dom.js";
|
11
|
+
import "../_shared/utils/locale.js";
|
12
|
+
import "../_shared/utils/time.js";
|
13
|
+
/* empty css */
|
14
|
+
/* empty css */
|
15
|
+
/* empty css */
|
16
|
+
import _sfc_main$3 from "../_shared/icons/IconDelete.vue2.js";
|
17
|
+
import _sfc_main$4 from "../_shared/icons/IconEyeClose.vue.js";
|
18
|
+
import _sfc_main$2 from "../_shared/icons/IconPlus.vue.js";
|
19
|
+
import "../Image/index.js";
|
20
|
+
import _sfc_main$1 from "../Image/ImagePreview.vue.js";
|
21
|
+
/* empty css */
|
22
|
+
const _hoisted_1 = ["src", "alt"];
|
23
|
+
const _hoisted_2 = { class: "yc-upload-list-picture-mask" };
|
24
|
+
const _hoisted_3 = { class: "yc-upload-list-picture-operation" };
|
25
|
+
const _hoisted_4 = ["onClick"];
|
26
|
+
const _hoisted_5 = ["onClick"];
|
27
|
+
const _hoisted_6 = { class: "yc-upload-picture-card-text" };
|
28
|
+
const _hoisted_7 = {
|
29
|
+
key: 0,
|
30
|
+
class: "yc-upload-tip"
|
31
|
+
};
|
32
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
33
|
+
__name: "UploadPictureCard",
|
34
|
+
setup(__props) {
|
35
|
+
const uploadRef = ref();
|
36
|
+
const visible = ref(false);
|
37
|
+
const url = ref("");
|
38
|
+
const {
|
39
|
+
computedFileList,
|
40
|
+
limit,
|
41
|
+
tip,
|
42
|
+
slots,
|
43
|
+
customIcon,
|
44
|
+
disabled,
|
45
|
+
imagePreview,
|
46
|
+
showPreviewButton,
|
47
|
+
showRemoveButton,
|
48
|
+
listType,
|
49
|
+
handleUpload,
|
50
|
+
handleDelFile,
|
51
|
+
emits
|
52
|
+
} = useUpload(uploadRef);
|
53
|
+
const renderDelIcon = () => {
|
54
|
+
return slots["remove-icon"] ?? (customIcon.value.removeIcon || _sfc_main$3);
|
55
|
+
};
|
56
|
+
const renderPreviewIcon = () => {
|
57
|
+
return slots["preview-icon"] ?? (customIcon.value.previewIcon || _sfc_main$4);
|
58
|
+
};
|
59
|
+
const handlePreview = (fileItem) => {
|
60
|
+
url.value = fileItem.url;
|
61
|
+
emits("preview", fileItem);
|
62
|
+
if (!imagePreview.value) return;
|
63
|
+
visible.value = true;
|
64
|
+
};
|
65
|
+
return (_ctx, _cache) => {
|
66
|
+
return openBlock(), createElementBlock("div", {
|
67
|
+
class: normalizeClass([
|
68
|
+
"yc-upload-list",
|
69
|
+
`yc-upload-list-type-${unref(listType)}`,
|
70
|
+
{
|
71
|
+
"yc-upload-list-disabled": unref(disabled)
|
72
|
+
}
|
73
|
+
])
|
74
|
+
}, [
|
75
|
+
createVNode(unref(_sfc_main$1), {
|
76
|
+
visible: visible.value,
|
77
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event),
|
78
|
+
src: url.value
|
79
|
+
}, null, 8, ["visible", "src"]),
|
80
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(computedFileList), (item) => {
|
81
|
+
return openBlock(), createElementBlock("div", {
|
82
|
+
key: item.uid,
|
83
|
+
class: "yc-upload-list-picture"
|
84
|
+
}, [
|
85
|
+
createElementVNode("img", {
|
86
|
+
src: item.url,
|
87
|
+
alt: item.name
|
88
|
+
}, null, 8, _hoisted_1),
|
89
|
+
createElementVNode("div", _hoisted_2, [
|
90
|
+
createElementVNode("div", _hoisted_3, [
|
91
|
+
unref(showPreviewButton) ? (openBlock(), createElementBlock("span", {
|
92
|
+
key: 0,
|
93
|
+
class: normalizeClass(["yc-upload-icon", "yc-upload-icon-preview"]),
|
94
|
+
onClick: ($event) => handlePreview(item)
|
95
|
+
}, [
|
96
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderPreviewIcon())))
|
97
|
+
], 8, _hoisted_4)) : createCommentVNode("", true),
|
98
|
+
unref(showRemoveButton) ? (openBlock(), createElementBlock("span", {
|
99
|
+
key: 1,
|
100
|
+
class: normalizeClass(["yc-upload-icon", "yc-upload-icon-remove"]),
|
101
|
+
onClick: ($event) => unref(handleDelFile)(item)
|
102
|
+
}, [
|
103
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderDelIcon())))
|
104
|
+
], 8, _hoisted_5)) : createCommentVNode("", true)
|
105
|
+
])
|
106
|
+
])
|
107
|
+
]);
|
108
|
+
}), 128)),
|
109
|
+
unref(limit) <= 0 || unref(computedFileList).length < unref(limit) ? (openBlock(), createElementBlock("span", {
|
110
|
+
key: 0,
|
111
|
+
class: "yc-upload",
|
112
|
+
ref_key: "uploadRef",
|
113
|
+
ref: uploadRef,
|
114
|
+
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
115
|
+
(...args) => unref(handleUpload) && unref(handleUpload)(...args))
|
116
|
+
}, [
|
117
|
+
createElementVNode("div", {
|
118
|
+
class: normalizeClass([
|
119
|
+
"yc-upload-picture-card",
|
120
|
+
{
|
121
|
+
"yc-upload-picture-card-disabled": unref(disabled)
|
122
|
+
}
|
123
|
+
])
|
124
|
+
}, [
|
125
|
+
createElementVNode("div", _hoisted_6, [
|
126
|
+
createVNode(unref(_sfc_main$2))
|
127
|
+
]),
|
128
|
+
unref(tip) ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(unref(tip)), 1)) : createCommentVNode("", true)
|
129
|
+
], 2)
|
130
|
+
], 512)) : createCommentVNode("", true)
|
131
|
+
], 2);
|
132
|
+
};
|
133
|
+
}
|
134
|
+
});
|
5
135
|
export {
|
6
|
-
|
136
|
+
_sfc_main as default
|
7
137
|
};
|