Files
Situation-Awareness-Platfor…/src/components/index.ts
2025-03-12 18:41:20 +08:00

52 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Animation from '@/components/Animation/index.vue';
import GLink from '@/components/GLink/index.vue';
import OptionLink from '@/components/OptionLink/index.vue';
import Number from '@/components/Number/index.vue';
import Panel from '@/components/Panel/index.vue';
import Time from '@/components/Time/index.vue';
import Copy from '@/components/Copy/index.vue';
import EmptyData from '@/components/EmptyData/index.vue';
import DataPanel from '@/components/DataPanel/index.vue';
import DataPanelV2 from '@/components/v2/DataPanel/index.vue';
import RichLabel from '@/components/RichLabel/index.vue';
import Card from '@/components/Card/index.vue';
import Icon from '@/components/Icon/index.vue';
import UserAvatar from '@/components/UserAvatar/index.vue';
import GText from '@/components/GText/index.vue';
import GAvatar from '@/components/GAvatar/index.vue';
import GrayNumber from '@/components/v2/GrayNum/index.vue'
const GLOBAL_COMPONENT_MAP = {
GLink,
OptionLink,
Number,
Panel,
Time,
Copy,
EmptyData,
DataPanel,
RichLabel,
Card,
Icon,
UserAvatar,
GText,
GAvatar,
DataPanelV2,
GrayNumber
};
const GlobalComponentsPlugin = {
install(app) {
Object.entries(GLOBAL_COMPONENT_MAP).forEach(([name, component]) => {
app.component(name, component);
// 使用G开头重新声明组件过渡阶段后面统一使用G开头
if (!name.startsWith('G')) {
app.component(`G${name}`, component);
}
});
}
};
export default GlobalComponentsPlugin;