Skip to content

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

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

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

Activity

wenyejie

wenyejie commented on Jun 27, 2019

@wenyejie

js中的数据类型

maozhuo123

maozhuo123 commented on Jul 3, 2019

@maozhuo123

Number, String, Boolean, Array, Function, Object

Ricemonster

Ricemonster commented on Jul 26, 2019

@Ricemonster

七种:

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

space-tu commented on Apr 7, 2021

@space-tu

官方文档:类型检查

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wenyejie@haizhilin2013@maozhuo123@Ricemonster@space-tu

        Issue actions

          [vue] prop验证的type类型有哪几种? · Issue #429 · haizlin/fe-interview