import api from '@/api/api' import { httpGet, httpPost } from '@/api/fetch-api.js' export default { props: { // 是否显示组件 visible: { type: Boolean, default: true, }, // 标题名称 需要再 assets/images/common/ 目录下添加图标 icon: { type: String, default: "succ", }, // 标题,不建议使用 title: { type: String, default: "", }, // 文案 content: { type: String, default: "", }, // 确认文案 confirmText: { type: String, default: "確認", }, // 取消文案 cancelText: { type: String, default: "取消", }, // 是否显示确认按钮 showConfirm: { type: Boolean, default: true, }, // 是否显示取消按钮 showCancel: { type: Boolean, default: false, }, // 是否显示遮罩层 overlayShow: { type: Boolean, default: true, }, // 确定按钮回调方法 confirm: { type: Function, default: null }, // 取消按钮回调方法 cancel: { type: Function, default: null }, // 点击关闭回调方法 close: { type: Function, default: null }, // 点击蒙层回调方法 overlay: { type: Function, default: null } }, data() { return { key: 'value' } }, components: {}, methods: { // 点击确认 onConfirmHandler() { if (this.confirm) { this.confirm(); } }, // 点击取消 onCancelHandler() { if (this.cancel) { this.cancel(); } }, // 点击关闭 onCloseHandler() { if (this.close) { this.close(); } }, // 点击蒙层 onOverLayHandler() { if (this.overlay) { this.overlay(); } }, initData() {} }, mounted() {}, created() {} }