diff --git a/pages.json b/pages.json index 9fad6a95a7254135606af9a191f9e1684b96dbc9..fa156702e30ec78960058cae9363c5e963dbc18b 100644 --- a/pages.json +++ b/pages.json @@ -419,6 +419,26 @@ "navigationBarTitleText": "call-method-other 组合式 API" } }, + { + "path": "pages/component-instance/provide/provide-options-1", + "style": { + "navigationBarTitleText": "provide 选项式 API 字面量" + } + }, + { + "path": "pages/component-instance/provide/provide-options-2", + "style": { + "navigationBarTitleText": "provide 选项式 API 函数" + } + }, + { + "path": "pages/component-instance/provide/provide-composition", + "style": { + "navigationBarTitleText": "provide 组合式 API" + } + }, + + { "path": "pages/component-instance/circular-reference/circular-reference", "style": { @@ -537,24 +557,6 @@ } }, // #endif - { - "path": "pages/composition/provide/provide", - "style": { - "navigationBarTitleText": "provide" - } - }, - { - "path": "pages/composition/provide/provide-page2", - "style": { - "navigationBarTitleText": "provide-page-2" - } - }, - { - "path": "pages/composition/inject/inject", - "style": { - "navigationBarTitleText": "inject" - } - }, { "path": "pages/composition/setup/setup", "style": { @@ -791,12 +793,6 @@ "navigationBarTitleText": "onScopeDispose" } }, - { - "path": "pages/composition-api/dependency-injection/provide/provide", - "style": { - "navigationBarTitleText": "依赖注入" - } - }, { "path": "pages/built-in/component/teleport/teleport-options", "style": { diff --git a/pages/component-instance/inject/inject-composition.uvue b/pages/component-instance/inject/inject-composition.uvue new file mode 100644 index 0000000000000000000000000000000000000000..f5e3646ddea80cfeb44503564ec63c6baa3e39c1 --- /dev/null +++ b/pages/component-instance/inject/inject-composition.uvue @@ -0,0 +1,32 @@ + + + \ No newline at end of file diff --git a/pages/composition/provide/component-for-inject-1.uvue b/pages/component-instance/inject/inject-options-1.uvue similarity index 79% rename from pages/composition/provide/component-for-inject-1.uvue rename to pages/component-instance/inject/inject-options-1.uvue index 17e132b9a09e2ea2952510d02cd319f061e6d347..0657dec6c3920ccf75a91ebebf5f467a9a88c2d8 100644 --- a/pages/composition/provide/component-for-inject-1.uvue +++ b/pages/component-instance/inject/inject-options-1.uvue @@ -1,41 +1,41 @@ \ No newline at end of file diff --git a/pages/composition-api/dependency-injection/provide/provide.uvue b/pages/composition-api/dependency-injection/provide/provide.uvue deleted file mode 100644 index 4022ed0f5f8d0994312a2928c917c3470cd837c4..0000000000000000000000000000000000000000 --- a/pages/composition-api/dependency-injection/provide/provide.uvue +++ /dev/null @@ -1,15 +0,0 @@ - - - \ No newline at end of file diff --git a/pages/composition/inject/inject.test.js b/pages/composition/inject/inject.test.js deleted file mode 100644 index 01bc3edb6f940e3047924b9d0b1d21da7bc25d28..0000000000000000000000000000000000000000 --- a/pages/composition/inject/inject.test.js +++ /dev/null @@ -1,13 +0,0 @@ -const PAGE_PATH = '/pages/composition/inject/inject' - -describe('inject', () => { - it('basic', async () => { - const page = await program.reLaunch(PAGE_PATH) - await page.waitFor('view') - const globalProvideMsgEl = await page.$('.global-provide-msg') - const globalProvideMsgElText = await globalProvideMsgEl.text() - expect(globalProvideMsgElText).toBe( - 'globalProvideMsg: global provide message' - ) - }) -}) diff --git a/pages/composition/inject/inject.uvue b/pages/composition/inject/inject.uvue deleted file mode 100644 index 1db77431c3cf4624fcf185b0a9356792ba6f01fc..0000000000000000000000000000000000000000 --- a/pages/composition/inject/inject.uvue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/pages/index/index.uvue b/pages/index/index.uvue index b7834aab2916f95e66f507a80654f77dfba44970..a195434bf152b591c512759d1075feeca74c07b1 100644 --- a/pages/index/index.uvue +++ b/pages/index/index.uvue @@ -331,6 +331,27 @@ export default { url: 'call-method-other-composition' } ] + }, + { + id: 'provide', + name: 'provide', + children: [ + { + id: 'provide-options-1', + name: 'provide 选项式 API 字面量方式', + url: 'provide-options-1' + }, + { + id: 'provide-options-2', + name: 'provide 选项式 API 函数方式', + url: 'provide-options-2' + }, + { + id: 'provide-composition', + name: 'provide 组合式 API', + url: 'provide-composition' + }, + ] } ] as Page[] },