diff --git a/src/main/ets/view/SafeView.ets b/src/main/ets/view/SafeView.ets index 8d03095..b5d9334 100644 --- a/src/main/ets/view/SafeView.ets +++ b/src/main/ets/view/SafeView.ets @@ -70,15 +70,18 @@ export struct SafeView { Row() { Image($r("app.media.base_back")) .height(15) - .objectFit(ImageFit.Contain) - .onClick(() => { - if (this.onBackEvent && !this.hideBack) { - this.onBackEvent() - } else if (this.pageInfos) { - this.pageInfos.pop() - } - }).visibility(!this.hideBack ? Visibility.Visible : Visibility.None) + .objectFit(ImageFit.Contain).visibility(!this.hideBack ? Visibility.Visible : Visibility.None) }.width(110) + .onClick(() => { + if (this.hideBack) { + return + } + if (this.onBackEvent && !this.hideBack) { + this.onBackEvent() + } else if (this.pageInfos) { + this.pageInfos.pop() + } + }) Text(this.titleText ?? '') .maxLines(1)