Showing
1 changed file
with
3 additions
and
0 deletions
| ... | @@ -167,10 +167,13 @@ const formatter = computed(() => { // 格式化日历文字显示 | ... | @@ -167,10 +167,13 @@ const formatter = computed(() => { // 格式化日历文字显示 |
| 167 | const onConfirm = async (dates) => { // 日历点击确认回调 | 167 | const onConfirm = async (dates) => { // 日历点击确认回调 |
| 168 | show.value = false; | 168 | show.value = false; |
| 169 | selectedDates.value = []; | 169 | selectedDates.value = []; |
| 170 | + defaultDate.value = []; | ||
| 170 | dates.forEach((date) => { | 171 | dates.forEach((date) => { |
| 171 | selectedDates.value.push(dayjs(date).format('YYYY-MM-DD')) | 172 | selectedDates.value.push(dayjs(date).format('YYYY-MM-DD')) |
| 172 | defaultDate.value.push(dayjs(date).toDate()) | 173 | defaultDate.value.push(dayjs(date).toDate()) |
| 173 | }); | 174 | }); |
| 175 | + // 缓存修改日期 | ||
| 176 | + localStorage.setItem('save_selected_dates', JSON.stringify(selectedDates.value)); | ||
| 174 | // 后台请求数据更新日期列表 | 177 | // 后台请求数据更新日期列表 |
| 175 | const { data } = await orderRestCountAPI({ dates: selectedDates.value.join(',') }); | 178 | const { data } = await orderRestCountAPI({ dates: selectedDates.value.join(',') }); |
| 176 | shortcut.value = data; | 179 | shortcut.value = data; | ... | ... |
-
Please register or login to post a comment