Skip to content

Commit b395c6e

Browse files
committed
fix:hasPermission roles判断
1 parent 14ef911 commit b395c6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/pen/render.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3989,7 +3989,7 @@ export function calcInView(pen: Pen, calcChild = false) {
39893989
pen.calculative.inView = false;
39903990
}
39913991
}
3992-
if(store.data.locked){
3992+
if(store.data.locked && pen.calculative.inView){
39933993
pen.calculative.inView = hasPermission(pen, store.options.roles);
39943994
}
39953995
// TODO: 语义化上,用 onValue 更合适,但 onValue 会触发 echarts 图形的重绘,没有必要
@@ -4005,7 +4005,7 @@ function hasPermission(pen: Pen, roles: string[]) {
40054005
if (pen.parentId) {
40064006
return hasPermission(getParent(pen, false), roles);
40074007
} else {
4008-
return true;
4008+
return pen.calculative.inView;
40094009
}
40104010
} else {
40114011
if(!roles?.length){

0 commit comments

Comments
 (0)