|
[多端开发]
textarea confirm-type 不起作用, 如何利用它来发送信息呢
[复制链接]
<template>
<view class="page">
<safe-area></safe-area>
<input auto-height v-model="textdata1" confirm-type="send" onconfirm="sendMsg1()"/>
<textarea auto-height v-model="textdata2" confirm-type="send" onconfirm="sendMsg2()"/>
</view>
</template>
<script>
export default {
name: 'test',
data() {
return {
textdata1: '',
textdata2: '',
};
},
methods:{
sendMsg1(){
api.alert({
msg: '发送:' + this.textdata1
});
},
sendMsg2(){
api.alert({
msg: '发送:' + this.textdata2
});
}
}
}
</script>
<style scoped>
.page {
height: 100%;
background-color: rgba(244, 244, 244, 1);
}
</style>
|
|