import { ElLists, ElListsSingle } from './modules' import _Vue, { PluginFunction, VueConstructor } from 'vue' interface InstallFunction extends PluginFunction { installed?: boolean } const Components: { [key: string]: VueConstructor } = { ElLists: ElLists, ElListsSingle: ElListsSingle } const install: InstallFunction = (Vue: typeof _Vue) => { if (install.installed) return Object.keys(Components).forEach((name: any) => { Vue.component(name, Components[name]) }) install.installed = true } export default install