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

37 lines
493 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: 0
title:
zh-CN: 基本用法
en-US: Basic usage
---
## zh-CN
数字输入框
## en-US
Numeric-only input box.
</docs>
<template>
<div>
<a-input-number id="inputNumber" v-model:value="value" :min="1" :max="10" />
当前值{{ value }}
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const value = ref<number>(3);
return {
value,
};
},
});
</script>