console
foucus: function (e) {
var that = this;
that.setData({
inputBottom: e.detail.height
})
},
blur: function (e) {
var that = this;
that.setData({
inputBottom: 0
})
},
<view class="say" style='bottom:{{inputBottom}}px'>
<image src="/imgs/share.png"></image>
<text>分享</text>
<view class="say1">
<input type="text" value="{{ say }}" placeholder="请输入内容" bindfocus="foucus" bindblur="blur" adjust-position='{{false}}' />
</view>
<view class="send">
<text>发送</text>
</view>
</view>
.say {
height: 100rpx;
box-shadow: 1px -1px 1px #e3e3e3;
position: fixed;
width: 700rpx;
bottom: 0;
display: flex;
flex-direction: row;
align-items: center;
padding: 0 30rpx;
justify-content: space-between;
background-color: #fff;
}
.say image {
width: 50rpx;
height: 50rpx;
}
.say .send text {
color: #fff;
font-size: 30rpx;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
width: 90rpx;
height: 90rpx;
background-color: rgb(229, 135, 135);
}
.say1 {
background-color: #F5F5F5;
display: flex;
flex-direction: row;
align-items: center;
height: 80rpx;
width: 460rpx;
border-radius: 35rpx;
font-size: 28rpx;
padding-left: 20rpx;
}