File tree 3 files changed +13
-0
lines changed
app-backend-vue2/src/components
app-backend-vue3/src/components
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ const fnTypeRE = /^(?:function|class) (\w+)/
150
150
* Convert prop type constructor to string.
151
151
*/
152
152
function getPropType ( type ) {
153
+ if ( Array . isArray ( type ) ) {
154
+ return type . map ( t => getPropType ( t ) ) . join ( ' or ' )
155
+ }
153
156
const match = type . toString ( ) . match ( fnTypeRE )
154
157
return typeof type === 'function'
155
158
? ( match && match [ 1 ] ) || 'any'
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ const fnTypeRE = /^(?:function|class) (\w+)/
67
67
* Convert prop type constructor to string.
68
68
*/
69
69
function getPropType ( type ) {
70
+ if ( Array . isArray ( type ) ) {
71
+ return type . map ( t => getPropType ( t ) ) . join ( ' or ' )
72
+ }
70
73
const match = type . toString ( ) . match ( fnTypeRE )
71
74
return typeof type === 'function'
72
75
? ( match && match [ 1 ] ) || 'any'
Original file line number Diff line number Diff line change @@ -76,6 +76,13 @@ export default {
76
76
}
77
77
},
78
78
79
+ props: {
80
+ multiTypeProp: {
81
+ type: [Date , Boolean ],
82
+ default: false
83
+ }
84
+ },
85
+
79
86
data () {
80
87
return {
81
88
localDate: new Date (),
You can’t perform that action at this time.
0 commit comments