Lines Matching refs:Text

1 # 文本显示 (Text/Span)
4 Text是文本组件,通常用于展示用户视图,如显示文章的文字内容。Span则用于呈现显示行内文本。
6 具体用法请参考[Text](../reference/apis-arkui/arkui-ts/ts-basic-components-text.md)和[Span](../reference/api…
11 Text可通过以下两种方式来创建:
17 Text('我是一段文本')
30 Text($r('app.string.module_desc'))
43Text](../reference/apis-arkui/arkui-ts/ts-basic-components-text.md)和[RichEditor](../reference/apis…
47 Span组件必须嵌入在Text组件中才能显示,单独的Span组件不会呈现任何内容。Text与Span同时配置文本内容时,Span内容覆盖Text内容。
51 Text('我是Text') {
66 Text() {
84 Text() {
100 Text() {
115 Text('左对齐')
120 Text('中间对齐')
125 Text('右对齐')
137Text('This is the setting of textOverflow to Clip text content This is the setting of textOverflow…
144 Text('我是超长文本,超出的部分显示省略号。I am an extra long text, with ellipses displayed for any excess。')
151Text('当文本溢出其尺寸时,文本将滚动显示。When the text overflows its dimensions, the text will scroll for displayin…
165 Text('This is the text with the line height set. This is the text with the line height set.')
167 Text('This is the text with the line height set. This is the text with the line height set.')
177 Text('This is the text')
183 Text('This is the text')
189 Text('This is the text')
202 Text('This is the text content with baselineOffset 0.')
209 Text('This is the text content with baselineOffset 30.')
216 Text('This is the text content with baselineOffset -20.')
230 Text('This is the text content with letterSpacing 0.')
237 Text('This is the text content with letterSpacing 3.')
244 Text('This is the text content with letterSpacing -1.')
260 Text('我的最大字号为30,最小字号为5,宽度为250,maxLines为1')
268 Text('我的最大字号为30,最小字号为5,宽度为250,maxLines为2')
276 Text('我的最大字号为30,最小字号为15,宽度为250,高度为50')
284 Text('我的最大字号为30,最小字号为15,宽度为250,高度为100')
299 Text('This is the text content with textCase set to Normal.')
306 Text('This is the text content with textCase set to LowerCase.')
312 Text('This is the text content with textCase set to UpperCase.')
324 Text("这是一段可复制文本")
334 Text组件可以添加通用事件,可以绑定[onClick](../reference/apis-arkui/arkui-ts/ts-universal-events-click.md#onclick)…
337 Text('点我')
339 console.info('我是Text的点击响应事件');
355 Text("1").fontSize(14).fontColor(Color.Red).margin({ left: 10, right: 10 })
356 Text("我是热搜词条1")
362 Text("爆")
375 Text("2").fontSize(14).fontColor(Color.Red).margin({ left: 10, right: 10 })
376 Text("我是热搜词条2 我是热搜词条2 我是热搜词条2 我是热搜词条2 我是热搜词条2")
383 Text("热")
396 Text("3").fontSize(14).fontColor(Color.Orange).margin({ left: 10, right: 10 })
397 Text("我是热搜词条3")
404 Text("热")
417 Text("4").fontSize(14).fontColor(Color.Grey).margin({ left: 10, right: 10 })
418 Text("我是热搜词条4 我是热搜词条4 我是热搜词条4 我是热搜词条4 我是热搜词条4")