1
1
// https://github.com/luban-h5-components/plugin-common-props
2
- import commonProps from '@luban-h5/plugin-common-props'
2
+ import PropTypes from '@luban-h5/plugin-common-props'
3
3
4
4
export default {
5
5
name : 'lbp-form-input' ,
@@ -26,12 +26,6 @@ export default {
26
26
/>
27
27
} ,
28
28
props : {
29
- name : {
30
- type : String ,
31
- default ( ) {
32
- return 'name'
33
- }
34
- } ,
35
29
type : {
36
30
type : String ,
37
31
default : 'text' ,
@@ -40,20 +34,18 @@ export default {
40
34
label : '类型'
41
35
}
42
36
} ,
43
- disabled : {
44
- type : Boolean ,
45
- default : false
46
- } ,
47
- // type: commonProps.type,
48
- placeholder : commonProps . placeholder ( '姓名' ) ,
49
- fontSize : commonProps . fontSize ,
50
- color : commonProps . color ,
51
- backgroundColor : commonProps . backgroundColor ,
52
- borderColor : commonProps . borderColor ,
53
- borderWidth : commonProps . borderWidth ,
54
- borderRadius : commonProps . borderRadius ,
55
- lineHeight : commonProps . lineHeight ,
56
- textAlign : commonProps . textAlign ( { defaultValue : 'left' } )
37
+ name : PropTypes . string ( { defaultValue : 'name' , label : 'name' } ) ,
38
+ disabled : PropTypes . boolean ( { label : 'disabled' } ) ,
39
+ fontSize : PropTypes . number ( { label : '字号(px)' } ) ,
40
+ placeholder : PropTypes . string ( { defaultValue : '提示信息' , label : '提示信息' } ) ,
41
+ color : PropTypes . color ( ) ,
42
+ backgroundColor : PropTypes . color ( { label : '背景色' , defaultValue : 'rgba(255, 255, 255, 0.2)' } ) ,
43
+ borderWidth : PropTypes . number ( { label : '边框宽度(px)' , defaultValue : 1 } ) ,
44
+ borderRadius : PropTypes . number ( { label : '圆角(px)' , defaultValue : 0 } ) ,
45
+ borderColor : PropTypes . color ( { label : '边框颜色' , defaultValue : '#ced4da' } ) ,
46
+ textAlign : PropTypes . textAlign ( { defaultValue : 'left' } ) ,
47
+ vertical : PropTypes . boolean ( ) ,
48
+ lineHeight : PropTypes . number ( { label : '行高(px)' , defaultValue : 1 } )
57
49
} ,
58
50
componentsForPropsEditor : {
59
51
'lbs-select-input-type' : {
0 commit comments