QYF-GitLab1
2025-02-28 7a07041e87f5fea69ad4d83868f095c6b612e710
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<template>
  <div class="search-container">
    <el-input
      v-model="searchText"
      placeholder="搜索..."
      prefix-icon="Search"
      clearable
      @input="handleSearch"
    />
  </div>
</template>
 
<script setup lang="ts">
import { ref } from 'vue'
 
const searchText = ref('')
const emit = defineEmits(['search'])
 
const handleSearch = () => {
  emit('search', searchText.value)
}
</script>
 
<style lang="less" scoped>
.search-container {
  padding: 16px;
  border-bottom: 1px solid #eee;
}
</style>