File tree Expand file tree Collapse file tree
packages/plugins/materials/src/composable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,8 +136,8 @@ const initPageOrBlock = async () => {
136136 // url 没有 pageid 或 blockid,页面打开顺序:可访问主页 -> 可访问的第一个页面 -> 不可访问首页 -> 不可访问全页面顺位第一页
137137 const getPageInfo = ( ) => {
138138 // 页面是否被他人锁定
139- const isPageOccupierd = ( page ) => {
140- return page . meta ?. occupier && page . meta ?. occupier . id = == globalState . userInfo . id
139+ const isPageOccupierdByOthers = ( page ) => {
140+ return page . meta ?. occupier ?. id ! == globalState . userInfo . id
141141 }
142142 // 首页
143143 const homePage = appSchemaState . pageTree . find ( ( page ) => page ?. meta ?. isHome )
@@ -148,7 +148,9 @@ const initPageOrBlock = async () => {
148148 // 顺位首个可访问页面
149149 const firstUnoccupiedPage = appSchemaState . pageTree . find (
150150 ( page ) =>
151- page . componentName === COMPONENT_NAME . Page && page ?. meta ?. group !== 'publicPages' && ! isPageOccupierd ( page )
151+ page . componentName === COMPONENT_NAME . Page &&
152+ page ?. meta ?. group !== 'publicPages' &&
153+ ! isPageOccupierdByOthers ( page )
152154 )
153155 // 空页面
154156 const emptyPage = {
@@ -157,7 +159,7 @@ const initPageOrBlock = async () => {
157159 }
158160 }
159161 // 可访问主页
160- if ( homePage && ! isPageOccupierd ( homePage ) ) {
162+ if ( homePage && ! isPageOccupierdByOthers ( homePage ) ) {
161163 return homePage
162164 }
163165 return firstUnoccupiedPage || homePage || firstPage || emptyPage
You can’t perform that action at this time.
0 commit comments