
<template>
    <div @click="showBig">
		<QrcodeVue :value="code" :size="40" v-if="code" style="margin-top:20px"></QrcodeVue>
		<Modal v-model="show" :title="this.params.colDef.headerName" footer-hide :width="432">
			<QrcodeVue :value="code" :size="400" v-if="code"></QrcodeVue>
		</Modal>
	</div>
</template>

<script>
import QrcodeVue from 'qrcode.vue';
export default {
	components: { QrcodeVue },
	name: 'qrcode-cell',
	data() {
		return {
			code: null,
			show: false
		};
	},
	mounted() {
		if (this.params.value) {
			this.code = this.params.value;
		}
	},
	computed: {

	},
	methods: {
		showBig() {
			if (this.code) {
				this.show = true;
			}
		}
	}
};
</script>