Skip to content

Commit 5688b69

Browse files
committed
fix(mp-vue): 补充支付宝小程序全局类型声明
1 parent 0b9d310 commit 5688b69

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/uni-mp-vue/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import type { App } from 'vue'
33
import { initApp } from '@dcloudio/uni-vue'
44
import { pruneComponentPropsCache } from './helpers/renderProps'
55

6+
declare const my: any
7+
68
interface MountOptions {
79
independent?: boolean
810
createApp?: (instance: any, root?: string) => void
@@ -70,10 +72,8 @@ function getGlobalCreateApp(method: string) {
7072
typeof (global as any)[method] !== 'undefined'
7173
) {
7274
return (global as any)[method]
73-
// @ts-expect-error
7475
} else if (typeof my !== 'undefined') {
7576
// 支付宝小程序开启globalObjectMode配置后才会有global
76-
// @ts-expect-error
7777
return (my as any)[method]
7878
}
7979
}

0 commit comments

Comments
 (0)