mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
fix: 修复crud2编辑器内设置多列右侧固定显示问题
This commit is contained in:
parent
38ddbd5981
commit
37e6369364
@ -60,8 +60,17 @@ export default class Head extends React.PureComponent<Props> {
|
|||||||
tdColumns: Array<TdProps>;
|
tdColumns: Array<TdProps>;
|
||||||
|
|
||||||
prependColumns(columns: Array<any>) {
|
prependColumns(columns: Array<any>) {
|
||||||
const {rowSelectionFixed, expandableFixed, draggable} = this.props;
|
const {
|
||||||
if (draggable) {
|
rowSelectionFixed,
|
||||||
|
expandableFixed,
|
||||||
|
draggable,
|
||||||
|
selectable,
|
||||||
|
expandable
|
||||||
|
} = this.props;
|
||||||
|
if (expandable) {
|
||||||
|
columns.unshift({});
|
||||||
|
}
|
||||||
|
if (draggable || selectable) {
|
||||||
columns.unshift({});
|
columns.unshift({});
|
||||||
} else {
|
} else {
|
||||||
if (expandableFixed) {
|
if (expandableFixed) {
|
||||||
|
@ -234,7 +234,9 @@ function getAfterRightWidth(
|
|||||||
for (let i = doms.length - 0; i > index; i--) {
|
for (let i = doms.length - 0; i > index; i--) {
|
||||||
if (columns && columns[i] && isFixedRightColumn(columns[i].fixed)) {
|
if (columns && columns[i] && isFixedRightColumn(columns[i].fixed)) {
|
||||||
const dom = doms[i] as HTMLElement;
|
const dom = doms[i] as HTMLElement;
|
||||||
width += dom.offsetWidth;
|
if (dom) {
|
||||||
|
width += dom.offsetWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return width;
|
return width;
|
||||||
|
Loading…
Reference in New Issue
Block a user