|
|
@ -1,38 +1,23 @@ |
|
|
|
<template> |
|
|
|
<Teleport> |
|
|
|
<Transition name="fade"> |
|
|
|
<div |
|
|
|
:class="['mask-layer', { 'none-mask': noneMask }]" |
|
|
|
v-if="modelVisible" |
|
|
|
> |
|
|
|
<BackgroundClip |
|
|
|
class="dialog" |
|
|
|
<div :class="['mask-layer', { 'none-mask': noneMask }]" v-if="modelVisible"> |
|
|
|
<BackgroundClip class="dialog" |
|
|
|
clipPath="polygon(calc(100% - var(--clip-width)) 0, 100% var(--clip-width), 100% 100%, var(--clip-width) 100%, 0 calc(100% - var(--clip-width)), 0 0)" |
|
|
|
borderColor="linear-gradient(180deg, rgba(78, 174, 204, .9), rgba(78, 174, 204, 0))" |
|
|
|
bgColor="linear-gradient(180deg, rgba(14, 69, 92, 0.9) 0%, rgba(20, 89, 119, 0.9) 100%)" |
|
|
|
ref="DialogContentRef" |
|
|
|
> |
|
|
|
ref="DialogContentRef"> |
|
|
|
<div class="dialog-title"> |
|
|
|
<img |
|
|
|
class="title-icon" |
|
|
|
src="@screen/images/dialog/title-icon.svg" |
|
|
|
/> |
|
|
|
<img class="title-icon" src="@screen/images/dialog/title-icon.svg" /> |
|
|
|
<span>{{ title }}</span> |
|
|
|
<img |
|
|
|
class="icon-close" |
|
|
|
@click.stop="modelVisible = false" |
|
|
|
src="@screen/images/dialog/icon-close.svg" |
|
|
|
/> |
|
|
|
<img class="icon-close" @click.stop="modelVisible = false" src="@screen/images/dialog/icon-close.svg" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="dialog-content"> |
|
|
|
<slot /> |
|
|
|
</div> |
|
|
|
|
|
|
|
<img |
|
|
|
class="bottom-right" |
|
|
|
src="@screen/images/dialog/right-bottom.svg" |
|
|
|
/> |
|
|
|
<img class="bottom-right" src="@screen/images/dialog/right-bottom.svg" /> |
|
|
|
|
|
|
|
<div class="footer" v-if="$slots.footer"> |
|
|
|
<slot name="footer"></slot> |
|
|
@ -88,18 +73,30 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
updateDialogVisible(bool) { |
|
|
|
this.modelVisible = bool; |
|
|
|
console.log("modelVisible", this.modelVisible); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.emitter.on("updateDialogVisible", this.updateDialogVisible); |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
modelVisible: { |
|
|
|
get() { |
|
|
|
return this.visible; |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
console.log("val", "val") |
|
|
|
this.$emit("update:value", val); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
console.log("beforeDestory111") |
|
|
|
this.modelVisible = false; |
|
|
|
this.emitter.off("updateDialogVisible", this.updateDialogVisible); |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
@ -203,7 +200,7 @@ export default { |
|
|
|
padding: 0 27px; |
|
|
|
|
|
|
|
::v-deep { |
|
|
|
> div { |
|
|
|
>div { |
|
|
|
min-width: 96px; |
|
|
|
} |
|
|
|
} |
|
|
|