Files
workspace/code/g3soft-libs/docs/examples/input/clearable.vue
T
2026-10-08 22:38:34 +08:00

19 lines
454 B
Vue

<script setup lang="ts">
// allowClear:有值时 hover / 聚焦出现清除按钮;clear 事件通知清空动作
import { ref } from 'vue'
import { G3Input, G3Message } from '@g3soft/ui'
const keyword = ref('g3soft')
</script>
<template>
<div style="width: 260px">
<G3Input
v-model="keyword"
allow-clear
placeholder="输入后 hover 可见清除按钮"
@clear="G3Message.info('已清空')"
/>
</div>
</template>