Commit a0f489478b9804a28ccd4ce30731e1127ed728fd

Authored by 梁灏
1 parent 9ea47cb3

Optimize Table checkbox style

src/components/table/table-head.vue
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 </template> 17 </template>
18 <template v-else-if="column.type === 'selection'"><Checkbox :value="isSelectAll" :disabled="!data.length" @on-change="selectAll"></Checkbox></template> 18 <template v-else-if="column.type === 'selection'"><Checkbox :value="isSelectAll" :disabled="!data.length" @on-change="selectAll"></Checkbox></template>
19 <template v-else> 19 <template v-else>
20 - <span v-if="!column.renderHeader" @click="handleSortByHead(getColumn(rowIndex, index)._index)">{{ column.title || '#' }}</span> 20 + <span v-if="!column.renderHeader" :class="{[prefixCls + '-cell-sort']: column.sortable}" @click="handleSortByHead(getColumn(rowIndex, index)._index)">{{ column.title || '#' }}</span>
21 <render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header> 21 <render-header v-else :render="column.renderHeader" :column="column" :index="index"></render-header>
22 <span :class="[prefixCls + '-sort']" v-if="column.sortable"> 22 <span :class="[prefixCls + '-sort']" v-if="column.sortable">
23 <i class="ivu-icon ivu-icon-arrow-up-b" :class="{on: getColumn(rowIndex, index)._sortType === 'asc'}" @click="handleSort(getColumn(rowIndex, index)._index, 'asc')"></i> 23 <i class="ivu-icon ivu-icon-arrow-up-b" :class="{on: getColumn(rowIndex, index)._sortType === 'asc'}" @click="handleSort(getColumn(rowIndex, index)._index, 'asc')"></i>
src/styles/components/table.less
@@ -175,6 +175,10 @@ @@ -175,6 +175,10 @@
175 transform: rotate(90deg); 175 transform: rotate(90deg);
176 } 176 }
177 } 177 }
  178 + &-sort{
  179 + cursor: pointer;
  180 + user-select: none;
  181 + }
178 } 182 }
179 &-hidden{ 183 &-hidden{
180 visibility: hidden; 184 visibility: hidden;