updated 方法简写

This commit is contained in:
PASSER-BY 2022-03-29 00:19:05 +08:00
parent 4a8d180c1f
commit f5bd7ad3f7
3 changed files with 3 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1662,12 +1662,7 @@
for(var k in _prefix[tag]){ for(var k in _prefix[tag]){
var prefixList = _prefix[tag][k]; var prefixList = _prefix[tag][k];
var newKey = key.replace(tag,k); var newKey = key.replace(tag,k);
var isFilter = false; var isFilter = ['h,h','w,w','w,h','h,w'].some(pair=>(newKey.indexOf(pair)>-1));
['h,h','w,w','w,h','h,w'].forEach(function(pair){
if(newKey.indexOf(pair)>-1){
isFilter = true;
}
});
var newList = []; var newList = [];
if(!isFilter){ if(!isFilter){
prefixList.forEach(function(prefix){ prefixList.forEach(function(prefix){