fix: 过滤条件关键字忽略大小写

This commit is contained in:
fit2cloud-chenyw 2022-04-11 10:41:43 +08:00
parent fddc019fd3
commit 8863f0f009

View File

@ -302,7 +302,7 @@ export default {
if (this.showDomType === 'field') { if (this.showDomType === 'field') {
let results = this.originFieldDatas let results = this.originFieldDatas
if (val) { if (val) {
results = this.originFieldDatas.filter(item => item.name.toLocaleLowerCase().includes(val)) results = this.originFieldDatas.filter(item => item.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()))
} }
this.fieldDatas = JSON.parse(JSON.stringify(results)) this.fieldDatas = JSON.parse(JSON.stringify(results))
return return
@ -319,7 +319,7 @@ export default {
if (this.comShowDomType === 'field') { if (this.comShowDomType === 'field') {
let results = this.originComFieldDatas let results = this.originComFieldDatas
if (val) { if (val) {
results = this.originComFieldDatas.filter(item => item.name.toLocaleLowerCase().includes(val)) results = this.originComFieldDatas.filter(item => item.name.toLocaleLowerCase().includes(val.toLocaleLowerCase()))
} }
this.comFieldDatas = JSON.parse(JSON.stringify(results)) this.comFieldDatas = JSON.parse(JSON.stringify(results))
} }