index.ts 476 B

12345678910111213141516171819
  1. import { Loading } from './src/service'
  2. import { vLoading } from './src/directive'
  3. import type { App } from 'vue'
  4. // installer and everything in all
  5. export const ElLoading = {
  6. install(app: App) {
  7. app.directive('loading', vLoading)
  8. app.config.globalProperties.$loading = Loading
  9. },
  10. directive: vLoading,
  11. service: Loading,
  12. }
  13. export default ElLoading
  14. export { vLoading, vLoading as ElLoadingDirective, Loading as ElLoadingService }
  15. export * from './src/types'