diff --git a/src/UI/Components/Board/Door/DoorConfigModal.tsx b/src/UI/Components/Board/Door/DoorConfigModal.tsx index 6d7779d64..9c37d9938 100644 --- a/src/UI/Components/Board/Door/DoorConfigModal.tsx +++ b/src/UI/Components/Board/Door/DoorConfigModal.tsx @@ -132,6 +132,13 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore; 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) => { const store = this.props.store as DrawerStore; @@ -227,6 +234,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore; uiOption={this.uiOption} onChange={this.handleTBOffset} title="上留空" + onBlur={this.handleTBOffsetBlur} > { store instanceof DrawerStore && @@ -246,6 +254,7 @@ export class DoorConfigModal extends React.Component<{ store?: DoorDrawerStore; uiOption={this.uiOption} onChange={this.handleTBOffset} title="下留空" + onBlur={this.handleTBOffsetBlur} > { store instanceof DrawerStore && diff --git a/src/UI/Store/DoorDrawerStore/DoorDrawerStore.ts b/src/UI/Store/DoorDrawerStore/DoorDrawerStore.ts index bcc6cecb4..e3267a9c4 100644 --- a/src/UI/Store/DoorDrawerStore/DoorDrawerStore.ts +++ b/src/UI/Store/DoorDrawerStore/DoorDrawerStore.ts @@ -144,7 +144,7 @@ export class DoorDrawerStore extends BoardStore { inf.isLockHeight = info.isLockHeight; 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.width = info.width; - inf.showWidth = info.width.toString(); + inf.showWidth = FixedNotZero(info.width, 1); } } }