fix:区别详情查看和扫码添加
This commit is contained in:
parent
c5e83d9581
commit
8e5f258d1a
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="open" style="margin-left: 10px;">扫码添加</el-button>
|
<el-icon v-if="type=='info'" size="18" @click="open"><el-icon-files /></el-icon>
|
||||||
|
<el-button v-else type="primary" @click="open" style="margin-left: 10px;">扫码添加</el-button>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="扫描二维码"
|
title="扫描二维码"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
|
@ -10,13 +11,19 @@
|
||||||
ref="codeInput"
|
ref="codeInput"
|
||||||
v-model="codeText"
|
v-model="codeText"
|
||||||
clearable
|
clearable
|
||||||
@change="$emit('closed',codeText)"
|
@change="codeTextChange"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props:{
|
||||||
|
type:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
visible:false,
|
visible:false,
|
||||||
|
@ -32,6 +39,11 @@ export default {
|
||||||
}, 200);
|
}, 200);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
codeTextChange(){
|
||||||
|
console.log('this.codeText',this.codeText);
|
||||||
|
this.$emit('closed',this.codeText);
|
||||||
|
this.closed();
|
||||||
|
},
|
||||||
closed(){
|
closed(){
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue