mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 21:22:33 +08:00
🐛 Fixing a bug. #I85DEI webstorm不识别ts全局定义的变量
This commit is contained in:
parent
544f93576c
commit
2f2516c322
@ -46,7 +46,7 @@ other.elSvg(app);
|
||||
app
|
||||
.use(pinia) // pinia 存储
|
||||
.use(router) // 路由
|
||||
.use(ElementPlus, { i18n: i18n.global.t }) // ElementPlus 全局引入
|
||||
.use(ElementPlus) // ElementPlus 全局引入
|
||||
.use(ElementIcons) // elementIcons 图标全局引入
|
||||
.use(i18n) // 国际化
|
||||
.mount('#app');
|
||||
|
14
src/types/func.ts
Normal file
14
src/types/func.ts
Normal file
@ -0,0 +1,14 @@
|
||||
// 定义全局属性的类型
|
||||
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
||||
import { ComponentCustomProperties } from 'vue';
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
parseTime: Function;
|
||||
parseDate: Function;
|
||||
dateTimeStr: string;
|
||||
dateStr: string;
|
||||
timeStr: string;
|
||||
baseURL: string;
|
||||
}
|
||||
}
|
14
src/types/global.d.ts
vendored
14
src/types/global.d.ts
vendored
@ -106,17 +106,3 @@ declare interface TableType<T = any> {
|
||||
[key: string]: T;
|
||||
};
|
||||
}
|
||||
|
||||
// 定义全局属性的类型
|
||||
import { ComponentCustomProperties } from 'vue';
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
parseTime: Function;
|
||||
parseDate: Function;
|
||||
dateTimeStr: string;
|
||||
dateStr: string;
|
||||
timeStr: string;
|
||||
baseURL: string;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user