From 73ded95a6b851f13cfb97516dff82d9e123eed83 Mon Sep 17 00:00:00 2001 From: zhiyuanzmj <260480378@qq.com> Date: Thu, 10 Jul 2025 19:12:33 +0800 Subject: [PATCH 1/2] fix(runtime-vapor): remove access globalProperties warning --- packages/runtime-vapor/src/apiCreateApp.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/runtime-vapor/src/apiCreateApp.ts b/packages/runtime-vapor/src/apiCreateApp.ts index ee4c00c880d..bcc680eae42 100644 --- a/packages/runtime-vapor/src/apiCreateApp.ts +++ b/packages/runtime-vapor/src/apiCreateApp.ts @@ -88,18 +88,6 @@ function prepareApp() { } function postPrepareApp(app: App) { - if (__DEV__) { - app.config.globalProperties = new Proxy( - {}, - { - set() { - warn(`app.config.globalProperties is not supported in vapor mode.`) - return false - }, - }, - ) - } - app.vapor = true const mount = app.mount app.mount = (container, ...args: any[]) => { From 809b9b52717a839acdf9321ccb88b6dbbc8aedfe Mon Sep 17 00:00:00 2001 From: zhiyuanzmj <260480378@qq.com> Date: Thu, 10 Jul 2025 19:22:10 +0800 Subject: [PATCH 2/2] test: mark todo --- packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts b/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts index c82d432f1d4..6b21e5e5569 100644 --- a/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts +++ b/packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts @@ -341,7 +341,7 @@ describe('api: createVaporApp', () => { }) }) - test('config.globalProperty', () => { + test.todo('config.globalProperty', () => { const { app } = define({ setup() { return [] @@ -351,7 +351,7 @@ describe('api: createVaporApp', () => { app.config.globalProperties.msg = 'hello world' } catch (e) {} expect( - `app.config.globalProperties is not supported in vapor mode`, + `app.config.globalProperties is not supported in vapor mode components`, ).toHaveBeenWarned() }) })