diff --git a/src/main.ts b/src/main.ts index f476df3..98b1dc8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,8 +26,8 @@ export default function install (Vue: Vue, { router, siteIdList, isDebug = false */ const pushBAIDU: any = new PushBAIDU(siteIdList, isDebug); - // 获取Vue版本 - const VUE_VERSION: number = getVueVersion(Vue) || 0; + // 获取Vue版本(获取失败则默认为2) + const VUE_VERSION: number = getVueVersion(Vue) || 2; // 2.x可以直接挂载到原型上 if ( VUE_VERSION === 2 ) {