From 2a8c9cb1b555387c74f871ff4fc08067f8eca21d Mon Sep 17 00:00:00 2001 From: neverland Date: Fri, 29 Oct 2021 13:08:50 +0800 Subject: [PATCH] types: fix VueConstructor type conflict (#9750) --- src/locale/index.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/locale/index.ts b/src/locale/index.ts index 3c8bdc257..54b5adcee 100644 --- a/src/locale/index.ts +++ b/src/locale/index.ts @@ -2,16 +2,8 @@ import Vue from 'vue'; import { deepAssign } from '../utils/deep-assign'; import defaultMessages from './lang/zh-CN'; -declare module 'vue' { - interface VueConstructor { - util: { - defineReactive(obj: object, key: string, value: any): void; - }; - } -} - const proto = Vue.prototype; -const { defineReactive } = Vue.util; +const { defineReactive } = (Vue as any).util; defineReactive(proto, '$vantLang', 'zh-CN'); defineReactive(proto, '$vantMessages', {