/
index.jsx
88 lines (81 loc) · 1.57 KB
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import React, { Component } from 'react'
import { View } from '@styli/taro'
import { navigateTo } from '@tarojs/taro'
import './index.css'
const data = [
{
title: 'Class A',
path: '/pages/classa/index',
},
{
title: 'Class B',
path: '/pages/classb/index',
},
{
title: 'Class C',
path: '/pages/classc/index',
},
{
title: 'Function A',
path: '/pages/functiona/index',
},
{
title: 'Function B',
path: '/pages/functionb/index',
},
{
title: 'Function C',
path: '/pages/functionc/index',
},
{
title: 'Arrow Function A',
path: '/pages/arrowa/index',
},
{
title: 'Arrow Function b',
path: '/pages/arrowb/index',
},
{
title: 'connect class',
path: '/pages/connectclass/index',
},
{
title: 'connect function',
path: '/pages/connectfunction/index',
},
{
title: 'connect arrow',
path: '/pages/connectarrow/index',
},
]
export default class Index extends Component {
componentWillMount() {}
componentDidMount() {}
componentWillUnmount() {}
componentDidShow() {}
componentDidHide() {}
render() {
return (
<View h-500 center column pt-260>
{data.map((item, index) => (
<View
key={index}
f-25
fontBold
w-200
h-100
red70
bgRed10
p-10
rounded-10
center
mb-10
onClick={() => navigateTo({ url: item.path })}
>
{item.title}
</View>
))}
</View>
)
}
}