This commit is contained in:
yumoqing 2024-11-28 13:36:17 +08:00
parent 28c940c0cf
commit 7e6603b0ec
2 changed files with 8 additions and 1 deletions

View File

@ -124,6 +124,9 @@ bricks.widgetBuild = async function(desc, widget, data){
var klassname = desc.widgettype; var klassname = desc.widgettype;
var base_url = widget.baseURI; var base_url = widget.baseURI;
while (klassname == 'urlwidget'){ while (klassname == 'urlwidget'){
if (data){
desc = bricks.apply_data(desc, data);
}
let url = bricks.absurl(desc.options.url, widget); let url = bricks.absurl(desc.options.url, widget);
base_url = url; base_url = url;
let method = desc.options.method || 'GET'; let method = desc.options.method || 'GET';

View File

@ -35,7 +35,11 @@ bricks.DataRow = class extends bricks.HBox {
if (header){ if (header){
w = new bricks.BlankIcon({}); w = new bricks.BlankIcon({});
} else { } else {
w = new bricks.UiCheck({name:this.checkField,value:this.user_data[this.checkField]}); var v = 0
if (this.user_data){
v = this.user_data[this.checkField];
}
w = new bricks.UiCheck({name:this.checkField,value:v});
w.bind('changed', this.get_check_state.bind(this)); w.bind('changed', this.get_check_state.bind(this));
} }
this.add_widget(w); this.add_widget(w);