Kaynağa Gözat

更新投稿页面

reghao 3 yıl önce
ebeveyn
işleme
1044b20641

+ 1 - 2
src/components/upload/publish-article.vue

@@ -3,8 +3,7 @@
     <v-row justify="center">
       <v-text-field
         v-model="articlePost.title"
-        placeholder="标题"
-        label="标题(50字以内)"
+        placeholder="标题(50字以内)"
         clearable
       />
     </v-row>

+ 7 - 1
src/components/upload/publish-image.vue

@@ -88,6 +88,8 @@ VueFilePond(
   FilePondPluginFileValidateSize
 )
 
+var imgFileIds = []
+
 export default {
   data() {
     return {
@@ -106,7 +108,7 @@ export default {
           onload(response) {
             const resp = JSON.parse(response)
             if (resp.code === 0) {
-              // imgFileIds.push(resp.data.imageFileId)
+              imgFileIds.push(resp.data.imageFileId)
             } else {
               if (resp.msg != null) {
                 this.message = '上传文件出现异常,请重新上传!' + resp.msg
@@ -119,6 +121,8 @@ export default {
         }
       },
       imagePost: {
+        title: null,
+        imageFileIds: []
       }
     }
   },
@@ -152,6 +156,8 @@ export default {
       }
     },
     publish() {
+      this.imagePost.imageFileIds = imgFileIds
+      console.log(this.imagePost)
     }
   }
 }