杨磊
3 天以前 ac478242e0ecb50b23b2e91c0541f9ceae2dccf6
src/views/home/components/searchBox.vue
@@ -36,20 +36,29 @@
        { value: "abstract", label: "摘要" },
        { value: "source", label: "来源" },
      ],
      searchFun: {
        type: Function,
        default: () => {},
      },
    },
  },
  data() {
    return {
      searchText: "", // 输入框内容
      selectedType: "", // 下拉框选中值
      selectedType: "all", // 下拉框选中值
    };
  },
  methods: {
    // 搜索处理
    handleSearch() {
    // 找到选中的选项的label
    const selectedOption = this.options.find(option => option.value === this.selectedType);
    const selectedLabel = selectedOption ? selectedOption.label : '';
    console.log(selectedLabel,"001")
      this.$emit("search", {
        text: this.searchText,
        type: this.selectedType,
        label: selectedLabel
      });
    },
  },
@@ -67,16 +76,17 @@
/* 输入框样式 */
.search-input {
  background-color:transparent;
  width: 100%;
}
.inputBox {
  border: 1px solid #B9A587;
  border: 1px solid #b9a587;
  height: 38px;
  width: 400px;
  display: flex;
  justify-content: space-between;
  background-color: transparent !important;
  align-items: center;
  padding-right: 5px;
  border-radius: 5px;
@@ -89,6 +99,7 @@
  width: 70px;
  height: 30px;
  background-color: #937950;
  border-radius: 5px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 14px;
@@ -106,10 +117,9 @@
.el-select /deep/ .el-input__inner {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border: 1px solid #B9A587;
  border: 1px solid #b9a587;
  background-color: transparent;
  border-right: none;
}
.el-input-group__prepend {