Compare commits

..

2 Commits

Author SHA1 Message Date
zgf eccba61d2c
Pre Merge pull request !440 from zgf/master 2024-12-04 04:33:12 +00:00
zgf 13794ddd19 错误日志和回调增加信息
Signed-off-by: zgf <zenggaofeng2@h-partners.com>
2024-12-04 12:33:01 +08:00
1 changed files with 4 additions and 6 deletions

View File

@ -110,8 +110,7 @@ export struct ImageKnifeComponent {
if (this.imageKnifeOption.objectFit === ImageFit.Auto && this.isImageFitAutoResize) { if (this.imageKnifeOption.objectFit === ImageFit.Auto && this.isImageFitAutoResize) {
this.isImageFitAutoResize = false this.isImageFitAutoResize = false
} else { } else {
ImageKnife.getInstance().execute(this.getRequest( ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight,this.getUniqueId()))
this.currentWidth, this.currentHeight, this.getUniqueId()))
} }
} }
} }
@ -128,8 +127,7 @@ export struct ImageKnifeComponent {
' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc + ' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc +
' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc + ' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc +
' componentId = ' + this.getUniqueId()) ' componentId = ' + this.getUniqueId())
ImageKnife.getInstance().execute(this.getRequest( ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight,this.getUniqueId()))
this.currentWidth, this.currentHeight, this.getUniqueId()))
} }
getCurrentContext(): common.UIAbilityContext { getCurrentContext(): common.UIAbilityContext {
@ -159,8 +157,8 @@ export struct ImageKnifeComponent {
fileCache = fileCache - net fileCache = fileCache - net
let source = memory == 1 ? 'memory' : fileCache == 1 ? 'fileCache' : 'downLoad' let source = memory == 1 ? 'memory' : fileCache == 1 ? 'fileCache' : 'downLoad'
LogUtil.info('image load showPixelMap:' + this.request?.componentId + ',srcType:' + requestSource + LogUtil.info('image load showPixelMap:' + this.request?.componentId + ',srcType:' + requestSource +
',version:' + this.request?.componentVersion + ',version:' + this.request?.componentVersion
',size:' + JSON.stringify(size) + ',source:' + source) + ',size:' + JSON.stringify(size) + ',source:' + source)
if (typeof this.pixelMap !== 'string') { if (typeof this.pixelMap !== 'string') {
if (this.imageKnifeOption.objectFit === ImageFit.Auto && this.isImageFitAutoResize == false) { if (this.imageKnifeOption.objectFit === ImageFit.Auto && this.isImageFitAutoResize == false) {
this.adaptiveHeight = this.currentWidth * size.height / size.width this.adaptiveHeight = this.currentWidth * size.height / size.width