index.ts 714 B

123456789101112131415161718192021222324252627282930
  1. import { App } from 'vue'
  2. import AppPage from './page/index.vue'
  3. import AppView from './view/index.vue'
  4. import AppScrollView from './scroll-view/index.vue'
  5. import AppStatusbar from './statusbar/index.vue'
  6. import AppNavback from './navback/index.vue'
  7. import AppNavbar from './navbar/index.vue'
  8. import AppFooter from './footer/index.vue'
  9. import AppBlock from './block/index.vue'
  10. const components = {
  11. AppPage,
  12. AppView,
  13. AppFooter,
  14. AppScrollView,
  15. AppStatusbar,
  16. AppNavback,
  17. AppNavbar,
  18. AppBlock,
  19. }
  20. const install = (app: App) => {
  21. for (const [key, value] of Object.entries(components)) {
  22. app.component(key, value); //注册全局组件
  23. }
  24. }
  25. export default {
  26. install,
  27. }