Skip to content

Commit

Permalink
chore: 加上element函数声明
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Sep 22, 2022
1 parent f22b0a7 commit 09d3e59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import { Component, AllowedComponentProps, DefineComponent, VNodeProps } from 'v
import { ElTable } from 'element-plus';
export {};
declare global {
//unplugin-auto-import的Element是在页面加载到的时候才生成类型,这里全局声明一下
const ElLoading: typeof import('element-plus/es')['ElLoading'];
const ElMessage: typeof import('element-plus/es')['ElMessage'];
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'];
const ElNotification: typeof import('element-plus/es')['ElNotification'];
// svg-icon /el-cion-*组件定义
type Icon = DefineComponent<{
size: (StringConstructor | NumberConstructor)[];
Expand Down

0 comments on commit 09d3e59

Please sign in to comment.