app.tsx 1023 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { Component, PropsWithChildren } from 'react'
  2. import './app.scss'
  3. import '@/context/locales/index'
  4. import { Provider } from 'react-redux'
  5. import store from './store/store'
  6. import { View } from '@tarojs/components'
  7. import GlobalModal from './components/layout/GlobalModal'
  8. import Taro from '@tarojs/taro'
  9. // import 'taro-ui/dist/style/index.scss'
  10. const App: React.FC<PropsWithChildren> = ({ children }) => {
  11. global.isDebug = Taro.getStorageSync('isDebug')
  12. return <Provider store={store}>
  13. <View style={{position:'absolute',left:0,right:0,top:0,height:300,backgroundColor:'red'}}/>
  14. {children}
  15. <GlobalModal />
  16. <View style={{position:'absolute',left:0,right:0,top:0,height:300,backgroundColor:'red'}}/>
  17. </Provider>
  18. }
  19. // class App extends Component<PropsWithChildren> {
  20. // componentDidMount () {}
  21. // componentDidShow () {}
  22. // componentDidHide () {}
  23. // // this.props.children 是将要会渲染的页面
  24. // render () {
  25. // return this.props.children
  26. // }
  27. // }
  28. export default App