Confirm.vue
679 字节
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
<template>
<div class="confirm-button">
<button @click="getButtonClick">{{text || 'ȷ'}}</button>
</div>
</template>
<script>
export default {
name: "confirm-button",
props:["text"],
data() {
return {
msg:true
};
},
methods: {
getButtonClick() {
this.$emit("message", this.msg); // ֵ
}
}
};
</script>
<style>
.confirm-button {
margin-top: 100px;
}
.confirm-button button{
width: 180px;
height: 40px;
font-size: 22px;
background-color: aqua;
outline: 0;
border: 0;
color: #fff;
border-radius: 8px;
}
</style>