图片默认值
This commit is contained in:
@@ -75,17 +75,17 @@
|
|||||||
<script>
|
<script>
|
||||||
import req from '@/api/lpk/banner.js'
|
import req from '@/api/lpk/banner.js'
|
||||||
import Editor from '@/components/Editor'
|
import Editor from '@/components/Editor'
|
||||||
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
import upload from '@/components/uploadFile/upload_yanchejianchaTuBiao.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
upload,
|
upload,
|
||||||
Editor
|
Editor
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
imgList: [],
|
imgList: [],
|
||||||
hideUploadBtn: false,
|
hideUploadBtn: false,
|
||||||
submitdisabled: false,
|
submitdisabled: false,
|
||||||
formobj: {
|
formobj: {
|
||||||
title: '',
|
title: '',
|
||||||
@@ -132,6 +132,7 @@
|
|||||||
bannerUrl: '',
|
bannerUrl: '',
|
||||||
bannerPath: ''
|
bannerPath: ''
|
||||||
}
|
}
|
||||||
|
this.imgList = []
|
||||||
this.$emit('doback')
|
this.$emit('doback')
|
||||||
},
|
},
|
||||||
showAdd() {},
|
showAdd() {},
|
||||||
@@ -146,19 +147,19 @@
|
|||||||
this.formobj = row
|
this.formobj = row
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
backData(value) {
|
backData(value) {
|
||||||
console.log('backData》》》》', value)
|
console.log('backData》》》》', value)
|
||||||
console.log('imgList', this.imgList)
|
console.log('imgList', this.imgList)
|
||||||
|
|
||||||
if (this.imgList.length > 0) {
|
if (this.imgList.length > 0) {
|
||||||
this.formobj.bannerUrl = this.imgList[0].url
|
this.formobj.bannerUrl = this.imgList[0].url
|
||||||
} else {
|
} else {
|
||||||
this.formobj.bannerUrl = ''
|
this.formobj.bannerUrl = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hideUploadBtn = this.imgList.length !== 0
|
this.hideUploadBtn = this.imgList.length !== 0
|
||||||
console.log('this.hideUploadBtn', this.hideUploadBtn)
|
console.log('this.hideUploadBtn', this.hideUploadBtn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user