update common/src/main/ets/default/uicomponents/FormManagerDialog.ets.

Signed-off-by: gengzhengxing <gengzhengxing1@h-partners.com>
This commit is contained in:
gengzhengxing 2023-06-25 03:32:08 +00:00 committed by Gitee
parent feb6a03d4f
commit a504dcf74c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -40,6 +40,7 @@ export struct FormManagerDialog {
StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT / 2, StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT / 2,
StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT / 2, StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT / 2,
StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT]; StyleConstants.FORM_MANAGER_VIEW_CARD_HEIGHT];
@State enabledDomEventResponse: boolean = true;
mFormDialogController: CustomDialogController; mFormDialogController: CustomDialogController;
cancel: (callback?) => void; cancel: (callback?) => void;
@ -178,12 +179,20 @@ export struct FormManagerDialog {
} }
.height('100%') .height('100%')
.loop(false) .loop(false)
.duration(80)
.cachedCount(1)
.index(0) .index(0)
.onChange((index: number) => { .onChange((index: number) => {
if (this.mSwiperIndex !== index) { if (this.mSwiperIndex !== index) {
this.mSwiperIndex = index; this.mSwiperIndex = index;
} }
}) })
.onAnimationStart(() => {
this.enabledDomEventResponse = false;
})
.onAnimationEnd(() => {
this.enabledDomEventResponse = true;
})
} }
.height('85%') .height('85%')
Flex({ justifyContent: FlexAlign.SpaceAround }) { Flex({ justifyContent: FlexAlign.SpaceAround }) {
@ -208,6 +217,7 @@ export struct FormManagerDialog {
.fontSize(StyleConstants.DEFAULT_BADGE_FONT_SIZE) .fontSize(StyleConstants.DEFAULT_BADGE_FONT_SIZE)
.fontColor(StyleConstants.BUTTON_FONT_COLOR) .fontColor(StyleConstants.BUTTON_FONT_COLOR)
} }
.enabled(this.enabledDomEventResponse)
.backgroundColor(StyleConstants.DEFAULT_BG_COLOR) .backgroundColor(StyleConstants.DEFAULT_BG_COLOR)
.height(StyleConstants.DEFAULT_BUTTON_HEIGHT) .height(StyleConstants.DEFAULT_BUTTON_HEIGHT)
.width(StyleConstants.DEFAULT_BUTTON_WIDTH) .width(StyleConstants.DEFAULT_BUTTON_WIDTH)