This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 903
/
index.vue
192 lines (178 loc) · 4.98 KB
/
index.vue
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- Created by Tw93 on 17/07/28. -->
<template>
<div class="wxc-demo">
<scroller class="scroller">
<title title="wxc-simple-flow"></title>
<category title="使用案例"></category>
<text class="title">含标题、描述、时间的简易流程图</text>
<wxc-simple-flow :list="testData1"></wxc-simple-flow>
<text class="title">可只显示标题,也支持显示多个高亮</text>
<wxc-simple-flow :list="testData2"></wxc-simple-flow>
<text class="title">可配置主题色</text>
<wxc-simple-flow :list="testData1" :themeColor="themeColor1"></wxc-simple-flow>
<text class="title">支持流程图动态更新</text>
<wxc-simple-flow :list="folding ? testData3 : testData3.slice(0, 4)"></wxc-simple-flow>
<div class="btn">
<text class="btn-txt" @click="()=>folding=!folding">{{folding ? '模拟动态更新-减少' : '模拟动态更新-增加'}}</text>
</div>
</scroller>
</div>
</template>
<style scoped>
.wxc-demo {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
}
.scroller {
flex: 1;
}
.title {
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
font-size: 26px;
color: #333333;
background-color: #eeeeee;
font-weight: bold;
}
.btn {
width: 600px;
height: 80px;
margin-top: 20px;
margin-bottom: 30px;
margin-left: 75px;
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 6px;
background-color: #ffc300;
border-color: #ffc300;
}
.btn-txt {
color: #ffffff;
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
font-size: 26px;
}
</style>
<script>
import Title from '../_mods/title.vue';
import Category from '../_mods/category.vue';
import { WxcSimpleFlow } from '../../index';
import { setTitle } from '../_mods/set-nav';
export default {
components: { Title, Category, WxcSimpleFlow },
data: () => ({
folding: false,
themeColor1: {
lineColor: '#bf280b',
pointInnerColor: '#b95048',
pointBorderColor: '#bf280b',
highlightTitleColor: '#bf280b',
highlightPointInnerColor: '#bf280b',
highlightPointBorderColor: '#d46262'
},
testData1: [
{
'date': '2017-05-24 21:10:29',
'desc': '',
'highlight': true,
'title': '方案已确认'
},
{
'date': '2017-05-24 19:54:28',
'desc': '',
'title': '方案已更新'
},
{
'date': '2017-05-24 19:50:21',
'desc': '您以确定了方案',
'title': '方案已上传'
},
{
'date': '2017-05-24 19:49:03',
'desc': '商家会在2个工作小时内电话或旺旺联系您',
'title': '商家已接单'
}
],
testData2: [
{
'highlight': true,
'title': '方案已确认'
},
{
'highlight': true,
'title': '方案已更新'
},
{
'title': '方案已上传'
},
{
'title': '商家已接单'
}
],
testData3: [
{
'date': '2017-05-24 21:10:43',
'desc': '',
'highlight': true,
'title': '预付款已支付'
},
{
'date': '2017-05-24 21:10:43',
'desc': '',
'title': '预付款已支付'
},
{
'date': '2017-05-24 21:10:41',
'desc': '',
'title': '订单待付款'
},
{
'date': '2017-05-24 21:10:29',
'desc': '',
'title': '方案已确认'
},
{
'date': '2017-05-24 19:54:28',
'desc': '',
'title': '方案已更新'
},
{
'date': '2017-05-24 19:50:21',
'desc': '您以确定了方案',
'title': '方案已上传'
},
{
'date': '2017-05-24 19:49:03',
'desc': '商家会在2个工作小时内电话或旺旺联系您',
'title': '商家已接单'
}
]
}),
created () {
setTitle('SimpleFlow');
}
}
</script>