import './adapter'; import Toast from './toast'; import NavigationBar from './navigation-bar'; import Overlay from './overlay'; import List from './list'; import SvgaPlayer from './svga-player'; const components = { NavigationBar, Overlay, List, SvgaPlayer, }; const install = (Vue: typeof window.Vue) => { Vue.use(Toast); // Vue.extend 出来的组件名字都是 VueComponent Object.keys(components) .forEach(key => { Vue.component(key, components[key]); }); }; if (typeof void 0 != typeof window && window.Vue) { install(window.Vue); } export default { install, Toast, NavigationBar, Overlay, List, SvgaPlayer, };