SearchConfig
参考
js
const searchModel = reactive({
data: {
name: "",
role: "",
region: "",
status: "",
tags: [],
},
});
const searchConfig = computed(() => {
return [
{
key: "name",
label: "名称",
type: "input",
noneLabel: true,
width: 6,
model: "data.name",
},
{
key: "role",
label: "角色",
type: "select",
noneLabel: true,
width: 6,
model: "data.role",
dictList: roleOptions,
},
{
key: "status",
label: "状态",
type: "select",
noneLabel: true,
width: 6,
model: "data.status",
dictList: statusOptions,
},
{
key: "tags",
label: "标签",
type: "select",
width: 8,
multiple: true,
model: "data.tags",
more: true,
dictList: tagList,
},
];
});属性说明
| 属性 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| key | list唯一值 | string/number | - |
| label | 按钮内容 | string | - |
| type | 筛选类型 参考Form的类型,按照不同类型也支持相应的属性 | string | - |
| width | 筛选框的宽度 | number | 8 |
| more | 是否放入高级筛选中 | boolean | false |