能否提供.d.ts文件
shiyun opened this issue · comments
RT
没有哦
declare module 'vue/types/vue' {
interface Toast {
(text: string): void
top: (text: string) => void
center: (text: string) => void
bottom: (text: string) => void
}
interface Vue {
$toast: Toast
}
}
loading类似
declare interface ToastOpt {
type: "bottom" | "top" | "center"
duration: number
wordWrap: boolean
width: string | "auto"
}
declare interface ToastInterface {
(text: string, opt?: ToastOpt): void
top: (text: string, opt?: ToastOpt) => void
center: (text: string, opt?: ToastOpt) => void
bottom: (text: string, opt?: ToastOpt) => void
}
declare module 'vue/types/vue' {
interface Vue {
$toast: ToastInterface
}
}