查询界面单日期查询,单个日期查询
日期默认是区间范围查询,修改range属性为单个日期查询
[vue3代码]写在生成的[表.vue]文件中,[vue2代码]写在[表.jsx]文件methods方法中;二选一实现
vue3代码
//也可以在searchBefore查询前方法设置默认值
const onInited=()=> {
searchFormOptions.forEach(x => {
x.forEach(item => {
if (item.field == "字段") {
//设置单个日期查询
item.range = false;
//设置查询类型为date(默认为datetime)
//item.type = "date";
//设置默认值为null,也可以设置查询当天proxy.base.getDate()见上面的日期操作示例
searchFormFields.字段=null
}
})
})
}
vue2代码
//也可以在searchBefore查询前方法设置默认值
onInited() {
this.searchFormOptions.forEach(x => {
x.forEach(item => {
if (item.field == "字段") {
//设置单个日期查询
item.range = false;
//设置查询类型为date(默认为datetime)
//item.type = "date";
//设置默认值为null,也可以设置查询当天this.base.getDate()见上面的日期操作示例
this.searchFormFields.字段=null
}
})
})
}