feat: 点击进入多语言页面

This commit is contained in:
菲鸽 2024-04-02 21:25:00 +08:00
parent 9f972136cc
commit dd8a2ebfa5
3 changed files with 17 additions and 21 deletions

View File

@ -51,6 +51,13 @@
"style": { "style": {
"navigationBarTitleText": "关于" "navigationBarTitleText": "关于"
} }
},
{
"path": "pages/index/i18n",
"type": "page",
"style": {
"navigationBarTitleText": "%app.name%"
}
} }
], ],
"subPackages": [ "subPackages": [

View File

@ -17,7 +17,7 @@
<text class="text-red-500">菲鸽</text> <text class="text-red-500">菲鸽</text>
</view> </view>
<view class="text-center mt-8"> <view class="text-center mt-8">
<wd-button type="primary">wot 组件库测试</wd-button> <wd-button type="primary" @click="gotoPage()">进入多语言页面</wd-button>
</view> </view>
<view class="text-center py-4"> <view class="text-center py-4">
@ -36,6 +36,12 @@ import PLATFORM from '@/utils/platform'
const { safeAreaInsets } = uni.getSystemInfoSync() const { safeAreaInsets } = uni.getSystemInfoSync()
console.log(PLATFORM) console.log(PLATFORM)
const gotoPage = () => {
uni.navigateTo({
url: '/pages/index/i18n',
})
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -17,30 +17,13 @@
</view> </view>
<view class="text-center text-4xl main-title-color mt-4">unibest</view> <view class="text-center text-4xl main-title-color mt-4">unibest</view>
<view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view> <view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
<view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view> <view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view>
<view class="mt-8 text-center"> <view class="mt-8 text-center">
<text class="text-green-400">在线文档</text> <text class="text-green-400">当前模板分支i18n</text>
<!-- #ifndef H5 -->
https://codercup.github.io/unibest-docs/
<!-- #endif -->
<!-- #ifdef H5 -->
<a href="https://codercup.github.io/unibest-docs/" target="_blank">
https://codercup.github.io/unibest-docs/
</a>
<!-- #endif -->
</view>
<view class="mt-4 text-center">
<text class="text-green-400">在线预览</text>
<!-- #ifndef H5 -->
https://codercup.github.io/unibest/
<!-- #endif -->
<!-- #ifdef H5 -->
<a href="https://codercup.github.io/unibest/" target="_blank">
https://codercup.github.io/unibest/
</a>
<!-- #endif -->
</view> </view>
</view> </view>
<tabbar />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>