代客下单更新

1.筛选时去除头尾空格来匹配
This commit is contained in:
YeMingfei666 2024-08-22 16:02:03 +08:00
parent a14a9877c2
commit 5d1961d772
1 changed files with 1 additions and 1 deletions

View File

@ -1316,7 +1316,7 @@ export default {
this.goods.list = this.$goodsData.records || []; this.goods.list = this.$goodsData.records || [];
} else { } else {
const newarr = this.$goodsData.records.filter((v) => const newarr = this.$goodsData.records.filter((v) =>
v.name.includes(newval) v.name.includes(newval.trim())
); );
this.search.list = newarr; this.search.list = newarr;
this.goods.list = newarr.length ? newarr : this.$goodsData.records; this.goods.list = newarr.length ? newarr : this.$goodsData.records;