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