完善日志,补充组件id信息
Signed-off-by: madixin <madixin@huawei.com>
This commit is contained in:
parent
dac7731794
commit
74bc24d61d
|
@ -75,7 +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('execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight)
|
LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight +
|
||||||
|
' loadSrc = ' + this.imageKnifeOption.loadSrc +
|
||||||
|
' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc +
|
||||||
|
' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc +
|
||||||
|
' componentId = ' + this.getUniqueId())
|
||||||
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
|
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,6 +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 +
|
||||||
|
' loadSrc = ' + this.imageKnifeOption.loadSrc +
|
||||||
|
' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc +
|
||||||
|
' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc +
|
||||||
|
' componentId = ' + this.getUniqueId())
|
||||||
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
|
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight),true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +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('execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight)
|
LogUtil.log('onSizeChange execute request:width=' + this.currentWidth + ' height= ' + this.currentHeight +
|
||||||
|
' loadSrc = ' + this.imageKnifeOption.loadSrc +
|
||||||
|
' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc +
|
||||||
|
' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc +
|
||||||
|
' componentId = ' + this.getUniqueId())
|
||||||
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
|
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,10 +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.request?.imageKnifeOption.loadSrc
|
' loadSrc = ' + this.imageKnifeOption.loadSrc +
|
||||||
+ ' placeholderSrc = ' + this.request?.imageKnifeOption.placeholderSrc
|
' placeholderSrc = ' + this.imageKnifeOption.placeholderSrc +
|
||||||
+ ' errorholderSrc = ' + this.request?.imageKnifeOption.errorholderSrc)
|
' errorholderSrc = ' + this.imageKnifeOption.errorholderSrc +
|
||||||
|
' componentId = ' + this.getUniqueId())
|
||||||
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
|
ImageKnife.getInstance().execute(this.getRequest(this.currentWidth, this.currentHeight))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue