Pre Merge pull request !218 from zgf/3.x

This commit is contained in:
zgf 2024-04-23 12:07:40 +00:00 committed by Gitee
commit db473c29b9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 1 deletions

View File

@ -63,7 +63,12 @@ export struct ImageKnifeComponent {
}
this.listener.off("layout", this.onLayoutComplete)
}
aboutToRecycle(){
if (this.request !== undefined) {
this.request.requestState = ImageKnifeRequestState.DESTROY
this.request = undefined
}
}
build() {
Image(this.pixelMap)
.objectFit(this.ImageKnifeOption.objectFit === undefined ? ImageFit.Contain : this.ImageKnifeOption.objectFit)