Commit 835b37ff9f8a1d7a10529c09ede0dbe27faf1445

Authored by 梁灏
1 parent 7c41ecb3

fixed #1403

Showing 2 changed files with 21 additions and 16 deletions   Show diff stats
examples/routers/table.vue
... ... @@ -46,6 +46,7 @@
46 46 title: '年龄',
47 47 key: 'age',
48 48 sortable: true,
  49 +// sortType: 'asc',
49 50 width: 200
50 51 },
51 52 {
... ... @@ -81,22 +82,22 @@
81 82 // }
82 83 ],
83 84 data3: [
84   -// {
85   -// name: '王小明',
86   -// age: 18,
87   -// address: '北京市朝阳区芍药居',
88   -// province: '北京市',
89   -// city: '朝阳区',
90   -// zip: 100000
91   -// },
92   -// {
93   -// name: '张小刚',
94   -// age: 25,
95   -// address: '北京市海淀区西二旗',
96   -// province: '北京市',
97   -// city: '海淀区',
98   -// zip: 100000
99   -// },
  85 + {
  86 + name: '王小明',
  87 + age: 18,
  88 + address: '北京市朝阳区芍药居',
  89 + province: '北京市',
  90 + city: '朝阳区',
  91 + zip: 100000
  92 + },
  93 + {
  94 + name: '张小刚',
  95 + age: 25,
  96 + address: '北京市海淀区西二旗',
  97 + province: '北京市',
  98 + city: '海淀区',
  99 + zip: 100000
  100 + },
100 101 // {
101 102 // name: '李小红',
102 103 // age: 30,
... ...
src/components/table/table.vue
... ... @@ -660,6 +660,10 @@
660 660 column._isFiltered = true;
661 661 }
662 662  
  663 + if ('sortType' in column) {
  664 + column._sortType = column.sortType;
  665 + }
  666 +
663 667 if (column.fixed && column.fixed === 'left') {
664 668 left.push(column);
665 669 } else if (column.fixed && column.fixed === 'right') {
... ...