yc-design-vue 2.2.5 → 2.2.7
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/Anchor/Anchor.vue.d.ts +1 -1
- package/es/Anchor/index.d.ts +3 -3
- 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 +2 -2
- package/es/Calendar/Calendar.vue.js +2 -2
- 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/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
- package/es/DatePicker/DatePicker.vue.js +334 -0
- package/es/DatePicker/DatePicker.vue3.js +5 -0
- package/es/DatePicker/{YcMonthPicker.vue.js → MonthPicker.vue.js} +100 -72
- package/es/DatePicker/MonthPicker.vue3.js +5 -0
- package/es/DatePicker/WeekPicker.vue.js +301 -0
- package/es/DatePicker/WeekPicker.vue3.js +5 -0
- package/es/DatePicker/{YcYearPicker.vue.js → YearPicker.vue.js} +82 -57
- package/es/DatePicker/YearPicker.vue3.js +5 -0
- package/es/DatePicker/component/PickerHeader.vue.js +1 -1
- package/es/DatePicker/component/PickerInput.vue.d.ts +1 -0
- package/es/DatePicker/component/PickerInput.vue.js +41 -39
- package/es/DatePicker/component/PickerPanel.vue.d.ts +2 -0
- package/es/DatePicker/component/PickerPanel.vue.js +26 -29
- package/es/DatePicker/hooks/useContext.js +1 -1
- package/es/DatePicker/hooks/userPicker.d.ts +2 -0
- package/es/DatePicker/hooks/userPicker.js +26 -2
- package/es/DatePicker/index.css +3 -3
- package/es/DatePicker/index.d.ts +7 -7
- package/es/DatePicker/index.js +8 -8
- package/es/DatePicker/type.d.ts +6 -5
- 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/InputOperaBtn.vue.js +1 -1
- package/es/InputTag/index.vue.js +2 -2
- package/es/Layout/LayoutSider.vue.js +1 -1
- 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/Spin/index.vue.js +1 -1
- package/es/Split/index.vue.js +1 -1
- 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.d.ts +5 -98
- package/es/TimePicker/TimePicker.vue.js +22 -17
- package/es/TimePicker/TimePickerPanel.vue.d.ts +1 -3
- package/es/TimePicker/TimePickerPanel.vue.js +89 -56
- package/es/TimePicker/hooks/useContext.d.ts +6 -0
- package/es/TimePicker/hooks/useContext.js +9 -0
- package/es/TimePicker/index.css +1 -1
- package/es/TimePicker/index.d.ts +10 -49
- package/es/TimePicker/type.d.ts +3 -0
- 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.vue2.js → index.vue.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.vue2.js +1 -1
- package/es/_shared/icons/IconDoubleRight.vue2.js +1 -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.vue.js +24 -1
- package/es/_shared/icons/IconSeparator.vue2.js +1 -24
- 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/index.d.ts +6 -6
- package/es/index.js +4 -4
- package/es/style.css +1 -1
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Anchor/Anchor.vue.d.ts +1 -1
- package/lib/Anchor/index.d.ts +3 -3
- 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/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/DatePicker/{YcDatePicker.vue.d.ts → DatePicker.vue.d.ts} +2 -2
- package/lib/DatePicker/DatePicker.vue.js +1 -0
- package/lib/DatePicker/DatePicker.vue3.js +1 -0
- package/lib/DatePicker/MonthPicker.vue.js +1 -0
- package/lib/DatePicker/MonthPicker.vue3.js +1 -0
- package/lib/DatePicker/WeekPicker.vue.js +1 -0
- package/lib/DatePicker/WeekPicker.vue3.js +1 -0
- package/lib/DatePicker/YearPicker.vue.js +1 -0
- package/lib/DatePicker/{YcDatePicker.vue3.js → YearPicker.vue3.js} +1 -1
- package/lib/DatePicker/component/PickerHeader.vue.js +1 -1
- package/lib/DatePicker/component/PickerInput.vue.d.ts +1 -0
- package/lib/DatePicker/component/PickerInput.vue.js +1 -1
- package/lib/DatePicker/component/PickerPanel.vue.d.ts +2 -0
- package/lib/DatePicker/component/PickerPanel.vue.js +1 -1
- package/lib/DatePicker/hooks/useContext.js +1 -1
- package/lib/DatePicker/hooks/userPicker.d.ts +2 -0
- package/lib/DatePicker/hooks/userPicker.js +1 -1
- package/lib/DatePicker/index.css +3 -3
- package/lib/DatePicker/index.d.ts +7 -7
- package/lib/DatePicker/index.js +1 -1
- package/lib/DatePicker/type.d.ts +6 -5
- 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/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/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/Spin/index.vue.js +1 -1
- package/lib/Split/index.vue.js +1 -1
- 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.d.ts +5 -98
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/TimePicker/TimePickerPanel.vue.d.ts +1 -3
- package/lib/TimePicker/TimePickerPanel.vue.js +1 -1
- package/lib/TimePicker/hooks/useContext.d.ts +6 -0
- package/lib/TimePicker/hooks/useContext.js +1 -1
- package/lib/TimePicker/index.css +1 -1
- package/lib/TimePicker/index.d.ts +10 -49
- package/lib/TimePicker/type.d.ts +3 -0
- 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.vue.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.vue2.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.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/index.d.ts +6 -6
- package/lib/index.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/DatePicker/YcDatePicker.vue.js +0 -268
- package/es/DatePicker/YcDatePicker.vue3.js +0 -5
- package/es/DatePicker/YcMonthPicker.vue3.js +0 -5
- package/es/DatePicker/YcWeekPicker.vue.js +0 -265
- package/es/DatePicker/YcWeekPicker.vue3.js +0 -5
- package/es/DatePicker/YcYearPicker.vue3.js +0 -5
- package/lib/DatePicker/YcDatePicker.vue.js +0 -1
- package/lib/DatePicker/YcMonthPicker.vue.js +0 -1
- package/lib/DatePicker/YcMonthPicker.vue3.js +0 -1
- package/lib/DatePicker/YcWeekPicker.vue.js +0 -1
- package/lib/DatePicker/YcWeekPicker.vue3.js +0 -1
- package/lib/DatePicker/YcYearPicker.vue.js +0 -1
- package/lib/DatePicker/YcYearPicker.vue3.js +0 -1
- package/lib/_shared/components/IconButton/index.vue2.js +0 -1
- package/{lib/DatePicker/YcMonthPicker.vue.d.ts → es/DatePicker/MonthPicker.vue.d.ts} +1 -1
- package/{lib/DatePicker/YcWeekPicker.vue.d.ts → es/DatePicker/WeekPicker.vue.d.ts} +1 -1
- package/es/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
- package/{es/DatePicker/YcMonthPicker.vue.d.ts → lib/DatePicker/MonthPicker.vue.d.ts} +1 -1
- package/{es/DatePicker/YcWeekPicker.vue.d.ts → lib/DatePicker/WeekPicker.vue.d.ts} +1 -1
- package/lib/DatePicker/{YcYearPicker.vue.d.ts → YearPicker.vue.d.ts} +1 -1
@@ -4,20 +4,24 @@ import _sfc_main$3 from "./component/PickerHeader.vue.js";
|
|
4
4
|
/* empty css */
|
5
5
|
import _sfc_main$4 from "./component/PickerCell.vue.js";
|
6
6
|
/* empty css */
|
7
|
-
import _sfc_main$
|
7
|
+
import _sfc_main$1 from "./component/PickerPanel.vue.js";
|
8
8
|
/* empty css */
|
9
9
|
import _sfc_main$5 from "./component/PickerInput.vue.js";
|
10
10
|
/* empty css */
|
11
|
-
import _sfc_main$
|
12
|
-
/* empty css
|
13
|
-
const _hoisted_1 = {
|
14
|
-
|
11
|
+
import _sfc_main$2 from "./YearPicker.vue.js";
|
12
|
+
/* empty css */
|
13
|
+
const _hoisted_1 = {
|
14
|
+
key: 1,
|
15
|
+
class: "yc-panel-month"
|
16
|
+
};
|
17
|
+
const _hoisted_2 = { class: "yc-panel-month-inner" };
|
18
|
+
const _hoisted_3 = { class: "yc-picker-body" };
|
15
19
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
16
20
|
...{
|
17
21
|
name: "MonthPicker",
|
18
22
|
inheritAttrs: false
|
19
23
|
},
|
20
|
-
__name: "
|
24
|
+
__name: "MonthPicker",
|
21
25
|
props: {
|
22
26
|
modelValue: { default: void 0 },
|
23
27
|
defaultValue: { default: "" },
|
@@ -106,80 +110,82 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
106
110
|
return openBlock(), createElementBlock(Fragment, null, [
|
107
111
|
createVNode(unref(DefinePanel), null, {
|
108
112
|
default: withCtx(() => [
|
109
|
-
|
110
|
-
key: 0,
|
111
|
-
"model-value": `${unref(curYear)}`,
|
112
|
-
"hide-trigger": "",
|
113
|
-
"value-format": "YYYY",
|
114
|
-
onChange: _cache[0] || (_cache[0] = (_, date) => {
|
115
|
-
curYear.value = date.getFullYear();
|
116
|
-
showYearPicker.value = false;
|
117
|
-
})
|
118
|
-
}, null, 8, ["model-value"])) : (openBlock(), createBlock(_sfc_main$2, {
|
119
|
-
key: 1,
|
113
|
+
createVNode(_sfc_main$1, {
|
120
114
|
locale: unref(locale),
|
121
115
|
"preview-shortcut": _ctx.previewShortcut,
|
122
116
|
shortcuts: _ctx.shortcuts,
|
123
117
|
"shortcuts-position": _ctx.shortcutsPosition,
|
124
118
|
"confirm-btn-disabled": !unref(computedValue),
|
125
119
|
"show-confirm-btn": _ctx.showConfirmBtn,
|
120
|
+
"show-footer": !unref(showYearPicker),
|
126
121
|
onConfirm: unref(handleConfirm),
|
127
122
|
onShortcutSelect: unref(handleShortcut)
|
128
123
|
}, createSlots({
|
129
124
|
default: withCtx(() => [
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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"]),
|
125
|
+
unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
|
126
|
+
key: 0,
|
127
|
+
"model-value": `${unref(curYear)}`,
|
128
|
+
"hide-trigger": "",
|
129
|
+
"value-format": "YYYY",
|
130
|
+
onChange: _cache[0] || (_cache[0] = (_, date) => {
|
131
|
+
curYear.value = date.getFullYear();
|
132
|
+
showYearPicker.value = false;
|
133
|
+
})
|
134
|
+
}, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
153
135
|
createElementVNode("div", _hoisted_2, [
|
154
|
-
(
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
136
|
+
createVNode(_sfc_main$3, {
|
137
|
+
year: unref(curYear),
|
138
|
+
type: "month",
|
139
|
+
onYearClick: _cache[1] || (_cache[1] = ($event) => showYearPicker.value = true),
|
140
|
+
onPrevDoubleClick: _cache[2] || (_cache[2] = ($event) => curYear.value--),
|
141
|
+
onNextDoubleClick: _cache[3] || (_cache[3] = ($event) => curYear.value++)
|
142
|
+
}, createSlots({ _: 2 }, [
|
143
|
+
$slots["icon-prev-double"] ? {
|
144
|
+
name: "icon-prev-double",
|
145
|
+
fn: withCtx(() => [
|
146
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
147
|
+
]),
|
148
|
+
key: "0"
|
149
|
+
} : void 0,
|
150
|
+
$slots["icon-next-double"] ? {
|
151
|
+
name: "icon-next-double",
|
152
|
+
fn: withCtx(() => [
|
153
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
154
|
+
]),
|
155
|
+
key: "1"
|
156
|
+
} : void 0
|
157
|
+
]), 1032, ["year"]),
|
158
|
+
createElementVNode("div", _hoisted_3, [
|
159
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(monthData.value, (row, i) => {
|
160
|
+
return openBlock(), createElementBlock("div", {
|
161
|
+
key: i,
|
162
|
+
class: "yc-picker-row"
|
163
|
+
}, [
|
164
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(row, ({ value: date, label }, k) => {
|
165
|
+
var _a;
|
166
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
167
|
+
key: k,
|
168
|
+
value: label,
|
169
|
+
"cell-in-view": unref(isCellInView)(date, "month"),
|
170
|
+
"is-today": unref(isToday)(date, "month"),
|
171
|
+
"is-selected": unref(isSelected)(date, "month"),
|
172
|
+
disabled: (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, date),
|
173
|
+
onClick: ($event) => unref(handleSelect)(date)
|
174
|
+
}, createSlots({ _: 2 }, [
|
175
|
+
$slots.cell ? {
|
176
|
+
name: "cell",
|
177
|
+
fn: withCtx(() => [
|
178
|
+
renderSlot(_ctx.$slots, "cell", { date })
|
179
|
+
]),
|
180
|
+
key: "0"
|
181
|
+
} : void 0
|
182
|
+
]), 1032, ["value", "cell-in-view", "is-today", "is-selected", "disabled", "onClick"]);
|
183
|
+
}), 128))
|
184
|
+
]);
|
185
|
+
}), 128))
|
186
|
+
])
|
181
187
|
])
|
182
|
-
])
|
188
|
+
]))
|
183
189
|
]),
|
184
190
|
_: 2
|
185
191
|
}, [
|
@@ -190,7 +196,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
190
196
|
]),
|
191
197
|
key: "0"
|
192
198
|
} : void 0
|
193
|
-
]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "onConfirm", "onShortcutSelect"])
|
199
|
+
]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
|
194
200
|
]),
|
195
201
|
_: 3
|
196
202
|
}),
|
@@ -199,12 +205,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
199
205
|
class: normalizeClass(_ctx.$attrs.class),
|
200
206
|
style: normalizeStyle(_ctx.$attrs.style),
|
201
207
|
type: "month"
|
202
|
-
}, {
|
208
|
+
}, createSlots({
|
203
209
|
content: withCtx(() => [
|
204
210
|
createVNode(unref(ReusePanel))
|
205
211
|
]),
|
206
|
-
_:
|
207
|
-
},
|
212
|
+
_: 2
|
213
|
+
}, [
|
214
|
+
$slots.default ? {
|
215
|
+
name: "trigger",
|
216
|
+
fn: withCtx(() => [
|
217
|
+
renderSlot(_ctx.$slots, "default")
|
218
|
+
]),
|
219
|
+
key: "0"
|
220
|
+
} : void 0,
|
221
|
+
$slots["suffix-icon"] ? {
|
222
|
+
name: "suffix-icon",
|
223
|
+
fn: withCtx(() => [
|
224
|
+
renderSlot(_ctx.$slots, "suffix-icon")
|
225
|
+
]),
|
226
|
+
key: "1"
|
227
|
+
} : void 0,
|
228
|
+
$slots.prefix ? {
|
229
|
+
name: "prefix",
|
230
|
+
fn: withCtx(() => [
|
231
|
+
renderSlot(_ctx.$slots, "prefix")
|
232
|
+
]),
|
233
|
+
key: "2"
|
234
|
+
} : void 0
|
235
|
+
]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
|
208
236
|
], 64);
|
209
237
|
};
|
210
238
|
}
|
@@ -0,0 +1,301 @@
|
|
1
|
+
import { defineComponent, useSlots, ref, watch, createElementBlock, openBlock, Fragment, createVNode, createBlock, unref, withCtx, createSlots, createElementVNode, renderSlot, renderList, normalizeClass, normalizeStyle } 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$4 from "./component/PickerHeader.vue.js";
|
10
|
+
/* empty css */
|
11
|
+
import _sfc_main$5 from "./component/PickerWeekHeader.vue.js";
|
12
|
+
/* empty css */
|
13
|
+
import _sfc_main$6 from "./component/PickerCell.vue.js";
|
14
|
+
/* empty css */
|
15
|
+
import _sfc_main$1 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$2 from "./YearPicker.vue.js";
|
20
|
+
/* empty css */
|
21
|
+
import _sfc_main$3 from "./MonthPicker.vue.js";
|
22
|
+
/* empty css */
|
23
|
+
const _hoisted_1 = {
|
24
|
+
key: 2,
|
25
|
+
class: "yc-panel-week"
|
26
|
+
};
|
27
|
+
const _hoisted_2 = { class: "yc-panel-week-inner" };
|
28
|
+
const _hoisted_3 = { class: "yc-picker-body" };
|
29
|
+
const _hoisted_4 = ["onClick"];
|
30
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
31
|
+
...{
|
32
|
+
name: "WeekPicker",
|
33
|
+
inheritAttrs: false
|
34
|
+
},
|
35
|
+
__name: "WeekPicker",
|
36
|
+
props: {
|
37
|
+
modelValue: { default: void 0 },
|
38
|
+
defaultValue: { default: "" },
|
39
|
+
dayStartOfWeek: { default: 0 },
|
40
|
+
locale: { default: () => ({}) },
|
41
|
+
hideTrigger: { type: Boolean, default: false },
|
42
|
+
allowClear: { type: Boolean, default: false },
|
43
|
+
readonly: { type: Boolean, default: false },
|
44
|
+
error: { type: Boolean, default: false },
|
45
|
+
size: { default: void 0 },
|
46
|
+
shortcuts: { default: () => [] },
|
47
|
+
shortcutsPosition: { default: "bottom" },
|
48
|
+
position: { default: "bl" },
|
49
|
+
popupVisible: { type: Boolean, default: void 0 },
|
50
|
+
defaultPopupVisible: { type: Boolean, default: false },
|
51
|
+
triggerProps: { default: () => ({}) },
|
52
|
+
unmountOnClose: { type: Boolean, default: false },
|
53
|
+
placeholder: { default: "" },
|
54
|
+
disabled: { type: Boolean, default: false },
|
55
|
+
disabledDate: { type: Function, default: void 0 },
|
56
|
+
disabledTime: {},
|
57
|
+
pickerValue: { default: void 0 },
|
58
|
+
defaultPickerValue: { default: "" },
|
59
|
+
popupContainer: { default: void 0 },
|
60
|
+
valueFormat: { default: "YYYY-MM-DD" },
|
61
|
+
format: { default: "gggg-wo" },
|
62
|
+
previewShortcut: { type: Boolean, default: true },
|
63
|
+
showConfirmBtn: { type: Boolean, default: false },
|
64
|
+
disabledInput: { type: Boolean, default: false },
|
65
|
+
abbreviation: { type: Boolean, default: true }
|
66
|
+
},
|
67
|
+
emits: ["update:modelValue", "update:popupVisible", "update:pickerValue", "change", "select", "ok", "picker-value-change", "popup-visible-change", "clear", "select-shortcut"],
|
68
|
+
setup(__props, { emit: __emit }) {
|
69
|
+
const $slots = useSlots();
|
70
|
+
const props = __props;
|
71
|
+
const emits = __emit;
|
72
|
+
const {
|
73
|
+
computedValue,
|
74
|
+
locale,
|
75
|
+
abbreviation,
|
76
|
+
dayStartOfWeek,
|
77
|
+
curMonth,
|
78
|
+
curYear,
|
79
|
+
showMonthPicker,
|
80
|
+
showYearPicker,
|
81
|
+
DefinePanel,
|
82
|
+
ReusePanel,
|
83
|
+
getDateFromFormat,
|
84
|
+
isCellInView,
|
85
|
+
isToday,
|
86
|
+
isSelected,
|
87
|
+
getWeeksOfMonth,
|
88
|
+
handleConfirm,
|
89
|
+
handleSelect,
|
90
|
+
handleShortcut
|
91
|
+
} = usePicker({
|
92
|
+
props,
|
93
|
+
emits
|
94
|
+
});
|
95
|
+
const weekData = ref([]);
|
96
|
+
const handleDateChange = (dateType, type) => {
|
97
|
+
if (dateType == "year") {
|
98
|
+
curYear.value = type == "pre" ? curYear.value - 1 : curYear.value + 1;
|
99
|
+
weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
|
100
|
+
} else {
|
101
|
+
const base = dayjs().set("year", curYear.value).set("month", curMonth.value);
|
102
|
+
const date = type == "pre" ? base.subtract(1, "month") : base.add(1, "month");
|
103
|
+
curYear.value = date.year();
|
104
|
+
curMonth.value = date.month();
|
105
|
+
weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
|
106
|
+
}
|
107
|
+
};
|
108
|
+
watch(
|
109
|
+
() => computedValue.value,
|
110
|
+
(val) => {
|
111
|
+
const date = val ? getDateFromFormat(val) : /* @__PURE__ */ new Date();
|
112
|
+
curYear.value = date.getFullYear();
|
113
|
+
curMonth.value = date.getMonth();
|
114
|
+
weekData.value = getWeeksOfMonth(curYear.value, curMonth.value);
|
115
|
+
},
|
116
|
+
{
|
117
|
+
immediate: true
|
118
|
+
}
|
119
|
+
);
|
120
|
+
return (_ctx, _cache) => {
|
121
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
122
|
+
createVNode(unref(DefinePanel), null, {
|
123
|
+
default: withCtx(() => [
|
124
|
+
createVNode(_sfc_main$1, {
|
125
|
+
locale: unref(locale),
|
126
|
+
"preview-shortcut": _ctx.previewShortcut,
|
127
|
+
shortcuts: _ctx.shortcuts,
|
128
|
+
"shortcuts-position": _ctx.shortcutsPosition,
|
129
|
+
"confirm-btn-disabled": !unref(computedValue),
|
130
|
+
"show-confirm-btn": _ctx.showConfirmBtn,
|
131
|
+
"show-footer": !unref(showYearPicker) && !unref(showMonthPicker),
|
132
|
+
onConfirm: unref(handleConfirm),
|
133
|
+
onShortcutSelect: unref(handleShortcut)
|
134
|
+
}, createSlots({
|
135
|
+
default: withCtx(() => [
|
136
|
+
unref(showYearPicker) ? (openBlock(), createBlock(_sfc_main$2, {
|
137
|
+
key: 0,
|
138
|
+
"model-value": `${unref(curYear)}`,
|
139
|
+
"hide-trigger": "",
|
140
|
+
"value-format": "YYYY",
|
141
|
+
onChange: _cache[0] || (_cache[0] = (_, date) => {
|
142
|
+
curYear.value = date.getFullYear();
|
143
|
+
weekData.value = unref(getWeeksOfMonth)(unref(curYear), unref(curMonth));
|
144
|
+
showYearPicker.value = false;
|
145
|
+
})
|
146
|
+
}, null, 8, ["model-value"])) : unref(showMonthPicker) ? (openBlock(), createBlock(_sfc_main$3, {
|
147
|
+
key: 1,
|
148
|
+
"model-value": `${unref(curYear)}-${unref(curMonth) + 1 < 10 ? `0${unref(curMonth) + 1}` : unref(curMonth) + 1}`,
|
149
|
+
"hide-trigger": "",
|
150
|
+
"value-format": "YYYY-MM",
|
151
|
+
onChange: _cache[1] || (_cache[1] = (_, date) => {
|
152
|
+
curMonth.value = date.getMonth();
|
153
|
+
weekData.value = unref(getWeeksOfMonth)(unref(curYear), unref(curMonth));
|
154
|
+
showMonthPicker.value = false;
|
155
|
+
})
|
156
|
+
}, null, 8, ["model-value"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
157
|
+
createElementVNode("div", _hoisted_2, [
|
158
|
+
createVNode(_sfc_main$4, {
|
159
|
+
year: unref(curYear),
|
160
|
+
month: unref(curMonth),
|
161
|
+
type: "week",
|
162
|
+
onPrevClick: _cache[2] || (_cache[2] = ($event) => handleDateChange("month", "pre")),
|
163
|
+
onNextClick: _cache[3] || (_cache[3] = ($event) => handleDateChange("month", "next")),
|
164
|
+
onPrevDoubleClick: _cache[4] || (_cache[4] = ($event) => handleDateChange("year", "pre")),
|
165
|
+
onNextDoubleClick: _cache[5] || (_cache[5] = ($event) => handleDateChange("year", "next")),
|
166
|
+
onYearClick: _cache[6] || (_cache[6] = ($event) => showYearPicker.value = true),
|
167
|
+
onMonthClick: _cache[7] || (_cache[7] = ($event) => showMonthPicker.value = true)
|
168
|
+
}, createSlots({ _: 2 }, [
|
169
|
+
$slots["icon-prev"] ? {
|
170
|
+
name: "icon-prev-double",
|
171
|
+
fn: withCtx(() => [
|
172
|
+
renderSlot(_ctx.$slots, "icon-next")
|
173
|
+
]),
|
174
|
+
key: "0"
|
175
|
+
} : void 0,
|
176
|
+
$slots["icon-next"] ? {
|
177
|
+
name: "icon-next-double",
|
178
|
+
fn: withCtx(() => [
|
179
|
+
renderSlot(_ctx.$slots, "icon-next")
|
180
|
+
]),
|
181
|
+
key: "1"
|
182
|
+
} : void 0,
|
183
|
+
$slots["icon-prev-double"] ? {
|
184
|
+
name: "icon-prev-double",
|
185
|
+
fn: withCtx(() => [
|
186
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
187
|
+
]),
|
188
|
+
key: "2"
|
189
|
+
} : void 0,
|
190
|
+
$slots["icon-next-double"] ? {
|
191
|
+
name: "icon-next-double",
|
192
|
+
fn: withCtx(() => [
|
193
|
+
renderSlot(_ctx.$slots, "icon-next-double")
|
194
|
+
]),
|
195
|
+
key: "3"
|
196
|
+
} : void 0
|
197
|
+
]), 1032, ["year", "month"]),
|
198
|
+
createVNode(_sfc_main$5, {
|
199
|
+
locale: unref(locale),
|
200
|
+
abbreviation: unref(abbreviation),
|
201
|
+
"day-start-of-week": unref(dayStartOfWeek)
|
202
|
+
}, null, 8, ["locale", "abbreviation", "day-start-of-week"]),
|
203
|
+
createElementVNode("div", _hoisted_3, [
|
204
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(weekData.value, ({ label, time, value }, i) => {
|
205
|
+
var _a;
|
206
|
+
return openBlock(), createElementBlock("div", {
|
207
|
+
key: i,
|
208
|
+
class: normalizeClass([
|
209
|
+
"yc-picker-row",
|
210
|
+
"yc-picker-week-row",
|
211
|
+
{
|
212
|
+
"yc-picker-week-row-disabled": (_a = _ctx.disabledDate) == null ? void 0 : _a.call(_ctx, value),
|
213
|
+
"yc-picker-week-row-selected": unref(isSelected)(value, "week")
|
214
|
+
}
|
215
|
+
]),
|
216
|
+
onClick: ($event) => unref(handleSelect)(value)
|
217
|
+
}, [
|
218
|
+
createVNode(_sfc_main$6, {
|
219
|
+
"cell-in-view": false,
|
220
|
+
value: label
|
221
|
+
}, null, 8, ["value"]),
|
222
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(time, ({ value: date, label: label2 }, k) => {
|
223
|
+
return openBlock(), createBlock(_sfc_main$6, {
|
224
|
+
key: k,
|
225
|
+
value: label2,
|
226
|
+
"cell-in-view": unref(isCellInView)(date, "week"),
|
227
|
+
"is-today": unref(isToday)(date, "week"),
|
228
|
+
hoverable: false,
|
229
|
+
class: normalizeClass({
|
230
|
+
"yc-week-picker-cell-first": !i,
|
231
|
+
"yc-week-picker-cell-last": i == time.length - 1
|
232
|
+
})
|
233
|
+
}, createSlots({ _: 2 }, [
|
234
|
+
$slots.cell ? {
|
235
|
+
name: "cell",
|
236
|
+
fn: withCtx(() => [
|
237
|
+
renderSlot(_ctx.$slots, "cell", { date })
|
238
|
+
]),
|
239
|
+
key: "0"
|
240
|
+
} : void 0
|
241
|
+
]), 1032, ["value", "cell-in-view", "is-today", "class"]);
|
242
|
+
}), 128))
|
243
|
+
], 10, _hoisted_4);
|
244
|
+
}), 128))
|
245
|
+
])
|
246
|
+
])
|
247
|
+
]))
|
248
|
+
]),
|
249
|
+
_: 2
|
250
|
+
}, [
|
251
|
+
$slots.extra ? {
|
252
|
+
name: "extra",
|
253
|
+
fn: withCtx(() => [
|
254
|
+
renderSlot(_ctx.$slots, "extra")
|
255
|
+
]),
|
256
|
+
key: "0"
|
257
|
+
} : void 0
|
258
|
+
]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
|
259
|
+
]),
|
260
|
+
_: 3
|
261
|
+
}),
|
262
|
+
!_ctx.hideTrigger ? (openBlock(), createBlock(_sfc_main$7, {
|
263
|
+
key: 0,
|
264
|
+
class: normalizeClass(_ctx.$attrs.class),
|
265
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
266
|
+
type: "week"
|
267
|
+
}, createSlots({
|
268
|
+
content: withCtx(() => [
|
269
|
+
createVNode(unref(ReusePanel))
|
270
|
+
]),
|
271
|
+
_: 2
|
272
|
+
}, [
|
273
|
+
$slots.default ? {
|
274
|
+
name: "trigger",
|
275
|
+
fn: withCtx(() => [
|
276
|
+
renderSlot(_ctx.$slots, "default")
|
277
|
+
]),
|
278
|
+
key: "0"
|
279
|
+
} : void 0,
|
280
|
+
$slots["suffix-icon"] ? {
|
281
|
+
name: "suffix-icon",
|
282
|
+
fn: withCtx(() => [
|
283
|
+
renderSlot(_ctx.$slots, "suffix-icon")
|
284
|
+
]),
|
285
|
+
key: "1"
|
286
|
+
} : void 0,
|
287
|
+
$slots.prefix ? {
|
288
|
+
name: "prefix",
|
289
|
+
fn: withCtx(() => [
|
290
|
+
renderSlot(_ctx.$slots, "prefix")
|
291
|
+
]),
|
292
|
+
key: "2"
|
293
|
+
} : void 0
|
294
|
+
]), 1032, ["class", "style"])) : (openBlock(), createBlock(unref(ReusePanel), { key: 1 }))
|
295
|
+
], 64);
|
296
|
+
};
|
297
|
+
}
|
298
|
+
});
|
299
|
+
export {
|
300
|
+
_sfc_main as default
|
301
|
+
};
|