<template>
	<view class="main">
		<view class="cu-chat">
			<view class="cu-item self">
				<view class="main">
					<view class="content bg-green shadow">
						<text>喵喵喵！喵喵喵！喵喵喵！喵喵！喵喵！！喵！喵喵喵！</text>
					</view>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
			</view>
			<view class="cu-item">
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
				<view class="main">
					<view class="content shadow">
						<text>喵喵喵！喵喵喵！</text>
					</view>
				</view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<image src="https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg" class="radius" mode="widthFix"></image>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
			</view>
			<view class="cu-item self">
				<view class="main">
					<view class="action text-bold text-grey">
						3"
					</view>
					<view class="content shadow">
						<text class="cuIcon-sound text-xxl padding-right-xl"> </text>
					</view>
				</view>
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big107000.jpg);"></view>
			</view>
			<view class="cu-item">
				<view class="cu-avatar radius" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big143004.jpg);"></view>
				<view class="main">
					<view class="content shadow">
						xxxxxxs
					</view>
				</view>
			</view>
		</view>
		<view :class="InputBottom!=0?'cu-bar foot input cur':'cu-bar foot input'" :style="'bottom:'+InputBottom+'px'">
			<view class="action" @click="sendvoice">
				<text class="cuIcon-sound text-grey"></text>
			</view>
			<input v-if="!isvoice" class="solid-bottom" @focus="InputFocus" @blur="InputBlur" :disabled="isinput" :adjust-position="false"
			 :focus="false" maxlength="300" :placeholder="textinput" cursor-spacing="10"></input>
			<button class="flex-sub" style="font-size: 30rpx; height: 64rpx;padding: 0;" v-else>按住发送语音</button>
			<view class="action" style="margin-right: 20rpx;">
				<text class="cuIcon-picfill text-grey"></text>
			</view>
			<button class="cu-btn bg-green shadow">发送</button>
		</view>
	</view>
</template>

<script>
	export default {
		components: {

		},
		onLoad() {

		},
		mounted() {

		},
		data() {
			return {
				keyword: "",
				InputBottom: 0,
				isvoice: false,
				textinput: "请输入",
				isinput: false
			}
		},
		methods: {
			InputFocus(e) {
				this.InputBottom = e.detail.height
			},
			InputBlur(e) {
				this.InputBottom = 0
			},
			sendvoice() {
				this.isvoice = !this.isvoice
			}
		}
	};
</script>

<style lang="scss">
	page {
		padding-bottom: 100rpx;
	}
</style>
