feat: add global properties typings (#5075)

This commit is contained in:
三咲智子 2021-12-31 16:39:10 +08:00 committed by GitHub
parent 784bc069da
commit dad5dc1743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
typings/global.d.ts vendored
View File

@ -94,4 +94,17 @@ declare module 'vue' {
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$message: typeof import('element-plus')['ElMessage']
$notify: typeof import('element-plus')['ElNotification']
$msgbox: typeof import('element-plus')['ElMessageBox']
$messageBox: typeof import('element-plus')['ElMessageBox']
$alert: typeof import('element-plus')['ElMessageBox']['alert']
$confirm: typeof import('element-plus')['ElMessageBox']['confirm']
$prompt: typeof import('element-plus')['ElMessageBox']['prompt']
$loading: typeof import('element-plus')['ElLoadingService']
}
}
export {}