import { App } from 'vue'
import AppPage from './page/index.vue'
import AppScrollView from './scroll-view/index.vue'
import AppStatusbar from './statusbar/index.vue'
import AppNavbar from './navbar/index.vue'

const components = {
    AppPage,
    AppScrollView,
    AppStatusbar,
    AppNavbar,
}

const install = (app: App) => {
    for (const [key, value] of Object.entries(components)) {
        app.component(key, value); //注册全局组件
    }
}

export default {
    install,
}