Commit 1978057c authored by 刘怀志's avatar 刘怀志

二次弹窗

parent 7320cb6b
<template>
<el-button :loading="loading" :class="buttonClass" :icon="buttonIcon" @click="clickEvent">{{ buttonText }}</el-button>
</template>
<script>
export default {
name: 'Index',
props: {
buttonClass: {
type: String,
default: 'resetBtn'
},
loading: {
type: Boolean,
default: false
},
buttonIcon: {
type: String,
default: 'el-icon-back'
},
buttonText: {
type: String,
default: '返 回'
},
clickAction: {
type: Object,
required: true
},
isShowConfirm: {
type: Boolean,
default: false
}
},
methods: {
clickEvent() {
if (this.isShowConfirm) {
this.$confirm(this.buttonClass === 'queryBtn' ? '系统即将发布编辑内容,是否确定' : '是否立即返回,返回后系统不再保存已填写内容', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'box-logout',
cancelButtonClass: 'resetBtn',
confirmButtonClass: 'queryBtn',
type: 'warning',
closeOnClickModal: false
}).then(() => {
this.clickAction()
})
} else {
this.clickAction()
}
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment