注册全局组件SVG,集成pinia,封装axios

This commit is contained in:
2024-08-08 19:08:15 +08:00
parent f0cc1b54c2
commit 74bd16dc51
31 changed files with 4753 additions and 122 deletions

View File

@@ -0,0 +1,19 @@
import type { App, Component } from 'vue'
// 当组件很多的时候,可以使用
import { SvgIcon } from './staticExtend/SvgIcon'
// 这个地方将合并到对象中
const Components: {
[propName: string]: Component
} = { SvgIcon }
// 批量注册全局组件
export default {
install: (app: App) => {
Object.keys(Components).forEach((key) => {
app.component(key, Components[key])
})
},
}