Blame view

src/components/modal-protocol-comp/modal-protocol-comp.js 1017 Bytes
simon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
import api from '@/api/api'
import {
	httpGet,
	httpPost
} from '@/api/fetch-api.js'


export default {
	props: {
		// 是否显示组件
		visible: {
			type: Boolean,
			default: true,
		},
		// 标题,不建议使用
		title: {
			type: String,
			default: "",
		},
		// 是否显示遮罩层
		overlayShow: {
			type: Boolean,
			default: true,
		},
		// 点击关闭回调方法
		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() {}
}