feat: 使用 tabbar layout + wot icon
This commit is contained in:
parent
ee52ae132d
commit
4f6d271c28
@ -33,8 +33,9 @@ export default defineUniPages({
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/my/index',
|
||||
icon: 'i-carbon-user-avatar',
|
||||
isUnocssIcon: true,
|
||||
icon: 'user',
|
||||
// 经过验证发现unocss这样跨文件动态图标,无法显示,所以先用wot icon 吧
|
||||
// isUnocssIcon: true,
|
||||
text: '我的',
|
||||
},
|
||||
],
|
||||
|
4
src/layouts/tabbar.vue
Normal file
4
src/layouts/tabbar.vue
Normal file
@ -0,0 +1,4 @@
|
||||
<template>
|
||||
<slot />
|
||||
<fg-tabbar />
|
||||
</template>
|
@ -1,6 +1,7 @@
|
||||
<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
|
||||
<route lang="json5" type="home">
|
||||
{
|
||||
layout: 'tabbar',
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
navigationBarTitleText: '首页',
|
||||
@ -28,7 +29,6 @@
|
||||
<text class="text-green-500">tabbar</text>
|
||||
</view>
|
||||
</view>
|
||||
<fg-tabbar />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<route lang="json5" type="page">
|
||||
{
|
||||
layout: 'default',
|
||||
layout: 'tabbar',
|
||||
style: {
|
||||
navigationBarTitleText: '我的',
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user