From d69f0992c75c79b7e86d18aca13ee064918fe9d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E4=B8=AA=E4=B8=89?= <2029364173@qq.com> Date: Fri, 14 Jul 2023 16:09:34 +0000 Subject: [PATCH] =?UTF-8?q?!27=20=E4=BF=AE=E5=A4=8D=EF=BC=8C[VueTypes=20wa?= =?UTF-8?q?rn]:=20VueTypes.extend=20is=20deprecated.=E8=AD=A6=E5=91=8A?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20Merge=20pull=20request=20!27=20from=20?= =?UTF-8?q?=E4=B8=89=E4=B8=AA=E4=B8=89/ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/propTypes.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/utils/propTypes.ts b/src/utils/propTypes.ts index 4d69bb6..2f31820 100644 --- a/src/utils/propTypes.ts +++ b/src/utils/propTypes.ts @@ -1,5 +1,5 @@ import { CSSProperties } from 'vue'; -import { createTypes, VueTypeValidableDef, VueTypesInterface } from 'vue-types'; +import VueTypes, { createTypes, toValidableType, VueTypeValidableDef, VueTypesInterface } from 'vue-types'; type PropTypes = VueTypesInterface & { readonly style: VueTypeValidableDef; @@ -14,12 +14,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 };