bricks/dist/docs/zh/iframe.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

1.3 KiB
Raw Blame History

NewWindow

控件功能,类型(普通控件或容器控件),父类控件

  • 控件功能:打开一个新浏览器窗口,加载指定 URL。
  • 控件类型:普通控件
  • 父类控件bricks.JsWidget

初始化参数

参数名 类型 必填 说明
url string 要在新窗口中打开的页面 URL。
name string 新窗口的名称(即 window.open 的第二个参数),默认为 '_blank',表示新建标签页。

主要事件

无主要事件。该控件在初始化时立即执行 window.open(),不提供可监听的事件。


Iframe

控件功能,类型(普通控件或容器控件),父类控件

  • 控件功能:创建一个内嵌的 iframe 框架,用于在当前页面中嵌入另一个网页,支持设置高度并自动加载指定 URL。
  • 控件类型:普通控件
  • 父类控件bricks.Layout

初始化参数

参数名 类型 必填 说明
url string 要嵌入的 iframe 页面地址。
height string 或 number iframe 的高度,默认值为 '100%'

主要事件

无主要事件。该控件在构造函数中直接设置 src 属性,加载页面,未定义自定义事件。