import { PluginFunction } from 'vue' ; import { PswpOptions , ManualCreateArgs } from '@/type' ; import { GlobalOption } from '@/config' ; import { registerDirective , manualCreate , UI } from '@/utils' ; import PhotoswipeComponent from '@/components/photoswipe.vue' ; const install = ( Vue , options ? ) => { if ( options ) GlobalOption . extend ( options ) ; registerDirective ( ) ; Vue . component ( 'Photoswipe' , PhotoswipeComponent ) ; Vue . prototype . $Pswp = { open ( args ) { UI . append ( ) ; return manualCreate ( args ) ; } , } ; } ; export const Photoswipe = PhotoswipeComponent ; export default install ;