64 lines
1018 B
Vue
64 lines
1018 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<div class="pack-box">
|
||
|
<div style="text-align:center; margin:auto; margin-top: 35px;">
|
||
|
<qrcode-vue v-loading="loading" :value="url" :size="500" />
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="draft">
|
||
|
<el-button-group>
|
||
|
<el-button @click="turnback">返回</el-button>
|
||
|
</el-button-group>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
|
||
|
import QrcodeVue from 'qrcode.vue';
|
||
|
|
||
|
export default {
|
||
|
name: 'QCode',
|
||
|
components: {
|
||
|
QrcodeVue
|
||
|
},
|
||
|
props: {
|
||
|
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
loading: false,
|
||
|
url: ''
|
||
|
};
|
||
|
},
|
||
|
computed: {
|
||
|
|
||
|
},
|
||
|
mounted() {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
qrCodeShow(data) { // 生成二维码
|
||
|
console.log(data);
|
||
|
this.url = data.url;
|
||
|
},
|
||
|
turnback() {
|
||
|
this.$router.go(-1);
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||
|
.pack-rule {
|
||
|
width: 800px;
|
||
|
margin: 0 auto;
|
||
|
margin-top: 12px;
|
||
|
padding: 40px;
|
||
|
}
|
||
|
.draft {
|
||
|
width: 400px;
|
||
|
text-align: center;
|
||
|
margin: 20px auto;
|
||
|
}
|
||
|
</style>
|