| | |
| | | /// <reference types="miniprogram-api-typings" /> |
| | | /// <reference types="miniprogram-api-typings" /> |
| | | declare type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance; |
| | | declare type ToastType = 'loading' | 'success' | 'error'; |
| | | declare type ToastType = 'loading' | 'success' | 'warning' | 'error'; |
| | | declare type ToastPositionType = 'top' | 'middle' | 'bottom'; |
| | | declare type ToastDirectionType = 'row' | 'column'; |
| | | export declare type ToastOptionsType = { |
| | |
| | | placement?: ToastPositionType; |
| | | preventScrollThrough?: boolean; |
| | | direction?: ToastDirectionType; |
| | | close?: <T = any>() => T; |
| | | close?: () => void; |
| | | }; |
| | | declare function Toast(options: ToastOptionsType): void; |
| | | declare function showToast(options?: ToastOptionsType): void; |