[baozhangchao] 3 лет назад
Родитель
Сommit
520a458acc
4 измененных файлов: 12 добавлений и 17 удалений
  1. 6
    17
      src/pages/index/index.jsx
  2. 5
    0
      src/pages/test/index.config.js
  3. 0
    0
      src/pages/test/index.jsx
  4. 1
    0
      src/pages/test/index.less

+ 6
- 17
src/pages/index/index.jsx Просмотреть файл

@@ -1,24 +1,13 @@
1
-import { Component } from 'react'
2 1
 import { View, Text } from '@tarojs/components'
3 2
 import './index.less'
4 3
 
5
-export default class Index extends Component {
6 4
 
7
-  componentWillMount () { }
8 5
 
9
-  componentDidMount () { }
6
+export default (props) => {
10 7
 
11
-  componentWillUnmount () { }
12
-
13
-  componentDidShow () { }
14
-
15
-  componentDidHide () { }
16
-
17
-  render () {
18
-    return (
19
-      <View className='index'>
20
-        <Text>测试</Text>
21
-      </View>
22
-    )
23
-  }
8
+  return (
9
+    <View className='index'>
10
+      <Text>测试</Text>
11
+    </View>
12
+  )
24 13
 }

+ 5
- 0
src/pages/test/index.config.js Просмотреть файл

@@ -0,0 +1,5 @@
1
+export default {
2
+  navigationBarTitleText: '我的'
3
+}
4
+
5
+

+ 0
- 0
src/pages/test/index.jsx Просмотреть файл


+ 1
- 0
src/pages/test/index.less Просмотреть файл

@@ -0,0 +1 @@
1
+