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
| <template>
| <div class="popup" v-show="isShow">
| <div class="popup-inner">
| <h2 class="popup-title">{{ this.title || '温馨提示' }}</h2>
| <a class="popup-close" title="点击关闭" @click="popupClose">X</a>
| <div class="popup-main">
| <div class="popup-content">
| <slot></slot>
| </div>
| <!-- <div class="popup-button"><input type="button" value="确定" @click="popupClose"></div> -->
| </div>
| </div>
| </div>
| </template>
| <script>
| export default {
| name: 'alert',
| props: {
| isShow: {
| type: Boolean,
| required: true
| },
| title: {
| type: String,
| required: false
| }
| },
| methods: {
| popupClose () {
| this.$emit('close')
| }
| }
| }
| </script>
| <style scoped lang="stylus">
| .popup{
| position: fixed;
| left: 0;
| top: 0;
| width: 100%;
| height: 100%;
| background: rgba(0, 0, 0, .5);
| z-index: 100;
| display: flex;
| justify-content: center;
| align-items: center;
| }
| .popup-inner{
| width: 500px;
| // height: 320px;
| background: #fff;
| position: relative;
| font-size: 14px;
| }
| .popup-title{
| height: 72px;
| line-height: 76px;
| padding-left 20px
| background: #eee;
| color: #333;
| font-size: 32px;
| text-indent: 10px;
| font-weight: normal;
| font-weight 500
| }
| .popup-close{
| position: absolute;
| top:12px;
| right: 20px;
| color: #666;
| font-weight: bold;
| font-size: 32px;
| cursor: pointer;
| }
| .popup-content{
| color: #333;
| text-align: center;
| margin: 40px 0 40px;
| font-size 30px
| word-break: break-all;
| padding: 0 20px
| }
| .popup-button{
| text-align: center;
| }
| .popup-button input[type=button]{
| width: 156px;
| height: 48px;
| border: 1px solid #eee;
| // line-height: 48px;
| color: #fff;
| background: #D70012;
| border-radius: 4px;
| }
| </style>
|
|