File tree Expand file tree Collapse file tree 2 files changed +2
-24
lines changed
packages/devtools/src/demos Expand file tree Collapse file tree 2 files changed +2
-24
lines changed Original file line number Diff line number Diff line change 1- #### 2025.4.20
1+ #### 2025.4.21
221 . ` A ` 新增文本换行相关特性:
33 - whiteSpace:控制空白字符和换行的处理;
44 - wordBreak:控制单词内的断行规则;
Original file line number Diff line number Diff line change 22import { defineComponent } from " vue" ;
33import { template } from " dot" ;
44
5- let tpl2 = `
5+ let tpl = `
66<scrollview id="container" scrollY = "true">
77 <text class="text lineHeightText" value="文本可以指定行高实现垂直居中"></text>
88
@@ -20,8 +20,6 @@ let tpl2 = `
2020
2121 <text class="text normalWrap" value="设置了文本宽度,文本会根据宽度自动换行,这在页面宽度有限的场景下非常有用,比如在展示用户昵称的时候,用户昵称可能是很长的"></text>
2222
23- <text class="text normalWrap" value="😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊"></text>
24-
2523 <text class="text textOverflowText" value="很长很长很长的文本可以设置截断方式,比如这段文字超出屏幕,但是会省略号展示"></text>
2624
2725 <text class="text textMiddle" value="设置了文本宽度,文本会根据宽度自动换行,有时候换行的文本也想要垂直居中,可以通过设置高度和verticalAlign来实现"></text>
@@ -36,13 +34,6 @@ let tpl2 = `
3634</scrollview>
3735 ` ;
3836
39-
40- let tpl = `
41- <scrollview id="container" scrollY = "true">
42- <text id="test" class="text normalWrap" value="设置了文本宽度,文本会根据宽度自动换行,这在页面宽度有限的场景下非常有用,比如在展示用户昵称的时候,用户昵称可能是很长的"></text>
43- </scrollview>
44- ` ;
45-
4637let style = {
4738 container: {
4839 width: 800 ,
@@ -102,10 +93,6 @@ let style = {
10293 },
10394 textBreakAll: {
10495 wordBreak: ' break-all' ,
105- },
106- normalWrap: {
107- whiteSpace: ' pre-wrap' ,
108- width: 100
10996 }
11097};
11198
@@ -144,15 +131,6 @@ export default defineComponent({
144131 text .style .backgroundColor = ' #f3f3f3'
145132 }
146133 })
147-
148- const test = Layout .getElementById (' test' );
149- test .value = ` 这是很长的 文字很长很长
150- 3
151-
152- 4
153-
154- 5
155- 6 `
156134 },
157135 },
158136});
You can’t perform that action at this time.
0 commit comments