明梦爽
2022-01-26 894dd034da2c3b466f0ee80db36342d4b0d01ebc
src/components/Administrator/EditLunBo.vue
@@ -6,7 +6,8 @@
    <el-upload
      class="upload-demo"
      drag
      action="https://jsonplaceholder.typicode.com/posts/"
      action="http://localhost:8080//news/add"
      :on-remove="handleRemove"
      multiple>
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
@@ -50,12 +51,16 @@
    this.newsCategoryId = this.$route.query.id
  },
  methods:{
    handleRemove(file,fileList){
      console.log(file,fileList);
    },
    submit(){
      const data = {
        newsCategoryId:this.newsCategoryId,
        content:this.content,
        title:this.title,
        releaseTime:this.releaseTime
        releaseTime:this.releaseTime,
        pictureFile:this.file,
      }
      add(data).then(res => {
        console.log(res);