cosey 0.8.0 → 0.8.2
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.
|
@@ -52,7 +52,7 @@ var stdin_default = defineComponent({
|
|
|
52
52
|
const row = result[rowIndex] ??= [];
|
|
53
53
|
const week = i + 1;
|
|
54
54
|
const d = currentD.week(week);
|
|
55
|
-
const startDate = d.startOf("
|
|
55
|
+
const startDate = d.startOf("week");
|
|
56
56
|
const endDate = d.endOf("week");
|
|
57
57
|
const startStr = startDate.format("MM-DD");
|
|
58
58
|
const endStr = endDate.format("MM-DD");
|
|
@@ -72,7 +72,8 @@ var stdin_default = defineComponent({
|
|
|
72
72
|
return result;
|
|
73
73
|
});
|
|
74
74
|
const pickedDates = ref([]);
|
|
75
|
-
const innerValue = ref(
|
|
75
|
+
const innerValue = ref([]);
|
|
76
|
+
const selectedDates = ref([]);
|
|
76
77
|
watch(() => props.parsedValue, () => {
|
|
77
78
|
const dates = parseDates(props.parsedValue);
|
|
78
79
|
if (dates.length !== innerValue.value.length || dates.length > 0 && !isSame(dates, innerValue.value)) {
|
|
@@ -83,7 +84,6 @@ var stdin_default = defineComponent({
|
|
|
83
84
|
immediate: true
|
|
84
85
|
});
|
|
85
86
|
const isSelecting = computed(() => pickedDates.value.length === 1);
|
|
86
|
-
const selectedDates = ref([]);
|
|
87
87
|
const onPrevYear = () => {
|
|
88
88
|
currentYearDate.value = dayjs(currentYearDate.value).subtract(1, "year");
|
|
89
89
|
};
|
|
@@ -105,7 +105,8 @@ var stdin_default = defineComponent({
|
|
|
105
105
|
pickedDates.value = [];
|
|
106
106
|
}
|
|
107
107
|
pickedDates.value.push(weekInfo);
|
|
108
|
-
|
|
108
|
+
pickedDates.value.sort((a, b) => a.id - b.id);
|
|
109
|
+
selectedDates.value = pickedDates.value.map(item => item.id);
|
|
109
110
|
if (selectedDates.value.length === 1) {
|
|
110
111
|
const d = selectedDates.value[0];
|
|
111
112
|
selectedDates.value = [d, d];
|
|
@@ -121,8 +122,6 @@ var stdin_default = defineComponent({
|
|
|
121
122
|
if (!weekInfo) return;
|
|
122
123
|
selectedDates.value = [pickedDates.value[0].id, weekInfo.id].sort();
|
|
123
124
|
};
|
|
124
|
-
const onMouseDown = () => {};
|
|
125
|
-
const onMouseUp = () => {};
|
|
126
125
|
const resetCurrentYear = year => {
|
|
127
126
|
const currentYear = currentYearDate.value.year();
|
|
128
127
|
if (year !== currentYear) {
|
|
@@ -178,9 +177,7 @@ var stdin_default = defineComponent({
|
|
|
178
177
|
"class": `${prefixCls.value}-content`
|
|
179
178
|
}, [createVNode("table", {
|
|
180
179
|
"onClick": onPickWeek,
|
|
181
|
-
"onMousemove": onMouseMove
|
|
182
|
-
"onMousedown": onMouseDown,
|
|
183
|
-
"onMouseup": onMouseUp
|
|
180
|
+
"onMousemove": onMouseMove
|
|
184
181
|
}, [createVNode("tbody", null, [weeks.value.map((row, i) => {
|
|
185
182
|
return createVNode("tr", {
|
|
186
183
|
"key": i
|