济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
3.0 KiB

1 year ago
<template>
<Teleport>
<Transition name="fade">
<div class="mask-layer" 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%)">
1 year ago
<div class="dialog-title">
<img class="title-icon" src="@screen/images/dialog/title-icon.svg" />
1 year ago
<span>{{ title }}</span>
<img class="icon-close" @click="modelVisible = false" src="@screen/images/dialog/icon-close.svg" />
1 year ago
</div>
1 year ago
<div class="dialog-content">
<slot />
</div>
<img class="bottom-right" src="@screen/images/dialog/right-bottom.svg">
</BackgroundClip>
1 year ago
</div>
</Transition>
</Teleport>
</template>
<script>
import Teleport from '../Teleport.vue';
import BackgroundClip from "@screen/components/Decorations/BackgroundClip.vue"
1 year ago
export default {
components: {
Teleport,
BackgroundClip
1 year ago
},
model: {
prop: 'visible',
event: "update:value"
},
name: 'Dialog',
props: {
title: {
type: String
},
visible: Boolean
},
computed: {
modelVisible: {
get() {
return this.visible
},
set(val) {
this.$emit('update:value', val)
}
}
}
}
</script>
<style lang='scss' scoped>
.mask-layer {
position: fixed;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .36);
border-radius: 0px 0px 0px 0px;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
--border-width: 1px;
1 year ago
--clip-width-num: 24;
--clip-width: calc(var(--clip-width-num) * 1px);
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .24s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.dialog {
max-width: 72vw;
opacity: 1;
background-clip: padding-box;
position: relative;
box-sizing: border-box;
margin: calc(var(--border-width) / 2);
.dialog-title {
position: relative;
width: calc(100% - 2px);
height: 51px;
display: flex;
padding-top: 3px;
align-items: center;
justify-content: space-between;
background: linear-gradient(90deg, #267494 0%, rgba(38, 116, 148, 0) 100%);
1 year ago
font-size: 19px;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3de8ff;
.title-icon {
position: absolute;
top: -1px;
left: -1px;
height: 6px;
1 year ago
}
.icon-close {
cursor: pointer;
margin-right: 21px;
}
span {
margin-left: 20px;
height: 48px;
display: flex;
align-items: center;
}
}
.dialog-content {
padding: 10px 20px 20px 20px;
1 year ago
max-height: 96vh;
}
1 year ago
.bottom-right {
position: absolute;
right: 0;
bottom: 0;
1 year ago
}
}
</style>