Przeglądaj źródła

文章编写添加描述输入框

Breaker 5 lat temu
rodzic
commit
d209948ad3
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      src/views/Editor.vue

+ 5 - 2
src/views/Editor.vue

@@ -24,6 +24,7 @@
           v-model="content"
       >
       </tinymce>
+      <el-input type="textarea" v-model="description" placeholder="请填写文章简介"></el-input>
     </el-main>
     <el-footer>
       <el-row>
@@ -51,7 +52,8 @@ export default {
   data () {
     return {
       title: '',
-      content: ''
+      content: '',
+      description: ''
     }
   },
   methods: {
@@ -59,7 +61,8 @@ export default {
       if (this.title !== '') {
         this.$axios.post('/articles', {
           title: this.title,
-          content: this.content
+          content: this.content,
+          description: this.description
         }).then(r => {
           console.log(r)
         })