types: improve generated component typing (#8308)

This commit is contained in:
neverland
2021-03-08 16:52:15 +08:00
committed by GitHub
parent 0c740b6962
commit ae40d40c24
86 changed files with 190 additions and 173 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { App, CSSProperties, TeleportProps } from 'vue';
import { ComponentInstance, inBrowser, installable } from '../utils';
import { ComponentInstance, inBrowser, withInstall } from '../utils';
import { mountComponent, usePopupState } from '../utils/mount-component';
import { Interceptor } from '../utils/interceptor';
import { PopupCloseIconPosition } from '../popup';
@@ -97,10 +97,10 @@ const ImagePreview = (
return instance;
};
ImagePreview.Component = installable(VanImagePreview);
ImagePreview.Component = withInstall<typeof VanImagePreview>(VanImagePreview);
ImagePreview.install = (app: App) => {
app.use(installable(VanImagePreview));
app.use(withInstall<typeof VanImagePreview>(VanImagePreview));
};
export default ImagePreview;