神奇的props
props: {
deliver: {
type: Object,
default: () => {
return {};
},
},
},
deliver {}
props: {
deliver: {
type: Object,
default: () => {},
},
},
deliver undefined
PS:昨天看了ES6写法,箭头函数还可以这么写
加小括号它就能识别出这玩意是对象OR空数组了!
props: {
deliver: {
type: Object,
default: () => ({})
},
},
人生到处知何似,应似飞鸿踏雪泥。