1.fix lint error,cannot use width & height as properties.

Signed-off-by: dodozhou7 <abczp777777@163.com>
This commit is contained in:
dodozhou7 2022-08-17 23:31:07 -07:00
parent 3cf3ec125e
commit aed44a4afe
1 changed files with 8 additions and 8 deletions

View File

@ -29,8 +29,8 @@ export struct CropImagePage2 {
@State options1: PixelMapCrop.Options = new PixelMapCrop.Options(); @State options1: PixelMapCrop.Options = new PixelMapCrop.Options();
@State cropTap: boolean = false; @State cropTap: boolean = false;
@State pack: PixelMapPack = new PixelMapPack(); @State pack: PixelMapPack = new PixelMapPack();
@State width: number = 0; @State width1: number = 0;
@State height: number = 0; @State height1: number = 0;
@State _rotate: number = 0; @State _rotate: number = 0;
@State _scale: number = 1; @State _scale: number = 1;
private _resource: Resource = $r('app.media.bmpNet'); private _resource: Resource = $r('app.media.bmpNet');
@ -54,8 +54,8 @@ export struct CropImagePage2 {
let pack1 = new PixelMapPack(); let pack1 = new PixelMapPack();
pack1.pixelMap = pixelmap; pack1.pixelMap = pixelmap;
this.pack = pack1; this.pack = pack1;
this.width = sx * px2vp(1); this.width1 = sx * px2vp(1);
this.height = sy * px2vp(1); this.height1 = sy * px2vp(1);
} }
@ -77,13 +77,13 @@ export struct CropImagePage2 {
Image(this.pack.pixelMap) Image(this.pack.pixelMap)
.width(this.width) .width(this.width1)
.height(this.height) .height(this.height1)
.objectFit(ImageFit.Contain) .objectFit(ImageFit.Contain)
.rotate({ .rotate({
z: 1, z: 1,
centerX: this.width / 2, centerX: this.width1 / 2,
centerY: this.height / 2, centerY: this.height1 / 2,
angle: this._rotate angle: this._rotate
}) })
.scale({ x: this._scale, y: this._scale, z: 1.0 }) .scale({ x: this._scale, y: this._scale, z: 1.0 })