cosey 0.8.0 → 0.8.1

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.
@@ -72,7 +72,8 @@ var stdin_default = defineComponent({
72
72
  return result;
73
73
  });
74
74
  const pickedDates = ref([]);
75
- const innerValue = ref(parseDates(props.parsedValue));
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
- selectedDates.value = pickedDates.value.map(item => item.id).sort();
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",