Skip to content

Commit 01f997d

Browse files
author
黄书伟
committed
update
1 parent d774ed4 commit 01f997d

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

packages/themes-base/v-table.css

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,44 +106,55 @@
106106
border-width: 0;
107107
border-style: solid;
108108
border-color: rgba(221, 221, 221, 1);
109+
}
109110

111+
.v-table-title-cell:before {
112+
content: '';
113+
display: inline-block;
114+
height: 100%;
115+
vertical-align: middle;
116+
/* border: 1px solid red;*/ /* so we can see what's going on */
110117
}
111118

112119
.table-title{
113120
display: inline-block;
114121
padding:0 3px;
122+
vertical-align: middle;
115123
word-break: break-all;
116124
overflow: hidden;
125+
line-height: 1.2em;
117126
}
118127

119128
.v-table-sort-icon {
120129
position: relative;
121130
display: inline-block;
122-
width: 14px;
123131
vertical-align: middle;
124-
text-align: center;
125-
height: 100%;
126-
line-height: 100%;
127-
cursor: pointer;
132+
/*font-size:16px;*/
133+
width:16px;
134+
height: 19px;
128135
margin-left: -8px;
136+
overflow: hidden;
137+
cursor: pointer;
129138
}
130139

131140
.v-table-sort-icon i {
141+
132142
position: absolute;
133-
line-height: 8px;
134143
display: block;
135-
width: 14px;
136-
height: 8px;
144+
width:16px;
145+
height: 15px;
146+
/*line-height: 12px;*/
147+
overflow: hidden;
137148
color: #a6a6a6;
138149
transition: color .2s ease-in-out;
139150
}
140151

141152
.v-table-sort-icon i:first-child {
142-
top: -10px;
153+
top: -4px;
143154
}
144155

145156
.v-table-sort-icon i:last-child {
146-
/* bottom: 10px;*/
157+
bottom: -0px;
147158
}
148159

149160
.v-table-header .cursorPointer{

packages/v-table/src/table.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@mousedown.stop="handleTitleMouseDown($event)"
2020
@mouseout.stop="handleTitleMouseOut()">
2121
<div :class="['v-table-title-cell',showVerticalBorder?'vertical-border':'',showHorizontalBorder?'horizontal-border':'']"
22-
:style="{'width':titleColumnWidth(col.fields)+'px','height':titleColumnHeight(col.rowspan)+'px','line-height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
22+
:style="{'width':titleColumnWidth(col.fields)+'px','height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
2323
<span class="table-title" v-html="col.title"></span>
2424
<span @click.stop="sortControl(col.fields[0],col.orderBy)" class="v-table-sort-icon" v-if="enableSort(col.orderBy)">
2525
<i :class='["v-icon-up-dir",col.orderBy ==="asc" ? "checked":""]'></i>
@@ -38,7 +38,7 @@
3838
@mousedown.stop="handleTitleMouseDown($event)"
3939
@mouseout.stop="handleTitleMouseOut()">
4040
<div :class="['v-table-title-cell',showVerticalBorder?'vertical-border':'',showHorizontalBorder?'horizontal-border':'']"
41-
:style="{'width':col.width+'px','height':titleRowHeight+'px','line-height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
41+
:style="{'width':col.width+'px','height':titleRowHeight+'px','text-align':col.titleAlign}">
4242
<span class="table-title" v-html="col.title"></span>
4343
<span @click.stop="sortControl(col.field,col.orderBy)" class="v-table-sort-icon" v-if="enableSort(col.orderBy)">
4444
<i :class='["v-icon-up-dir",col.orderBy ==="asc" ? "checked":""]'></i>
@@ -111,7 +111,7 @@
111111
@mousedown.stop="handleTitleMouseDown($event)"
112112
@mouseout.stop="handleTitleMouseOut()">
113113
<div :class="['v-table-title-cell',showVerticalBorder?'vertical-border':'',showHorizontalBorder?'horizontal-border':'']"
114-
:style="{'width':titleColumnWidth(col.fields)+'px','height':titleColumnHeight(col.rowspan)+'px','line-height':titleColumnHeight(col.rowspan)+'px','line-height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
114+
:style="{'width':titleColumnWidth(col.fields)+'px','height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
115115
<span class="table-title" v-html="col.title"></span>
116116
<span @click.stop="sortControl(col.fields[0],col.orderBy)" class="v-table-sort-icon" v-if="enableSort(col.orderBy)">
117117
<i :class='["v-icon-up-dir",col.orderBy ==="asc" ? "checked":""]'></i>
@@ -131,7 +131,7 @@
131131
@mousedown.stop="handleTitleMouseDown($event)"
132132
@mouseout.stop="handleTitleMouseOut()">
133133
<div :class="['v-table-title-cell',showVerticalBorder?'vertical-border':'',showHorizontalBorder?'horizontal-border':'']"
134-
:style="{'width':col.width+'px','height':titleRowHeight+'px','line-height':titleColumnHeight(col.rowspan)+'px','text-align':col.titleAlign}">
134+
:style="{'width':col.width+'px','height':titleRowHeight+'px','text-align':col.titleAlign}">
135135
<span class="table-title" v-html="col.title"></span>
136136
<span @click.stop="sortControl(col.field,col.orderBy)" class="v-table-sort-icon" v-if="enableSort(col.orderBy)">
137137
<i :class='["v-icon-up-dir",col.orderBy ==="asc" ? "checked":""]'></i>

0 commit comments

Comments
 (0)