弹窗打开时点击其他的地方不允许关闭弹窗
This commit is contained in:
parent
a2ebcbcacd
commit
d2838ebb12
|
@ -1,11 +1,21 @@
|
|||
<template>
|
||||
<a-modal :class="'custom-modal' + (innerFullscreen ? ' fullscreen' : '')" v-bind="_attrs" v-model="visible" @cancel="handleCancel">
|
||||
<a-modal
|
||||
:class="'custom-modal' + (innerFullscreen ? ' fullscreen' : '')"
|
||||
v-bind="_attrs"
|
||||
v-model="visible"
|
||||
:maskClosable="false"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<img slot="closeIcon" src="@/assets/images/global/close.png" />
|
||||
<div slot="title">
|
||||
<div class="custom-modal-title">
|
||||
<span>{{ title }}</span>
|
||||
<template v-if="enableFullScreen">
|
||||
<img v-if="innerFullscreen" src="@/assets/images/global/quit-fullscreen.png" @click="innerFullscreen = false" />
|
||||
<img
|
||||
v-if="innerFullscreen"
|
||||
src="@/assets/images/global/quit-fullscreen.png"
|
||||
@click="innerFullscreen = false"
|
||||
/>
|
||||
<img v-else src="@/assets/images/global/fullscreen.png" @click="innerFullscreen = true" />
|
||||
</template>
|
||||
</div>
|
||||
|
@ -24,24 +34,24 @@
|
|||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
},
|
||||
okHandler: {
|
||||
type: Function
|
||||
type: Function,
|
||||
},
|
||||
title: {
|
||||
type: String
|
||||
type: String,
|
||||
},
|
||||
enableFullScreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: this.value,
|
||||
confirmLoading: false,
|
||||
innerFullscreen: false
|
||||
innerFullscreen: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -56,7 +66,7 @@ export default {
|
|||
},
|
||||
innerFullscreen(val) {
|
||||
this.$emit('fullscreen', val)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async onSave() {
|
||||
|
@ -80,8 +90,8 @@ export default {
|
|||
this.visible = false
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit("cancel")
|
||||
}
|
||||
this.$emit('cancel')
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
_attrs() {
|
||||
|
@ -96,8 +106,8 @@ export default {
|
|||
// 是否有自定义的footer
|
||||
hasCustomFooter() {
|
||||
return !!this.$slots['custom-footer']
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue
Block a user