Blame view

examples/routers/input-number.vue 607 Bytes
c97c42ab   梁灏   support InputNumber
1
2
  <template>
      <div>
8d3a02a5   丁强   修改input组件 autofoc...
3
          <Input-number :max="10" :min="-1" v-model="v1" :autofocus="autofocus"></Input-number>
c97c42ab   梁灏   support InputNumber
4
5
6
7
8
9
10
11
12
13
14
          {{ v1 }}
          <div @click="c">change v1</div>
          <Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number>
      </div>
  </template>
  <script>
      export default {
          props: {},
          data () {
              return {
                  v1: 1,
8d3a02a5   丁强   修改input组件 autofoc...
15
16
                  v2: 1,
                  autofocus: true
c97c42ab   梁灏   support InputNumber
17
18
19
20
21
22
23
24
25
26
              };
          },
          computed: {},
          methods: {
              c () {
                  this.v1 = 5;
              }
          }
      };
  </script>