uview-next
Version:
基于uView UI 2.0,110+高质量组件库,支持vue2和vue3,支持鸿蒙,支持多语言,搭配便捷工具助力,让开发更得心应手
52 lines (50 loc) • 1.28 kB
JavaScript
import { defineProps } from '../../libs/util/props';
import theme from '../../libs/config/theme.js'
export default defineProps('form', {
// 当前form的需要验证字段的集合
model: {
type: Object,
default: () => ({})
},
// 验证规则
rules: {
type: [Object, Function, Array],
default: () => ({})
},
// 有错误时的提示方式,message-提示信息,toast-进行toast提示
// border-bottom-下边框呈现红色,none-无提示
errorType: {
type: String,
default: 'message'
},
// 是否显示表单域的下划线边框
borderBottom: {
type: Boolean,
default: true
},
// 下划线边框的颜色
borderBottomColor: {
type: String,
default: theme.borderColorLight
},
// label的位置,left-左边,top-上边
labelPosition: {
type: String,
default: 'left'
},
// label的宽度,单位px
labelWidth: {
type: [String, Number],
default: 45
},
// lable字体的对齐方式
labelAlign: {
type: String,
default: 'left'
},
// lable的样式,对象形式
labelStyle: {
type: Object,
default: () => ({})
}
})