feat: 优化多语言页面
This commit is contained in:
parent
a7b0c536a7
commit
9cf135ced5
@ -54,7 +54,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/i18n",
|
||||
"path": "pages/about/i18n",
|
||||
"type": "page",
|
||||
"style": {
|
||||
"navigationBarTitleText": "%app.name%"
|
||||
|
@ -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>
|
||||
|
2
src/types/uni-pages.d.ts
vendored
2
src/types/uni-pages.d.ts
vendored
@ -6,7 +6,7 @@
|
||||
interface NavigateToOptions {
|
||||
url: "/pages/index/index" |
|
||||
"/pages/about/about" |
|
||||
"/pages/index/i18n";
|
||||
"/pages/about/i18n";
|
||||
}
|
||||
interface RedirectToOptions extends NavigateToOptions {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user