From 99783c90e78f77b05350989b62ed64d48334bb04 Mon Sep 17 00:00:00 2001 From: ZoeLeeFZ Date: Mon, 2 Mar 2020 21:01:22 +0800 Subject: [PATCH] =?UTF-8?q?!768=20=E4=BC=98=E5=8C=96=E6=8A=BD=E5=B1=89?= =?UTF-8?q?=E7=95=99=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UI/Components/Board/Door/DoorConfigModal.tsx | 9 +++++++++ src/UI/Store/DoorDrawerStore/DoorDrawerStore.ts | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) 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); } } }