add propTypes工具以及vue-types
parent
7c09eb50a7
commit
548550bb42
@ -0,0 +1,25 @@
|
|||||||
|
import { CSSProperties } from 'vue';
|
||||||
|
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
|
||||||
|
|
||||||
|
type PropTypes = VueTypesInterface & {
|
||||||
|
readonly style: VueTypeValidableDef<CSSProperties>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const propTypes = createTypes({
|
||||||
|
func: undefined,
|
||||||
|
bool: undefined,
|
||||||
|
string: undefined,
|
||||||
|
number: undefined,
|
||||||
|
object: undefined,
|
||||||
|
integer: undefined
|
||||||
|
}) as PropTypes;
|
||||||
|
|
||||||
|
propTypes.extend([
|
||||||
|
{
|
||||||
|
name: 'style',
|
||||||
|
getter: true,
|
||||||
|
type: [String, Object],
|
||||||
|
default: undefined
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
export { propTypes };
|
||||||
Loading…
Reference in New Issue