js: define text color with gradient

This commit is contained in:
王劲鹏
2021-07-19 16:29:54 +08:00
committed by osborn
parent ae62a76160
commit 4a0c8bd171
10 changed files with 458 additions and 367 deletions

View File

@@ -1,5 +1,5 @@
import { View } from "../ui/view";
import { Color } from "../util/color";
import { Color, GradientColor } from "../util/color";
import { Gravity } from "../util/gravity";
export declare enum TruncateAt {
End = 0,
@@ -9,7 +9,7 @@ export declare enum TruncateAt {
}
export declare class Text extends View {
text?: string;
textColor?: Color;
textColor?: Color | GradientColor;
textSize?: number;
maxLines?: number;
textAlignment?: Gravity;

View File

@@ -23,7 +23,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
* limitations under the License.
*/
import { View, Property } from "../ui/view";
import { Color } from "../util/color";
import { Gravity } from "../util/gravity";
import { layoutConfig } from "../util/layoutconfig";
export var TruncateAt;
@@ -41,7 +40,7 @@ __decorate([
], Text.prototype, "text", void 0);
__decorate([
Property,
__metadata("design:type", Color)
__metadata("design:type", Object)
], Text.prototype, "textColor", void 0);
__decorate([
Property,