modal-example.vue
1.87 KB
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
<template>
<Modal
v-model="showExample"
width="700"
title="色卡图片示例">
<div>
<div>
<div class="example-1"></div>
<div class="example-2"></div>
<div class="example-3"></div>
<div class="example-4"></div>
<div class="example-5"></div>
</div>
<div>
<span class="example-title">商品正面图</span>
<span class="example-title">商品反面图</span>
<span class="example-title">模特图</span>
<span class="example-title">男生频道封面图</span>
<span class="example-title">女生频道封面图</span>
</div>
</div>
<div slot="footer" style="text-align: center">
<Button type="primary" size="large" @click="close">关闭</Button>
</div>
</Modal>
</template>
<script>
export default {
name: 'modal-example',
data() {
return {
showExample: false
};
},
methods: {
show() {
this.showExample = true;
},
close() {
this.showExample = false;
}
}
};
</script>
<style lang="scss">
@mixin exampleImg ($num: 1) {
display: inline-block;
width: 100px;
height: 150px;
border-radius: 3px;
background-image: url(../../statics/images/example/#{$num}.png);
background-repeat: no-repeat;
margin: 15px;
}
.example-1 {
@include exampleImg(1);
}
.example-2 {
@include exampleImg(2);
}
.example-3 {
@include exampleImg(3);
}
.example-4 {
@include exampleImg(4);
}
.example-5 {
@include exampleImg(5);
}
.example-title {
display: inline-block;
width: 130px;
text-align: center;
}
</style>