UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

36 lines (35 loc) 1.49 kB
/** * 函数式调用组件 * @param {Object} vueInstance 页面Vue实例(一般为页面this) * @param {Object} dialogComponent 弹窗组件,支持静态导入import Dialog from '..'和动态导入const Dialog = () => import('...')两种形式 * @param {Object} dialogOptions 弹窗参数Object * @returns Promise 回调组件实例 * * @example * ```ts * function showDateTimePicker(this: any, { * onConfirm, * currentDate, * }) { * showFunctionalComponent( * this, () => import('src/local-component/ui/gp-match-horz/date-picker'), * { * currentDate, * minDate: new Date(new Date().getTime() + 30 * 60 * 1000), * onClickConfirm: (date) => { * const dateNumber = Math.floor(date.getTime()); * onConfirm(date, dateNumber); * }, * }, * ); * } * ``` */ export declare function showFunctionalComponent(vueInstance: any, dialogComponent: any, dialogOptions: Record<string, any>): Promise<unknown>; /** * @description 根据弹窗队列(dialogList)依次弹出 * @param {object} context Vue 页面 Vue实例上下文(一般为页面this、window.app、new Vue() 等) * @param {array} dialogList 弹窗列表 * @param {Object} dialogComponent 弹窗组件,支持静态导入 import Dialog from '..' 和动态导入 const Dialog = () => import('...') 两种形式 */ export declare function showFunctionalComponentQueue(context: any, dialogList: Array<any>, dialogComponent: any): void;