帖子
帖子
用户
博客
课程
显示全部楼层
28
帖子
0
勋章
228
Y币

[多端开发] textarea confirm-type 不起作用, 如何利用它来发送信息呢

[复制链接]
发表于 2022-5-8 17:25:56
<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>


380
帖子
4
勋章
6
Y币
放form 标签里面
您需要登录后才可以回帖 登录

本版积分规则