Commit 8a76ba042d6016779eb0d1dc9839e4bcb1e88e87
1 parent
4a260ed5
add slider on-input
Showing
2 changed files
with
18 additions
and
14 deletions
Show diff stats
src/components/slider/slider.vue
test/routers/slider.vue
1 | 1 | <template> |
2 | 2 | <div style="width: 140px;margin:100px;"> |
3 | - <!--{{ value }}--> | |
4 | - <!--<Slider @on-change="change" :step="15"></Slider>--> | |
5 | - <!--<Slider :value="40" :tip-format="format"></Slider>--> | |
6 | - <!--<Slider :value.sync="value" show-input show-stops range @on-change="change" :step="13"></Slider>--> | |
7 | - <!--<Slider :max="10"></Slider>--> | |
8 | - <!--<Slider :step="13"></Slider>--> | |
9 | - <!--<Slider :step="13" :max="60"></Slider>--> | |
10 | - <!--<Icon type="checkmark-circled" size="40" color="#f60"></Icon>--> | |
11 | - <!--<p>附近的首付款是东方红看就是</p>--> | |
12 | - <!--<div class="ivu-article">--> | |
13 | - <!--<a href="http://www.iviewui.com" target="_blank">iView</a>--> | |
14 | - <!--</div>--> | |
3 | + {{ value }} | |
4 | + <Slider @on-change="change" @on-input="input" :step="15"></Slider> | |
5 | + <Slider :value="40" :tip-format="format"></Slider> | |
6 | + <Slider :value.sync="value" show-input show-stops range @on-change="change" @on-input="input" :step="13"></Slider> | |
7 | + <Slider :max="10"></Slider> | |
8 | + <Slider :step="13"></Slider> | |
9 | + <Slider :step="13" :max="60"></Slider> | |
10 | + <Icon type="checkmark-circled" size="40" color="#f60"></Icon> | |
11 | + <p>附近的首付款是东方红看就是</p> | |
12 | + <div class="ivu-article"> | |
13 | + <a href="http://www.iviewui.com" target="_blank">iView</a> | |
14 | + </div> | |
15 | 15 | <Slider :value="75"></Slider> |
16 | - <!--<Slider :value="[20, 50]" range></Slider>--> | |
16 | + <Slider :value="[20, 50]" range></Slider> | |
17 | 17 | </div> |
18 | 18 | </template> |
19 | 19 | <script> |
... | ... | @@ -31,7 +31,10 @@ |
31 | 31 | return `进度:${val}%` |
32 | 32 | }, |
33 | 33 | change (data) { |
34 | -// console.log(data) | |
34 | + console.log(data) | |
35 | + }, | |
36 | + input (value) { | |
37 | + console.log(value) | |
35 | 38 | } |
36 | 39 | } |
37 | 40 | } | ... | ... |