This commit is contained in:
yumoqing 2024-05-06 18:00:27 +08:00
parent 32305d3db7
commit 6a23ff18b0
4 changed files with 12 additions and 4 deletions

View File

@ -283,8 +283,10 @@ bricks.buildUrlwidgetHandler = function(w, target, rtdata, desc){
} }
} }
var options = objcopy(desc.options||{}); var options = objcopy(desc.options||{});
var params = options.params || {};
options = bricks.apply_data(options, rtdata); options = bricks.apply_data(options, rtdata);
bricks.extend(options.params, rtdata); options.params = bricks.extend(params, rtdata);
var opts = { var opts = {
"widgettype":"urlwidget", "widgettype":"urlwidget",
"options":options "options":options

View File

@ -87,7 +87,7 @@ bricks.DataRow = class extends bricks.HBox {
}, f); }, f);
if (header){ if (header){
opts.value = f.label || f.name; opts.value = f.label || f.name;
} }
var f = bricks.get_ViewBuilder(f.uitype); var f = bricks.get_ViewBuilder(f.uitype);
if (!f) f = bricks.get_ViewBuilder('str'); if (!f) f = bricks.get_ViewBuilder('str');
var w = f(opts); var w = f(opts);

View File

@ -298,6 +298,9 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
async dataHandle(d){ async dataHandle(d){
var data = d.rows; var data = d.rows;
var page = d.add_page; var page = d.add_page;
if (!data){
return;
}
await this.renderAccordionItems(data, page); await this.renderAccordionItems(data, page);
if (d.delete_page){ if (d.delete_page){
this.delete_page(d.delete_page); this.delete_page(d.delete_page);
@ -397,6 +400,9 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
} }
} }
async toggle_content(info, content, record, event){ async toggle_content(info, content, record, event){
if(! this.content_view){
return;
}
var h = this.container.dom_element.offsetHeight - 3 * info.dom_element.offsetHeight; var h = this.container.dom_element.offsetHeight - 3 * info.dom_element.offsetHeight;
content.set_style('height', h + 'px'); content.set_style('height', h + 'px');
if (this.active_content){ if (this.active_content){

View File

@ -24,13 +24,13 @@ bricks.add_ViewBuilder('code', function(opts){
var txt = opts.useer_data[textField] || opts.user_data[valueField]||''; var txt = opts.useer_data[textField] || opts.user_data[valueField]||'';
var options = bricks.extend({}, opts); var options = bricks.extend({}, opts);
options.otext = txt; options.otext = txt;
options.i18n = True; options.i18n = true;
return new bricks.Text(options); return new bricks.Text(options);
}); });
bricks.add_ViewBuilder('password', function(opts){ bricks.add_ViewBuilder('password', function(opts){
var options = bricks.extend({}, opts); var options = bricks.extend({}, opts);
options.otext = '******'; options.otext = '******';
options.i18n = True; options.i18n = true;
return new bricks.Text(options); return new bricks.Text(options);
}); });
bricks.add_ViewBuilder('hide', function(opts){ bricks.add_ViewBuilder('hide', function(opts){