feat: search配置新增函数能力拓展

search表单,部分情况下需要函数扩展数据处理能力。如options为异步获取的情况
This commit is contained in:
andm31
2024-05-23 11:06:03 +08:00
parent 7f4be6649b
commit bc04041fba
2 changed files with 18 additions and 5 deletions

View File

@@ -57,10 +57,15 @@ const searchConfig: ISearchConfig = {
width: "100px",
},
},
options: [
{ label: "启用", value: 1 },
{ label: "禁用", value: 0 },
],
options: [],
initFn() {
setTimeout(() => {
this.options = [
{ label: "启用", value: 1 },
{ label: "禁用", value: 0 },
];
}, 300);
},
},
{
type: "date-picker",