添加bar组件
This commit is contained in:
36
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/builder.ets
Normal file
36
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/builder.ets
Normal file
@@ -0,0 +1,36 @@
|
||||
// import { Color } from '@ohos.arkui';
|
||||
@Builder
|
||||
export function buildImage(params: ESObject) {
|
||||
if(params.color) {
|
||||
Image(params.src)
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.objectFit(ImageFit.Contain)
|
||||
// .fillColor(Color.Blue)
|
||||
.fillColor(params.color)
|
||||
// colorFilter只对位图生效
|
||||
.colorFilter(params.colorFilter)
|
||||
// .colorFilter(
|
||||
// [1, 0, 0, 0, 1,
|
||||
// 0, 1, 0, 0, 1,
|
||||
// 0, 0, 1, 0, 0,
|
||||
// 0, 0, 0, 1, 0])
|
||||
.onComplete((event)=>{
|
||||
params.onComplete(event)
|
||||
})
|
||||
.onError((error) =>{
|
||||
params.onError(error.message)
|
||||
})
|
||||
} else {
|
||||
Image(params.src)
|
||||
.width('100%')
|
||||
.height('100%')
|
||||
.objectFit(ImageFit.Contain)
|
||||
.onComplete((event)=>{
|
||||
params.onComplete(event)
|
||||
})
|
||||
.onError((error) =>{
|
||||
params.onError(error.message)
|
||||
})
|
||||
}
|
||||
}
|
||||
Binary file not shown.
BIN
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/index.uts
Normal file
BIN
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/index.uts
Normal file
Binary file not shown.
BIN
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/utils.uts
Normal file
BIN
QXTfront/uni_modules/lime-svg/utssdk/app-harmony/utils.uts
Normal file
Binary file not shown.
Reference in New Issue
Block a user