Merge pull request #8696 from xianlinzhang/fix-scoped-cmpt-cant-find-reload-cmpt

chore: Scoped组件reolad方法时增加fallback,找不到对应名称组件则继续寻找对应ID组件
This commit is contained in:
hsm-lv 2023-11-17 10:16:36 +08:00 committed by GitHub
commit c97063a794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,7 +274,8 @@ function createScopedTools(
location.reload();
}
} else {
const component = scoped.getComponentByName(name);
const component =
scoped.getComponentByName(name) || scoped.getComponentById(name);
component &&
component.reload &&
component.reload(subPath, query, ctx);