types: reduce any (#8256)

This commit is contained in:
neverland 2021-03-03 17:46:00 +08:00 committed by GitHub
parent d606b32c64
commit 1dc1b708f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
import { App, CSSProperties, TeleportProps } from 'vue'; import { App, Plugin, CSSProperties, TeleportProps } from 'vue';
import { inBrowser, ComponentInstance } from '../utils'; import { inBrowser, ComponentInstance } from '../utils';
import { Interceptor } from '../utils/interceptor'; import { Interceptor } from '../utils/interceptor';
import { mountComponent, usePopupState } from '../utils/mount-component'; import { mountComponent, usePopupState } from '../utils/mount-component';
@ -120,7 +120,7 @@ Dialog.resetDefaultOptions = () => {
}; };
Dialog.install = (app: App) => { Dialog.install = (app: App) => {
app.use(VanDialog as any); app.use((VanDialog as unknown) as Plugin);
app.config.globalProperties.$dialog = Dialog; app.config.globalProperties.$dialog = Dialog;
}; };

View File

@ -1,4 +1,4 @@
import { App, TeleportProps } from 'vue'; import { App, Plugin, TeleportProps } from 'vue';
import { ComponentInstance, inBrowser } from '../utils'; import { ComponentInstance, inBrowser } from '../utils';
import { mountComponent, usePopupState } from '../utils/mount-component'; import { mountComponent, usePopupState } from '../utils/mount-component';
import { Interceptor } from '../utils/interceptor'; import { Interceptor } from '../utils/interceptor';
@ -96,7 +96,7 @@ const ImagePreview = (
ImagePreview.Component = VanImagePreview; ImagePreview.Component = VanImagePreview;
ImagePreview.install = (app: App) => { ImagePreview.install = (app: App) => {
app.use(VanImagePreview as any); app.use((VanImagePreview as unknown) as Plugin);
}; };
export default ImagePreview; export default ImagePreview;

View File

@ -1,4 +1,4 @@
import { App } from 'vue'; import { App, Plugin } from 'vue';
import { isObject, inBrowser, ComponentInstance } from '../utils'; import { isObject, inBrowser, ComponentInstance } from '../utils';
import { mountComponent, usePopupState } from '../utils/mount-component'; import { mountComponent, usePopupState } from '../utils/mount-component';
import VanNotify, { NotifyType } from './Notify'; import VanNotify, { NotifyType } from './Notify';
@ -97,7 +97,7 @@ Notify.resetDefaultOptions = () => {
}; };
Notify.install = (app: App) => { Notify.install = (app: App) => {
app.use(VanNotify as any); app.use((VanNotify as unknown) as Plugin);
app.config.globalProperties.$notify = Notify; app.config.globalProperties.$notify = Notify;
}; };

View File

@ -1,4 +1,4 @@
import { ref, App, TeleportProps, getCurrentInstance } from 'vue'; import { ref, App, Plugin, TeleportProps, getCurrentInstance } from 'vue';
import { isObject, inBrowser, ComponentInstance } from '../utils'; import { isObject, inBrowser, ComponentInstance } from '../utils';
import { mountComponent, usePopupState } from '../utils/mount-component'; import { mountComponent, usePopupState } from '../utils/mount-component';
import VanToast, { ToastType, ToastPosition } from './Toast'; import VanToast, { ToastType, ToastPosition } from './Toast';
@ -179,7 +179,7 @@ Toast.allowMultiple = (value = true) => {
}; };
Toast.install = (app: App) => { Toast.install = (app: App) => {
app.use(VanToast as any); app.use((VanToast as unknown) as Plugin);
app.config.globalProperties.$toast = Toast; app.config.globalProperties.$toast = Toast;
}; };

View File

@ -309,7 +309,7 @@ export default createComponent({
type="file" type="file"
class={bem('input')} class={bem('input')}
accept={props.accept} accept={props.accept}
capture={props.capture as any} capture={(props.capture as unknown) as boolean}
multiple={props.multiple} multiple={props.multiple}
disabled={props.disabled} disabled={props.disabled}
onChange={onChange} onChange={onChange}