keyboard-accessory
设置 input / textarea 聚焦时键盘上方 cover-view / cover-image 工具栏视图
示例代码:
<!--pages/component/pages/input/input.mcml-->
<view class="container">
<view class="cssname">keyboard-accessory</view>
<view class="textareaClass">
<input placeholder="设置键盘上方工具栏视图">
<keyboard-accessory style="display:flex;height: 50px;">
<cover-view bindtap="keyboardTap" style="flex: 1; background: green;">1</cover-view>
<cover-view bindtap="keyboardTap" style="flex: 1; background: red;">2</cover-view>
</keyboard-accessory>
</input>
</view>
</view>
// pages/component/pages/input/input.js
Page({
data: {
},
keyboardTap: function(e){
mc.showModal({
showCancel: false,
content: '点了点我'
})
}
})