Blame view

examples/routers/page.vue 677 Bytes
7fa943eb   梁灏   init
1
  <template>
ea060d98   Rijn   fix #1543
2
      <div>
6355250e   Rijn   emit current upda...
3
4
          <Page :total="total" show-sizer show-elevator show-total :current.sync="current"></Page>
          {{ current }}
ea060d98   Rijn   fix #1543
5
          <Button type="primary" @click="subject">- 1</Button>
6355250e   Rijn   emit current upda...
6
          <Button type="primary" @click="change">Change</Button>
6d2b7bcb   梁灏   fixed #1575
7
          <Page :current="2" :total="50" simple></Page>
ea060d98   Rijn   fix #1543
8
      </div>
7fa943eb   梁灏   init
9
10
  </template>
  <script>
7fa943eb   梁灏   init
11
      export default {
ea060d98   Rijn   fix #1543
12
13
          data () {
              return {
6355250e   Rijn   emit current upda...
14
                  current: 1,
ea060d98   Rijn   fix #1543
15
16
17
18
19
20
                  total: 21
              }
          },
          methods: {
              subject() {
                  this.total -= 1;
6355250e   Rijn   emit current upda...
21
22
23
              },
              change() {
                  this.current = 1;
ea060d98   Rijn   fix #1543
24
25
              }
          }
7fa943eb   梁灏   init
26
      }
d6342fe1   jingsam   fixed ie bug
27
  </script>