2.1.4 • Published 1 year ago
@alicloud/console-components-inline-editor v2.1.4
@ali/wind-rc-inline-editor
a wind library
install
tnpm i @ali/wind-rc-inline-editor --save-dev
Usage
import SimpleEditor from '@ali/wind-rc-inline-editor';
<SimpleEditor
intl={intl}
maxLength={100}
onSubmit={nameValue => {
}}
>test</SimpleEditor>
API
参数 | 说明 | 类型 | 必填 | 默认值 |
---|---|---|---|---|
type | 修改的类型, 名字或者描述 | 'name' or 'desc' | true | - |
shape | 触发修改的类型 | 'icon' or 'text' | true | - |
minLength | 文案最小长度 | number | true | - |
maxLength | 文案最大长度 | number | true | - |
classPrefix | class 的 prefix 默认(next) | string | true | - |
onClose | 弹窗关闭的回调 | () => void | true | - |
onSubmit | 提交的的回调 | (value: string) => void | true | - |
children | 被包裹的内容 | - | false | - |
validateRegExp | 校验的表达式 | Regex | false | - |
okText | 弹窗确认按钮 | string | false | 确认 |
cancelText | 弹窗取消按钮 | string | false | 取消 |
editText | 编辑文案 | string | false | 编辑 |
tipFormatText | 提示格式的 Message | string | false | 长度为{min}-{max}个字符,以大小字母或中文开头,可包含数字,"_"或"-" |
noEmptyText | 提示为空的文案 | string | false | 不能为空 |
invalidText | 格式错误的文案 | string | false | 格式不合法 |