import { Component, ComponentProps, Event, Target } from "waft"; import { JSON, JSONObject } from "waft-json"; export class Dialog extends Component { constructor(props: ComponentProps) { super(props); } onConfirmBtn(e: Event): void{ console.log("****点击确认按钮****"); this.props.dispatch("onConfirm", new JSONObject()); } onCancelBtn(e: Event): void{ console.log("****点击取消按钮****"); this.props.dispatch("onCancel", new JSONObject()); } }