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/basic.vue

43 lines
738 B

<docs>
---
order: 0
title:
zh-CN: 基本用法
en-US: Basic usage
---
## zh-CN
基本用法
## en-US
Basic usage example.
</docs>
<template>
<a-space direction="vertical">
<a-input v-model:value="value" placeholder="Basic usage" />
<a-input v-model:value.lazy="value1" autofocus placeholder="Lazy usage" />
</a-space>
</template>
<script lang="ts">
import { watch, defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const value = ref<string>('');
const value1 = ref<string>('');
watch(value, () => {
console.log(value.value);
});
watch(value1, () => {
console.log(value1.value);
});
return {
value,
value1,
};
},
});
</script>