日期下拉默认修改

This commit is contained in:
stt
2025-12-04 10:30:19 +08:00
parent 5687367602
commit 3accaf3079
5 changed files with 84 additions and 13 deletions

View File

@@ -15,6 +15,7 @@
:nextFlag="nextFlag"
:theCurrentTime="theCurrentTime"
@change="handleDatePickerChange"
:timeKeyList="props.timeKeyList"
></DatePicker>
</el-form-item>
@@ -89,6 +90,7 @@ interface Props {
showReset?: boolean //是否显示重置
showExport?: boolean //导出控制
timeCacheFlag?: boolean //是否取缓存时间
timeKeyList?: Array<string> //日期下拉列表
}
const props = withDefaults(defineProps<Props>(), {
@@ -99,7 +101,8 @@ const props = withDefaults(defineProps<Props>(), {
theCurrentTime: true,
showReset: true,
showExport: false,
timeCacheFlag: true
timeCacheFlag: true,
timeKeyList: () => [] // 修改为箭头函数返回空数组
})
// 处理 DatePicker 值变化事件