Blame view

examples/routers/table.vue 5.84 KB
b34e09b8   梁灏   fixed #2832
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  <!--<template>-->
      <!--<Table border :columns="columns6" :data="data5"></Table>-->
  <!--</template>-->
  <!--<script>-->
      <!--export default {-->
          <!--data () {-->
              <!--return {-->
                  <!--columns6: [-->
                      <!--{-->
                          <!--title: 'Date',-->
                          <!--key: 'date'-->
                      <!--},-->
                      <!--{-->
                          <!--title: 'Name',-->
                          <!--key: 'name'-->
                      <!--},-->
                      <!--{-->
                          <!--title: 'Gender',-->
                          <!--key: 'gender'-->
                      <!--},-->
                      <!--{-->
                          <!--title: 'Age',-->
                          <!--key: 'age',-->
                          <!--fixed: 'left',-->
  <!--//                        fixed: 'right',-->
                          <!--filters: [-->
                              <!--{-->
                                  <!--label: 'Greater than 25',-->
                                  <!--value: 1-->
                              <!--},-->
                              <!--{-->
                                  <!--label: 'Less than 25',-->
                                  <!--value: 2-->
                              <!--}-->
                          <!--],-->
                          <!--filterMultiple: false,-->
                          <!--filterMethod (value, row) {-->
                              <!--if (value === 1) {-->
                                  <!--return row.age > 25;-->
                              <!--} else if (value === 2) {-->
                                  <!--return row.age < 25;-->
                              <!--}-->
                          <!--}-->
                      <!--},-->
                      <!--{-->
                          <!--title: 'Address',-->
                          <!--key: 'address',-->
                          <!--fixed: 'left',-->
                          <!--filters: [-->
                              <!--{-->
                                  <!--label: 'New York',-->
                                  <!--value: 'New York'-->
                              <!--},-->
                              <!--{-->
                                  <!--label: 'London',-->
                                  <!--value: 'London'-->
                              <!--},-->
                              <!--{-->
                                  <!--label: 'Sydney',-->
                                  <!--value: 'Sydney'-->
                              <!--}-->
                          <!--],-->
                          <!--filterMethod (value, row) {-->
                              <!--return row.address.indexOf(value) > -1;-->
                          <!--}-->
                      <!--}-->
                  <!--],-->
                  <!--data5: [-->
                      <!--{-->
                          <!--name: 'John Brown',-->
                          <!--age: 18,-->
                          <!--gender: 'male',-->
                          <!--address: 'New York No. 1 Lake Park',-->
                          <!--date: '2016-10-03'-->
                      <!--},-->
                      <!--{-->
                          <!--name: 'Jim Green',-->
                          <!--age: 24,-->
                          <!--gender: 'female',-->
                          <!--address: 'London No. 1 Lake Park',-->
                          <!--date: '2016-10-01'-->
                      <!--},-->
                      <!--{-->
                          <!--name: 'Joe Black',-->
                          <!--age: 30,-->
                          <!--gender: 'male',-->
                          <!--address: 'Sydney No. 1 Lake Park',-->
                          <!--date: '2016-10-02'-->
                      <!--},-->
                      <!--{-->
                          <!--name: 'Jon Snow',-->
                          <!--age: 26,-->
                          <!--gender: 'male',-->
                          <!--address: 'Ottawa No. 2 Lake Park',-->
                          <!--date: '2016-10-04'-->
                      <!--}-->
                  <!--],-->
              <!--}-->
          <!--}-->
      <!--}-->
  <!--</script>-->
  
2cb8a6d9   梁灏   commit Table comp...
103
  <template>
b34e09b8   梁灏   fixed #2832
104
      <Table border :columns="columns5" :data="data5"></Table>
2cb8a6d9   梁灏   commit Table comp...
105
106
  </template>
  <script>
2cb8a6d9   梁灏   commit Table comp...
107
      export default {
51356c2c   梁灏   fixed #658
108
109
          data () {
              return {
b34e09b8   梁灏   fixed #2832
110
                  columns5: [
ceeb9361   梁灏   fixed Table bug i...
111
112
                      {
                          title: 'Date',
b34e09b8   梁灏   fixed #2832
113
114
                          key: 'date',
                          sortable: true
ceeb9361   梁灏   fixed Table bug i...
115
                      },
437b8059   Sergio Crisostomo   Added Table to CS...
116
                      {
55f90d87   梁灏   fixed #1648
117
                          title: 'Name',
ceeb9361   梁灏   fixed Table bug i...
118
                          key: 'name'
2993f4ee   梁灏   update Tab
119
120
                      },
                      {
55f90d87   梁灏   fixed #1648
121
122
                          title: 'Age',
                          key: 'age',
b34e09b8   梁灏   fixed #2832
123
124
                          fixed: 'right',
                          sortable: true
2993f4ee   梁灏   update Tab
125
126
                      },
                      {
55f90d87   梁灏   fixed #1648
127
                          title: 'Address',
b34e09b8   梁灏   fixed #2832
128
                          key: 'address'
437b8059   Sergio Crisostomo   Added Table to CS...
129
130
                      }
                  ],
ceeb9361   梁灏   fixed Table bug i...
131
                  data5: [
b142865e   梁灏   fixed #2102
132
133
134
135
                      {
                          name: 'John Brown',
                          age: 18,
                          address: 'New York No. 1 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
136
                          date: '2016-10-03'
b142865e   梁灏   fixed #2102
137
138
139
140
                      },
                      {
                          name: 'Jim Green',
                          age: 24,
ceeb9361   梁灏   fixed Table bug i...
141
142
                          address: 'London No. 1 Lake Park',
                          date: '2016-10-01'
b142865e   梁灏   fixed #2102
143
144
145
146
147
                      },
                      {
                          name: 'Joe Black',
                          age: 30,
                          address: 'Sydney No. 1 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
148
                          date: '2016-10-02'
b142865e   梁灏   fixed #2102
149
150
151
152
153
                      },
                      {
                          name: 'Jon Snow',
                          age: 26,
                          address: 'Ottawa No. 2 Lake Park',
ceeb9361   梁灏   fixed Table bug i...
154
                          date: '2016-10-04'
437b8059   Sergio Crisostomo   Added Table to CS...
155
                      }
b34e09b8   梁灏   fixed #2832
156
                  ]
c5beedf8   梁灏   fixed #690
157
              }
2cb8a6d9   梁灏   commit Table comp...
158
          }
6c634aa6   梁灏   fixed #2078
159
      }
17db7df4   梁灏   fixed #1751
160
  </script>