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.
1.0 KiB
1.0 KiB
docs
用法
<html>
<head>
</head>
<body>
<script src="/marked.js"></script>
<script src="http://kimird.com/bricks/bricks.js"></script>
<script>
const opts =
{
"widget": {
"widgettype":"MarkdownViewer",
"options":{
"navigator":true,
"md_url":"../docs/index.md"
}
}
}
;
const app = new BricksApp(opts);
app.run();
</script>
</body>
</html>
widget参数说明
| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 |
|---|---|---|---|---|---|
| widgettype | 控件类型 | String | 是 | --- | --- |
widget.options参数说明
| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 |
|---|---|---|---|---|---|
| navigator | 是否可以导航指向 | Boolean | 是 | true/false | --- |
| md_url | 数据来源地址 | String | 是 | --- | --- |