Skip to content

Commit 5518e77

Browse files
committed
fix(bug-2.7.x): 添加详细注释
1 parent ace0cb3 commit 5518e77

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/plugins/materials/src/composable/useResource.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const initPageOrBlock = async () => {
135135

136136
// url 没有 pageid 或 blockid,页面打开顺序:可访问主页 -> 可访问的第一个页面 -> 不可访问首页 -> 不可访问全页面顺位第一页
137137
const getPageInfo = () => {
138-
// 页面是否被他人锁定
138+
// 页面是否被他人锁定 (被锁定 且 非当前用户锁定)
139139
const isPageOccupierdByOthers = (page) => {
140140
return page.meta?.occupier && page.meta.occupier.id !== globalState.userInfo.id
141141
}
@@ -145,7 +145,7 @@ const initPageOrBlock = async () => {
145145
const firstPage = appSchemaState.pageTree.find(
146146
(page) => page.componentName === COMPONENT_NAME.Page && page?.meta?.group !== 'publicPages'
147147
)
148-
// 顺位首个可访问页面
148+
// 顺位首个可访问页面(当前用户锁定 或 未锁定)
149149
const firstUnoccupiedPage = appSchemaState.pageTree.find(
150150
(page) =>
151151
page.componentName === COMPONENT_NAME.Page &&
@@ -158,7 +158,7 @@ const initPageOrBlock = async () => {
158158
componentName: COMPONENT_NAME.Page
159159
}
160160
}
161-
// 可访问主页
161+
// 可访问主页 (当前用户锁定 或 未锁定)
162162
if (homePage && !isPageOccupierdByOthers(homePage)) {
163163
return homePage
164164
}

0 commit comments

Comments
 (0)