更新记录
1.0.0(2025-12-30)
下载此版本
master
平台兼容性
uni-app(4.45)
| Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
| √ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
| 微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
| √ |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
其他
安装
在市场导入xf-fm-textareauni_modules版本的即可,无需import
组件关联说明
代码演示
插件使用
基本用法
<template>
<view class="xf-col" style="gap: 16px;">
<xf-fm-textarea bottomTip="副标题" customClass="b-mt16" required v-model="text1" title="标题" disabled @confirm="confirm" />
<xf-fm-textarea tip="内容提示" customClass="b-mt16" v-model="text2" title="标题(最多100字)" :maxlength="100" />
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const text1 = ref('');
const text2 = ref('');
function confirm(value: string | undefined) {
console.log(value)
}
</script>
API
Props
| 属性名 |
说明 |
类型 |
默认值 |
| v-model |
当前输入的值 |
object |
- |
| title |
标题 |
string |
- |
| bottomTip |
副标题 |
string |
- |
| tip |
显示tooltip内容 |
string |
- |
| customClass |
自定义class |
string |
- |
| required |
是否必填* |
boolean |
false |
| labelWidth |
左边标题宽度 |
string |
- |
| placeholder |
输入框占位提示文字 |
string |
请输入 |
| disabled |
是否禁用输入框 |
boolean |
false |
| maxlength |
输入的最大长度 |
number |
-1 |
| count |
是否显示统计字数 |
boolean |
true |
事件 Emits
| 事件名 |
说明 |
返回值 |
| confirm |
点击键盘的完成按钮时触发 |
|