|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
- title="扫码签到"
|
|
|
|
|
|
|
+ :title="title"
|
|
|
:visible.sync="dialogVisible"
|
|
:visible.sync="dialogVisible"
|
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
:close-on-press-escape="false"
|
|
:close-on-press-escape="false"
|
|
@@ -40,13 +40,17 @@ export default {
|
|
|
type: {
|
|
type: {
|
|
|
type: String,
|
|
type: String,
|
|
|
default: ''
|
|
default: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ title: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: '扫码签到'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
qrCode: '',
|
|
qrCode: '',
|
|
|
dialogVisible: this.visible,
|
|
dialogVisible: this.visible,
|
|
|
- url:'http://192.168.2.16:8080/',
|
|
|
|
|
|
|
+ url: 'http://192.168.2.16:8080/'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// mounted () {
|
|
// mounted () {
|
|
@@ -54,18 +58,18 @@ export default {
|
|
|
// this.qrcodeRender()
|
|
// this.qrcodeRender()
|
|
|
// })
|
|
// })
|
|
|
// },
|
|
// },
|
|
|
- watch:{
|
|
|
|
|
|
|
+ watch: {
|
|
|
dialogVisible: {
|
|
dialogVisible: {
|
|
|
- handler: function(val, oldVal) {
|
|
|
|
|
- if(val == true){
|
|
|
|
|
|
|
+ handler: function (val, oldVal) {
|
|
|
|
|
+ if (val === true) {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.qrcodeRender()
|
|
this.qrcodeRender()
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- deep:true,
|
|
|
|
|
- immediate:true
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ immediate: true
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
downloadCode () {
|
|
downloadCode () {
|