Blame view

local/routers/index.vue 799 Bytes
7fa943eb   梁灏   init
1
2
3
4
5
  <style>
  
  </style>
  <template>
      <div>welcome</div>
39e6e965   梁灏   fixed checkbox bu...
6
7
8
9
10
11
12
      <Checkbox-group :model.sync="fruit">
          <Checkbox value="香蕉"></Checkbox>
          <Checkbox value="苹果"></Checkbox>
          <Checkbox value="西瓜"></Checkbox>
      </Checkbox-group>
      {{ fruit | json }}
      <Button @click="update">update fruit</Button>
7fa943eb   梁灏   init
13
14
  </template>
  <script>
39e6e965   梁灏   fixed checkbox bu...
15
16
17
      import { Checkbox, Icon, Button } from 'iview';
      const CheckboxGroup = Checkbox.Group;
  
7fa943eb   梁灏   init
18
      export default {
39e6e965   梁灏   fixed checkbox bu...
19
          components: { Checkbox, CheckboxGroup, Icon, Button },
7fa943eb   梁灏   init
20
21
22
23
24
          props: {
          
          },
          data () {
              return {
39e6e965   梁灏   fixed checkbox bu...
25
                  fruit: ['苹果']
7fa943eb   梁灏   init
26
27
28
              }        
          },
          methods: {
39e6e965   梁灏   fixed checkbox bu...
29
30
31
              update () {
                  this.fruit = ['香蕉', '西瓜']
              }
7fa943eb   梁灏   init
32
33
34
          }
      }
  </script>