Skip to content

Latest commit

 

History

History
155 lines (88 loc) · 3.45 KB

File metadata and controls

155 lines (88 loc) · 3.45 KB

{{ target: graphic-rich-text }}

#${prefix} width(number)

富文本容器宽度。

#${prefix} height(number)

富文本容器高度。

#${prefix} maxHeight(number) = Infinity

最大高度

#${prefix} maxWidth(number) = Infinity

最大宽度

#${prefix} ellipsis(boolean|string) = false

超出容器范围后文字的省略方式。

#${prefix} wordBreak(string) = 'break-all'

富文本文字折行方式。

可选值:

  • 'break-word': 在单词间折行
  • 'break-all': 可在任意字符间折行

#${prefix} verticalDirection(string)

富文本文字对齐方向。

可选值:

  • 'top'
  • 'middle'
  • 'bottom'

#${prefix} maxHeight(number)

富文本容器最小高度。

#${prefix} maxWidth(number)

富文本容器最小宽度。

#${prefix} textAlign(string)

富文本文字对齐方式。

可选值:

  • 'left': 左对齐
  • 'right': 右对齐
  • 'center': 居中对齐

#${prefix} textBaseline(string)

富文本文字基线。

可选值:

  • 'top'
  • 'middle'
  • 'bottom'

#${prefix} layoutDirection(string) = 'horizontal'

富文本文字排列方向。

可选值:

  • 'horizontal': 横排
  • 'vertical': 纵排

#${prefix} singleLine(boolean) = false

富文本是否单行排列。

#${prefix} textConfig(Array)

富文本文字配置。

{{ use: graphic-rich-text-character( prefix = '#' + ${prefix}, ) }}

#${prefix} fontSize(number)

字号。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} fontFamily(string)

字体。。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} fontWeight(string|number)

文字字体的粗细。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

可选:

  • 'normal'
  • 'bold'
  • 'bolder'
  • 'lighter'
  • 100 | 200 | 300 | 400...

#${prefix} fontStyle(string) = 'normal'

文字字体的风格。

可选:

  • 'normal'
  • 'italic'
  • 'oblique'

#${prefix} fill(string)

填充颜色。支持使用 rgb(255,255,255)rgba(255,255,255,1)#fff 等方式设置为纯色。 配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} stroke(string)

描边颜色。支持使用 'rgb(255,255,255)''rgba(255,255,255,1)''#fff' 等方式设置为纯色。 配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} lineWidth(number)

描边宽度。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} fillOpacity(number)

填充透明度。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefix} strokeOpacity(number)

描边透明度。配置于所有文字段落的,会被 textConfig 中的配置覆盖。

#${prefx} forceBoundsWidth(number)

强制设置文本对应的包围盒宽度,默认我们会根据文本的内容和属性,自动计算宽度,当设置了该属性之后,包围盒的宽度会被强制设置为该值。 一般用于使用 html 或者 react 渲染文本内容的时候,解决宽度没法自动计算的情况。

#${prefx} forceBoundsHeight(number)

强制设置文本对应的包围盒高度,默认我们会根据文本的内容和属性,自动计算高度,当设置了该属性之后,包围盒的高度会被强制设置为该值。 一般用于使用 html 或者 react 渲染文本内容的时候,解决宽度没法自动计算的情况。