2018-04-01 11:23:56 +00:00
|
|
|
<cn>
|
|
|
|
#### 带输入框的滑块
|
2019-02-16 08:51:21 +00:00
|
|
|
和 [数字输入框](/components/input-number-cn/) 组件保持同步。
|
2018-04-01 11:23:56 +00:00
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Slider with InputNumber
|
2019-02-16 08:51:21 +00:00
|
|
|
Synchronize with [InputNumber](/components/input-number/) component.
|
2018-04-01 11:23:56 +00:00
|
|
|
</us>
|
|
|
|
|
|
|
|
```html
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<a-row>
|
2019-09-28 12:45:07 +00:00
|
|
|
<a-col :span="12">
|
|
|
|
<a-slider :min="1" :max="20" v-model="inputValue1" />
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="4">
|
|
|
|
<a-input-number :min="1" :max="20" style="marginLeft: 16px" v-model="inputValue1" />
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="12">
|
|
|
|
<a-slider :min="0" :max="1" v-model="inputValue" :step="0.01" />
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="4">
|
|
|
|
<a-input-number
|
|
|
|
:min="0"
|
|
|
|
:max="1"
|
|
|
|
:step="0.01"
|
|
|
|
style="marginLeft: 16px"
|
|
|
|
v-model="inputValue"
|
|
|
|
/>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
2018-04-01 11:23:56 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2019-09-28 12:45:07 +00:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
inputValue: 0,
|
|
|
|
inputValue1: 1,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
};
|
2018-04-01 11:23:56 +00:00
|
|
|
</script>
|
|
|
|
<style scoped>
|
2019-09-28 12:45:07 +00:00
|
|
|
.code-box-demo .ant-slider {
|
|
|
|
margin-bottom: 16px;
|
|
|
|
}
|
2018-04-01 11:23:56 +00:00
|
|
|
</style>
|
|
|
|
```
|