定义props时要注意的坑
来源:2-6 【讨论题】Virtual DOM
_小_七_
2021-10-02
记得不要写 null 在定义中,否则可能会在开发环境白屏
如
props: {
age: [Number, null]
}
要写确定的
props: {
age: [Number]
}
之前就遇到这个问题 https://www.jianshu.com/p/b7ecac9f3555
写回答
1回答
-
ustbhuangyi
2021-10-02
props 的类型定义,显然 null 不符合要求
00
相似问题