diff --git a/pages.config.ts b/pages.config.ts index e36fc30..8e98f1d 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -1,4 +1,5 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages' +import tabbarList from './src/components/fg-tabbar/tabbarList' export default defineUniPages({ globalStyle: { @@ -28,32 +29,6 @@ export default defineUniPages({ fontSize: '10px', iconWidth: '24px', spacing: '3px', - list: [ - // 注意tabbar路由需要使用 layout:tabbar 布局 - { - pagePath: 'pages/index/index', - text: '首页', - icon: 'home', - iconType: 'wot', - }, - { - pagePath: 'pages/about/about', - text: '关于', - icon: 'i-carbon-code', - iconType: 'unocss', - }, - // { - // pagePath: 'pages/my/index', - // text: '我的', - // icon: '/static/logo.svg', - // iconType: 'local', - // }, - // { - // pagePath: 'pages/mine/index', - // text: '我的', - // icon: 'iconfont icon-my', - // iconType: 'iconfont', - // }, - ], + list: tabbarList as any, }, }) diff --git a/src/components/fg-tabbar/tabbarList.ts b/src/components/fg-tabbar/tabbarList.ts new file mode 100644 index 0000000..d4f7b90 --- /dev/null +++ b/src/components/fg-tabbar/tabbarList.ts @@ -0,0 +1,27 @@ +export default [ + // 注意tabbar路由需要使用 layout:tabbar 布局 + { + pagePath: 'pages/index/index', + text: '首页', + icon: 'home', + iconType: 'wot', + }, + { + pagePath: 'pages/about/about', + text: '关于', + icon: 'i-carbon-code', + iconType: 'unocss', + }, + // { + // pagePath: 'pages/my/index', + // text: '我的', + // icon: '/static/logo.svg', + // iconType: 'local', + // }, + // { + // pagePath: 'pages/mine/index', + // text: '我的', + // icon: 'iconfont icon-my', + // iconType: 'iconfont', + // }, +] diff --git a/src/pages.json b/src/pages.json index 7f469db..a3ceb1c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -39,7 +39,6 @@ } ] }, - "__esModule": true, "pages": [ { "path": "pages/index/index",