index.ts 618 B

12345678910111213141516171819
  1. import { VueConstructor } from 'vue'
  2. import VxeImagePreviewComponent from '../image/src/preview'
  3. import { VxeUI } from '@vxe-ui/core'
  4. import { dynamicApp } from '../dynamics'
  5. import { openPreviewImage } from '../image/src/util'
  6. export const VxeImagePreview = Object.assign(VxeImagePreviewComponent, {
  7. install (app: VueConstructor) {
  8. app.component(VxeImagePreviewComponent.name as string, VxeImagePreviewComponent)
  9. }
  10. })
  11. VxeUI.previewImage = openPreviewImage
  12. dynamicApp.use(VxeImagePreview)
  13. VxeUI.component(VxeImagePreviewComponent)
  14. export const ImagePreview = VxeImagePreview
  15. export default VxeImagePreview