fix:修复弹窗显示bug

This commit is contained in:
wangwenrui
2020-01-15 16:22:17 +08:00
parent aa23428d6d
commit 84f8791021
2 changed files with 13 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-popover :placement="placement" width="400" @hide="hidePop" ref="popBox" v-model="popBox.show"> <el-popover :placement="placement" @show="afterShow" width="400" @hide="hidePop" ref="popBox" v-model="popBox.show">
<div class=""> <div class="">
<div class="pop-window-assetType-content"> <div class="pop-window-assetType-content">
<div class="pop-top-btns"> <div class="pop-top-btns">
@@ -134,6 +134,11 @@ export default {
this.popBox.show=isShow; this.popBox.show=isShow;
this.popBox.isEdit=isEdit; this.popBox.isEdit=isEdit;
}, },
afterShow:function(){
if(!this.popBox.isEdit){
this.popBox.isEdit=this.isEdit;
}
},
toEdit:function(u){ toEdit:function(u){
this.cabinet = Object.assign({}, u); this.cabinet = Object.assign({}, u);
this.popBox.isEdit = true; this.popBox.isEdit = true;

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-popover :placement="placement" width="400" @hide="hidePop" ref="popBox" v-model="popBox.show"> <el-popover :placement="placement" @show="afterShow" width="400" @hide="hidePop" ref="popBox" v-model="popBox.show">
<div class=""> <div class="">
<!-- begin--顶部按钮--> <!-- begin--顶部按钮-->
<div class="pop-top-btns"> <div class="pop-top-btns">
@@ -116,6 +116,11 @@
openBox:function(){ openBox:function(){
this.popBox.show=true; this.popBox.show=true;
}, },
afterShow:function(){
if(!this.popBox.isEdit){
this.popBox.isEdit=this.isEdit;
}
},
getUserData() { getUserData() {
let temp=this; let temp=this;
temp.$get('sys/user/list').then(response => { temp.$get('sys/user/list').then(response => {
@@ -216,7 +221,7 @@
deep: true, deep: true,
handler(n, o) { handler(n, o) {
if (n && n.id) { if (n && n.id) {
this.title = this.$t('asset.createAssetTab.editIdcTab.title') + " ID" + n.id; this.title = this.popBox.isEdit?this.$t('asset.createAssetTab.editIdcTab.title') + " ID" + n.id:this.$t('asset.createAssetTab.dc') + " ID" + n.id;
this.idc=n; this.idc=n;
} else { } else {