forked from ant-design/ant-design-mini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.axml.tsx
83 lines (80 loc) · 2.03 KB
/
index.axml.tsx
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
import { InternalData, Page, View } from 'tsxml';
import AntButton from '../../../src/Button/index.axml';
import AntContainer from '../../../src/Container/index.axml';
import AntGuideTour from '../../../src/GuideTour/index.axml';
export default ({
list,
baseVisible,
props,
slotVisible,
moreVisible,
controlledVisible,
current,
swiperVisible,
}: InternalData) => (
<Page>
<AntGuideTour
items={[list[0]]}
visible={baseVisible}
onCancel="closeTour"
onChange="onChange"
/>
<AntGuideTour
items={list}
visible={moreVisible}
onCancel="closeTour"
onChange="onChange"
/>
<AntGuideTour
items={list}
visible={swiperVisible}
onCancel="closeTour"
onChange="onChange"
swiperable={true}
/>
<AntGuideTour
items={list}
current={current}
visible={controlledVisible}
onCancel="closeTour"
onChange="onChangeControlled"
/>
{/* #if ALIPAY */}
<AntGuideTour
items={list}
visible={slotVisible}
onCancel="closeTour"
onChange="onChange"
jumpText='跳过'
gotItText='知道了'
prevStepText='上一步'
nextStepText='下一步'
>
<View class="step-box" slot="step" slot-scope="props">
step-{props.index}
</View>
</AntGuideTour>
{/* #endif */}
<AntContainer title="基础用法" className="list">
<AntButton onTap="openTour" data-field="baseVisible">
单图模式
</AntButton>
<AntButton onTap="openTour" data-field="moreVisible">
多图模式
</AntButton>
<AntButton onTap="openTour" data-field="swiperVisible">
滑动模式
</AntButton>
<AntButton onTap="openTour" data-field="controlledVisible">
受控模式
</AntButton>
</AntContainer>
{/* #if ALIPAY */}
<AntContainer title="插槽用法" className="list">
<AntButton onTap="openTour" data-field="slotVisible">
开始
</AntButton>
</AntContainer>
{/* #endif */}
</Page>
);