拖拽激活区宽度超长导致滚动条显示bug
This commit is contained in:
parent
adbc27c24b
commit
5bc8813fe6
|
@ -215,7 +215,7 @@ var ColumnManager = function () {
|
||||||
|
|
||||||
ColumnManager.prototype.getColumnWidth = function getColumnWidth(contentWidth) {
|
ColumnManager.prototype.getColumnWidth = function getColumnWidth(contentWidth) {
|
||||||
var columns = this.leafColumns();
|
var columns = this.leafColumns();
|
||||||
var res = { computeWidth: 0, lastShowIndex: 0 };
|
var res = { computeWidth: 0, lastShowIndex: -1 };
|
||||||
columns.forEach(function (col, index) {
|
columns.forEach(function (col, index) {
|
||||||
//如果列显示
|
//如果列显示
|
||||||
if (col.ifshow) {
|
if (col.ifshow) {
|
||||||
|
|
|
@ -192,6 +192,8 @@
|
||||||
.u-table td {
|
.u-table td {
|
||||||
padding: 12px 8px;
|
padding: 12px 8px;
|
||||||
word-break: break-all; }
|
word-break: break-all; }
|
||||||
|
.u-table tr th:last-child {
|
||||||
|
overflow: hidden; }
|
||||||
.u-table-row-hover {
|
.u-table-row-hover {
|
||||||
background: #e3f2fd; }
|
background: #e3f2fd; }
|
||||||
.u-table-scroll {
|
.u-table-scroll {
|
||||||
|
|
|
@ -437,7 +437,7 @@ var Table = function (_Component) {
|
||||||
_state$contentWidthDi = _state.contentWidthDiff,
|
_state$contentWidthDi = _state.contentWidthDiff,
|
||||||
contentWidthDiff = _state$contentWidthDi === undefined ? 0 : _state$contentWidthDi,
|
contentWidthDiff = _state$contentWidthDi === undefined ? 0 : _state$contentWidthDi,
|
||||||
_state$lastShowIndex = _state.lastShowIndex,
|
_state$lastShowIndex = _state.lastShowIndex,
|
||||||
lastShowIndex = _state$lastShowIndex === undefined ? 0 : _state$lastShowIndex;
|
lastShowIndex = _state$lastShowIndex === undefined ? -1 : _state$lastShowIndex;
|
||||||
|
|
||||||
var filterCol = [];
|
var filterCol = [];
|
||||||
rows = rows || [];
|
rows = rows || [];
|
||||||
|
|
|
@ -160,7 +160,7 @@ export default class ColumnManager {
|
||||||
}
|
}
|
||||||
getColumnWidth(contentWidth){
|
getColumnWidth(contentWidth){
|
||||||
let columns = this.leafColumns();
|
let columns = this.leafColumns();
|
||||||
let res={computeWidth:0,lastShowIndex:0};
|
let res={computeWidth:0,lastShowIndex:-1};
|
||||||
columns.forEach((col,index)=>{
|
columns.forEach((col,index)=>{
|
||||||
//如果列显示
|
//如果列显示
|
||||||
if(col.ifshow){
|
if(col.ifshow){
|
||||||
|
|
|
@ -341,7 +341,7 @@ class Table extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
getHeaderRows(columns, currentRow = 0, rows) {
|
getHeaderRows(columns, currentRow = 0, rows) {
|
||||||
let { contentWidthDiff = 0, lastShowIndex = 0 } = this.state;
|
let { contentWidthDiff = 0, lastShowIndex = -1 } = this.state;
|
||||||
let filterCol = [];
|
let filterCol = [];
|
||||||
rows = rows || [];
|
rows = rows || [];
|
||||||
rows[currentRow] = rows[currentRow] || [];
|
rows[currentRow] = rows[currentRow] || [];
|
||||||
|
@ -691,7 +691,7 @@ class Table extends Component {
|
||||||
}else{
|
}else{
|
||||||
//内容少,不用显示滚动条
|
//内容少,不用显示滚动条
|
||||||
if(this.domWidthDiff > 0){
|
if(this.domWidthDiff > 0){
|
||||||
headStyle.overflowX = 'auto';
|
headStyle.overflowX = 'hidden';
|
||||||
}
|
}
|
||||||
headStyle.marginBottom = `0px`;
|
headStyle.marginBottom = `0px`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,11 @@ $table-move-in-color: $bg-color-base;
|
||||||
padding: $vertical-padding $horizontal-padding;
|
padding: $vertical-padding $horizontal-padding;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
tr {
|
||||||
|
th:last-child{ //拖拽tag影响了表格整体宽度
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
&-row-hover {
|
&-row-hover {
|
||||||
background: rgb(227, 242, 253);
|
background: rgb(227, 242, 253);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue