Blame view

examples/routers/input-number.vue 878 Bytes
c97c42ab   梁灏   support InputNumber
1
2
  <template>
      <div>
fa66bfb1   Rijn   add watchers for ...
3
          <Input-number :max="max" name="he" :min="-1" v-model="v1" :autofocus="autofocus"></Input-number>
c97c42ab   梁灏   support InputNumber
4
5
          {{ v1 }}
          <div @click="c">change v1</div>
fa66bfb1   Rijn   add watchers for ...
6
          <div @click="changeMax">change max</div>
c97c42ab   梁灏   support InputNumber
7
          <Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number>
b6861430   Lawrence Lee   add test case for...
8
          <Input-number :max="10" :min="1" v-model="obj.v"></Input-number>
c97c42ab   梁灏   support InputNumber
9
10
11
12
13
14
15
16
      </div>
  </template>
  <script>
      export default {
          props: {},
          data () {
              return {
                  v1: 1,
8d3a02a5   丁强   修改input组件 autofoc...
17
                  v2: 1,
fa66bfb1   Rijn   add watchers for ...
18
                  max: 10,
b6861430   Lawrence Lee   add test case for...
19
20
21
22
                  autofocus: true,
                  obj: {
  
                  }
c97c42ab   梁灏   support InputNumber
23
24
25
26
27
28
              };
          },
          computed: {},
          methods: {
              c () {
                  this.v1 = 5;
fa66bfb1   Rijn   add watchers for ...
29
30
31
              },
              changeMax () {
                  this.max++;
c97c42ab   梁灏   support InputNumber
32
33
34
35
              }
          }
      };
  </script>