Match-id-10b63a2cc012a3a05fb8c502131856090e0315b4

This commit is contained in:
* 2022-01-26 14:40:54 +08:00 committed by *
parent 3d8502d8cc
commit d074f507fb
1 changed files with 8 additions and 7 deletions

View File

@ -39,14 +39,15 @@ export class FlagUtils {
}); });
} }
static hasAnyFlag(node: VNode) { // 有标志位 static hasAnyFlag(node: VNode) { // 有标志位
let keyFlag = false; const flags = node.flags;
FlagArr.forEach(key => { const arrLength = FlagArr.length;
if (node.flags[key]) { for(let i = 0; i < arrLength; i++) {
keyFlag = true; const key = FlagArr[i];
return; if (flags[key]) {
return true;
} }
}); }
return keyFlag; return false;
} }
static setNoFlags(node: VNode) { static setNoFlags(node: VNode) {