add tab bar
This commit is contained in:
+19
-1
@@ -1,11 +1,29 @@
|
||||
export default defineAppConfig({
|
||||
pages: [
|
||||
'pages/index/index'
|
||||
'pages/index/index',
|
||||
'pages/repair/repair',
|
||||
'pages/user/user',
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: 'WeChat',
|
||||
navigationBarTextStyle: 'black'
|
||||
},
|
||||
tabBar: {
|
||||
list: [
|
||||
{
|
||||
pagePath: 'pages/index/index',
|
||||
text: '主页'
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/repair/repair',
|
||||
text: '维修'
|
||||
},
|
||||
{
|
||||
pagePath: 'pages/user/user',
|
||||
text: '我的'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useLaunch } from '@tarojs/taro'
|
||||
import 'taro-ui/dist/style/index.scss'
|
||||
//import 'taro-ui/dist/style/index.scss'
|
||||
import './app.scss'
|
||||
|
||||
function App({ children }: PropsWithChildren<any>) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
navigationBarTitleText: '首页',
|
||||
usingComponents: {}
|
||||
})
|
||||
|
||||
@@ -14,9 +14,7 @@ class Index extends Component {
|
||||
render(): ReactNode {
|
||||
return (
|
||||
<View>
|
||||
<Text>
|
||||
{this.state.msg}
|
||||
</Text>
|
||||
<Text>{this.state.msg}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
usingComponents: {},
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { View, Text } from "@tarojs/components";
|
||||
import { Component, ReactNode } from "react";
|
||||
|
||||
export default class RepairPage extends Component {
|
||||
render(): ReactNode {
|
||||
return (
|
||||
<View>
|
||||
<Text>Repair Page</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
usingComponents: {},
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { View, Text } from "@tarojs/components";
|
||||
import { Component, ReactNode } from "react";
|
||||
|
||||
export default class UserPage extends Component {
|
||||
render(): ReactNode {
|
||||
return (
|
||||
<View>
|
||||
<Text>User Page</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user