!768 优化抽屉留空

pull/768/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent c62663d742
commit 99783c90e7

@ -132,6 +132,13 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore;
option.isLockBottomOffset = true; option.isLockBottomOffset = true;
} }
}; };
private handleTBOffsetBlur = (e) =>
{
const store = this.props.store as DrawerStore;
const option = store.m_Option;
this.uiOption.topOffset = option.topOffset.toString();
this.uiOption.bottomOffset = option.bottomOffset.toString();
};
private toggleLockLiuKong = (isTop: boolean) => private toggleLockLiuKong = (isTop: boolean) =>
{ {
const store = this.props.store as DrawerStore; const store = this.props.store as DrawerStore;
@ -227,6 +234,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore;
uiOption={this.uiOption} uiOption={this.uiOption}
onChange={this.handleTBOffset} onChange={this.handleTBOffset}
title="上留空" title="上留空"
onBlur={this.handleTBOffsetBlur}
> >
{ {
store instanceof DrawerStore && store instanceof DrawerStore &&
@ -246,6 +254,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore;
uiOption={this.uiOption} uiOption={this.uiOption}
onChange={this.handleTBOffset} onChange={this.handleTBOffset}
title="下留空" title="下留空"
onBlur={this.handleTBOffsetBlur}
> >
{ {
store instanceof DrawerStore && store instanceof DrawerStore &&

@ -144,7 +144,7 @@ export class DoorDrawerStore extends BoardStore
{ {
inf.isLockHeight = info.isLockHeight; inf.isLockHeight = info.isLockHeight;
inf.height = info.height; inf.height = info.height;
inf.showHeight = info.height.toString(); inf.showHeight = FixedNotZero(info.height, 1);
} }
} }
} }
@ -158,7 +158,7 @@ export class DoorDrawerStore extends BoardStore
{ {
inf.isLockWidth = info.isLockWidth; inf.isLockWidth = info.isLockWidth;
inf.width = info.width; inf.width = info.width;
inf.showWidth = info.width.toString(); inf.showWidth = FixedNotZero(info.width, 1);
} }
} }
} }

Loading…
Cancel
Save