This commit is contained in:
liuye
2022-01-21 11:37:55 +08:00
parent 0ccde442ee
commit 7ef43dad73
2 changed files with 12 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="add">
<div class="add" v-if="isShow">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="标题" prop="title" required :border-bottom="false" class="titles" label-position="top">
@@ -94,6 +94,7 @@ export default {
second: false,
timestamp: true,
},
isShow: false
}
},
computed: { ...mapState(['user']) },
@@ -106,6 +107,9 @@ export default {
this.getDetail()
})
if(!o.id) {
this.isShow = true
}
if (!this.indexDetail) {
this.forms.contactPhone = this.user.phone
this.forms.contactPerson = this.user.name
@@ -127,6 +131,7 @@ export default {
this.forms.url = JSON.parse(res.data.url || '[]')
}
}
this.isShow = true
}
})
}

View File

@@ -1,5 +1,5 @@
<template>
<div class="add">
<div class="add" v-if="isShow">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="标题" prop="title" required :border-bottom="false" class="names">
@@ -43,11 +43,15 @@ export default {
images: [],
},
flag: false,
isShow: false
}
},
computed: {...mapState(['user'])},
onLoad(o) {
this.id = o.id
if(!o.id) {
this.isShow = true
}
this.getDetail()
},
onShow() {
@@ -65,6 +69,7 @@ export default {
if (res.data.images) {
this.forms.images = JSON.parse(res.data.images || '[]')
}
this.isShow = true
}
})
}