<template>
<view>
<textarea
v-model="inputText"
placeholder-style="color: #9ca3af; font-size: 14px; line-height: 18px;"
:maxlength="500"
:auto-height="true"
:show-confirm-bar="false"
:cursor-spacing="70"
confirm-type="send"
@input="onInput"
@confirm="handleSend"
placeholder="请输入内容"
style="
margin-top: 200px;
width: 100% !important;
min-height: 46px !important;
max-height: 96px;
overflow-y: auto;
box-sizing: border-box;
font-size: 14px;
line-height: 18px;
"
/>
</view>
</template>
<script setup lang="ts">
import { ref, onMounted, nextTick, computed } from "vue";
const inputText = ref<string>("")
const onInput = (e:any) => {
inputText.value = e.detail.value
}
const handleSend =() => {
inputText.value = ""
}
</script>
<style scoped lang="scss">
/ 全局禁止页面滚动 + 隐藏滚动条 /
page {
height: 100vh;
overflow: hidden;
overscroll-behavior: none;
}
height: 0;
display: none;
}
</style>
fantengfei (作者)
经过验证,原生微信小程就存在这个问题。
2026-05-19 18:27
DCloud_UNI_JBB
回复 fantengfei: 反馈到微信社区
2026-05-19 18:39