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