From 62271135ccd29cbee57ad27e05a38fc226cc0dc6 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 23 Jan 2024 11:15:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4web=E7=AB=AF=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=9A=84=E7=89=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 2 ++ .../basic/define-model/define-model.test.js | 6 ++++++ .../basic/define-options/define-options.test.js | 6 ++++++ .../watch-sync-effect/watch-sync-effect.uvue | 2 +- pages/tab-bar/composition-api.uvue | 10 ++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pages.json b/pages.json index 8b5c094..3a1b1b2 100644 --- a/pages.json +++ b/pages.json @@ -399,6 +399,7 @@ "navigationBarTitleText": "defineExpose" } }, + // #ifdef APP { "path": "pages/composition-api/basic/define-model/define-model", "style": { @@ -411,6 +412,7 @@ "navigationBarTitleText": "defineOptions" } }, + // #endif { "path": "pages/composition-api/basic/define-slots/define-slots", "style": { diff --git a/pages/composition-api/basic/define-model/define-model.test.js b/pages/composition-api/basic/define-model/define-model.test.js index d5a2a34..6768c34 100644 --- a/pages/composition-api/basic/define-model/define-model.test.js +++ b/pages/composition-api/basic/define-model/define-model.test.js @@ -1,6 +1,12 @@ const PAGE_PATH = '/pages/composition-api/basic/define-model/define-model' describe('defineModel', () => { + if (process.env.uniTestPlatformInfo.startsWith('web')) { + // TODO: web 端暂不支持 + it('web', async () => { + expect(1).toBe(1) + }) + } let page = null beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) diff --git a/pages/composition-api/basic/define-options/define-options.test.js b/pages/composition-api/basic/define-options/define-options.test.js index 05f0ebd..420a824 100644 --- a/pages/composition-api/basic/define-options/define-options.test.js +++ b/pages/composition-api/basic/define-options/define-options.test.js @@ -1,6 +1,12 @@ const PAGE_PATH = '/pages/composition-api/basic/define-options/define-options' describe('defineOptions', () => { + if (process.env.uniTestPlatformInfo.startsWith('web')) { + // TODO: web 端暂不支持 + it('web', async () => { + expect(1).toBe(1) + }) + } let page = null beforeAll(async () => { page = await program.reLaunch(PAGE_PATH) diff --git a/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.uvue b/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.uvue index bc370f7..744d7fa 100644 --- a/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.uvue +++ b/pages/composition-api/reactivity/watch-sync-effect/watch-sync-effect.uvue @@ -55,7 +55,7 @@ watchCountRes.value = `count: ${count.value}, count ref text: ${countRef.value!.value}` // #endif // #ifdef WEB - watchCountRes.value = `count: ${count.value}, count ref text: ${countRef.value!.childNodes[0] as HTMLElement).innerText}` + watchCountRes.value = `count: ${count.value}, count ref text: ${(countRef.value!.childNodes[0] as HTMLElement).innerText}` // #endif } else { watchCountRes.value = `count: ${ count.value }, count ref text: ` diff --git a/pages/tab-bar/composition-api.uvue b/pages/tab-bar/composition-api.uvue index 57da1c3..f481f08 100644 --- a/pages/tab-bar/composition-api.uvue +++ b/pages/tab-bar/composition-api.uvue @@ -60,7 +60,12 @@ { name: 'defineOptions', url: 'define-options', + // #ifdef APP enable: true, + // #endif + // #ifdef WEB + enable: false, + // #endif }, { name: 'defineSlots', @@ -70,7 +75,12 @@ { name: 'defineModel', url: 'define-model', + // #ifdef APP enable: true, + // #endif + // #ifdef WEB + enable: false, + // #endif }, { name: 'useSlots', -- GitLab