Files
docs/versioned_docs/version-2.17/developer-guide/plugin/api-reference/ui/components/search-input.md
Ryan Wang 9d868fa50e docs: update documentation for Halo 2.17 (#378)
为 [Halo 2.17](https://github.com/halo-dev/halo/releases/tag/v2.17.0) 更新文档。

/kind documentation

```release-note
None
```
2024-07-02 02:41:22 +00:00

1.0 KiB

title, description
title description
SearchInput 搜索输入框组件

此组件适用于关键词搜索场景,输入数据的过程中不会触发搜索,只有在输入完成后,点击回车才会触发搜索。

使用方式

<script lang="ts" setup>
import { ref } from "vue"

const keyword = ref("")
</script>

<template>
  <SearchInput v-model="keyword" placeholder="请输入关键字" />
</template>

Props

属性名 类型 默认值 描述
placeholder string undefined 可选,用于指定输入字段的占位符文本。
modelValue string 无,必填 用于绑定输入字段的值。

Emits

事件名称 参数 描述
update:modelValue modelValue: string 类型,表示模型值。 当模型值更新时触发。