first commit
This commit is contained in:
36
node_modules/vant/es/utils/props.mjs
generated
vendored
Normal file
36
node_modules/vant/es/utils/props.mjs
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
const unknownProp = null;
|
||||
const numericProp = [Number, String];
|
||||
const truthProp = {
|
||||
type: Boolean,
|
||||
default: true
|
||||
};
|
||||
const makeRequiredProp = (type) => ({
|
||||
type,
|
||||
required: true
|
||||
});
|
||||
const makeArrayProp = () => ({
|
||||
type: Array,
|
||||
default: () => []
|
||||
});
|
||||
const makeNumberProp = (defaultVal) => ({
|
||||
type: Number,
|
||||
default: defaultVal
|
||||
});
|
||||
const makeNumericProp = (defaultVal) => ({
|
||||
type: numericProp,
|
||||
default: defaultVal
|
||||
});
|
||||
const makeStringProp = (defaultVal) => ({
|
||||
type: String,
|
||||
default: defaultVal
|
||||
});
|
||||
export {
|
||||
makeArrayProp,
|
||||
makeNumberProp,
|
||||
makeNumericProp,
|
||||
makeRequiredProp,
|
||||
makeStringProp,
|
||||
numericProp,
|
||||
truthProp,
|
||||
unknownProp
|
||||
};
|
||||
Reference in New Issue
Block a user