{"version":3,"file":"modal.mjs","sources":["../../../../../../packages/components/modal/src/modal.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\r\n\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type Modal from './modal.vue'\r\n\r\ntype IType = 'confirm' | 'operate' | 'upload'\r\n\r\nexport interface IResultType {\r\n  [key: string]: unknown\r\n  showFooter?: null\r\n}\r\nexport const modalProps = buildProps({\r\n  /**\r\n   * @description 开启弹窗\r\n   */\r\n  open: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  /**\r\n   * @description 标题\r\n   */\r\n  title: {\r\n    type: String,\r\n    default: '提示',\r\n  },\r\n  /**\r\n   * @description 加载状态\r\n   */\r\n  loading: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  /**\r\n   * @description 弹窗类型\r\n   */\r\n  type: {\r\n    type: definePropType<IType>(String),\r\n    default: 'operate',\r\n  },\r\n  isConfirmModel: {\r\n    type: Boolean,\r\n    default: false,\r\n  },\r\n  /**\r\n   * @description 弹窗class\r\n   */\r\n  class: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  /**\r\n   * @description 弹窗外层容器的类名\r\n   */\r\n  wrapClassName: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  /**\r\n   * @description 确认按钮文字\r\n   */\r\n  confirmText: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  /**\r\n   * @description 取消按钮文字\r\n   */\r\n  cancelText: {\r\n    type: String,\r\n    default: '',\r\n  },\r\n  /**\r\n   * @description 显示取消按钮\r\n   */\r\n  showCancel: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  /**\r\n   * @description 显示底部\r\n   */\r\n  showFooter: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n  /**\r\n   * @description 是否使用esc关闭\r\n   */\r\n  keyboard: {\r\n    type: Boolean,\r\n    default: true,\r\n  },\r\n} as const)\r\n\r\nexport const modalEmits = {\r\n  /**\r\n   * @description 点击取消时触发\r\n   */\r\n  cancel: () => true,\r\n  /**\r\n   * @description 点击确认时触发\r\n   */\r\n  ok: () => true,\r\n  'update:open': () => true,\r\n} as const\r\n\r\n// props\r\nexport type ModalProps = ExtractPropTypes<typeof modalProps>\r\n\r\n// emits\r\nexport type ModalEmits = typeof modalEmits\r\n\r\n// instance\r\nexport type ModalInstance = InstanceType<typeof Modal>\r\n"],"names":[],"mappings":";;;;AAWO,MAAM,aAAa,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAInC,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,eAAsB,MAAM,CAAA;AAAA,IAClC,OAAA,EAAS;AAAA,GACX;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,OAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,aAAA,EAAe;AAAA,IACb,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AA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