Skip to content

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,
    },
  ];
});

属性说明

属性说明类型默认值
keylist唯一值string/number-
label按钮内容string-
type筛选类型 参考Form的类型,按照不同类型也支持相应的属性string-
width筛选框的宽度number8
more是否放入高级筛选中booleanfalse