class Dialog { config = { body: this.$("body"), AgainFatherlassName: '', AgainCancelClassName: '', // 取消的类名 AgainConfirmClassName: '', // 确定的类名 title: '提示', content: '这是一段信息', cancelText: '取消', confirmText: '确定', beforeCloseType: null, showClose: false, // true 显示,false关闭 confirmEvent: () => {}, cancelEvent: () => {}, }; constructor(option) { this.config.title = option.title || this.config.title; this.config.content = option.content || this.config.content; this.config.cancelText = option.cancelText || this.config.cancelText; this.config.confirmText = option.confirmText || this.config.confirmText; this.config.beforeCloseType = option.beforeCloseType || this.config.beforeCloseType; this.config.showClose = option.showClose || this.config.showClose; this.config.confirmEvent = option.confirmEvent || this.config.confirmEvent; this.config.cancelEvent = option.cancelEvent || this.config.cancelEvent; this.createdDialog(); this.BindCancel(); this.BindConfirm(); } createdDialog() { this.config.body.insertAdjacentHTML( "beforeend", `