feat: 优化多语言页面

This commit is contained in:
菲鸽 2024-05-18 17:55:54 +08:00
parent a7b0c536a7
commit 9cf135ced5
4 changed files with 11 additions and 2 deletions

View File

@ -54,7 +54,7 @@
}
},
{
"path": "pages/index/i18n",
"path": "pages/about/i18n",
"type": "page",
"style": {
"navigationBarTitleText": "%app.name%"

View File

@ -15,6 +15,9 @@
鸽友们好我是
<text class="text-red-500">菲鸽</text>
</view>
<view class="text-center mt-8 text-#fff">
<wd-button type="success" @click="gotoPage('i18n')">进入多语言页面</wd-button>
</view>
<RequestComp />
<UploadComp />
</view>
@ -26,6 +29,12 @@ import UploadComp from './components/upload.vue'
//
const { safeAreaInsets } = uni.getSystemInfoSync()
const gotoPage = (path) => {
uni.navigateTo({
url: `/pages/about/${path}`,
})
}
</script>
<style lang="scss" scoped>

View File

@ -6,7 +6,7 @@
interface NavigateToOptions {
url: "/pages/index/index" |
"/pages/about/about" |
"/pages/index/i18n";
"/pages/about/i18n";
}
interface RedirectToOptions extends NavigateToOptions {}