import { App } from 'vue' import AppPage from './page/index.vue' import AppView from './view/index.vue' import AppScrollView from './scroll-view/index.vue' import AppStatusbar from './statusbar/index.vue' import AppNavback from './navback/index.vue' import AppNavbar from './navbar/index.vue' import AppFooter from './footer/index.vue' import AppBlock from './block/index.vue' const components = { AppPage, AppView, AppFooter, AppScrollView, AppStatusbar, AppNavback, AppNavbar, AppBlock, } const install = (app: App) => { for (const [key, value] of Object.entries(components)) { app.component(key, value); //注册全局组件 } } export default { install, }