feat: doric-web text support maxLines

This commit is contained in:
钱泽虹
2023-08-30 14:29:51 +08:00
committed by osborn
parent 704a31f80c
commit 089423126d
5 changed files with 136 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ class NaivgatorDemo extends Panel {
'AnimatorDemo',
'Gobang',
'NotificationDemo',
'TextDemo',
'SwitchDemo',
'SliderDemo',
'NavbarDemo',

View File

@@ -61,7 +61,14 @@ class TextDemo extends Panel {
layoutConfig: layoutConfig().configWidth(LayoutSpec.MOST).configHeight(LayoutSpec.JUST),
}),
text({
text: "This is normal text",
text: "This is normal text! This is normal text! This is normal text! This is normal text! This is normal text! This is normal text! ",
maxLines: 2,
backgroundColor: Color.LTGRAY,
layoutConfig:layoutConfig().configWidth(LayoutSpec.JUST).configHeight(LayoutSpec.FIT),
width:320,
border:{"width":1, "color":Color.RED},
margin:{left:15,right:17}
}),
hlayout([
text({