yc-design-vue 2.2.3 → 2.2.5
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/Affix/index.vue.js +0 -4
- package/es/Alert/index.vue.js +2 -6
- package/es/Anchor/Anchor.vue.js +0 -4
- package/es/Anchor/AnchorLink.vue.js +0 -4
- package/es/Anchor/hooks/useContext.js +0 -4
- package/es/AutoComplete/index.vue.js +0 -4
- package/es/Avatar/Avatar.vue.js +1 -5
- package/es/Avatar/AvatarGroup.vue.js +0 -4
- package/es/BackTop/index.vue.js +1 -5
- package/es/Badge/index.vue.js +0 -4
- package/es/Breadcrumb/Breadcrumb.vue.js +0 -4
- package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -5
- package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -5
- package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -5
- package/es/Button/hooks/useContext.js +0 -4
- package/es/Calendar/Calendar.vue.js +32 -51
- package/es/Calendar/CalendarMonth.vue.d.ts +4 -6
- package/es/Calendar/CalendarMonth.vue.js +32 -43
- package/es/Calendar/CalendarYear.vue.d.ts +3 -4
- package/es/Calendar/CalendarYear.vue.js +19 -38
- package/es/Card/Card.vue.js +0 -4
- package/es/Card/CardMeta.vue.js +0 -4
- package/es/Carousel/Carousel.vue.js +0 -4
- package/es/Carousel/CarouselArrow.vue.js +1 -5
- package/es/Carousel/CarouselIndicator.vue.js +0 -4
- package/es/Carousel/hooks/useContext.js +0 -4
- package/es/Cascader/Cascader.vue.js +0 -4
- package/es/Cascader/CascaderIcon.vue.js +2 -6
- package/es/Cascader/CascaderOption.vue.js +1 -5
- package/es/Cascader/hooks/useContext.js +0 -4
- package/es/Checkbox/Checkbox.vue.js +2 -6
- package/es/Checkbox/hooks/useContext.js +0 -4
- package/es/Collapse/CollapseItem.vue.js +2 -6
- package/es/Collapse/hooks/useContext.js +0 -4
- package/es/ColorPicker/ColorControl.vue.js +0 -4
- package/es/ColorPicker/ColorInput.vue.js +0 -4
- package/es/ColorPicker/ColorList.vue.js +0 -4
- package/es/ColorPicker/ColorPalette.vue.js +0 -4
- package/es/ColorPicker/ColorPanel.vue.js +0 -4
- package/es/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/es/ColorPicker/hooks/useContext.js +0 -4
- package/es/ColorPicker/index.d.ts +3 -3
- package/es/Comment/hooks/useContext.js +0 -4
- package/es/Comment/index.vue.js +0 -4
- package/es/ConfigProvider/index.vue.js +0 -4
- package/es/DatePicker/YcDatePicker.vue.d.ts +69 -1
- package/es/DatePicker/YcDatePicker.vue.js +257 -4
- package/es/DatePicker/{YcDatePicker.vue2.js → YcDatePicker.vue3.js} +1 -0
- package/es/DatePicker/YcMonthPicker.vue.d.ts +4 -2
- package/es/DatePicker/YcMonthPicker.vue.js +42 -62
- package/es/DatePicker/YcWeekPicker.vue.d.ts +4 -2
- package/es/DatePicker/YcWeekPicker.vue.js +262 -4
- package/es/DatePicker/YcWeekPicker.vue3.js +5 -0
- package/es/DatePicker/YcYearPicker.vue.d.ts +4 -2
- package/es/DatePicker/YcYearPicker.vue.js +46 -55
- package/es/DatePicker/component/PickerCell.vue.d.ts +2 -2
- package/es/DatePicker/component/PickerCell.vue.js +39 -5
- package/es/DatePicker/component/PickerCell.vue3.js +5 -0
- package/es/DatePicker/component/PickerHeader.vue.d.ts +40 -0
- package/es/DatePicker/component/PickerHeader.vue.js +83 -0
- package/es/DatePicker/component/PickerHeader.vue3.js +5 -0
- package/es/DatePicker/component/PickerInput.vue.js +119 -5
- package/es/DatePicker/component/PickerInput.vue3.js +5 -0
- package/es/DatePicker/component/PickerPanel.vue.d.ts +6 -1
- package/es/DatePicker/component/PickerPanel.vue.js +47 -10
- package/es/DatePicker/component/PickerWeekHeader.vue.d.ts +8 -0
- package/es/DatePicker/component/PickerWeekHeader.vue.js +58 -0
- package/es/DatePicker/component/PickerWeekHeader.vue3.js +5 -0
- package/es/DatePicker/hooks/userPicker.d.ts +7 -15
- package/es/DatePicker/hooks/userPicker.js +45 -53
- package/es/DatePicker/index.css +2 -2
- package/es/DatePicker/index.d.ts +156 -3
- package/es/DatePicker/index.js +5 -3
- package/es/Descriptions/ReuseItem.vue.js +0 -4
- package/es/Descriptions/ReuseTd.vue.js +0 -4
- package/es/Descriptions/hooks/useContext.js +0 -4
- package/es/Divider/index.vue.js +0 -4
- package/es/Drawer/Drawer.vue.js +2 -6
- package/es/Drawer/DrawerService.vue.js +0 -4
- package/es/Dropdown/Dropdown.vue.js +0 -4
- package/es/Dropdown/DropdownButton.vue.js +1 -5
- package/es/Dropdown/Dsubmenu.vue.js +1 -5
- package/es/Dropdown/hooks/useContext.js +0 -4
- package/es/Empty/index.vue.js +1 -5
- package/es/Grid/Grid.vue.js +0 -4
- package/es/Grid/GridCol.vue.js +0 -4
- package/es/Grid/GridItem.vue.js +0 -4
- package/es/Grid/GridRow.vue.js +0 -4
- package/es/Grid/hooks/useContext.js +0 -4
- package/es/Image/Image.vue.js +1 -5
- package/es/Image/ImagePreview.vue.js +1 -5
- package/es/Image/ImagePreviewArrow.vue.js +1 -5
- package/es/Image/ImagePreviewGroup.vue.js +0 -4
- package/es/Image/ImagePreviewToolbar.vue.js +1 -5
- package/es/Image/hooks/useContext.js +0 -4
- package/es/Input/Input.vue.js +2 -6
- package/es/Input/InputPassword.vue.js +2 -6
- package/es/Input/InputSearch.vue.js +2 -6
- package/es/Input/hooks/useLimitedInput.js +0 -4
- package/es/InputNumber/InputNumber.vue.d.ts +1 -1
- package/es/InputNumber/InputNumber.vue.js +0 -4
- package/es/InputNumber/InputOperaBtn.vue.js +1 -5
- package/es/InputNumber/index.d.ts +3 -3
- package/es/InputTag/index.vue.js +2 -6
- package/es/Layout/Layout.vue.js +0 -4
- package/es/Layout/LayoutSider.vue.d.ts +1 -1
- package/es/Layout/LayoutSider.vue.js +1 -5
- package/es/Layout/hooks/useSiderContext.js +0 -4
- package/es/Layout/index.d.ts +3 -3
- package/es/Link/index.vue.js +1 -5
- package/es/List/List.vue.js +0 -4
- package/es/List/ListVirtual.vue.js +0 -4
- package/es/List/hooks/useScrollReach.js +0 -4
- package/es/Mention/index.vue.js +0 -4
- package/es/Menu/Menu.vue.js +1 -5
- package/es/Menu/MenuEllipsis.vue.js +1 -5
- package/es/Menu/MenuItem.vue.js +0 -4
- package/es/Menu/MenuItemGroup.vue.js +0 -4
- package/es/Menu/SubMenu.vue.js +1 -5
- package/es/Menu/hooks/useCalcMaxMenuItems.js +0 -4
- package/es/Menu/hooks/useContext.js +0 -4
- package/es/Message/Message.vue.js +2 -6
- package/es/Message/index.js +0 -4
- package/es/Modal/Modal.vue.js +2 -6
- package/es/Modal/ModalService.vue.js +0 -4
- package/es/Modal/hooks/useModalClose.js +0 -4
- package/es/Modal/hooks/useModalDraggable.js +0 -4
- package/es/Modal/hooks/useOnBeforeClose.js +0 -4
- package/es/Notification/Notification.vue.js +2 -6
- package/es/Notification/index.js +0 -4
- package/es/OverflowList/index.vue.js +0 -4
- package/es/PageHeader/index.vue.js +2 -6
- package/es/Pagination/Pagination.vue.js +0 -4
- package/es/Pagination/PaginationItem.vue.js +1 -5
- package/es/Pagination/hooks/useContext.js +0 -4
- package/es/Popconfirm/index.vue.js +0 -4
- package/es/Popover/index.vue.js +0 -4
- package/es/Progress/Progress.vue.js +0 -4
- package/es/Progress/ProgressCircle.vue.js +1 -5
- package/es/Progress/ProgressLine.vue.js +0 -4
- package/es/Progress/ProgressSteps.vue.js +0 -4
- package/es/Radio/Radio.vue.js +2 -6
- package/es/Radio/hooks/useContext.js +0 -4
- package/es/Rate/index.vue.js +1 -5
- package/es/ResizeBox/index.vue.js +1 -5
- package/es/Scrollbar/Scrollbar.vue.js +0 -4
- package/es/Scrollbar/ScrollbarTrack.vue.js +0 -4
- package/es/Select/Option.vue.js +0 -4
- package/es/Select/Select.vue.js +0 -4
- package/es/Select/SelectIcon.vue.js +2 -6
- package/es/Select/SelectRealList.vue.js +0 -4
- package/es/Select/SelectView.vue.js +0 -4
- package/es/Select/SelectVirtualList.vue.js +0 -4
- package/es/Select/hooks/useContext.js +0 -4
- package/es/Select/hooks/useSelectHotkeys.js +0 -4
- package/es/Select/hooks/useSelectOptions.js +0 -4
- package/es/Skeleton/SkeletonLine.vue.js +0 -4
- package/es/Skeleton/SkeletonShape.vue.js +0 -4
- package/es/Slider/Slider.vue.d.ts +1 -1
- package/es/Slider/SliderBtn.vue.js +0 -4
- package/es/Slider/hooks/useContext.js +0 -4
- package/es/Slider/hooks/useSliderDraggable.js +0 -4
- package/es/Slider/index.d.ts +3 -3
- package/es/Space/index.vue.js +0 -4
- package/es/Spin/index.vue.js +1 -5
- package/es/Split/index.vue.js +1 -5
- package/es/Statistic/Countdown.vue.d.ts +1 -1
- package/es/Statistic/Countdown.vue.js +0 -4
- package/es/Statistic/Statistic.vue.d.ts +1 -1
- package/es/Statistic/Statistic.vue.js +0 -4
- package/es/Statistic/index.d.ts +6 -6
- package/es/Steps/Step.vue.js +1 -5
- package/es/Steps/hooks/useContext.js +0 -4
- package/es/Switch/index.vue.js +0 -4
- package/es/Tabs/TabButton.vue.js +2 -6
- package/es/Tabs/TabPane.vue.js +0 -4
- package/es/Tabs/Tabs.vue.js +1 -5
- package/es/Tabs/TabsNavInk.vue.js +0 -4
- package/es/Tabs/TabsTab.vue.js +0 -4
- package/es/Tabs/hooks/useContext.js +0 -4
- package/es/Tabs/hooks/useTabsScroll.js +0 -4
- package/es/Tag/index.vue.js +2 -6
- package/es/Textarea/hooks/useTextareaHeight.js +0 -4
- package/es/Textarea/index.vue.js +2 -6
- package/es/TimePicker/TimePicker.vue.js +2 -6
- package/es/TimePicker/TimePickerPanel.vue.js +0 -4
- package/es/TimePicker/hooks/useContext.js +0 -4
- package/es/Timeline/TimelineItemPending.vue.js +0 -4
- package/es/Timeline/hooks/useContext.js +0 -4
- package/es/Tooltip/index.vue.js +0 -4
- package/es/Transfer/Transfer.vue.js +1 -5
- package/es/Transfer/TransferPanel.vue.js +2 -6
- package/es/Transfer/hooks/useContext.js +0 -4
- package/es/Trigger/hooks/useContext.js +0 -4
- package/es/Trigger/hooks/useTriggerPosition.js +0 -4
- package/es/Trigger/hooks/useTriggerVisible.js +0 -4
- package/es/Trigger/index.vue.js +1 -5
- package/es/Typography/TypographyBase.vue.js +1 -5
- package/es/Upload/UploadButton.vue.js +1 -5
- package/es/Upload/UploadDrag.vue.js +1 -5
- package/es/Upload/UploadFileList.vue.js +2 -6
- package/es/Upload/UploadPictureCard.vue.js +1 -5
- package/es/Upload/hooks/useContext.js +0 -4
- package/es/Upload/hooks/useUpload.js +0 -4
- package/es/VerificationCode/index.vue.js +0 -4
- package/es/Watermark/index.vue.js +0 -4
- package/es/_shared/components/ExpandTransition/index.vue2.js +0 -4
- package/es/_shared/components/Icon/index.vue3.js +0 -4
- package/es/_shared/components/IconButton/{index.vue.js → index.vue2.js} +1 -5
- package/es/_shared/components/IconButton/index.vue3.js +2 -2
- package/es/_shared/constants/index.js +1 -5
- package/es/_shared/icons/IconArrowDown.vue.js +1 -5
- package/es/_shared/icons/IconArrowRight.vue.js +1 -5
- package/es/_shared/icons/IconCalendar.vue2.js +1 -5
- package/es/_shared/icons/IconCheck.vue.js +1 -5
- package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -5
- package/es/_shared/icons/IconClose.vue.js +1 -5
- package/es/_shared/icons/IconCopy.vue2.js +1 -5
- package/es/_shared/icons/IconDelete.vue2.js +1 -5
- package/es/_shared/icons/IconDoubleLeft.vue.js +1 -28
- package/es/_shared/icons/IconDoubleLeft.vue2.js +24 -1
- package/es/_shared/icons/IconDoubleRight.vue.js +1 -28
- package/es/_shared/icons/IconDoubleRight.vue2.js +24 -1
- package/es/_shared/icons/IconDragDot.vue.js +1 -5
- package/es/_shared/icons/IconEdit.vue2.js +1 -5
- package/es/_shared/icons/IconEmpty.vue.js +1 -5
- package/es/_shared/icons/IconError.vue.js +1 -5
- package/es/_shared/icons/IconExclamation.vue2.js +1 -5
- package/es/_shared/icons/IconEyeClose.vue.js +1 -5
- package/es/_shared/icons/IconEyeOpen.vue.js +1 -5
- package/es/_shared/icons/IconFaceSmile.vue.js +1 -5
- package/es/_shared/icons/IconFile.vue2.js +1 -5
- package/es/_shared/icons/IconFullScreen.vue2.js +1 -5
- package/es/_shared/icons/IconImageClose.vue.js +1 -5
- package/es/_shared/icons/IconInfo.vue.js +1 -5
- package/es/_shared/icons/IconInfoLine.vue.js +1 -5
- package/es/_shared/icons/IconLink.vue.js +1 -5
- package/es/_shared/icons/IconLoading.vue.js +1 -5
- package/es/_shared/icons/IconMenuFold.vue.js +1 -5
- package/es/_shared/icons/IconMenuUnfold.vue.js +1 -5
- package/es/_shared/icons/IconMinus.vue2.js +1 -5
- package/es/_shared/icons/IconMore.vue.js +1 -5
- package/es/_shared/icons/IconOriginSize.vue2.js +1 -5
- package/es/_shared/icons/IconPlus.vue.js +1 -5
- package/es/_shared/icons/IconRight.vue.js +1 -5
- package/es/_shared/icons/IconRotateLeft.vue2.js +1 -5
- package/es/_shared/icons/IconRotateRight.vue2.js +1 -5
- package/es/_shared/icons/IconSearch.vue.js +1 -5
- package/es/_shared/icons/IconSeparator.vue2.js +1 -5
- package/es/_shared/icons/IconStar.vue.js +1 -5
- package/es/_shared/icons/IconSuccess.vue.js +1 -5
- package/es/_shared/icons/IconTime.vue.js +1 -5
- package/es/_shared/icons/IconToTop.vue.js +1 -5
- package/es/_shared/icons/IconUpload.vue2.js +1 -5
- package/es/_shared/icons/IconWarning.vue.js +1 -5
- package/es/_shared/icons/IconZoomIn.vue2.js +1 -5
- package/es/_shared/icons/IconZoomOut.vue2.js +1 -5
- package/es/_shared/utils/color.js +0 -4
- package/es/_shared/utils/dependencies.d.ts +0 -4
- package/es/_shared/utils/dom.js +0 -4
- package/es/_shared/utils/locale.d.ts +0 -5
- package/es/_shared/utils/time.d.ts +20 -8
- package/es/_shared/utils/time.js +64 -16
- package/es/index.d.ts +30 -18
- package/es/style.css +1 -1
- package/lib/Affix/index.vue.js +1 -1
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Anchor/Anchor.vue.js +1 -1
- package/lib/Anchor/AnchorLink.vue.js +1 -1
- package/lib/Anchor/hooks/useContext.js +1 -1
- package/lib/AutoComplete/index.vue.js +1 -1
- package/lib/Avatar/Avatar.vue.js +1 -1
- package/lib/Avatar/AvatarGroup.vue.js +1 -1
- package/lib/BackTop/index.vue.js +1 -1
- package/lib/Badge/index.vue.js +1 -1
- package/lib/Breadcrumb/Breadcrumb.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/Button/hooks/useContext.js +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Calendar/CalendarMonth.vue.d.ts +4 -6
- package/lib/Calendar/CalendarMonth.vue.js +1 -1
- package/lib/Calendar/CalendarYear.vue.d.ts +3 -4
- package/lib/Calendar/CalendarYear.vue.js +1 -1
- package/lib/Card/Card.vue.js +1 -1
- package/lib/Card/CardMeta.vue.js +1 -1
- package/lib/Carousel/Carousel.vue.js +1 -1
- package/lib/Carousel/CarouselArrow.vue.js +1 -1
- package/lib/Carousel/CarouselIndicator.vue.js +1 -1
- package/lib/Carousel/hooks/useContext.js +1 -1
- package/lib/Cascader/Cascader.vue.js +1 -1
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Cascader/CascaderOption.vue.js +1 -1
- package/lib/Cascader/hooks/useContext.js +1 -1
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Checkbox/hooks/useContext.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/Collapse/hooks/useContext.js +1 -1
- package/lib/ColorPicker/ColorControl.vue.js +1 -1
- package/lib/ColorPicker/ColorInput.vue.js +1 -1
- package/lib/ColorPicker/ColorList.vue.js +1 -1
- package/lib/ColorPicker/ColorPalette.vue.js +1 -1
- package/lib/ColorPicker/ColorPanel.vue.js +1 -1
- package/lib/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/lib/ColorPicker/hooks/useContext.js +1 -1
- package/lib/ColorPicker/index.d.ts +3 -3
- package/lib/Comment/hooks/useContext.js +1 -1
- package/lib/Comment/index.vue.js +1 -1
- package/lib/ConfigProvider/index.vue.js +1 -1
- package/lib/DatePicker/YcDatePicker.vue.d.ts +69 -1
- package/lib/DatePicker/YcDatePicker.vue.js +1 -1
- package/lib/DatePicker/{YcDatePicker.vue2.js → YcDatePicker.vue3.js} +1 -1
- package/lib/DatePicker/YcMonthPicker.vue.d.ts +4 -2
- package/lib/DatePicker/YcMonthPicker.vue.js +1 -1
- package/lib/DatePicker/YcWeekPicker.vue.d.ts +4 -2
- package/lib/DatePicker/YcWeekPicker.vue.js +1 -1
- package/lib/DatePicker/YcWeekPicker.vue3.js +1 -0
- package/lib/DatePicker/YcYearPicker.vue.d.ts +4 -2
- package/lib/DatePicker/YcYearPicker.vue.js +1 -1
- package/lib/DatePicker/component/PickerCell.vue.d.ts +2 -2
- package/lib/DatePicker/component/PickerCell.vue.js +1 -1
- package/lib/DatePicker/component/PickerCell.vue3.js +1 -0
- package/lib/DatePicker/component/PickerHeader.vue.d.ts +40 -0
- package/lib/DatePicker/component/PickerHeader.vue.js +1 -0
- package/lib/DatePicker/component/PickerHeader.vue3.js +1 -0
- package/lib/DatePicker/component/PickerInput.vue.js +1 -1
- package/lib/DatePicker/component/PickerInput.vue3.js +1 -0
- package/lib/DatePicker/component/PickerPanel.vue.d.ts +6 -1
- package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
- package/lib/DatePicker/component/PickerWeekHeader.vue.d.ts +8 -0
- package/lib/DatePicker/component/PickerWeekHeader.vue.js +1 -0
- package/lib/DatePicker/component/PickerWeekHeader.vue3.js +1 -0
- package/lib/DatePicker/hooks/userPicker.d.ts +7 -15
- package/lib/DatePicker/hooks/userPicker.js +1 -1
- package/lib/DatePicker/index.css +2 -2
- package/lib/DatePicker/index.d.ts +156 -3
- package/lib/DatePicker/index.js +1 -1
- package/lib/Descriptions/ReuseItem.vue.js +1 -1
- package/lib/Descriptions/ReuseTd.vue.js +1 -1
- package/lib/Descriptions/hooks/useContext.js +1 -1
- package/lib/Divider/index.vue.js +1 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Drawer/DrawerService.vue.js +1 -1
- package/lib/Dropdown/Dropdown.vue.js +1 -1
- package/lib/Dropdown/DropdownButton.vue.js +1 -1
- package/lib/Dropdown/Dsubmenu.vue.js +1 -1
- package/lib/Dropdown/hooks/useContext.js +1 -1
- package/lib/Empty/index.vue.js +1 -1
- package/lib/Grid/Grid.vue.js +1 -1
- package/lib/Grid/GridCol.vue.js +1 -1
- package/lib/Grid/GridItem.vue.js +1 -1
- package/lib/Grid/GridRow.vue.js +1 -1
- 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/ImagePreviewGroup.vue.js +1 -1
- package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
- package/lib/Image/hooks/useContext.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/Input/hooks/useLimitedInput.js +1 -1
- package/lib/InputNumber/InputNumber.vue.d.ts +1 -1
- package/lib/InputNumber/InputNumber.vue.js +1 -1
- package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
- package/lib/InputNumber/index.d.ts +3 -3
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/Layout/Layout.vue.js +1 -1
- package/lib/Layout/LayoutSider.vue.d.ts +1 -1
- package/lib/Layout/LayoutSider.vue.js +1 -1
- package/lib/Layout/hooks/useSiderContext.js +1 -1
- package/lib/Layout/index.d.ts +3 -3
- package/lib/Link/index.vue.js +1 -1
- package/lib/List/List.vue.js +1 -1
- package/lib/List/ListVirtual.vue.js +1 -1
- package/lib/List/hooks/useScrollReach.js +1 -1
- package/lib/Mention/index.vue.js +1 -1
- package/lib/Menu/Menu.vue.js +1 -1
- package/lib/Menu/MenuEllipsis.vue.js +1 -1
- package/lib/Menu/MenuItem.vue.js +1 -1
- package/lib/Menu/MenuItemGroup.vue.js +1 -1
- package/lib/Menu/SubMenu.vue.js +1 -1
- package/lib/Menu/hooks/useCalcMaxMenuItems.js +1 -1
- package/lib/Menu/hooks/useContext.js +1 -1
- package/lib/Message/Message.vue.js +1 -1
- package/lib/Message/index.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Modal/ModalService.vue.js +1 -1
- package/lib/Modal/hooks/useModalClose.js +1 -1
- package/lib/Modal/hooks/useModalDraggable.js +1 -1
- package/lib/Modal/hooks/useOnBeforeClose.js +1 -1
- package/lib/Notification/Notification.vue.js +1 -1
- package/lib/Notification/index.js +1 -1
- package/lib/OverflowList/index.vue.js +1 -1
- package/lib/PageHeader/index.vue.js +1 -1
- package/lib/Pagination/Pagination.vue.js +1 -1
- package/lib/Pagination/PaginationItem.vue.js +1 -1
- package/lib/Pagination/hooks/useContext.js +1 -1
- package/lib/Popconfirm/index.vue.js +1 -1
- package/lib/Popover/index.vue.js +1 -1
- package/lib/Progress/Progress.vue.js +1 -1
- package/lib/Progress/ProgressCircle.vue.js +1 -1
- package/lib/Progress/ProgressLine.vue.js +1 -1
- package/lib/Progress/ProgressSteps.vue.js +1 -1
- package/lib/Radio/Radio.vue.js +1 -1
- package/lib/Radio/hooks/useContext.js +1 -1
- package/lib/Rate/index.vue.js +1 -1
- package/lib/ResizeBox/index.vue.js +1 -1
- package/lib/Scrollbar/Scrollbar.vue.js +1 -1
- package/lib/Scrollbar/ScrollbarTrack.vue.js +1 -1
- package/lib/Select/Option.vue.js +1 -1
- package/lib/Select/Select.vue.js +1 -1
- package/lib/Select/SelectIcon.vue.js +1 -1
- package/lib/Select/SelectRealList.vue.js +1 -1
- package/lib/Select/SelectView.vue.js +1 -1
- package/lib/Select/SelectVirtualList.vue.js +1 -1
- package/lib/Select/hooks/useContext.js +1 -1
- package/lib/Select/hooks/useSelectHotkeys.js +1 -1
- package/lib/Select/hooks/useSelectOptions.js +1 -1
- package/lib/Skeleton/SkeletonLine.vue.js +1 -1
- package/lib/Skeleton/SkeletonShape.vue.js +1 -1
- package/lib/Slider/Slider.vue.d.ts +1 -1
- package/lib/Slider/SliderBtn.vue.js +1 -1
- package/lib/Slider/hooks/useContext.js +1 -1
- package/lib/Slider/hooks/useSliderDraggable.js +1 -1
- package/lib/Slider/index.d.ts +3 -3
- package/lib/Space/index.vue.js +1 -1
- package/lib/Spin/index.vue.js +1 -1
- package/lib/Split/index.vue.js +1 -1
- package/lib/Statistic/Countdown.vue.d.ts +1 -1
- package/lib/Statistic/Countdown.vue.js +1 -1
- package/lib/Statistic/Statistic.vue.d.ts +1 -1
- package/lib/Statistic/Statistic.vue.js +1 -1
- package/lib/Statistic/index.d.ts +6 -6
- package/lib/Steps/Step.vue.js +1 -1
- package/lib/Steps/hooks/useContext.js +1 -1
- package/lib/Switch/index.vue.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tabs/TabPane.vue.js +1 -1
- package/lib/Tabs/Tabs.vue.js +1 -1
- package/lib/Tabs/TabsNavInk.vue.js +1 -1
- package/lib/Tabs/TabsTab.vue.js +1 -1
- package/lib/Tabs/hooks/useContext.js +1 -1
- package/lib/Tabs/hooks/useTabsScroll.js +1 -1
- package/lib/Tag/index.vue.js +1 -1
- package/lib/Textarea/hooks/useTextareaHeight.js +1 -1
- package/lib/Textarea/index.vue.js +1 -1
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
- package/lib/TimePicker/hooks/useContext.js +1 -1
- package/lib/Timeline/TimelineItemPending.vue.js +1 -1
- package/lib/Timeline/hooks/useContext.js +1 -1
- package/lib/Tooltip/index.vue.js +1 -1
- package/lib/Transfer/Transfer.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Transfer/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
- package/lib/Trigger/hooks/useTriggerVisible.js +1 -1
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Typography/TypographyBase.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/UploadPictureCard.vue.js +1 -1
- package/lib/Upload/hooks/useContext.js +1 -1
- package/lib/Upload/hooks/useUpload.js +1 -1
- package/lib/VerificationCode/index.vue.js +1 -1
- package/lib/Watermark/index.vue.js +1 -1
- package/lib/_shared/components/ExpandTransition/index.vue2.js +1 -1
- package/lib/_shared/components/Icon/index.vue3.js +1 -1
- package/lib/_shared/components/IconButton/index.vue2.js +1 -0
- 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.vue2.js +1 -1
- 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.js +1 -1
- package/lib/_shared/icons/IconDoubleLeft.vue2.js +1 -1
- package/lib/_shared/icons/IconDoubleRight.vue.js +1 -1
- package/lib/_shared/icons/IconDoubleRight.vue2.js +1 -1
- 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.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/utils/color.js +1 -1
- package/lib/_shared/utils/dependencies.d.ts +0 -4
- package/lib/_shared/utils/dom.js +1 -1
- package/lib/_shared/utils/locale.d.ts +0 -5
- package/lib/_shared/utils/time.d.ts +20 -8
- package/lib/_shared/utils/time.js +1 -1
- package/lib/index.d.ts +30 -18
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/DatePicker/YcWeekPicker.vue2.js +0 -319
- package/es/DatePicker/component/PickerCell.vue2.js +0 -41
- package/es/DatePicker/component/PickerInput.vue2.js +0 -125
- package/es/_virtual/_plugin-vue_export-helper.js +0 -10
- package/lib/DatePicker/YcWeekPicker.vue2.js +0 -1
- package/lib/DatePicker/component/PickerCell.vue2.js +0 -1
- package/lib/DatePicker/component/PickerInput.vue2.js +0 -1
- package/lib/_shared/components/IconButton/index.vue.js +0 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
@@ -1,12 +1,265 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock } from "vue";
|
1
|
+
import { defineComponent, useSlots, ref, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, renderSlot, renderList, normalizeStyle, normalizeClass } from "vue";
|
2
|
+
import usePicker from "./hooks/userPicker.js";
|
3
|
+
import "../node_modules/b-tween/dist/b-tween.es.js";
|
4
|
+
import dayjs from "../node_modules/dayjs/dayjs.min.js";
|
5
|
+
import "../node_modules/tinycolor2/esm/tinycolor.js";
|
6
|
+
import "../_shared/utils/dom.js";
|
7
|
+
import "../_shared/utils/locale.js";
|
8
|
+
import "../_shared/utils/time.js";
|
9
|
+
import _sfc_main$6 from "./component/PickerCell.vue.js";
|
10
|
+
/* empty css */
|
11
|
+
import _sfc_main$4 from "./component/PickerHeader.vue.js";
|
12
|
+
/* empty css */
|
13
|
+
import _sfc_main$5 from "./component/PickerWeekHeader.vue.js";
|
14
|
+
/* empty css */
|
15
|
+
import _sfc_main$3 from "./component/PickerPanel.vue.js";
|
16
|
+
/* empty css */
|
17
|
+
import _sfc_main$7 from "./component/PickerInput.vue.js";
|
18
|
+
/* empty css */
|
19
|
+
import _sfc_main$1 from "./YcYearPicker.vue.js";
|
20
|
+
/* empty css */
|
21
|
+
import _sfc_main$2 from "./YcMonthPicker.vue.js";
|
22
|
+
/* empty css */
|
23
|
+
const _hoisted_1 = { class: "yc-panel-date" };
|
24
|
+
const _hoisted_2 = { class: "yc-picker-body" };
|
2
25
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
3
26
|
...{
|
4
|
-
name: "DatePicker"
|
27
|
+
name: "DatePicker",
|
28
|
+
inheritAttrs: false
|
5
29
|
},
|
6
30
|
__name: "YcDatePicker",
|
7
|
-
|
31
|
+
props: {
|
32
|
+
modelValue: { default: void 0 },
|
33
|
+
defaultValue: { default: "" },
|
34
|
+
dayStartOfWeek: { default: 0 },
|
35
|
+
showTime: { type: Boolean, default: false },
|
36
|
+
timePickerProps: { default: () => ({}) },
|
37
|
+
showNowBtn: { type: Boolean, default: false },
|
38
|
+
locale: { default: () => ({}) },
|
39
|
+
hideTrigger: { type: Boolean, default: false },
|
40
|
+
allowClear: { type: Boolean, default: false },
|
41
|
+
readonly: { type: Boolean, default: false },
|
42
|
+
error: { type: Boolean, default: false },
|
43
|
+
size: { default: void 0 },
|
44
|
+
shortcuts: { default: () => [] },
|
45
|
+
shortcutsPosition: { default: "bottom" },
|
46
|
+
position: { default: "bl" },
|
47
|
+
popupVisible: { type: Boolean, default: void 0 },
|
48
|
+
defaultPopupVisible: { type: Boolean, default: false },
|
49
|
+
triggerProps: { default: () => ({}) },
|
50
|
+
unmountOnClose: { type: Boolean, default: false },
|
51
|
+
placeholder: { default: "" },
|
52
|
+
disabled: { type: Boolean, default: false },
|
53
|
+
disabledDate: { type: Function, default: void 0 },
|
54
|
+
disabledTime: {},
|
55
|
+
pickerValue: { default: void 0 },
|
56
|
+
defaultPickerValue: { default: "" },
|
57
|
+
popupContainer: { default: void 0 },
|
58
|
+
valueFormat: { default: "YYYY-MM-DD" },
|
59
|
+
format: { default: "YYYY-MM-DD" },
|
60
|
+
previewShortcut: { type: Boolean, default: true },
|
61
|
+
showConfirmBtn: { type: Boolean, default: false },
|
62
|
+
disabledInput: { type: Boolean, default: false },
|
63
|
+
abbreviation: { type: Boolean, default: true }
|
64
|
+
},
|
65
|
+
emits: ["update:modelValue", "update:popupVisible", "update:pickerValue", "change", "select", "ok", "picker-value-change", "popup-visible-change", "clear", "select-shortcut"],
|
66
|
+
setup(__props, { emit: __emit }) {
|
67
|
+
const $slots = useSlots();
|
68
|
+
const props = __props;
|
69
|
+
const emits = __emit;
|
70
|
+
const {
|
71
|
+
computedValue,
|
72
|
+
locale,
|
73
|
+
abbreviation,
|
74
|
+
dayStartOfWeek,
|
75
|
+
curMonth,
|
76
|
+
curYear,
|
77
|
+
showMonthPicker,
|
78
|
+
showYearPicker,
|
79
|
+
DefinePanel,
|
80
|
+
ReusePanel,
|
81
|
+
getDateFromFormat,
|
82
|
+
isCellInView,
|
83
|
+
isToday,
|
84
|
+
isSelected,
|
85
|
+
getDaysOfMonth,
|
86
|
+
handleConfirm,
|
87
|
+
handleSelect,
|
88
|
+
handleShortcut,
|
89
|
+
handleNowClick
|
90
|
+
} = usePicker({
|
91
|
+
props,
|
92
|
+
emits
|
93
|
+
});
|
94
|
+
const dayData = ref([]);
|
95
|
+
const handleDateChange = (dateType, type) => {
|
96
|
+
if (dateType == "year") {
|
97
|
+
curYear.value = type == "pre" ? curYear.value - 1 : curYear.value + 1;
|
98
|
+
dayData.value = getDaysOfMonth(
|
99
|
+
curYear.value,
|
100
|
+
curMonth.value,
|
101
|
+
dayStartOfWeek.value
|
102
|
+
);
|
103
|
+
} else {
|
104
|
+
const base = dayjs().set("year", curYear.value).set("month", curMonth.value);
|
105
|
+
const date = type == "pre" ? base.subtract(1, "month") : base.add(1, "month");
|
106
|
+
curYear.value = date.year();
|
107
|
+
curMonth.value = date.month();
|
108
|
+
dayData.value = getDaysOfMonth(
|
109
|
+
curYear.value,
|
110
|
+
curMonth.value,
|
111
|
+
dayStartOfWeek.value
|
112
|
+
);
|
113
|
+
}
|
114
|
+
};
|
115
|
+
watch(
|
116
|
+
() => computedValue.value,
|
117
|
+
(val) => {
|
118
|
+
const date = val ? getDateFromFormat(val) : /* @__PURE__ */ new Date();
|
119
|
+
curYear.value = date.getFullYear();
|
120
|
+
curMonth.value = date.getMonth();
|
121
|
+
dayData.value = getDaysOfMonth(
|
122
|
+
curYear.value,
|
123
|
+
curMonth.value,
|
124
|
+
dayStartOfWeek.value
|
125
|
+
);
|
126
|
+
},
|
127
|
+
{
|
128
|
+
immediate: true
|
129
|
+
}
|
130
|
+
);
|
8
131
|
return (_ctx, _cache) => {
|
9
|
-
return openBlock(), createElementBlock(
|
132
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
133
|
+
createVNode(unref(DefinePanel), null, {
|
134
|
+
default: withCtx(() => [
|
135
|
+
unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$1, {
|
136
|
+
key: 0,
|
137
|
+
"model-value": `${unref(curYear)}`,
|
138
|
+
"hide-trigger": "",
|
139
|
+
"value-format": "YYYY",
|
140
|
+
onChange: _cache[0] || (_cache[0] = (_, date) => {
|
141
|
+
curYear.value = date.getFullYear();
|
142
|
+
dayData.value = unref(getDaysOfMonth)(unref(curYear), unref(curMonth), unref(dayStartOfWeek));
|
143
|
+
showYearPicker.value = false;
|
144
|
+
})
|
145
|
+
}, null, 8, ["model-value"])) : unref(showMonthPicker) ? (openBlock(), createBlock(_sfc_main$2, {
|
146
|
+
key: 1,
|
147
|
+
"model-value": `${unref(curYear)}-${unref(curMonth) + 1 < 10 ? `0${unref(curMonth) + 1}` : unref(curMonth) + 1}`,
|
148
|
+
"hide-trigger": "",
|
149
|
+
"value-format": "YYYY-MM",
|
150
|
+
onChange: _cache[1] || (_cache[1] = (_, date) => {
|
151
|
+
curMonth.value = date.getMonth();
|
152
|
+
dayData.value = unref(getDaysOfMonth)(unref(curYear), unref(curMonth), unref(dayStartOfWeek));
|
153
|
+
showMonthPicker.value = false;
|
154
|
+
})
|
155
|
+
}, null, 8, ["model-value"])) : (openBlock(), createBlock(_sfc_main$3, {
|
156
|
+
key: 2,
|
157
|
+
locale: unref(locale),
|
158
|
+
"preview-shortcut": _ctx.previewShortcut,
|
159
|
+
shortcuts: _ctx.shortcuts,
|
160
|
+
"shortcuts-position": _ctx.shortcutsPosition,
|
161
|
+
"confirm-btn-disabled": !unref(computedValue),
|
162
|
+
"show-confirm-btn": _ctx.showConfirmBtn,
|
163
|
+
"show-now": "",
|
164
|
+
onConfirm: unref(handleConfirm),
|
165
|
+
onShortcutSelect: unref(handleShortcut),
|
166
|
+
onNowClick: unref(handleNowClick)
|
167
|
+
}, createSlots({
|
168
|
+
default: withCtx(() => [
|
169
|
+
createElementVNode("div", _hoisted_1, [
|
170
|
+
createVNode(_sfc_main$4, {
|
171
|
+
type: "date",
|
172
|
+
year: unref(curYear),
|
173
|
+
month: unref(curMonth),
|
174
|
+
onPrevClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("month", "pre")),
|
175
|
+
onNextClick: _cache[3] || (_cache[3] = ($event) => handleDateChange("month", "next")),
|
176
|
+
onPrevDoubleClick: _cache[4] || (_cache[4] = ($event) => handleDateChange("year", "pre")),
|
177
|
+
onNextDoubleClick: _cache[5] || (_cache[5] = ($event) => handleDateChange("year", "next")),
|
178
|
+
onYearClick: _cache[6] || (_cache[6] = ($event) => showYearPicker.value = true),
|
179
|
+
onMonthClick: _cache[7] || (_cache[7] = ($event) => showMonthPicker.value = true)
|
180
|
+
}, createSlots({ _: 2 }, [
|
181
|
+
$slots["icon-prev"] ? {
|
182
|
+
name: "icon-prev-double",
|
183
|
+
fn: withCtx(() => [
|
184
|
+
renderSlot(_ctx.$slots, "icon-next")
|
185
|
+
]),
|
186
|
+
key: "0"
|
187
|
+
} : void 0,
|
188
|
+
$slots["icon-next"] ? {
|
189
|
+
name: "icon-next-double",
|
190
|
+
fn: withCtx(() => [
|
191
|
+
renderSlot(_ctx.$slots, "icon-next")
|
192
|
+
]),
|
193
|
+
key: "1"
|
194
|
+
} : void 0,
|
195
|
+
$slots["icon-prev-double"] ? {
|
196
|
+
name: "icon-prev-double",
|
197
|
+
fn: withCtx(() => [
|
198
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
199
|
+
]),
|
200
|
+
key: "2"
|
201
|
+
} : void 0,
|
202
|
+
$slots["icon-next-double"] ? {
|
203
|
+
name: "icon-next-double",
|
204
|
+
fn: withCtx(() => [
|
205
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
206
|
+
]),
|
207
|
+
key: "3"
|
208
|
+
} : void 0
|
209
|
+
]), 1032, ["year", "month"]),
|
210
|
+
createVNode(_sfc_main$5, {
|
211
|
+
locale: unref(locale),
|
212
|
+
abbreviation: unref(abbreviation),
|
213
|
+
"day-start-of-week": unref(dayStartOfWeek)
|
214
|
+
}, null, 8, ["locale", "abbreviation", "day-start-of-week"]),
|
215
|
+
createElementVNode("div", _hoisted_2, [
|
216
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dayData.value, (row, i) => {
|
217
|
+
return openBlock(), createElementBlock("div", {
|
218
|
+
key: i,
|
219
|
+
class: "yc-picker-row"
|
220
|
+
}, [
|
221
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ label, value: date }, k) => {
|
222
|
+
var _a;
|
223
|
+
return openBlock(), createBlock(_sfc_main$6, {
|
224
|
+
key: k,
|
225
|
+
value: label,
|
226
|
+
"cell-in-view": unref(isCellInView)(date, "date"),
|
227
|
+
"is-today": unref(isToday)(date, "date"),
|
228
|
+
"is-selected": unref(isSelected)(date, "date"),
|
229
|
+
disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
|
230
|
+
onClick: ($event) => unref(handleSelect)(date)
|
231
|
+
}, null, 8, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
|
232
|
+
}), 128))
|
233
|
+
]);
|
234
|
+
}), 128))
|
235
|
+
])
|
236
|
+
])
|
237
|
+
]),
|
238
|
+
_: 2
|
239
|
+
}, [
|
240
|
+
$slots.extra ? {
|
241
|
+
name: "extra",
|
242
|
+
fn: withCtx(() => [
|
243
|
+
renderSlot(_ctx.$slots, "extra")
|
244
|
+
]),
|
245
|
+
key: "0"
|
246
|
+
} : void 0
|
247
|
+
]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "onConfirm", "onShortcutSelect", "onNowClick"]))
|
248
|
+
]),
|
249
|
+
_: 3
|
250
|
+
}),
|
251
|
+
!_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$7, {
|
252
|
+
key: 0,
|
253
|
+
class: normalizeClass(_ctx.$attrs.class),
|
254
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
255
|
+
type: _ctx.showTime ? "time" : "date"
|
256
|
+
}, {
|
257
|
+
content: withCtx(() => [
|
258
|
+
createVNode(unref(ReusePanel))
|
259
|
+
]),
|
260
|
+
_: 1
|
261
|
+
}, 8, ["class", "style", "type"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
|
262
|
+
], 64);
|
10
263
|
};
|
11
264
|
}
|
12
265
|
});
|
@@ -44,16 +44,18 @@ declare const __VLS_component: import('vue').DefineComponent<MonthPickerProps, {
|
|
44
44
|
allowClear: boolean;
|
45
45
|
readonly: boolean;
|
46
46
|
triggerProps: import('..').TriggerProps;
|
47
|
-
hideTrigger: boolean;
|
48
47
|
format: string;
|
48
|
+
pickerValue: import('./type').DatePickerValue;
|
49
|
+
defaultPickerValue: import('./type').DatePickerValue;
|
49
50
|
valueFormat: import('./type').ValueFormat;
|
50
51
|
showConfirmBtn: boolean;
|
51
52
|
abbreviation: boolean;
|
53
|
+
disabledDate: import('./type').DisabledDate;
|
52
54
|
shortcutsPosition: import('./type').ShortcutsPosition;
|
53
55
|
shortcuts: import('./type').ShortcutType[];
|
54
56
|
previewShortcut: boolean;
|
55
57
|
disabledInput: boolean;
|
56
|
-
|
58
|
+
hideTrigger: boolean;
|
57
59
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
58
60
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
59
61
|
export default _default;
|
@@ -1,30 +1,17 @@
|
|
1
|
-
import { defineComponent, useSlots, computed, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, renderSlot,
|
1
|
+
import { defineComponent, useSlots, computed, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, renderSlot, renderList, normalizeStyle, normalizeClass } from "vue";
|
2
2
|
import usePicker from "./hooks/userPicker.js";
|
3
|
-
import "
|
4
|
-
|
5
|
-
import "
|
6
|
-
|
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/IconDoubleLeft.vue.js";
|
17
|
-
import _sfc_main$4 from "../_shared/icons/IconDoubleRight.vue.js";
|
18
|
-
import PickerCell from "./component/PickerCell.vue.js";
|
3
|
+
import _sfc_main$3 from "./component/PickerHeader.vue.js";
|
4
|
+
/* empty css */
|
5
|
+
import _sfc_main$4 from "./component/PickerCell.vue.js";
|
6
|
+
/* empty css */
|
19
7
|
import _sfc_main$2 from "./component/PickerPanel.vue.js";
|
20
8
|
/* empty css */
|
21
|
-
import
|
9
|
+
import _sfc_main$5 from "./component/PickerInput.vue.js";
|
10
|
+
/* empty css */
|
22
11
|
import _sfc_main$1 from "./YcYearPicker.vue.js";
|
23
12
|
/* empty css */
|
24
13
|
const _hoisted_1 = { class: "yc-panel-month" };
|
25
|
-
const _hoisted_2 = { class: "yc-picker-
|
26
|
-
const _hoisted_3 = { class: "yc-picker-header-title" };
|
27
|
-
const _hoisted_4 = { class: "yc-picker-body" };
|
14
|
+
const _hoisted_2 = { class: "yc-picker-body" };
|
28
15
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
29
16
|
...{
|
30
17
|
name: "MonthPicker",
|
@@ -51,8 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
51
38
|
disabled: { type: Boolean, default: false },
|
52
39
|
disabledDate: { type: Function, default: void 0 },
|
53
40
|
disabledTime: {},
|
54
|
-
pickerValue: {},
|
55
|
-
defaultPickerValue: {},
|
41
|
+
pickerValue: { default: void 0 },
|
42
|
+
defaultPickerValue: { default: "" },
|
56
43
|
popupContainer: { default: void 0 },
|
57
44
|
valueFormat: { default: "YYYY-MM" },
|
58
45
|
format: { default: "YYYY-MM" },
|
@@ -76,6 +63,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
63
|
ReusePanel,
|
77
64
|
t,
|
78
65
|
getDateFromFormat,
|
66
|
+
isCellInView,
|
67
|
+
isToday,
|
68
|
+
isSelected,
|
79
69
|
handleConfirm,
|
80
70
|
handleSelect,
|
81
71
|
handleShortcut
|
@@ -102,14 +92,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
102
92
|
});
|
103
93
|
});
|
104
94
|
});
|
105
|
-
const isSelected = (val) => {
|
106
|
-
const date = getDateFromFormat(computedValue.value);
|
107
|
-
if (!date) return false;
|
108
|
-
return date.getFullYear() == val.getFullYear() && date.getMonth() == val.getMonth();
|
109
|
-
};
|
110
|
-
const isToday = (date) => {
|
111
|
-
return date.getMonth() == dayjs().month() && date.getFullYear() == dayjs().year();
|
112
|
-
};
|
113
95
|
watch(
|
114
96
|
() => computedValue.value,
|
115
97
|
(val) => {
|
@@ -146,31 +128,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
146
128
|
}, createSlots({
|
147
129
|
default: withCtx(() => [
|
148
130
|
createElementVNode("div", _hoisted_1, [
|
131
|
+
createVNode(_sfc_main$3, {
|
132
|
+
year: unref(curYear),
|
133
|
+
type: "month",
|
134
|
+
onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
|
135
|
+
onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
|
136
|
+
onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
|
137
|
+
}, createSlots({ _: 2 }, [
|
138
|
+
$slots["icon-prev-double"] ? {
|
139
|
+
name: "icon-prev-double",
|
140
|
+
fn: withCtx(() => [
|
141
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
142
|
+
]),
|
143
|
+
key: "0"
|
144
|
+
} : void 0,
|
145
|
+
$slots["icon-next-double"] ? {
|
146
|
+
name: "icon-next-double",
|
147
|
+
fn: withCtx(() => [
|
148
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
149
|
+
]),
|
150
|
+
key: "1"
|
151
|
+
} : void 0
|
152
|
+
]), 1032, ["year"]),
|
149
153
|
createElementVNode("div", _hoisted_2, [
|
150
|
-
createElementVNode("div", {
|
151
|
-
class: "yc-picker-header-icon",
|
152
|
-
onClick: _cache[1] || (_cache[1] = ($event) => curYear.value--)
|
153
|
-
}, [
|
154
|
-
renderSlot(_ctx.$slots, "icon-prev-double", {}, () => [
|
155
|
-
createVNode(unref(_sfc_main$3))
|
156
|
-
])
|
157
|
-
]),
|
158
|
-
createElementVNode("div", _hoisted_3, [
|
159
|
-
createElementVNode("div", {
|
160
|
-
class: "yc-picker-header-label",
|
161
|
-
onClick: _cache[2] || (_cache[2] = ($event) => showYearPicker.value = true)
|
162
|
-
}, toDisplayString(unref(curYear)), 1)
|
163
|
-
]),
|
164
|
-
createElementVNode("div", {
|
165
|
-
class: "yc-picker-header-icon",
|
166
|
-
onClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
|
167
|
-
}, [
|
168
|
-
renderSlot(_ctx.$slots, "icon-next-double", {}, () => [
|
169
|
-
createVNode(unref(_sfc_main$4))
|
170
|
-
])
|
171
|
-
])
|
172
|
-
]),
|
173
|
-
createElementVNode("div", _hoisted_4, [
|
174
154
|
(openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
|
175
155
|
return openBlock(), createElementBlock("div", {
|
176
156
|
key: i,
|
@@ -178,13 +158,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
178
158
|
}, [
|
179
159
|
(openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
|
180
160
|
var _a;
|
181
|
-
return openBlock(), createBlock(
|
161
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
182
162
|
key: k,
|
183
|
-
"is-selected": isSelected(date),
|
184
|
-
"is-today": isToday(date),
|
185
|
-
disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
|
186
163
|
value: label,
|
187
|
-
"cell-in-view": "",
|
164
|
+
"cell-in-view": unref(isCellInView)(date, "month"),
|
165
|
+
"is-today": unref(isToday)(date, "month"),
|
166
|
+
"is-selected": unref(isSelected)(date, "month"),
|
167
|
+
disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
|
188
168
|
onClick: ($event) => unref(handleSelect)(date)
|
189
169
|
}, createSlots({ _: 2 }, [
|
190
170
|
$slots.cell ? {
|
@@ -194,7 +174,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
194
174
|
]),
|
195
175
|
key: "0"
|
196
176
|
} : void 0
|
197
|
-
]), 1032, ["
|
177
|
+
]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
|
198
178
|
}), 128))
|
199
179
|
]);
|
200
180
|
}), 128))
|
@@ -214,7 +194,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
214
194
|
]),
|
215
195
|
_: 3
|
216
196
|
}),
|
217
|
-
!_ctx.hideTrigger ? (openBlock(), createBlock(
|
197
|
+
!_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$5, {
|
218
198
|
key: 0,
|
219
199
|
class: normalizeClass(_ctx.$attrs.class),
|
220
200
|
style: normalizeStyle(_ctx.$attrs.style),
|
@@ -44,17 +44,19 @@ declare const __VLS_component: import('vue').DefineComponent<WeekPickerProps, {}
|
|
44
44
|
allowClear: boolean;
|
45
45
|
readonly: boolean;
|
46
46
|
triggerProps: import('..').TriggerProps;
|
47
|
-
hideTrigger: boolean;
|
48
47
|
format: string;
|
49
48
|
dayStartOfWeek: import('./type').DayStartOfWeek;
|
49
|
+
pickerValue: import('./type').DatePickerValue;
|
50
|
+
defaultPickerValue: import('./type').DatePickerValue;
|
50
51
|
valueFormat: import('./type').ValueFormat;
|
51
52
|
showConfirmBtn: boolean;
|
52
53
|
abbreviation: boolean;
|
54
|
+
disabledDate: import('./type').DisabledDate;
|
53
55
|
shortcutsPosition: import('./type').ShortcutsPosition;
|
54
56
|
shortcuts: import('./type').ShortcutType[];
|
55
57
|
previewShortcut: boolean;
|
56
58
|
disabledInput: boolean;
|
57
|
-
|
59
|
+
hideTrigger: boolean;
|
58
60
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
59
61
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
60
62
|
export default _default;
|