Blame view

examples/routers/table.vue 1.91 KB
2cb8a6d9   梁灏   commit Table comp...
1
  <template>
bb49347b   梁灏   fixed #2823
2
      <div>
19c208d3   梁灏   Poptip add prop `...
3
4
          <Table highlight-row ref="currentRowTable" :columns="columns3" :data="data1"></Table>
          <Button @click="handleClearCurrentRow">Clear</Button>
bb49347b   梁灏   fixed #2823
5
      </div>
2cb8a6d9   梁灏   commit Table comp...
6
7
  </template>
  <script>
2cb8a6d9   梁灏   commit Table comp...
8
      export default {
51356c2c   梁灏   fixed #658
9
10
          data () {
              return {
19c208d3   梁灏   Poptip add prop `...
11
                  columns3: [
ceeb9361   梁灏   fixed Table bug i...
12
                      {
19c208d3   梁灏   Poptip add prop `...
13
                          type: 'index',
bb49347b   梁灏   fixed #2823
14
15
                          width: 60,
                          align: 'center'
ceeb9361   梁灏   fixed Table bug i...
16
                      },
437b8059   Sergio Crisostomo   Added Table to CS...
17
                      {
55f90d87   梁灏   fixed #1648
18
                          title: 'Name',
ceeb9361   梁灏   fixed Table bug i...
19
                          key: 'name'
2993f4ee   梁灏   update Tab
20
21
                      },
                      {
55f90d87   梁灏   fixed #1648
22
                          title: 'Age',
bb49347b   梁灏   fixed #2823
23
                          key: 'age'
2993f4ee   梁灏   update Tab
24
25
                      },
                      {
55f90d87   梁灏   fixed #1648
26
                          title: 'Address',
b34e09b8   梁灏   fixed #2832
27
                          key: 'address'
437b8059   Sergio Crisostomo   Added Table to CS...
28
29
                      }
                  ],
bb49347b   梁灏   fixed #2823
30
                  data1: [
b142865e   梁灏   fixed #2102
31
32
33
34
                      {
                          name: 'John Brown',
                          age: 18,
                          address: 'New York No. 1 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
35
                          date: '2016-10-03'
b142865e   梁灏   fixed #2102
36
37
38
39
                      },
                      {
                          name: 'Jim Green',
                          age: 24,
ceeb9361   梁灏   fixed Table bug i...
40
41
                          address: 'London No. 1 Lake Park',
                          date: '2016-10-01'
b142865e   梁灏   fixed #2102
42
43
44
45
46
                      },
                      {
                          name: 'Joe Black',
                          age: 30,
                          address: 'Sydney No. 1 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
47
                          date: '2016-10-02'
b142865e   梁灏   fixed #2102
48
49
50
51
52
                      },
                      {
                          name: 'Jon Snow',
                          age: 26,
                          address: 'Ottawa No. 2 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
53
                          date: '2016-10-04'
437b8059   Sergio Crisostomo   Added Table to CS...
54
                      }
19c208d3   梁灏   Poptip add prop `...
55
56
57
58
59
60
                  ]
              }
          },
          methods: {
              handleClearCurrentRow () {
                  this.$refs.currentRowTable.clearCurrentRow();
c5beedf8   梁灏   fixed #690
61
              }
2cb8a6d9   梁灏   commit Table comp...
62
          }
6c634aa6   梁灏   fixed #2078
63
      }
17db7df4   梁灏   fixed #1751
64
  </script>