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
<template>
<div id="create-success">
<div v-show="step === 2" class="box one">
<van-cell-group class="input-cell">
<van-field v-model="newTemplateName" placeholder="请输入新的模板名称!" />
</van-cell-group>
</div>
<div v-show="step === 1" class="box two">
<div class="success-icon">
<img class="fg" src="../../../public/img/success.png" alt="success-fg">
<p>创建活动成功!</p>
</div>
</div>
<div class="box three">
<div class="btn-group">
<template v-if="step === 1">
<van-button type="info" @click="saveNewTemplate">保存为新的模板</van-button>
<van-button type="info" @click="$router.push('/ActTemplate')">完成</van-button>
</template>
<template v-if="step === 2">
<van-button type="info" @click="$router.push('/ActTemplate')">取消</van-button>
<van-button type="info">完成</van-button>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: "createSuccess",
components: {},
data() {
return {
newTemplateName: '',
step: 1
};
},
methods: {
saveNewTemplate() {
this.step = 2;
}
}
};
</script>
<style lang="scss">
#create-success {
display: flex;
flex-direction: column;
height: 100%;
.box {
margin-bottom: 20px;
}
.one {
flex: 1;
.input-cell {
width: 90%;
margin: 20px auto;
border: 1px solid #d4cfcf;
}
}
.two {
flex: 3;
.success-icon {
margin-top: 100px;
text-align: center;
img {
margin: 0 auto;
}
p {
font-size: 14px;
}
}
}
.three {
display: flex;
justify-content: center;
padding: 0 20px;
.btn-group {
.van-button {
width: 150px;
&:first-child{
margin-right: 10px;
}
}
}
}
}
</style>