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