src/components/makepager/SearchCommonView.vue
@@ -54,7 +54,7 @@
            <template v-if="selectArr?.length > 0" slot="prepend">
              <div style="display: flex">
                <div v-for="(val, i) in selectArr" :key="i" class="pre-views">
                  <span style="margin-left: 5px">{{ val.title }}</span>
                  <span style="margin-left: 5px">{{ val?.title ?? val }}</span>
                  <i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i>
                </div>
              </div>
@@ -80,7 +80,7 @@
            trigger="click"
            :hide-on-click="false"
            placement="bottom"
            @command="switchStatusKeywords($event, selList)"
            @command="switchKeywords($event, selList)"
          >
            <div class="common yes-cursor">
              <img src="@/assets/img/shaixuan.png" style="width: 10px" />
@@ -90,7 +90,7 @@
              <el-dropdown-item
                v-for="(item, key) in screenArray"
                :key="key"
                :command="{ command: item.title, ...item }"
                :command="item.title"
                :class="{ selected: status == item.title }"
              >
                <div class="dropdown-view">
@@ -256,6 +256,9 @@
    }
  },
  mounted() {
    this.searchTaskMap.forEach((ele) => {
      this.selList.push(ele.title)
    })
    this.selectArr = this.searchTaskMap
  },
  methods: {
@@ -287,8 +290,8 @@
    inspectionConfigClick() {
      this.$emit("inspectionConfigClick")
    },
    switchStatusKeywords(command, item) {
      console.log("index", command)
    switchKeywords(command, item) {
      console.log("index", command, item)
      this.status = command
      const oldValue = item
      console.log(oldValue)
@@ -301,6 +304,7 @@
      } else {
        oldValue.push(command)
      }
      this.$emit("switchKeywords", item)
    },
    // 删除筛选内容
    delSelectClick(item) {
@@ -427,7 +431,7 @@
  }
}
.selected {
  color: #409eff;
  color: #606266;
}
.dropdown-view {
  position: relative;