popUpComponent.vue
1.27 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
<template>
<view>
<u-popup :show="show" mode="bottom" @open="open" :customStyle="{width:'100vw'}" round="6" safeAreaInsetBottom>
<view class="popCss">
<view class="padding-top text-lg text-center">
{{title}}
</view>
<view class="padding">
<u-textarea v-model="textarea" placeholder="请简单描述原因"></u-textarea>
</view>
<view class="flex justify-between">
<view class="w50" @click="close">
<u-button>取消</u-button>
</view>
<view class="w50" @click="confirm">
<u-button :customStyle="{color:'#CF000D'}">确定</u-button>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
name: "popUpComponent",
props: {
title: {
type: String,
default: "同意"
}
},
data() {
return {
textarea:"",
show: false,
};
},
methods: {
open() {
this.show = true;
},
close() {
this.show = false;
},
confirm(){
console.log(this.textarea);
this.show = false;
this.textarea = "";
}
}
}
</script>
<style lang="scss">
.popCss {
// text-align: center;
}
</style>