props:{
// 字符串
title:{
type: String,
default: ''
},
// 数组
list: {
type: Array,
default: () => []
},
// 数字
num: {
type: Number,
default: 0
},
// 布尔值
show: {
type: Boolean,
default: false
},
// 对象
data: {
type: Object,
default: () => {
return {}
}
},
// 函数
showDialog: {
type: Function,
default: function () { }
}
}
vue2 子组件 props 接收多种类型的数据
于 2023-08-16 16:37:05 首次发布