yc-design-vue 2.2.4 → 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/Alert/index.vue.js +2 -2
- package/es/Avatar/Avatar.vue.js +1 -1
- package/es/BackTop/index.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/es/Calendar/Calendar.vue.js +2 -2
- package/es/Calendar/CalendarMonth.vue.js +2 -4
- package/es/Carousel/CarouselArrow.vue.js +1 -1
- package/es/Cascader/CascaderIcon.vue.js +2 -2
- package/es/Cascader/CascaderOption.vue.js +1 -1
- package/es/Checkbox/Checkbox.vue.js +2 -2
- package/es/Collapse/CollapseItem.vue.js +2 -2
- package/es/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/es/ColorPicker/index.d.ts +3 -3
- 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 +2 -2
- package/es/DatePicker/YcMonthPicker.vue.js +40 -56
- package/es/DatePicker/YcWeekPicker.vue.d.ts +2 -2
- package/es/DatePicker/YcWeekPicker.vue.js +262 -4
- package/es/DatePicker/YcWeekPicker.vue3.js +5 -0
- package/es/DatePicker/YcYearPicker.vue.d.ts +2 -2
- package/es/DatePicker/YcYearPicker.vue.js +44 -49
- 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 -6
- 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 -49
- package/es/DatePicker/index.css +2 -2
- package/es/DatePicker/index.d.ts +156 -3
- package/es/DatePicker/index.js +5 -3
- package/es/Drawer/Drawer.vue.js +2 -2
- package/es/Dropdown/DropdownButton.vue.js +1 -1
- package/es/Dropdown/Dsubmenu.vue.js +1 -1
- package/es/Empty/index.vue.js +1 -1
- package/es/Image/Image.vue.js +1 -1
- package/es/Image/ImagePreview.vue.js +1 -1
- package/es/Image/ImagePreviewArrow.vue.js +1 -1
- package/es/Image/ImagePreviewToolbar.vue.js +1 -1
- package/es/Input/Input.vue.js +2 -2
- package/es/Input/InputPassword.vue.js +2 -2
- package/es/Input/InputSearch.vue.js +2 -2
- package/es/InputNumber/InputNumber.vue.d.ts +1 -1
- package/es/InputNumber/InputOperaBtn.vue.js +1 -1
- package/es/InputNumber/index.d.ts +3 -3
- package/es/InputTag/index.vue.js +2 -2
- package/es/Layout/LayoutSider.vue.d.ts +1 -1
- package/es/Layout/LayoutSider.vue.js +1 -1
- package/es/Layout/index.d.ts +3 -3
- package/es/Link/index.vue.js +1 -1
- package/es/Menu/Menu.vue.js +1 -1
- package/es/Menu/MenuEllipsis.vue.js +1 -1
- package/es/Menu/SubMenu.vue.js +1 -1
- package/es/Message/Message.vue.js +2 -2
- package/es/Modal/Modal.vue.js +2 -2
- package/es/Notification/Notification.vue.js +2 -2
- package/es/PageHeader/index.vue.js +2 -2
- package/es/Pagination/PaginationItem.vue.js +1 -1
- package/es/Progress/ProgressCircle.vue.js +1 -1
- package/es/Radio/Radio.vue.js +2 -2
- package/es/Rate/index.vue.js +1 -1
- package/es/ResizeBox/index.vue.js +1 -1
- package/es/Select/SelectIcon.vue.js +2 -2
- package/es/Slider/Slider.vue.d.ts +1 -1
- package/es/Slider/index.d.ts +3 -3
- package/es/Spin/index.vue.js +1 -1
- package/es/Split/index.vue.js +1 -1
- package/es/Statistic/Countdown.vue.d.ts +1 -1
- package/es/Statistic/Statistic.vue.d.ts +1 -1
- package/es/Statistic/index.d.ts +6 -6
- package/es/Steps/Step.vue.js +1 -1
- package/es/Tabs/TabButton.vue.js +2 -2
- package/es/Tabs/Tabs.vue.js +1 -1
- package/es/Tag/index.vue.js +2 -2
- package/es/Textarea/index.vue.js +2 -2
- package/es/TimePicker/TimePicker.vue.js +2 -2
- package/es/Transfer/Transfer.vue.js +1 -1
- package/es/Transfer/TransferPanel.vue.js +2 -2
- package/es/Trigger/index.vue.js +1 -1
- package/es/Typography/TypographyBase.vue.js +1 -1
- package/es/Upload/UploadButton.vue.js +1 -1
- package/es/Upload/UploadDrag.vue.js +1 -1
- package/es/Upload/UploadFileList.vue.js +2 -2
- package/es/Upload/UploadPictureCard.vue.js +1 -1
- package/es/_shared/components/IconButton/{index.vue.js → index.vue2.js} +1 -1
- package/es/_shared/components/IconButton/index.vue3.js +2 -2
- package/es/_shared/constants/index.js +1 -1
- package/es/_shared/icons/IconArrowDown.vue.js +1 -1
- package/es/_shared/icons/IconArrowRight.vue.js +1 -1
- package/es/_shared/icons/IconCalendar.vue2.js +1 -1
- package/es/_shared/icons/IconCheck.vue.js +1 -1
- package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
- package/es/_shared/icons/IconClose.vue.js +1 -1
- package/es/_shared/icons/IconCopy.vue2.js +1 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -1
- package/es/_shared/icons/IconDoubleLeft.vue.js +1 -24
- package/es/_shared/icons/IconDoubleLeft.vue2.js +24 -1
- package/es/_shared/icons/IconDoubleRight.vue.js +1 -24
- package/es/_shared/icons/IconDoubleRight.vue2.js +24 -1
- package/es/_shared/icons/IconDragDot.vue.js +1 -1
- package/es/_shared/icons/IconEdit.vue2.js +1 -1
- package/es/_shared/icons/IconEmpty.vue.js +1 -1
- package/es/_shared/icons/IconError.vue.js +1 -1
- package/es/_shared/icons/IconExclamation.vue2.js +1 -1
- package/es/_shared/icons/IconEyeClose.vue.js +1 -1
- package/es/_shared/icons/IconEyeOpen.vue.js +1 -1
- package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
- package/es/_shared/icons/IconFile.vue2.js +1 -1
- package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
- package/es/_shared/icons/IconImageClose.vue.js +1 -1
- package/es/_shared/icons/IconInfo.vue.js +1 -1
- package/es/_shared/icons/IconInfoLine.vue.js +1 -1
- package/es/_shared/icons/IconLink.vue.js +1 -1
- package/es/_shared/icons/IconLoading.vue.js +1 -1
- package/es/_shared/icons/IconMenuFold.vue.js +1 -1
- package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
- package/es/_shared/icons/IconMinus.vue2.js +1 -1
- package/es/_shared/icons/IconMore.vue.js +1 -1
- package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
- package/es/_shared/icons/IconPlus.vue.js +1 -1
- package/es/_shared/icons/IconRight.vue.js +1 -1
- package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
- package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
- package/es/_shared/icons/IconSearch.vue.js +1 -1
- package/es/_shared/icons/IconSeparator.vue2.js +1 -1
- package/es/_shared/icons/IconStar.vue.js +1 -1
- package/es/_shared/icons/IconSuccess.vue.js +1 -1
- package/es/_shared/icons/IconTime.vue.js +1 -1
- package/es/_shared/icons/IconToTop.vue.js +1 -1
- package/es/_shared/icons/IconUpload.vue2.js +1 -1
- package/es/_shared/icons/IconWarning.vue.js +1 -1
- package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
- package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
- package/es/_shared/utils/time.d.ts +20 -0
- package/es/_shared/utils/time.js +74 -0
- package/es/index.d.ts +18 -18
- package/es/style.css +1 -1
- package/lib/Alert/index.vue.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/Calendar/CalendarMonth.vue.js +1 -1
- package/lib/Carousel/CarouselArrow.vue.js +1 -1
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Cascader/CascaderOption.vue.js +1 -1
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/lib/ColorPicker/index.d.ts +3 -3
- 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 +2 -2
- package/lib/DatePicker/YcMonthPicker.vue.js +1 -1
- package/lib/DatePicker/YcWeekPicker.vue.d.ts +2 -2
- package/lib/DatePicker/YcWeekPicker.vue.js +1 -1
- package/lib/DatePicker/YcWeekPicker.vue3.js +1 -0
- package/lib/DatePicker/YcYearPicker.vue.d.ts +2 -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/Drawer/Drawer.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/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/InputNumber.vue.d.ts +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/LayoutSider.vue.d.ts +1 -1
- package/lib/Layout/LayoutSider.vue.js +1 -1
- package/lib/Layout/index.d.ts +3 -3
- 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/Message/Message.vue.js +1 -1
- package/lib/Modal/Modal.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/Slider/Slider.vue.d.ts +1 -1
- package/lib/Slider/index.d.ts +3 -3
- 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/Statistic.vue.d.ts +1 -1
- package/lib/Statistic/index.d.ts +6 -6
- package/lib/Steps/Step.vue.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tabs/Tabs.vue.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/Transfer/Transfer.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.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/_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/time.d.ts +20 -0
- package/lib/_shared/utils/time.js +1 -1
- package/lib/index.d.ts +18 -18
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/Calendar/hooks/useCalendar.d.ts +0 -7
- package/es/Calendar/hooks/useCalendar.js +0 -36
- package/es/DatePicker/YcWeekPicker.vue2.js +0 -315
- package/es/DatePicker/component/PickerCell.vue2.js +0 -41
- package/es/DatePicker/component/PickerInput.vue2.js +0 -121
- package/es/_virtual/_plugin-vue_export-helper.js +0 -10
- package/lib/Calendar/hooks/useCalendar.d.ts +0 -7
- package/lib/Calendar/hooks/useCalendar.js +0 -1
- 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,7 +1,41 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
const
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createElementVNode, toDisplayString } from "vue";
|
2
|
+
const _hoisted_1 = { class: "yc-picker-date" };
|
3
|
+
const _hoisted_2 = { class: "yc-picker-date-value" };
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
5
|
+
__name: "PickerCell",
|
6
|
+
props: {
|
7
|
+
cellInView: { type: Boolean, default: false },
|
8
|
+
isToday: { type: Boolean, default: false },
|
9
|
+
isSelected: { type: Boolean, default: false },
|
10
|
+
disabled: { type: Boolean, default: false },
|
11
|
+
value: { default: "" },
|
12
|
+
hoverable: { type: Boolean, default: true }
|
13
|
+
},
|
14
|
+
emits: ["click"],
|
15
|
+
setup(__props) {
|
16
|
+
return (_ctx, _cache) => {
|
17
|
+
return openBlock(), createElementBlock("div", {
|
18
|
+
class: normalizeClass([
|
19
|
+
"yc-picker-cell",
|
20
|
+
{
|
21
|
+
"yc-picker-cell-in-view": _ctx.cellInView,
|
22
|
+
"yc-picker-cell-today": _ctx.isToday,
|
23
|
+
"yc-picker-cell-selected": _ctx.isSelected,
|
24
|
+
"yc-picker-cell-disabled": _ctx.disabled,
|
25
|
+
"yc-picker-cell-hoverable": _ctx.hoverable
|
26
|
+
}
|
27
|
+
]),
|
28
|
+
onClick: _cache[0] || (_cache[0] = ($event) => !_ctx.disabled && _ctx.$emit("click", $event))
|
29
|
+
}, [
|
30
|
+
renderSlot(_ctx.$slots, "cell", {}, () => [
|
31
|
+
createElementVNode("div", _hoisted_1, [
|
32
|
+
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.value), 1)
|
33
|
+
])
|
34
|
+
])
|
35
|
+
], 2);
|
36
|
+
};
|
37
|
+
}
|
38
|
+
});
|
5
39
|
export {
|
6
|
-
|
40
|
+
_sfc_main as default
|
7
41
|
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
type __VLS_Props = {
|
2
|
+
type: 'year' | 'month' | 'week' | 'date';
|
3
|
+
year?: number;
|
4
|
+
month?: number;
|
5
|
+
};
|
6
|
+
declare function __VLS_template(): {
|
7
|
+
attrs: Partial<{}>;
|
8
|
+
slots: {
|
9
|
+
'icon-prev-double'?(_: {}): any;
|
10
|
+
'icon-prev'?(_: {}): any;
|
11
|
+
default?(_: {}): any;
|
12
|
+
'icon-next'?(_: {}): any;
|
13
|
+
'icon-next-double'?(_: {}): any;
|
14
|
+
};
|
15
|
+
refs: {};
|
16
|
+
rootEl: HTMLDivElement;
|
17
|
+
};
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
20
|
+
"prev-double-click": () => any;
|
21
|
+
"prev-click": () => any;
|
22
|
+
"next-double-click": () => any;
|
23
|
+
"next-click": () => any;
|
24
|
+
"year-click": () => any;
|
25
|
+
"month-click": () => any;
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
27
|
+
"onPrev-double-click"?: (() => any) | undefined;
|
28
|
+
"onPrev-click"?: (() => any) | undefined;
|
29
|
+
"onNext-double-click"?: (() => any) | undefined;
|
30
|
+
"onNext-click"?: (() => any) | undefined;
|
31
|
+
"onYear-click"?: (() => any) | undefined;
|
32
|
+
"onMonth-click"?: (() => any) | undefined;
|
33
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
35
|
+
export default _default;
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
37
|
+
new (): {
|
38
|
+
$slots: S;
|
39
|
+
};
|
40
|
+
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, createVNode, unref, toDisplayString, Fragment } from "vue";
|
2
|
+
import "../../node_modules/b-tween/dist/b-tween.es.js";
|
3
|
+
import "../../node_modules/dayjs/dayjs.min.js";
|
4
|
+
import "../../node_modules/tinycolor2/esm/tinycolor.js";
|
5
|
+
import "../../_shared/utils/dom.js";
|
6
|
+
import { isUndefined } from "../../_shared/utils/is.js";
|
7
|
+
import "../../_shared/utils/locale.js";
|
8
|
+
import "../../_shared/utils/time.js";
|
9
|
+
/* empty css */
|
10
|
+
/* empty css */
|
11
|
+
/* empty css */
|
12
|
+
import _sfc_main$2 from "../../_shared/icons/IconArrowRight.vue.js";
|
13
|
+
import _sfc_main$1 from "../../_shared/icons/IconDoubleLeft.vue2.js";
|
14
|
+
import _sfc_main$3 from "../../_shared/icons/IconDoubleRight.vue2.js";
|
15
|
+
const _hoisted_1 = { class: "yc-picker-header" };
|
16
|
+
const _hoisted_2 = { class: "yc-picker-header-title" };
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
18
|
+
__name: "PickerHeader",
|
19
|
+
props: {
|
20
|
+
type: {},
|
21
|
+
year: {},
|
22
|
+
month: {}
|
23
|
+
},
|
24
|
+
emits: ["prev-double-click", "prev-click", "next-double-click", "next-click", "year-click", "month-click"],
|
25
|
+
setup(__props) {
|
26
|
+
return (_ctx, _cache) => {
|
27
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
28
|
+
createElementVNode("div", {
|
29
|
+
class: "yc-picker-header-icon",
|
30
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("prev-double-click"))
|
31
|
+
}, [
|
32
|
+
renderSlot(_ctx.$slots, "icon-prev-double", {}, () => [
|
33
|
+
createVNode(unref(_sfc_main$1))
|
34
|
+
])
|
35
|
+
]),
|
36
|
+
["week", "date"].includes(_ctx.type) ? (openBlock(), createElementBlock("div", {
|
37
|
+
key: 0,
|
38
|
+
class: "yc-picker-header-icon",
|
39
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("prev-click"))
|
40
|
+
}, [
|
41
|
+
renderSlot(_ctx.$slots, "icon-prev", {}, () => [
|
42
|
+
createVNode(unref(_sfc_main$2), { rotate: 180 })
|
43
|
+
])
|
44
|
+
])) : createCommentVNode("", true),
|
45
|
+
createElementVNode("div", _hoisted_2, [
|
46
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
47
|
+
createElementVNode("span", {
|
48
|
+
class: "yc-picker-header-label",
|
49
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("year-click"))
|
50
|
+
}, toDisplayString(_ctx.year), 1),
|
51
|
+
!unref(isUndefined)(_ctx.month) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
52
|
+
_cache[6] || (_cache[6] = createElementVNode("span", null, "-", -1)),
|
53
|
+
createElementVNode("span", {
|
54
|
+
class: "yc-picker-header-label",
|
55
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("month-click"))
|
56
|
+
}, toDisplayString(_ctx.month < 9 ? `0${_ctx.month + 1}` : _ctx.month + 1), 1)
|
57
|
+
], 64)) : createCommentVNode("", true)
|
58
|
+
])
|
59
|
+
]),
|
60
|
+
["week", "date"].includes(_ctx.type) ? (openBlock(), createElementBlock("div", {
|
61
|
+
key: 1,
|
62
|
+
class: "yc-picker-header-icon",
|
63
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("next-click"))
|
64
|
+
}, [
|
65
|
+
renderSlot(_ctx.$slots, "icon-next", {}, () => [
|
66
|
+
createVNode(unref(_sfc_main$2))
|
67
|
+
])
|
68
|
+
])) : createCommentVNode("", true),
|
69
|
+
createElementVNode("div", {
|
70
|
+
class: "yc-picker-header-icon",
|
71
|
+
onClick: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("next-double-click"))
|
72
|
+
}, [
|
73
|
+
renderSlot(_ctx.$slots, "icon-next-double", {}, () => [
|
74
|
+
createVNode(unref(_sfc_main$3))
|
75
|
+
])
|
76
|
+
])
|
77
|
+
]);
|
78
|
+
};
|
79
|
+
}
|
80
|
+
});
|
81
|
+
export {
|
82
|
+
_sfc_main as default
|
83
|
+
};
|
@@ -1,7 +1,121 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { defineComponent, toRefs, computed, ref, watch, nextTick, createBlock, openBlock, unref, mergeProps, isRef, withCtx, createVNode, normalizeClass, normalizeStyle, createSlots, createElementVNode, createCommentVNode, renderSlot, withModifiers } from "vue";
|
2
|
+
import _sfc_main$2 from "../../_shared/components/IconButton/index.vue2.js";
|
3
|
+
/* empty css */
|
4
|
+
import "../../node_modules/b-tween/dist/b-tween.es.js";
|
5
|
+
import "../../node_modules/dayjs/dayjs.min.js";
|
6
|
+
import "../../node_modules/tinycolor2/esm/tinycolor.js";
|
7
|
+
import "../../_shared/utils/dom.js";
|
8
|
+
import { useI18n } from "../../_shared/utils/locale.js";
|
9
|
+
import "../../_shared/utils/time.js";
|
10
|
+
/* empty css */
|
11
|
+
/* empty css */
|
12
|
+
import _sfc_main$1 from "../../_shared/icons/IconCalendar.vue2.js";
|
13
|
+
import usePickerInputContext from "../hooks/useContext.js";
|
14
|
+
import Input from "../../Input/index.js";
|
15
|
+
import Trigger from "../../Trigger/index.js";
|
16
|
+
const _hoisted_1 = { class: "yc-picker-suffix-icon" };
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
18
|
+
...{
|
19
|
+
inheritAttrs: false
|
20
|
+
},
|
21
|
+
__name: "PickerInput",
|
22
|
+
props: {
|
23
|
+
type: { default: "date" }
|
24
|
+
},
|
25
|
+
setup(__props) {
|
26
|
+
const $props = __props;
|
27
|
+
const { props, computedVisible, formatValue, showClearBtn, onClear } = usePickerInputContext().inject();
|
28
|
+
const {
|
29
|
+
popupContainer,
|
30
|
+
unmountOnClose,
|
31
|
+
readonly,
|
32
|
+
disabled,
|
33
|
+
position,
|
34
|
+
triggerProps,
|
35
|
+
size,
|
36
|
+
error,
|
37
|
+
disabledInput,
|
38
|
+
locale,
|
39
|
+
placeholder: _placeholder
|
40
|
+
} = toRefs(props);
|
41
|
+
const { t } = useI18n();
|
42
|
+
const placeholder = computed(() => {
|
43
|
+
var _a;
|
44
|
+
const key = `datePicker.placeholder.${$props.type}`;
|
45
|
+
return _placeholder.value || ((_a = locale.value) == null ? void 0 : _a[key]) || t(key);
|
46
|
+
});
|
47
|
+
const inputRef = ref();
|
48
|
+
watch(
|
49
|
+
() => computedVisible.value,
|
50
|
+
async (val) => {
|
51
|
+
var _a;
|
52
|
+
if (val) return;
|
53
|
+
await nextTick();
|
54
|
+
(_a = inputRef.value) == null ? void 0 : _a.blur();
|
55
|
+
}
|
56
|
+
);
|
57
|
+
return (_ctx, _cache) => {
|
58
|
+
return openBlock(), createBlock(unref(Trigger), mergeProps({
|
59
|
+
"popup-visible": unref(computedVisible),
|
60
|
+
"onUpdate:popupVisible": _cache[0] || (_cache[0] = ($event) => isRef(computedVisible) ? computedVisible.value = $event : null),
|
61
|
+
"popup-offset": 4,
|
62
|
+
"popup-container": unref(popupContainer),
|
63
|
+
"unmount-on-close": unref(unmountOnClose),
|
64
|
+
disabled: unref(disabled) || unref(readonly),
|
65
|
+
position: unref(position),
|
66
|
+
"prevent-focus": "",
|
67
|
+
trigger: "click",
|
68
|
+
"animation-name": "slide-dynamic-origin",
|
69
|
+
"need-transform-origin": ""
|
70
|
+
}, unref(triggerProps)), {
|
71
|
+
content: withCtx(() => [
|
72
|
+
renderSlot(_ctx.$slots, "content")
|
73
|
+
]),
|
74
|
+
default: withCtx(() => [
|
75
|
+
createVNode(unref(Input), {
|
76
|
+
"model-value": unref(formatValue),
|
77
|
+
placeholder: placeholder.value,
|
78
|
+
disabled: unref(disabled),
|
79
|
+
error: unref(error),
|
80
|
+
size: unref(size),
|
81
|
+
readonly: unref(readonly) || unref(disabledInput) || true,
|
82
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
83
|
+
class: normalizeClass([
|
84
|
+
_ctx.$attrs.class,
|
85
|
+
{
|
86
|
+
"yc-picker-allow-clear": unref(showClearBtn)
|
87
|
+
}
|
88
|
+
]),
|
89
|
+
ref_key: "inputRef",
|
90
|
+
ref: inputRef
|
91
|
+
}, createSlots({
|
92
|
+
suffix: withCtx(() => [
|
93
|
+
createElementVNode("div", _hoisted_1, [
|
94
|
+
renderSlot(_ctx.$slots, "suffix-icon", {}, () => [
|
95
|
+
createVNode(unref(_sfc_main$1))
|
96
|
+
])
|
97
|
+
]),
|
98
|
+
unref(showClearBtn) ? (openBlock(), createBlock(unref(_sfc_main$2), {
|
99
|
+
key: 0,
|
100
|
+
onClick: withModifiers(unref(onClear), ["stop"])
|
101
|
+
}, null, 8, ["onClick"])) : createCommentVNode("", true)
|
102
|
+
]),
|
103
|
+
_: 2
|
104
|
+
}, [
|
105
|
+
_ctx.$slots.prefix ? {
|
106
|
+
name: "prefix",
|
107
|
+
fn: withCtx(() => [
|
108
|
+
renderSlot(_ctx.$slots, "prefix")
|
109
|
+
]),
|
110
|
+
key: "0"
|
111
|
+
} : void 0
|
112
|
+
]), 1032, ["model-value", "placeholder", "disabled", "error", "size", "readonly", "style", "class"])
|
113
|
+
]),
|
114
|
+
_: 3
|
115
|
+
}, 16, ["popup-visible", "popup-container", "unmount-on-close", "disabled", "position"]);
|
116
|
+
};
|
117
|
+
}
|
118
|
+
});
|
5
119
|
export {
|
6
|
-
|
120
|
+
_sfc_main as default
|
7
121
|
};
|
@@ -6,6 +6,7 @@ type __VLS_Props = {
|
|
6
6
|
previewShortcut: boolean;
|
7
7
|
confirmBtnDisabled: boolean;
|
8
8
|
showConfirmBtn: boolean;
|
9
|
+
showNow?: boolean;
|
9
10
|
};
|
10
11
|
declare function __VLS_template(): {
|
11
12
|
attrs: Partial<{}>;
|
@@ -19,11 +20,15 @@ declare function __VLS_template(): {
|
|
19
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
20
21
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
21
22
|
confirm: (ev: MouseEvent) => any;
|
23
|
+
"now-click": () => any;
|
22
24
|
"shortcut-select": (shortcut: ShortcutType, hover: boolean) => any;
|
23
25
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
24
26
|
onConfirm?: ((ev: MouseEvent) => any) | undefined;
|
27
|
+
"onNow-click"?: (() => any) | undefined;
|
25
28
|
"onShortcut-select"?: ((shortcut: ShortcutType, hover: boolean) => any) | undefined;
|
26
|
-
}>, {
|
29
|
+
}>, {
|
30
|
+
showNow: boolean;
|
31
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
27
32
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
28
33
|
export default _default;
|
29
34
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createBlock, createCommentVNode, createElementVNode, unref, withCtx, Fragment, renderList, resolveDynamicComponent, renderSlot, createTextVNode, toDisplayString } from "vue";
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createBlock, createCommentVNode, createElementVNode, unref, withCtx, Fragment, renderList, resolveDynamicComponent, renderSlot, withDirectives, vShow, createTextVNode, toDisplayString } from "vue";
|
2
2
|
import { createReusableTemplate } from "../../node_modules/@vueuse/core/index.js";
|
3
3
|
import "../../node_modules/b-tween/dist/b-tween.es.js";
|
4
4
|
import "../../node_modules/dayjs/dayjs.min.js";
|
@@ -8,6 +8,7 @@ import { useI18n } from "../../_shared/utils/locale.js";
|
|
8
8
|
import "../../_shared/utils/time.js";
|
9
9
|
import { getSlotFunction } from "../../_shared/utils/vue-utils.js";
|
10
10
|
import Button from "../../Button/index.js";
|
11
|
+
import Link from "../../Link/index.js";
|
11
12
|
const _hoisted_1 = { class: "yc-picker-panel-wrapper" };
|
12
13
|
const _hoisted_2 = { class: "yc-picker-footer" };
|
13
14
|
const _hoisted_3 = {
|
@@ -18,6 +19,10 @@ const _hoisted_4 = {
|
|
18
19
|
key: 1,
|
19
20
|
class: "yc-picker-footer-btn-wrapper"
|
20
21
|
};
|
22
|
+
const _hoisted_5 = {
|
23
|
+
key: 2,
|
24
|
+
class: "yc-picker-footer-now-wrapper"
|
25
|
+
};
|
21
26
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
22
27
|
__name: "PickerPanel",
|
23
28
|
props: {
|
@@ -26,9 +31,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
26
31
|
shortcuts: {},
|
27
32
|
previewShortcut: { type: Boolean },
|
28
33
|
confirmBtnDisabled: { type: Boolean },
|
29
|
-
showConfirmBtn: { type: Boolean }
|
34
|
+
showConfirmBtn: { type: Boolean },
|
35
|
+
showNow: { type: Boolean, default: false }
|
30
36
|
},
|
31
|
-
emits: ["confirm", "shortcut-select"],
|
37
|
+
emits: ["confirm", "now-click", "shortcut-select"],
|
32
38
|
setup(__props) {
|
33
39
|
const props = __props;
|
34
40
|
const { define: DefineShortcuts, reuse: ReuseShortcuts } = createReusableTemplate();
|
@@ -38,8 +44,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
44
|
const key = "datePicker.ok";
|
39
45
|
return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
|
40
46
|
};
|
47
|
+
const getTodayText = () => {
|
48
|
+
var _a;
|
49
|
+
const key = "datePicker.today";
|
50
|
+
return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
|
51
|
+
};
|
52
|
+
const getNowText = () => {
|
53
|
+
var _a;
|
54
|
+
const key = "datePicker.now";
|
55
|
+
return ((_a = props.locale) == null ? void 0 : _a[key]) || t(key);
|
56
|
+
};
|
41
57
|
return (_ctx, _cache) => {
|
42
|
-
var _a, _b;
|
58
|
+
var _a, _b, _c, _d;
|
43
59
|
return openBlock(), createElementBlock("div", {
|
44
60
|
class: normalizeClass([
|
45
61
|
"yc-picker-container",
|
@@ -79,19 +95,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
79
95
|
renderSlot(_ctx.$slots, "extra")
|
80
96
|
])) : createCommentVNode("", true),
|
81
97
|
_ctx.showConfirmBtn || _ctx.shortcutsPosition == "bottom" && ((_b = _ctx.shortcuts) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
82
|
-
|
98
|
+
withDirectives(createVNode(unref(ReuseShortcuts), null, null, 512), [
|
99
|
+
[
|
100
|
+
vShow,
|
101
|
+
!_ctx.showNow || _ctx.shortcutsPosition == "bottom" && ((_c = _ctx.shortcuts) == null ? void 0 : _c.length)
|
102
|
+
]
|
103
|
+
]),
|
104
|
+
!((_d = _ctx.shortcuts) == null ? void 0 : _d.length) && _ctx.showNow ? (openBlock(), createBlock(unref(Button), {
|
105
|
+
key: 0,
|
106
|
+
size: "mini",
|
107
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("now-click"))
|
108
|
+
}, {
|
109
|
+
default: withCtx(() => [
|
110
|
+
createTextVNode(toDisplayString(getNowText()), 1)
|
111
|
+
]),
|
112
|
+
_: 1
|
113
|
+
})) : createCommentVNode("", true),
|
83
114
|
_ctx.showConfirmBtn ? (openBlock(), createBlock(unref(Button), {
|
84
115
|
key: 1,
|
85
116
|
disabled: _ctx.confirmBtnDisabled,
|
86
117
|
type: "primary",
|
87
118
|
size: "mini",
|
88
|
-
onClick: _cache[
|
119
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("confirm", $event))
|
89
120
|
}, {
|
90
121
|
default: withCtx(() => [
|
91
122
|
createTextVNode(toDisplayString(getOkText()), 1)
|
92
123
|
]),
|
93
124
|
_: 1
|
94
125
|
}, 8, ["disabled"])) : createCommentVNode("", true)
|
126
|
+
])) : createCommentVNode("", true),
|
127
|
+
_ctx.showNow && !_ctx.showConfirmBtn ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
128
|
+
createVNode(unref(Link), {
|
129
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("now-click"))
|
130
|
+
}, {
|
131
|
+
default: withCtx(() => [
|
132
|
+
createTextVNode(toDisplayString(getTodayText()), 1)
|
133
|
+
]),
|
134
|
+
_: 1
|
135
|
+
})
|
95
136
|
])) : createCommentVNode("", true)
|
96
137
|
])
|
97
138
|
])
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { DayStartOfWeek } from '../type';
|
2
|
+
type __VLS_Props = {
|
3
|
+
locale: Record<string, any>;
|
4
|
+
dayStartOfWeek: DayStartOfWeek;
|
5
|
+
abbreviation: boolean;
|
6
|
+
};
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
8
|
+
export default _default;
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { defineComponent, toRefs, computed, createElementBlock, openBlock, createElementVNode, Fragment, renderList, toDisplayString } from "vue";
|
2
|
+
import "../../node_modules/b-tween/dist/b-tween.es.js";
|
3
|
+
import "../../node_modules/dayjs/dayjs.min.js";
|
4
|
+
import "../../node_modules/tinycolor2/esm/tinycolor.js";
|
5
|
+
import "../../_shared/utils/dom.js";
|
6
|
+
import { useI18n } from "../../_shared/utils/locale.js";
|
7
|
+
import "../../_shared/utils/time.js";
|
8
|
+
const _hoisted_1 = { class: "yc-picker-week-list" };
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
+
__name: "PickerWeekHeader",
|
11
|
+
props: {
|
12
|
+
locale: {},
|
13
|
+
dayStartOfWeek: {},
|
14
|
+
abbreviation: { type: Boolean }
|
15
|
+
},
|
16
|
+
setup(__props) {
|
17
|
+
const props = __props;
|
18
|
+
const { locale, dayStartOfWeek, abbreviation } = toRefs(props);
|
19
|
+
const { t } = useI18n();
|
20
|
+
const weekHeaders = computed(() => {
|
21
|
+
const baseDays = [0, 1, 2, 3, 4, 5, 6];
|
22
|
+
const days = [
|
23
|
+
...baseDays.slice(dayStartOfWeek.value || 0),
|
24
|
+
...baseDays.slice(0, dayStartOfWeek.value || 0)
|
25
|
+
];
|
26
|
+
const map = Object.fromEntries(
|
27
|
+
[
|
28
|
+
"sunday",
|
29
|
+
"monday",
|
30
|
+
"tuesday",
|
31
|
+
"wednesday",
|
32
|
+
"thursday",
|
33
|
+
"friday",
|
34
|
+
"saturday"
|
35
|
+
].map((v, i) => [i, v])
|
36
|
+
);
|
37
|
+
return days.map((v) => {
|
38
|
+
var _a;
|
39
|
+
const key = `datePicker.week.${abbreviation.value ? "short" : "long"}.${map[v]}`;
|
40
|
+
return ((_a = locale.value) == null ? void 0 : _a[key]) || t(key);
|
41
|
+
});
|
42
|
+
});
|
43
|
+
return (_ctx, _cache) => {
|
44
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
45
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "yc-picker-week-list-item" }, null, -1)),
|
46
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(weekHeaders.value, (v) => {
|
47
|
+
return openBlock(), createElementBlock("div", {
|
48
|
+
key: v,
|
49
|
+
class: "yc-picker-week-list-item"
|
50
|
+
}, toDisplayString(v), 1);
|
51
|
+
}), 128))
|
52
|
+
]);
|
53
|
+
};
|
54
|
+
}
|
55
|
+
});
|
56
|
+
export {
|
57
|
+
_sfc_main as default
|
58
|
+
};
|
@@ -1,18 +1,5 @@
|
|
1
1
|
import { BasePickerEmits, DatePickerValue, DayStartOfWeek, ShortcutType } from '../type';
|
2
2
|
import { RecordType } from '../../_shared/type';
|
3
|
-
export type YearData = {
|
4
|
-
label: string;
|
5
|
-
value: Date;
|
6
|
-
};
|
7
|
-
export interface DayData {
|
8
|
-
label: string;
|
9
|
-
value: Date;
|
10
|
-
}
|
11
|
-
export interface WeekData {
|
12
|
-
label: number;
|
13
|
-
value: Date;
|
14
|
-
time: DayData[];
|
15
|
-
}
|
16
3
|
export default function usePicker(params: {
|
17
4
|
props: RecordType;
|
18
5
|
emits: BasePickerEmits;
|
@@ -33,11 +20,16 @@ export default function usePicker(params: {
|
|
33
20
|
t: (key: string, ...args: any[]) => string;
|
34
21
|
getDateFromFormat: (val: DatePickerValue) => Date | "";
|
35
22
|
getFormatFromDate: (val: Date) => string | number | Date;
|
23
|
+
isCellInView: (v: Date, type: string) => boolean;
|
24
|
+
isToday: (v: Date, type: string) => boolean;
|
25
|
+
isSelected: (v: Date, type: string) => boolean;
|
36
26
|
getRangeOfYear: (curYear: number) => {
|
37
|
-
range: YearData[][];
|
27
|
+
range: import('../../_shared/utils').YearData[][];
|
38
28
|
startYear: number;
|
39
29
|
};
|
40
|
-
getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => WeekData[];
|
30
|
+
getWeeksOfMonth: (year: number, month: number, startOfWeek?: DayStartOfWeek) => import('../../_shared/utils').WeekData[];
|
31
|
+
getDaysOfMonth: (year: number, month: number, dayStartOfWeek?: number) => import('../../_shared/utils').DayData[][];
|
32
|
+
handleNowClick: () => void;
|
41
33
|
handleSelect: (date: Date) => void;
|
42
34
|
handleConfirm: () => Promise<void>;
|
43
35
|
handleShortcut: (shortcut: ShortcutType, hover: boolean) => void;
|