Blame view

examples/routers/grid.vue 545 Bytes
c2db4f92   梁灏   fixed #540
1
2
3
4
5
  <style>
      .demo-col div{
          background: #f50;
      }
  </style>
c755733a   梁灏   support Grid
6
7
  <template>
      <div>
c2db4f92   梁灏   fixed #540
8
9
10
11
          <Row :gutter="16">
              <i-col class-name="demo-col" span="4" v-for="i in n" key="i">
                  <div>col-8</div>
              </i-col>
c755733a   梁灏   support Grid
12
          </Row>
c2db4f92   梁灏   fixed #540
13
          <Button @click="add">add</Button>
c755733a   梁灏   support Grid
14
15
16
17
      </div>
  </template>
  <script>
      export default {
c2db4f92   梁灏   fixed #540
18
19
20
21
22
23
24
25
26
27
          data () {
              return {
                  n: 2
              }
          },
          methods: {
              add () {
                  this.n++;
              }
          }
c755733a   梁灏   support Grid
28
29
      }
  </script>