Skip to content

Commit eec48d2

Browse files
committed
wip(app-vapor): 暂时不删除 __pageQuery
1 parent ac56aa5 commit eec48d2

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

packages/uni-app-plus/dist/uni.vue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ function initHooks(options, instance, publicThis) {
8282
if (false) ;
8383
if ('app' === 'app' && false) ;
8484
invokeHook(publicThis, ON_LOAD, query);
85-
delete instance.attrs.__pageQuery;
85+
// @ts-expect-error vapor 模式下 attrs 是只读代理对象,目前不支持删除
86+
if (!instance.vapor) {
87+
delete instance.attrs.__pageQuery;
88+
}
8689
// iOS-X 的非 Tab 页面与 uni-app 一致固定触发 onShow
8790
const $basePage = false
8891
? publicThis.$basePage

packages/uni-app-plus/dist/uni.x.vue.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ function initHooks(options, instance, publicThis) {
9696
}
9797
}
9898
invokeHook(publicThis, ON_LOAD, query);
99-
delete instance.attrs.__pageQuery;
99+
// @ts-expect-error vapor 模式下 attrs 是只读代理对象,目前不支持删除
100+
if (!instance.vapor) {
101+
delete instance.attrs.__pageQuery;
102+
}
100103
// iOS-X 的非 Tab 页面与 uni-app 一致固定触发 onShow
101104
const $basePage = true
102105
? publicThis.$basePage

packages/uni-vue/src/componentOptions/hooks.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ export function initHooks(
7676
}
7777
}
7878
invokeHook(publicThis, ON_LOAD, query)
79-
delete instance.attrs.__pageQuery
79+
// @ts-expect-error vapor 模式下 attrs 是只读代理对象,目前不支持删除
80+
if (!instance.vapor) {
81+
delete instance.attrs.__pageQuery
82+
}
8083
// iOS-X 的非 Tab 页面与 uni-app 一致固定触发 onShow
8184
const $basePage = __X__
8285
? publicThis.$basePage

0 commit comments

Comments
 (0)