textareaAlert.vue 1.8 KB
<template>
	<view class="alertWrap">
		<view class="alert">
			<view class="closeBtn">
				<image @click="$emit('close')" src="../static/image/ic_94@2x.png" mode=""></image>
			</view>
			<view class="alertTitle">
				失败原因
			</view>
			<view class="alertContent">
				<textarea maxlength="100" v-model="reason" placeholder="请输入失败原因" />
				<view class="textLength">
					{{reason.length}}/100
				</view>
			</view>
			<view class="bottomBtnAlt">
				<view class="bottomBtn">
					发送
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				reason:''
			}
		}
	}
</script>

<style lang="scss" scoped>
	.alertWrap{
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		background: $uni-bg-color-mask;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 2;
		.alert{
			width: 638rpx;
			background: #ffffff;
			border-radius: 44rpx;
			padding: 32rpx;
			.closeBtn{
				display: flex;
				justify-content: flex-end;
				image{width: $uni-img-size-40;height: $uni-img-size-40;}
			}
			.alertTitle{
				font-size: $uni-font-size-40;
				text-align: center;
				height: 90rpx;
				line-height: 90rpx;
				font-weight: 600;
			}
			.alertContent{
				padding: 20rpx;
				border-radius: 20rpx;
				font-size: $uni-font-size-26;
				line-height: $uni-font-lh-40;
				background: $uni-bg-color-hui;
				color: $uni-text-color-hui;
				textarea{
					width: 100%;
				}
				.textLength{
					text-align: right;
				}
			}
			.bottomBtnAlt{
				padding-top: 38rpx;
				display: flex;
				justify-content: center;
				.bottomBtn{
					flex: 1;
					height: 84rpx;
					background: #2e7ff9;
					border-radius: 68rpx;
					font-size: $uni-font-size-32;
					color: $uni-text-color-bai;
					line-height: 84rpx;
					text-align: center;
				}
			}
		}	
	}
</style>