feat:add Text lineSpacing

This commit is contained in:
pengfei.zhou
2020-03-24 11:06:30 +08:00
committed by osborn
parent a25aedcc6f
commit 0cfbef67a2
12 changed files with 75 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import { Panel, Group, scroller, vlayout, layoutConfig, LayoutSpec, Input, Gravity, log, input, text } from "doric";
import { Panel, Group, scroller, vlayout, layoutConfig, LayoutSpec, Input, Gravity, log, input, text, Color } from "doric";
import { title } from "./utils";
@Entry
class TextDemo extends Panel {
@@ -54,6 +54,17 @@ class TextDemo extends Panel {
textSize: 30,
font: 'iconfont'
}),
text({
text: "This is line Spaceing 0,\nSecond line",
maxLines: 0,
}),
text({
text: "This is line Spaceing 40,\nSecond line",
maxLines: 0,
lineSpacing: 40,
textColor: Color.RED,
textAlignment: Gravity.Right,
}),
],
{
space: 10,