@beisen-phoenix/mobile-inner-input

一个单纯的输入框 充满整个容器

Usage no npm install needed!

<script type="module">
  import beisenPhoenixMobileInnerInput from 'https://cdn.skypack.dev/@beisen-phoenix/mobile-inner-input';
</script>

README

一个单纯的输入框 充满整个容器

API

参数 说明 类型 默认值
value 指定输入框当前值 any
defaultValue 输入框初始值 any
placeholder 输入框没有值时的帮助文字 string 点击填写
readOnly 是否只读 boolean false
type 类型 string

多语言

参数 说明 类型 默认值
translation 语言包 用于翻译组件内置常量 {inputHolder: string} {inputHolder: '点击填写'}

事件

参数 说明 类型 默认值
onFocus 输入框获取焦点时的回调 (e: React.FocusEvent) => void
onChange 输入框内容变化时的回调 (e: React.ChangeEvent) => void
onBlur 输入框失去焦点时的回调 (e: React.FocusEvent) => void

文字对齐

参数 说明 类型 默认值
textAlign 文字对齐方式 可选值为css支持的所有对齐方式 string right