1
This commit is contained in:
24
uview-plus/components/u-form-item/formItem.js
Normal file
24
uview-plus/components/u-form-item/formItem.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* @Author : LQ
|
||||
* @Description :
|
||||
* @version : 1.0
|
||||
* @Date : 2021-08-20 16:44:21
|
||||
* @LastAuthor : LQ
|
||||
* @lastTime : 2021-08-20 17:04:32
|
||||
* @FilePath : /u-view2.0/uview-ui/libs/config/props/formItem.js
|
||||
*/
|
||||
export default {
|
||||
// formItem 组件
|
||||
formItem: {
|
||||
label: '',
|
||||
prop: '',
|
||||
rules: [],
|
||||
borderBottom: '',
|
||||
labelPosition: '',
|
||||
labelWidth: '',
|
||||
rightIcon: '',
|
||||
leftIcon: '',
|
||||
required: false,
|
||||
leftIconStyle: '',
|
||||
}
|
||||
}
|
||||
55
uview-plus/components/u-form-item/props.js
Normal file
55
uview-plus/components/u-form-item/props.js
Normal file
@@ -0,0 +1,55 @@
|
||||
import { defineMixin } from '../../libs/vue'
|
||||
import defProps from '../../libs/config/props.js'
|
||||
export const props = defineMixin({
|
||||
props: {
|
||||
// input的label提示语
|
||||
label: {
|
||||
type: String,
|
||||
default: () => defProps.formItem.label
|
||||
},
|
||||
// 绑定的值
|
||||
prop: {
|
||||
type: String,
|
||||
default: () => defProps.formItem.prop
|
||||
},
|
||||
// 绑定的规则
|
||||
rules: {
|
||||
type: Array,
|
||||
default: () => defProps.formItem.rules
|
||||
},
|
||||
// 是否显示表单域的下划线边框
|
||||
borderBottom: {
|
||||
type: [String, Boolean],
|
||||
default: () => defProps.formItem.borderBottom
|
||||
},
|
||||
// label的位置,left-左边,top-上边
|
||||
labelPosition: {
|
||||
type: String,
|
||||
default: () => defProps.formItem.labelPosition
|
||||
},
|
||||
// label的宽度,单位px
|
||||
labelWidth: {
|
||||
type: [String, Number],
|
||||
default: () => defProps.formItem.labelWidth
|
||||
},
|
||||
// 右侧图标
|
||||
rightIcon: {
|
||||
type: String,
|
||||
default: () => defProps.formItem.rightIcon
|
||||
},
|
||||
// 左侧图标
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: () => defProps.formItem.leftIcon
|
||||
},
|
||||
// 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
|
||||
required: {
|
||||
type: Boolean,
|
||||
default: () => defProps.formItem.required
|
||||
},
|
||||
leftIconStyle: {
|
||||
type: [String, Object],
|
||||
default: () => defProps.formItem.leftIconStyle,
|
||||
}
|
||||
}
|
||||
})
|
||||
264
uview-plus/components/u-form-item/u-form-item.vue
Normal file
264
uview-plus/components/u-form-item/u-form-item.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user