# NormalText(普通文本)
# 使用范围
ui、行为、规则组件通用
# 使用方式
config:{
name: {
text: '标题',
type: 'NormalText'
}
}
- 高阶版
config:{
name: {
text: '标题',
type: 'NormalText',
msg: '标题长度在10个字符以内',
require: true, // require 为true时,validate默认添加,仅验证内容是否为空
validate(value) {
if (!value) {
return {
stat: false,
msg: '内容不能为空'
}
}
if (value && value.length > 10) {
return {
stat: false,
msg: '标题长度在10个字符以内'
}
}
return {
stat: true,
msg: ''
}
}
}
}
# 特有参数
暂无
# 效果
