import {Toast} from "vant";

export const Loading = {
    open() {
        Toast.loading({
            message: '加载中...',
            loadingType: 'spinner',
            duration: 10000,
            forbidClick: true,
        });
    },
    close() {
        Toast.clear();
    },
    success(val) {
        Toast.success(val);
    },
    tips(val) {
        Toast(val);
    },
    submit() {
        Toast.loading({
            message: '提交中...',
            duration: 10000,
            forbidClick: true,
        });
    }
};