bricks/dist/docs/zh/html.md
yumoqing 1291f7fee3 fix: UiCode build_options uses valueField/textField fallback to 'value'/'text'
When valueField/textField are not explicitly set in opts, the auto-select
logic (line 1140) and nullable empty-option creation (lines 1144-1145) used
data[0][undefined] which returned undefined, causing:
- Single-option selects to show blank (auto-select failed)
- nullable empty options to have undefined keys

Now extracts vf/tf local variables with ||'value'/||'text' fallback at the
top of build_options(), used consistently throughout.
2026-05-29 23:03:52 +08:00

532 B

Html

控件功能:用于在页面中插入自定义的 HTML 内容。
类型:普通控件
父类控件:bricks.JsWidget

初始化参数

  • html (String)
    要插入到控件中的 HTML 字符串内容。该内容将被设置为控件 DOM 元素的 innerHTML

示例:

new bricks.Html({
  html: '<div style="color: red;">这是一个红色的文本</div>'
});

主要事件

无主要事件(继承自父类的通用事件,如 init, render 等,但本控件未定义特定事件)。