bricks/dist/examples/iptvchannels.bcrud
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

54 lines
947 B
Plaintext

{
"database":"iptvdb",
"table":"iptvchannels",
"browser":{
"lineno":true,
"include":[
{
"freeze":true,
"name":"play_btn",
"label":"Play",
"uitype":"button",
"color":"#2222d4",
"width":"60px",
"uioptions":{
"bgcolor":"#2222ff",
"nonepack":true
},
"action":{
"actiontype":"script",
"target":"self",
"script":"console.log(params.url); window.open(params.url);"
}
},
{
"freeze":true,
"name":"del_btn",
"label":"del",
"uitype":"button",
"bgcolor":"#d4d4d4",
"color":"#2222d4",
"width":"60px",
"uioptions":{
"bgcolor":"#2222ff",
"nonepack":true
},
"action":{
"actiontype":"script",
"target":"self",
"script":"console.log(params); window.open(params.url);"
}
}
],
"exclude":["id", "media_type"],
"alter":{
"url":{
"width":"410px"
},
"tv_group":{
"width":"100px"
}
}
}
}