Customize the `type` of props.

when viewing ide/components.html-sharpProp" rel=" nofollow noreferrer "> Props ,

type of
props can also be a custom constructor function that uses instanceof detection.

how to do this sentence?

for example, I have one:
propB: [String, Number]

so how do you implement one of the above custom constructors to define types?

Feb.28,2021

I just read it wrong. In fact, you define a function to detect parameters. The following means that the incoming data must have two attributes, name and age.

function Person(name, age) {
    this.name = name
    this.age = age
}

props:{
    data:{
       type: Person,
       required: true,
       default: 1
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e7de-2c425.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e7de-2c425.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?