uview-next
Version:
基于uView UI 2.0,110+高质量组件库,支持vue2和vue3,支持鸿蒙,支持多语言,搭配便捷工具助力,让开发更得心应手
60 lines (58 loc) • 1.34 kB
JavaScript
import { defineProps } from '../../libs/util/props';
import theme from '../../libs/config/theme.js'
export default defineProps('formItem', {
// input的label提示语
label: {
type: String,
default: ''
},
// 绑定的值
prop: {
type: String,
default: ''
},
// 是否显示表单域的下划线边框
borderBottom: {
type: [String, Boolean],
default: ''
},
// 下划线边框的颜色
borderBottomColor: {
type: String,
default: theme.borderColorLight
},
// label的位置,left-左边,top-上边
labelPosition: {
type: String,
default: ''
},
// label的宽度,单位px
labelWidth: {
type: [String, Number],
default: ''
},
// 右侧图标
rightIcon: {
type: String,
default: ''
},
// 左侧图标
leftIcon: {
type: String,
default: ''
},
// 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
required: {
type: Boolean,
default: false
},
leftIconStyle: {
type: [String, Object],
default: ''
},
// 验证规则
rules: {
type: [Object, Function, Array],
default: () => ({})
}
})