feat:add ImageView scaleType

This commit is contained in:
pengfei.zhou
2019-11-20 15:36:07 +08:00
parent b9382a4659
commit 5eddc44eb1
9 changed files with 144 additions and 21 deletions

View File

@@ -42,11 +42,21 @@ export class Text extends View implements IText {
textAlignment?: Gravity
}
export enum ScaleType {
ScaleToFill = 0,
ScaleAspectFit,
ScaleAspectFill,
}
export interface IImage extends IView {
imageUrl?: string
scaleType?: ScaleType
}
export class Image extends View implements IImage {
@Property
imageUrl?: string
@Property
scaleType?: ScaleType
}