android:fix mix use layoutConfig and flexConfig

This commit is contained in:
pengfei.zhou
2020-04-13 14:30:14 +08:00
committed by osborn
parent 5a8a855f89
commit 7a2bffdb64
8 changed files with 205 additions and 116 deletions

View File

@@ -8,6 +8,7 @@ declare enum ValueType {
export declare class FlexTypedValue implements Modeling {
type: ValueType;
value: number;
constructor(type: ValueType);
static Auto: FlexTypedValue;
static percent(v: number): FlexTypedValue;
static point(v: number): FlexTypedValue;

View File

@@ -6,19 +6,17 @@ var ValueType;
ValueType[ValueType["Auto"] = 3] = "Auto";
})(ValueType || (ValueType = {}));
export class FlexTypedValue {
constructor() {
this.type = ValueType.Auto;
constructor(type) {
this.value = 0;
this.type = type;
}
static percent(v) {
const ret = new FlexTypedValue;
ret.type = ValueType.Percent;
const ret = new FlexTypedValue(ValueType.Percent);
ret.value = v;
return ret;
}
static point(v) {
const ret = new FlexTypedValue;
ret.type = ValueType.Point;
const ret = new FlexTypedValue(ValueType.Point);
ret.value = v;
return ret;
}
@@ -29,7 +27,7 @@ export class FlexTypedValue {
};
}
}
FlexTypedValue.Auto = new FlexTypedValue;
FlexTypedValue.Auto = new FlexTypedValue(ValueType.Auto);
export var FlexDirection;
(function (FlexDirection) {
FlexDirection[FlexDirection["COLUMN"] = 0] = "COLUMN";