|
|
@@ -944,56 +944,60 @@ export default {
|
|
|
this.suitScrollPushList();
|
|
|
}
|
|
|
},
|
|
|
- searchFn() {
|
|
|
+ searchFn(limit=1) {
|
|
|
let list = copyObject(this.productInfo);
|
|
|
if(!this.$util.isEmpty(this.py)){
|
|
|
- //大于等于2个字符才开始搜索 shish 20210622
|
|
|
- if(this.py.length <=1){
|
|
|
- return
|
|
|
- }
|
|
|
- //红色粉色紫色绿色白色花材太多,搜索时会卡住,所以设置输入第三个字母时才搜索
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('fs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('粉色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('hs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('红色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('黄色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('zs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('紫色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('ls') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('绿色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('bs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('白色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.toLocaleLowerCase().indexOf('cs') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('橙色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.py.indexOf('银色') == 0 && this.py.length <= 2){
|
|
|
- return
|
|
|
+
|
|
|
+ if(limit == 1){
|
|
|
+ //大于等于2个字符才开始搜索 shish 20210622
|
|
|
+ if(this.py.length <=1){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //红色粉色紫色绿色白色花材太多,搜索时会卡住,所以设置输入第三个字母时才搜索
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('fs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('粉色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('hs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('红色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('黄色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('zs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('紫色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('ls') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('绿色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('bs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('白色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.toLocaleLowerCase().indexOf('cs') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('橙色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.py.indexOf('银色') == 0 && this.py.length <= 2){
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
let commonChildList = [];
|
|
|
list.forEach(ele => {
|
|
|
if (!this.$util.isEmpty(ele.child)) {
|