mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
types: reduce any (#8256)
This commit is contained in:
parent
d606b32c64
commit
1dc1b708f0
@ -1,4 +1,4 @@
|
||||
import { App, CSSProperties, TeleportProps } from 'vue';
|
||||
import { App, Plugin, CSSProperties, TeleportProps } from 'vue';
|
||||
import { inBrowser, ComponentInstance } from '../utils';
|
||||
import { Interceptor } from '../utils/interceptor';
|
||||
import { mountComponent, usePopupState } from '../utils/mount-component';
|
||||
@ -120,7 +120,7 @@ Dialog.resetDefaultOptions = () => {
|
||||
};
|
||||
|
||||
Dialog.install = (app: App) => {
|
||||
app.use(VanDialog as any);
|
||||
app.use((VanDialog as unknown) as Plugin);
|
||||
app.config.globalProperties.$dialog = Dialog;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { App, TeleportProps } from 'vue';
|
||||
import { App, Plugin, TeleportProps } from 'vue';
|
||||
import { ComponentInstance, inBrowser } from '../utils';
|
||||
import { mountComponent, usePopupState } from '../utils/mount-component';
|
||||
import { Interceptor } from '../utils/interceptor';
|
||||
@ -96,7 +96,7 @@ const ImagePreview = (
|
||||
ImagePreview.Component = VanImagePreview;
|
||||
|
||||
ImagePreview.install = (app: App) => {
|
||||
app.use(VanImagePreview as any);
|
||||
app.use((VanImagePreview as unknown) as Plugin);
|
||||
};
|
||||
|
||||
export default ImagePreview;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { App } from 'vue';
|
||||
import { App, Plugin } from 'vue';
|
||||
import { isObject, inBrowser, ComponentInstance } from '../utils';
|
||||
import { mountComponent, usePopupState } from '../utils/mount-component';
|
||||
import VanNotify, { NotifyType } from './Notify';
|
||||
@ -97,7 +97,7 @@ Notify.resetDefaultOptions = () => {
|
||||
};
|
||||
|
||||
Notify.install = (app: App) => {
|
||||
app.use(VanNotify as any);
|
||||
app.use((VanNotify as unknown) as Plugin);
|
||||
app.config.globalProperties.$notify = Notify;
|
||||
};
|
||||
|
||||
|
@ -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 { mountComponent, usePopupState } from '../utils/mount-component';
|
||||
import VanToast, { ToastType, ToastPosition } from './Toast';
|
||||
@ -179,7 +179,7 @@ Toast.allowMultiple = (value = true) => {
|
||||
};
|
||||
|
||||
Toast.install = (app: App) => {
|
||||
app.use(VanToast as any);
|
||||
app.use((VanToast as unknown) as Plugin);
|
||||
app.config.globalProperties.$toast = Toast;
|
||||
};
|
||||
|
||||
|
@ -309,7 +309,7 @@ export default createComponent({
|
||||
type="file"
|
||||
class={bem('input')}
|
||||
accept={props.accept}
|
||||
capture={props.capture as any}
|
||||
capture={(props.capture as unknown) as boolean}
|
||||
multiple={props.multiple}
|
||||
disabled={props.disabled}
|
||||
onChange={onChange}
|
||||
|
Loading…
x
Reference in New Issue
Block a user