parent
c9ebd6f57b
commit
27ba915902
4 changed files with 80 additions and 4 deletions
After Width: | Height: | Size: 118 KiB |
@ -0,0 +1,72 @@ |
||||
<template> |
||||
<el-dialog title="" :visible.sync="diaVisible" center width="400px" append-to-body :top="qrcodeTop" lock-scroll |
||||
custom-class="qrcode-dia"> |
||||
<div class="pic-wrap"> |
||||
<img class="pic" ref="pic" src="@/assets/img/customer.png" alt=""> |
||||
</div> |
||||
</el-dialog> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: ['visible'], |
||||
data () { |
||||
return { |
||||
qrcodeTop: '100px' |
||||
}; |
||||
}, |
||||
computed: { |
||||
diaVisible: { |
||||
get () { |
||||
return this.visible |
||||
}, |
||||
set (val) { |
||||
this.$emit('update:visible', val) |
||||
} |
||||
} |
||||
}, |
||||
mounted () { |
||||
const height = (window.innerHeight - 711) / 2 |
||||
this.qrcodeTop = (height > 0 ? height : 0) + 'px' |
||||
}, |
||||
methods: { |
||||
close () { |
||||
this.$emit('update:visible', false) |
||||
} |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
/deep/.qrcode-dia { |
||||
background-color: transparent; |
||||
box-shadow: none; |
||||
|
||||
.el-dialog__header, |
||||
.el-dialog__body { |
||||
padding: 0; |
||||
background-color: transparent; |
||||
overflow: hidden; |
||||
border-bottom: 0; |
||||
} |
||||
|
||||
.pic-wrap { |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.pic { |
||||
width: 100%; |
||||
// max-height: 90vh; |
||||
// object-fit: contain; |
||||
} |
||||
} |
||||
|
||||
@media (max-width: 1200px) { |
||||
/deep/.qrcode-dia { |
||||
.pic { |
||||
width: 95%; |
||||
} |
||||
} |
||||
} |
||||
</style> |
Loading…
Reference in new issue