deming/pageE/more/WriteComments.vue

75 lines
1.5 KiB
Vue
Raw Normal View History

2020-06-04 08:21:34 +08:00
<template>
<view class="write-complaints">
<view class="main-container">
2020-06-18 14:57:26 +08:00
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
2020-06-04 08:21:34 +08:00
<u-upload
ref="uUpload"
@on-uploaded="onUploaded"
:custom-btn="true"
:max-count="count"
:auto-upload="false"
>
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<img src="../static/mine/27.png" />
</view>
</u-upload>
</view>
<view class="write-btn" @click="submit">发表意见</view>
</view>
</template>
<script>
export default {
data() {
return {
count: 4, // 最大图片数量
2020-06-18 14:57:26 +08:00
text: '',
2020-06-04 08:21:34 +08:00
imageList: []
}
},
methods: {
submit() {
this.$refs.uUpload.upload();
},
onUploaded(list) {
2020-06-18 14:57:26 +08:00
console.log(this.text, list)
2020-06-04 08:21:34 +08:00
}
},
}
</script>
<style lang="scss" scoped>
.write-complaints {
min-height: calc(100vh - var(--window-top));
background-color: #ECECEC;
.main-container {
background-color: #ffffff;
padding: 30rpx;
textarea {
width: 100% !important;
margin-bottom: 60rpx;
}
.slot-btn {
width: 140rpx;
height: 140rpx;
background: rgba(236,236,236,1);
border-radius: 10rpx;
text-align: center;
> img {
margin-top: 48rpx;
width: 54rpx;
height: 49rpx;
}
}
}
.write-btn {
margin: 120rpx auto 0;
width: 690rpx;
height: 98rpx;
background: rgba(255,120,15,1);
border-radius: 46rpx;
font-size: 36rpx;
color: rgba(255,255,255,1);
text-align: center;
line-height: 98rpx;
}
}
</style>