<template>
  <div class="search">
    <!-- <el-select
      v-model="search.keywordType"
      size="large"
      style="width: 52px; margin-right: 4px"
    >
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      />
    </el-select> -->
    <div class="iput">
        <el-input
        v-model="keyword"
        style="width: 100% ;height: 100%;"
        size="large"
        placeholder="请输入"
        :suffix-icon="Search"
        clearable
        @keyup.enter="onSubmit"
        @change="onSubmit"
      />
    </div>
  </div>
</template>

<script setup >
import { Search, Delete, Files, ArrowDown } from "@element-plus/icons-vue";
import usePaperStore from "@/store/modules/paper";
const { paper, paperConfig, search, questionTotal } = storeToRefs(
  usePaperStore()
);
const router = useRouter();
const options = [
  {
    label: "试题",
    value: 0,
  },
  // {
  //   label: "试卷",
  //   value: 1,
  // },
];

const keyword = ref();
function onSubmit() {
  search.value.keyword = keyword.value;
  // newPage(`${location.origin}/paper/search`);
  router.push("/paper/search");
}
</script>

<style lang="scss" scoped>
.search {
  margin: 0 40px;
  width: 387px;
  height: 40px;
  border: 1px solid #e1e3e5;
  border-radius: 1px;
  display: flex;
  align-items: center;
  padding: 9px 16px;
  box-sizing: border-box;
  .iput{
    border-left: solid 1px #BBBDBF;
    height: 14px;
    padding: 0 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex: 1;
  }
}

:deep(.el-input__wrapper) {
  box-shadow: none;
  background: none;
  padding: 0;
}

:deep(.el-input--large .el-input__wrapper) {
  padding: 0;
}

:deep(.el-select .el-input__wrapper) {
  box-shadow: none !important;
}

:deep(.el-input .el-input__wrapper) {
  box-shadow: none !important;
}

.el-select {
  --el-select-input-focus-border-color: none !important;
}

.el-input {
  --el-select-input-focus-border-color: none !important;
}
</style>