修复VueTypes.extend is deprecated.

This commit is contained in:
thiszhc 2023-07-14 23:56:45 +08:00
parent 6c86aa42fd
commit 3e64487c60

View File

@ -1,4 +1,5 @@
import { CSSProperties } from 'vue'; import { CSSProperties } from 'vue';
import VueTypes, { toType, toValidableType } from 'vue-types'
import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types'; import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types';
type PropTypes = VueTypesInterface & { type PropTypes = VueTypesInterface & {
@ -14,12 +15,13 @@ const propTypes = createTypes({
integer: undefined integer: undefined
}) as PropTypes; }) as PropTypes;
propTypes.extend([ export default class ProjectTypes extends VueTypes {
{ static get style() {
name: 'style', return toValidableType('style', {
getter: true, type: [String, Object],
type: [String, Object], default: undefined
default: undefined
})
} }
]); }
export { propTypes }; export { propTypes };