Browse Source

选择内容时 添加当前状态 默认布局类型为图片

DESKTOP-SVI9JE1\muzen 1 year ago
parent
commit
9298b2d129
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/views/content/article/detail.vue

+ 5 - 2
src/views/content/article/detail.vue

@@ -333,7 +333,9 @@ export default {
 
     // 添加
     getAdd() {
-      this.form.contentShareLayoutList.push({})
+      this.form.contentShareLayoutList.push({
+        layoutType: 0
+      })
     },
 
     // 上传图片
@@ -409,6 +411,7 @@ export default {
         this.$set(e, 'contentPic', row.audioPic)
         this.$set(e, 'contentType', row.audioType)
         this.$set(e, 'platformId', row.platformId)
+        this.$set(e, 'status', row.status)
       } else {
         let e = this.index == -1 ? 'leftButton' : 'rightButton'
         this.$set(this.form, `${e}ContentId`, row.audioId)
@@ -460,7 +463,7 @@ export default {
     },
 
     statusFormatter(row) {
-      return this.selectDictLabel(this.disabledOptions, row.status)
+      return row.layoutType !== 0 ? this.selectDictLabel(this.disabledOptions, row.status) : ''
     }
   }
 }