fe-interview icon indicating copy to clipboard operation
fe-interview copied to clipboard

[vue] prop验证的type类型有哪几种?

Open haizhilin2013 opened this issue 7 years ago • 4 comments

[vue] prop验证的type类型有哪几种?

haizhilin2013 avatar Jun 22 '19 20:06 haizhilin2013

js中的数据类型

wenyejie avatar Jun 27 '19 02:06 wenyejie

Number, String, Boolean, Array, Function, Object

maozhuo123 avatar Jul 03 '19 03:07 maozhuo123

七种:

props:{
	title:String,
	likes: Number,
	isPublished: Boolean,
	commentIds: Array,
	author: Object,
	callback: Function,
	contactsPromise: Promise
}

Ricemonster avatar Jul 26 '19 00:07 Ricemonster

官方文档:类型检查

8种:String、Number、Boolean、Array、Object、Date、Function、Symbol、自定义构造函数

space-tu avatar Apr 07 '21 08:04 space-tu