@tuniao/tnui-vue3-uniapp
Version:
TuniaoUI for vue3 uniapp
16 lines (12 loc) • 338 B
text/typescript
import { INSTALLED_KEY } from '../constants'
import type { App, Plugin } from '@vue/runtime-core'
export const makeInstaller = (components: Plugin[] = []) => {
const install = (app: App) => {
if (app[INSTALLED_KEY]) return
app[INSTALLED_KEY] = true
components.forEach((c) => app.use(c))
}
return {
install,
}
}