跳到主要内容

eo-text

<eo-text>
Alias: <basic.general-text>

通用文本构件。

Playground

Examples

type

Playground

editable

Playground

CustomStyle

Playground

Properties

NameDescriptionTypeDefaultRequired
type

文本类型

TextType "default"
editable

是否可编辑

boolean | EditableConfig
fontSize

字体大小

CSSProperties["fontSize"] "14px"
fontWeight

字体粗细

CSSProperties["fontWeight"] "normal"
color

字体颜色

CSSProperties["color"] "black"
lineHeight

字体行高

CSSProperties["lineHeight"] "14px"
textAlign

字体对齐方式

CSSProperties["textAlign"] "left"
display

显示类型

CSSProperties["display"] "inline"
customStyle

自定义样式

CSSProperties

Events

NameDescriptionEvent Detail
change

值改变事件

string
update

值更新事件

string

Type references

EditableConfig

NameTypeRequiredDescription
controlEditControl
autoSizeAutoSize

TextType

"secondary" | "success" | "warning" | "danger" | "disabled" | "code" | "keyboard" | "default"

EditControl

"input" | "textarea"

AutoSize

boolean | { minRows?: number; maxRows?: number }