Blame view

examples/routers/slider.vue 916 Bytes
4ec205b6   梁灏   add Tag UI
1
  <template>
1c803cdf   梁灏   support Slider
2
3
4
5
6
7
8
9
10
      <div style="margin: 100px;">
          <Slider v-model="value1" :step="5" show-input></Slider>
          <Slider v-model="value2" range></Slider>
          <Slider v-model="value3" range disabled></Slider>
          {{ value1 }}{{value2}}
          <div @click="value1 = 13">change value1</div>
          <br>
          <Slider :value="value9" :tip-format="format"></Slider>
          <Slider :value="value10" :tip-format="hideFormat"></Slider>
69576f47   梁灏   add Slider component
11
      </div>
4ec205b6   梁灏   add Tag UI
12
13
  </template>
  <script>
4ec205b6   梁灏   add Tag UI
14
      export default {
36febc3c   梁灏   add Slider
15
16
          data () {
              return {
1c803cdf   梁灏   support Slider
17
18
19
20
21
                  value1: 25,
                  value2: [20, 50],
                  value3: [20, 50],
                  value9: 25,
                  value10: 25
36febc3c   梁灏   add Slider
22
23
              }
          },
4ec205b6   梁灏   add Tag UI
24
          methods: {
36febc3c   梁灏   add Slider
25
              format (val) {
1c803cdf   梁灏   support Slider
26
                  return '进度' + val + '%';
8a76ba04   jingsam   add slider on-input
27
              },
1c803cdf   梁灏   support Slider
28
29
              hideFormat () {
                  return null;
9dde24b6   梁灏   add LoadingBar co...
30
              }
4ec205b6   梁灏   add Tag UI
31
32
          }
      }
e355dd49   梁灏   add Select Component
33
  </script>