forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput-number.vue
53 lines (48 loc) · 1.11 KB
/
input-number.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<docs>
---
order: 1
title:
zh-CN: 带输入框的滑块
en-US: Slider with InputNumber
---
## zh-CN
和 [数字输入框](/components/input-number/) 组件保持同步。
## en-US
Synchronize with [InputNumber](/components/input-number/) component.
</docs>
<template>
<div>
<a-row>
<a-col :span="12">
<a-slider v-model:value="inputValue1" :min="1" :max="20" />
</a-col>
<a-col :span="4">
<a-input-number v-model:value="inputValue1" :min="1" :max="20" style="margin-left: 16px" />
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-slider v-model:value="inputValue" :min="0" :max="1" :step="0.01" />
</a-col>
<a-col :span="4">
<a-input-number
v-model:value="inputValue"
:min="0"
:max="1"
:step="0.01"
style="margin-left: 16px"
/>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
const inputValue = ref<number>(0);
const inputValue1 = ref<number>(1);
</script>
<style scoped>
.code-box-demo .ant-slider {
margin-bottom: 16px;
}
</style>