Text add strikethrough and underline

This commit is contained in:
pengfei.zhou
2020-04-13 17:41:17 +08:00
committed by osborn
parent 8faf0e5d33
commit 8cb135b7b1
13 changed files with 151 additions and 15 deletions

View File

@@ -46,6 +46,36 @@ class LayoutDemo extends Panel {
},
height: 50,
}),
image({
imageBase64: icon_refresh,
scaleType: ScaleType.ScaleAspectFit,
backgroundColor: Color.GRAY,
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.JUST,
},
height: 50,
}),
image({
imageBase64: icon_refresh,
scaleType: ScaleType.ScaleAspectFit,
backgroundColor: Color.GRAY,
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.JUST,
},
height: 50,
}),
image({
imageBase64: icon_refresh,
scaleType: ScaleType.ScaleAspectFit,
backgroundColor: Color.GRAY,
layoutConfig: {
widthSpec: LayoutSpec.FIT,
heightSpec: LayoutSpec.JUST,
},
height: 50,
}),
image({
imageBase64: icon_refresh,
scaleType: ScaleType.ScaleAspectFit,
@@ -75,9 +105,10 @@ class LayoutDemo extends Panel {
flexConfig: {
flexDirection: FlexDirection.ROW,
width: 200,
height: 100,
height: 200,
flexWrap: Wrap.WRAP,
alignContent: Align.CENTER,
alignContent: Align.FLEX_END,
alignItems: Align.FLEX_START,
},
backgroundColor: Color.GRAY.alpha(0.1),
}

View File

@@ -69,6 +69,18 @@ class TextDemo extends Panel {
(this as Text).textColor = Color.BLACK;
}
}),
text({
text: "This is strikethrough text.",
textSize: 20,
textColor: Color.RED,
strikethrough: true,
}),
text({
text: "This is underline text.",
textSize: 20,
textColor: Color.BLUE,
underline: true,
}),
],
{
space: 10,