Compare commits

..

2 Commits

Author SHA1 Message Date
Madi 517d45e631
Pre Merge pull request !432 from Madi/master 2024-11-23 03:58:46 +00:00
madixin b112249fc5 完善日志,补充组件id信息
Signed-off-by: madixin <madixin@huawei.com>
2024-11-23 11:56:14 +08:00
2 changed files with 20 additions and 20 deletions

View File

@ -75,11 +75,11 @@ export struct ImageKnifeAnimatorComponent {
} else { } else {
// 前提:宽高值均有效,值>0. 条件1当前宽高与上一次宽高不同 条件2:当前是第一次绘制 // 前提:宽高值均有效,值>0. 条件1当前宽高与上一次宽高不同 条件2:当前是第一次绘制
if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) { if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) {
LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight
' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' loadSrc = ' + this.imageKnifeOption.loadSrc
' 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(this.currentWidth, this.currentHeight),true) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
} }
} }
@ -97,11 +97,11 @@ export struct ImageKnifeAnimatorComponent {
} }
this.request = undefined this.request = undefined
this.componentVersion++ this.componentVersion++
LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight
' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' loadSrc = ' + this.imageKnifeOption.loadSrc
' 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(this.currentWidth, this.currentHeight),true) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
} }

View File

@ -100,11 +100,11 @@ export struct ImageKnifeComponent {
} else { } else {
// 前提:宽高值均有效,值>0. 条件1当前宽高与上一次宽高不同 条件2:当前是第一次绘制 // 前提:宽高值均有效,值>0. 条件1当前宽高与上一次宽高不同 条件2:当前是第一次绘制
if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) { if (this.currentHeight != this.lastHeight || this.currentWidth != this.lastWidth) {
LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight
' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' loadSrc = ' + this.imageKnifeOption.loadSrc
' 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(this.currentWidth, this.currentHeight)) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
} }
} }
@ -115,11 +115,11 @@ export struct ImageKnifeComponent {
this.clearLastRequest() this.clearLastRequest()
this.componentVersion++ this.componentVersion++
this.objectFit = this.imageKnifeOption.objectFit === undefined ? ImageFit.Contain : this.imageKnifeOption.objectFit this.objectFit = this.imageKnifeOption.objectFit === undefined ? ImageFit.Contain : this.imageKnifeOption.objectFit
LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight + LogUtil.log('watchImageKnifeOption execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight
' loadSrc = ' + this.imageKnifeOption.loadSrc + + ' loadSrc = ' + this.imageKnifeOption.loadSrc
' 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(this.currentWidth, this.currentHeight)) ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
} }