message-box-options.ts 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
import { VNode } from "vue";

export interface MessageBoxOptions {
    /**
     * 对话框类型
     *
     * @type {(string | 'info' | 'success' | 'warning' | 'error' | 'ok' )}
     * @memberof AppModalok
     */
    type?: string | 'info' | 'success' | 'warning' | 'error';

    /**
     * 标题
     *
     * @type {string}
     * @memberof AppModalok
     */
    title?: string;

    /**
     * 内容
     *
     * @type {string}
     * @memberof AppModalok
     */
    content?: string;

    /**
     * 按钮类型
     * 默认值:'okcancel'
     * okcancel 确认/取消
     * yesno 是/否
     * yesnocanel 是/否/取消
     * ok 确认
     * 
     * @type {(string | 'okcancel' | 'yesno' | 'yesnocanel' | 'ok')}
     * @memberof ModalokOptions
     */
    buttonType?: string | 'okcancel' | 'yesno' | 'yesnocanel' | 'ok';


    /**
     * 启用自定义底部
     *
     * @type {boolean}
     * @memberof ModalokOptions
     */
    visibleCustomFooter?: boolean;


    /**
     * 自定义底部
     *
     * @type {VNode}
     * @memberof ModalokOptions
     */
    customFooter?: VNode;

    /**
     * 显示模式
     * 默认值:center
     *
     * @type {('top' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left')}
     * @memberof NoticeOptions
     */
    showMode?: 'center' | string;

    /**
     * 自定义图标的类名,会覆盖type
     *
     * @type {string}
     * @memberof NoticeOptions
     */
    iconClass?: string;

    /**
     * 自定义类名
     *
     * @type {string}
     * @memberof NoticeOptions
     */
    customClass?: string;

    /**
     * 是否显示右上角的关闭按钮
     * 默认值:false
     *
     * @type {boolean}
     * @memberof NoticeOptions
     */
    showClose?: boolean;

    /**
     * 是否显示遮罩
     * 默认值:true
     *
     * @type {boolean}
     * @memberof NoticeOptions
     */
    mask?: boolean;

    /**
     * 是否点击遮罩关闭
     * 默认值:false
     *
     * @type {boolean}
     * @memberof NoticeOptions
     */
    maskClosable?: boolean;


    /**
     * 引用对象名称
     *
     * @type {string}
     * @memberof ModalokOptions
     */
    refName?: string;

    /**
     * 关闭时的回调函数, 参数为被关闭的实例
     *
     * @memberof NoticeOptions
     */
    onClose?: (val: any) => void;

}