soft-ui-vue3
Version:
一个Vue3前端组件库
19 lines (14 loc) • 455 B
text/typescript
import { INSTALLED_KEY } from '@soft-ui/constants'
import IconSymbolIds from 'virtual:svg-icons-names'
import type { App, Plugin } from 'vue'
export const makeInstaller = (components: Plugin[] = []) => {
const install = (app: App) => {
if (app[INSTALLED_KEY]) return
app[INSTALLED_KEY] = true
components.forEach((c) => app.use(c))
app.config.globalProperties.$icons = IconSymbolIds
}
return {
install
}
}