/
index.js
113 lines (104 loc) · 3.95 KB
/
index.js
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import Taro from '@tarojs/taro'
import { View } from '@tarojs/components'
import { AtCard } from 'taro-ui'
import DocsHeader from '../../components/doc-header'
import './index.scss'
export default class CardPage extends Taro.Component {
config = {
navigationBarTitleText: 'Taro UI'
}
handleClick = () => {
console.log('Card handleClick')
}
render () {
return (
<View className='page'>
<DocsHeader title='Card 卡片' />
<View className='doc-body'>
<View className='panel'>
<View className='panel__title'>基础卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard title='这是个标题' onClick={this.handleClick}>
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
<View className='panel'>
<View className='panel__title'>带缩略图的卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard
title='这是个标题'
thumb='http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png'
>
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
<View className='panel'>
<View className='panel__title'>带图标的卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard
title='这是个标题'
icon={{ value: 'tags', color: '#77a1fd' }}
>
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
<View className='panel'>
<View className='panel__title'>带小信息的卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard
note='小Tips'
title='这是个标题'
thumb='http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png'
>
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
<View className='panel'>
<View className='panel__title'>完整的卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard
note='小Tips'
extra='额外信息'
title='这是个标题'
thumb='http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png'
>
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
<View className='panel'>
<View className='panel__title'>通栏卡片</View>
<View className='panel__content no-padding'>
<View className='example-item'>
<AtCard
isFull
note='小Tips'
extra='额外信息'
title='这是个标题'
thumb='http://img10.360buyimg.com/jdphoto/s72x72_jfs/t5872/209/5240187906/2872/8fa98cd/595c3b2aN4155b931.png'
>
这也是内容区 可以随意定义功能 这也是内容区 可以随意定义功能
这也是内容区 可以随意定义功能
</AtCard>
</View>
</View>
</View>
</View>
</View>
)
}
}