File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
app-backend-vue2/src/components
app-backend-vue3/src/components Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ function getPropType (type) {
155
155
if ( Array . isArray ( type ) ) {
156
156
return type . map ( t => getPropType ( t ) ) . join ( ' or ' )
157
157
}
158
+ if ( type == null ) {
159
+ return 'null'
160
+ }
158
161
const match = type . toString ( ) . match ( fnTypeRE )
159
162
return typeof type === 'function'
160
163
? ( match && match [ 1 ] ) || 'any'
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ function processProps (instance) {
44
44
45
45
for ( let key in instance . props ) {
46
46
const propDefinition = propDefinitions ? propDefinitions [ key ] : null
47
+ console . log ( key , propDefinition )
47
48
key = camelize ( key )
48
49
propsData . push ( {
49
50
type : 'props' ,
@@ -76,6 +77,9 @@ function getPropType (type) {
76
77
if ( Array . isArray ( type ) ) {
77
78
return type . map ( t => getPropType ( t ) ) . join ( ' or ' )
78
79
}
80
+ if ( type == null ) {
81
+ return 'null'
82
+ }
79
83
const match = type . toString ( ) . match ( fnTypeRE )
80
84
return typeof type === 'function'
81
85
? ( match && match [ 1 ] ) || 'any'
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default {
8
8
9
9
props: {
10
10
count: {
11
- type: Number ,
11
+ type: [ Number , String , null ] ,
12
12
default: 4
13
13
}
14
14
},
You can’t perform that action at this time.
0 commit comments