This commit is contained in:
ap 2021-12-06 18:37:19 +08:00
parent 1f23801b39
commit 92c55b1882

View File

@ -200,14 +200,14 @@ function datetimeMerge({ columns, item }: any) {
const key = item.prop.replace("start", ""); const key = item.prop.replace("start", "");
if (columns.find((e: any) => e.propertyName == "end" + key)) { if (columns.find((e: any) => e.propertyName == "end" + key)) {
item.label = key == "time" ? "时间范围" : "日期访问"; item.label = key == "time" ? "时间范围" : "日期范围";
item.prop = key.toLocaleLowerCase(); item.prop = key.toLocaleLowerCase();
item.hook = "datetimeRange"; item.hook = "datetimeRange";
item.component = { item.component = {
name: "el-date-picker", name: "el-date-picker",
props: { props: {
type: key == "time" ? "datetimerange" : "daterange", type: key == "time" ? "datetimerange" : "daterange",
valueFormat: "YYYY-MM-DD HH:mm:ss" valueFormat: "time" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00"
} }
}; };
} }