9 changed files with 224 additions and 18 deletions
@ -0,0 +1,36 @@ |
|||||||
|
<template> |
||||||
|
<div class="FadeDialog"> |
||||||
|
<slot></slot> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<script> |
||||||
|
export default { |
||||||
|
name: "FadeDialog", |
||||||
|
data() { |
||||||
|
return {} |
||||||
|
}, |
||||||
|
computed: {}, |
||||||
|
created() { |
||||||
|
}, |
||||||
|
methods: {} |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped lang="scss"> |
||||||
|
@import "../../assets/scss/index"; |
||||||
|
|
||||||
|
.FadeDialog { |
||||||
|
position: fixed; |
||||||
|
left: 0; |
||||||
|
right: 0; |
||||||
|
bottom: 0; |
||||||
|
top: 0; |
||||||
|
overflow: auto; |
||||||
|
color: white; |
||||||
|
font-size: 1.4rem; |
||||||
|
|
||||||
|
.content { |
||||||
|
padding-top: 6rem; |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,72 @@ |
|||||||
|
<template> |
||||||
|
<div class="ConfirmDialog " @click="$emit('dismiss')"> |
||||||
|
<div class="content" @click.stop="null"> |
||||||
|
<div class="item">{{ title }}</div> |
||||||
|
<div class="footer"> |
||||||
|
<div class="cancel" @click.stop="$emit('cancel')">放弃</div> |
||||||
|
<div class="ok" @click.stop="$emit('ok')">保存</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<script> |
||||||
|
export default { |
||||||
|
name: "ConfirmDialog", |
||||||
|
props: { |
||||||
|
visible: { |
||||||
|
type: Boolean, |
||||||
|
default: false |
||||||
|
}, |
||||||
|
title: { |
||||||
|
type: String, |
||||||
|
default() { |
||||||
|
return '' |
||||||
|
} |
||||||
|
} |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return {} |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
|
||||||
|
<style scoped lang="scss"> |
||||||
|
|
||||||
|
.ConfirmDialog { |
||||||
|
z-index: 10; |
||||||
|
position: absolute; |
||||||
|
top: 0; |
||||||
|
bottom: 0; |
||||||
|
left: 0; |
||||||
|
right: 0; |
||||||
|
background: #000000bb; |
||||||
|
display: flex; |
||||||
|
justify-content: center; |
||||||
|
align-items: center; |
||||||
|
color: black; |
||||||
|
|
||||||
|
|
||||||
|
.content { |
||||||
|
background: white; |
||||||
|
width: 80%; |
||||||
|
border-radius: 2px; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 1.5rem 2rem; |
||||||
|
font-size: 1.5rem; |
||||||
|
|
||||||
|
.footer { |
||||||
|
margin-top: 2rem; |
||||||
|
display: flex; |
||||||
|
justify-content: flex-end; |
||||||
|
|
||||||
|
.cancel { |
||||||
|
margin-right: 2.5rem; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
|
</style> |
Loading…
Reference in new issue