scFilterBar 增加 tags 类型

This commit is contained in:
sc 2021-11-05 09:34:12 +08:00
parent 8ff3f6b0ff
commit 408d3ea49c
2 changed files with 20 additions and 2 deletions

View File

@ -1,10 +1,10 @@
<!--
* @Descripttion: 过滤器V2
* @version: 2.1
* @version: 2.2
* @Author: sakuya
* @Date: 2021年7月30日14:48:41
* @LastEditors: sakuya
* @LastEditTime: 2021年10月29日13:05:55
* @LastEditTime: 2021年11月5日09:33:07
-->
<template>
@ -68,6 +68,8 @@
<el-date-picker v-if="item.field.type=='datetimerange'" v-model="item.value" type="datetimerange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 100%;"></el-date-picker>
<!-- 开关 -->
<el-switch v-if="item.field.type=='switch'" v-model="item.value" active-value="1" inactive-value="0"></el-switch>
<!-- 标签 -->
<el-select v-if="item.field.type=='tags'" v-model="item.value" multiple filterable allow-create default-first-option no-data-text="输入关键词后按回车确认" :placeholder="item.field.placeholder||'请输入'"></el-select>
</td>
<td>
<i class="el-icon-delete del" @click="delFilter(index)"></i>

View File

@ -116,6 +116,22 @@
}
}
},
{
label: '关键词(标签)',
value: 'tags',
type: 'tags',
operator: 'include',
operators: [
{
label: '包含',
value: 'include',
},
{
label: '不包含',
value: 'notinclude',
}
]
},
{
label: '开关',
value: 'switch',