|
@ -1,38 +1,23 @@ |
|
|
<template> |
|
|
<template> |
|
|
<Teleport> |
|
|
<Teleport> |
|
|
<Transition name="fade"> |
|
|
<Transition name="fade"> |
|
|
<div |
|
|
<div :class="['mask-layer', { 'none-mask': noneMask }]" v-if="modelVisible"> |
|
|
:class="['mask-layer', { 'none-mask': noneMask }]" |
|
|
<BackgroundClip class="dialog" |
|
|
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)" |
|
|
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))" |
|
|
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%)" |
|
|
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"> |
|
|
<div class="dialog-title"> |
|
|
<img |
|
|
<img class="title-icon" src="@screen/images/dialog/title-icon.svg" /> |
|
|
class="title-icon" |
|
|
|
|
|
src="@screen/images/dialog/title-icon.svg" |
|
|
|
|
|
/> |
|
|
|
|
|
<span>{{ title }}</span> |
|
|
<span>{{ title }}</span> |
|
|
<img |
|
|
<img class="icon-close" @click.stop="modelVisible = false" src="@screen/images/dialog/icon-close.svg" /> |
|
|
class="icon-close" |
|
|
|
|
|
@click.stop="modelVisible = false" |
|
|
|
|
|
src="@screen/images/dialog/icon-close.svg" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="dialog-content"> |
|
|
<div class="dialog-content"> |
|
|
<slot /> |
|
|
<slot /> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<img |
|
|
<img class="bottom-right" src="@screen/images/dialog/right-bottom.svg" /> |
|
|
class="bottom-right" |
|
|
|
|
|
src="@screen/images/dialog/right-bottom.svg" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<div class="footer" v-if="$slots.footer"> |
|
|
<div class="footer" v-if="$slots.footer"> |
|
|
<slot name="footer"></slot> |
|
|
<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: { |
|
|
computed: { |
|
|
modelVisible: { |
|
|
modelVisible: { |
|
|
get() { |
|
|
get() { |
|
|
return this.visible; |
|
|
return this.visible; |
|
|
}, |
|
|
}, |
|
|
set(val) { |
|
|
set(val) { |
|
|
|
|
|
console.log("val", "val") |
|
|
this.$emit("update:value", val); |
|
|
this.$emit("update:value", val); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
beforeDestroy() { |
|
|
beforeDestroy() { |
|
|
|
|
|
console.log("beforeDestory111") |
|
|
this.modelVisible = false; |
|
|
this.modelVisible = false; |
|
|
|
|
|
this.emitter.off("updateDialogVisible", this.updateDialogVisible); |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
@ -203,7 +200,7 @@ export default { |
|
|
padding: 0 27px; |
|
|
padding: 0 27px; |
|
|
|
|
|
|
|
|
::v-deep { |
|
|
::v-deep { |
|
|
> div { |
|
|
>div { |
|
|
min-width: 96px; |
|
|
min-width: 96px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|