html
<template>
<el-input
v-model="keyword"
suffix-icon="search"
placeholder="请输入关键字"
clearable
@keyup.enter.prevent="searchHandle"
/>
</template>
<script setup lang="ts">
/**
* 按下回车键搜索方法
*/
const searchHandle = () => {
console.log("回车键按下");
};
</script>
<style lang="scss" scoped></style>