Commit 63e0444e55695b146577ccc599f33054f9697885

Authored by 梁灏
1 parent 9358a9ae

fixed #142

fixed #142
src/components/table/table-head.vue
... ... @@ -78,6 +78,7 @@
78 78 computed: {
79 79 isSelectAll () {
80 80 let isSelectAll = true;
  81 + if (!this.data.length) isSelectAll = false;
81 82  
82 83 for (let i = 0; i < this.data.length; i++) {
83 84 if (!this.objData[this.data[i]._index]._isChecked) {
... ...
test/routers/date.vue
1 1 <template>
2   - <date-picker readonly confirm format="MM/dd/yy" :open="open" :value="value3" @on-change="handleChange" type="date" @on-open-change="c" @on-clear="clear" @on-ok="ok">
3   - <a href="javascript:void(0)" @click="handleClick">
4   - <Icon type="ios-calendar-outline"></Icon>
5   - <template v-if="value3 === ''">选择日期</template>
6   - <template v-else>{{ value3 }}</template>
7   - </a>
8   - </date-picker>
  2 + <date-picker :open="true" type="date" placeholder="选择日期" style="width: 200px"><span></span></date-picker>
9 3 </template>
10 4 <script>
11 5 export default {
... ...
test/routers/table.vue
... ... @@ -8,6 +8,11 @@
8 8 return {
9 9 columns6: [
10 10 {
  11 + type: 'selection',
  12 + width: 60,
  13 + align: 'center'
  14 + },
  15 + {
11 16 title: '日期',
12 17 key: 'date'
13 18 },
... ... @@ -60,30 +65,30 @@
60 65 }
61 66 ],
62 67 data5: [
63   - {
64   - name: '王小明',
65   - age: 18,
66   - address: '北京市朝阳区芍药居',
67   - date: '2016-10-03'
68   - },
69   - {
70   - name: '张小刚',
71   - age: 25,
72   - address: '北京市海淀区西二旗',
73   - date: '2016-10-01'
74   - },
75   - {
76   - name: '李小红',
77   - age: 30,
78   - address: '上海市浦东新区世纪大道',
79   - date: '2016-10-02'
80   - },
81   - {
82   - name: '周小伟',
83   - age: 26,
84   - address: '深圳市南山区深南大道',
85   - date: '2016-10-04'
86   - }
  68 +// {
  69 +// name: '王小明',
  70 +// age: 18,
  71 +// address: '北京市朝阳区芍药居',
  72 +// date: '2016-10-03'
  73 +// },
  74 +// {
  75 +// name: '张小刚',
  76 +// age: 25,
  77 +// address: '北京市海淀区西二旗',
  78 +// date: '2016-10-01'
  79 +// },
  80 +// {
  81 +// name: '李小红',
  82 +// age: 30,
  83 +// address: '上海市浦东新区世纪大道',
  84 +// date: '2016-10-02'
  85 +// },
  86 +// {
  87 +// name: '周小伟',
  88 +// age: 26,
  89 +// address: '深圳市南山区深南大道',
  90 +// date: '2016-10-04'
  91 +// }
87 92 ]
88 93 }
89 94 },
... ...