WXL
2024-07-22 452e7fb4ea242b0d7bb821abc0cb3bf465129ffd
src/components/Regular/index.vue
@@ -66,7 +66,7 @@
            </el-input> </el-form-item
        ></el-col>
      </el-row>
      <el-form-item label="关键字(含)" prop="desc">
      <el-form-item label="关键字(含)" prop="desc" v-if="hasValue">
        <div class="xinz-inf">
          <el-tag
            :key="crux"
@@ -108,7 +108,7 @@
          >
        </div>
      </el-form-item>
      <el-form-item label="关键字(非)" prop="desc">
      <el-form-item label="关键字(非)" prop="desc" v-if="hasValue">
        <div class="xinz-inf">
          <el-tag
            :key="crux"
@@ -179,7 +179,6 @@
              class="upload-demo"
              style="display: flex"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-change="handleChange"
              :file-list="fileList"
              :limit="1"
              :on-exceed="handleExceed"
@@ -268,6 +267,10 @@
      type: Boolean,
      default: true,
    },
    hasValue: {
      type: Boolean,
      default: true,
    },
  },
  created() {
@@ -314,9 +317,9 @@
      this.handleSelectionChange();
    },
    // 控制文件
    handleChange(file, fileList) {
      this.fileList = fileList.slice(-3);
    },
    // handleChange(file, fileList) {
    //   this.fileList = fileList.slice(-3);
    // },
    // 文件超出个数限制时的钩子
    handleExceed(files, fileList) {
      this.$message.warning(
@@ -392,8 +395,11 @@
    },
    // 选项文件上传
    handleChange(item, response, file, fileList) {
      console.log(response, "response");
      console.log(item, "item");
      console.log(this.TargetoptionList, "this.TargetoptionList");
      let index = this.TargetoptionList.findIndex(
        (obj) => obj.id == item.id && obj.name == item.name
        (obj) => obj.guid == item.guid && obj.name == item.name
      );
      this.TargetoptionList[index].picturePath = response.url;
    },