diff --git a/pages.json b/pages.json index 8b5c09498c289165d7e476d0ce4a7672105a2ac4..3a1b1b2f3f52a4b91b65748eebd5e202c14cdc40 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 d5a2a3414ba4f802f2c6f93044b9da39442d3dd3..6768c34188f248f66315b873e5beb111a7540282 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 05f0ebd33668acf8c3e9c5ada35863d5e4e43811..420a8249c41d7a4e3c2a6f6004c61a409f74270e 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 bc370f79fef5a19d70106f038eb36fc3762aeb1f..744d7fa12136e385e994d38b6d51bee2d2444d2c 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 57da1c3506d2f9b0bde2b287d790371be4315be7..f481f08a484d0da968d1ee230e5b25264c770eaf 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',