月搜索默认为本月时值改为string

This commit is contained in:
mll
2026-04-08 18:17:22 +08:00
parent a13b7aa567
commit adc1adefe4

View File

@@ -423,7 +423,7 @@ const initTable = async () => {
if(['年','年度','年份'].includes(item.fieldName)&&item.searchDefaultValue=='本年'){ if(['年','年度','年份'].includes(item.fieldName)&&item.searchDefaultValue=='本年'){
tableSearch.value[config.prop]=getCurrentDate().year.toString() tableSearch.value[config.prop]=getCurrentDate().year.toString()
}else if( ['月','月度','月份'].includes(item.fieldName)&&item.searchDefaultValue=='本月'){ }else if( ['月','月度','月份'].includes(item.fieldName)&&item.searchDefaultValue=='本月'){
tableSearch.value[config.prop]=new Date().getMonth() + 1 tableSearch.value[config.prop]=(new Date().getMonth() + 1)+''
}else if(item.fieldType=='Date'&&item.searchDefaultValue=='当日'){ }else if(item.fieldType=='Date'&&item.searchDefaultValue=='当日'){
tableSearch.value[config.prop]=getCurrentDate().fullDate tableSearch.value[config.prop]=getCurrentDate().fullDate
}else{ }else{