You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/input/demo/allow-clear.vue

40 lines
691 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 10
title:
zh-CN: 带移除图标
en-US: With clear icon
---
## zh-CN
带移除图标的输入框点击图标删除所有内容
## en-US
Input type of password.
</docs>
<template>
<div>
<a-input v-model:value="value1" placeholder="input with clear icon" allow-clear />
<br />
<br />
<a-textarea v-model:value="value2" placeholder="textarea with clear icon" allow-clear />
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const value1 = ref<string>('');
const value2 = ref<string>('');
return {
value1,
value2,
};
},
});
</script>