This commit is contained in:
yumoqing 2024-06-05 15:48:00 +08:00
parent 1e0fbce1d5
commit 6a87994bdf
3 changed files with 10 additions and 17 deletions

View File

@ -453,7 +453,6 @@ bricks.DynamicAccordion = class extends bricks.VScrollPanel {
return;
}
var jc = new bricks.HttpJson();
var w;
w = await bricks.widgetBuild(this.content_view, content, record);
if (w){

View File

@ -76,11 +76,12 @@ bricks.HttpText = class {
}
return params;
}
params = Object.assign(this.params, params);
var p = bricks.extend({}, this.params);
p = bricks.extend(p, params);
if (session){
bricks.extend(params,{session:session});
bricks.extend(p,{session:session});
}
return params;
return p;
}
add_own_headers(headers){
if (! headers){

View File

@ -11,7 +11,7 @@ bricks.TreeNode = class extends bricks.VBox {
this.children_loaded = false;
this.user_data = data;
this.is_leaf = this.user_data.is_leaf;
this.params = {id:this.user_data[this.tree.opts.idField]};
this.params = bricks.extend(this.tree.params, {id:this.user_data[this.tree.opts.idField]});
if (this.tree.multitype_tree){
this.params['type'] = this.user_data[this.tree.opts.typeField];
}
@ -181,6 +181,7 @@ bricks.Tree = class extends bricks.VScrollPanel {
this.add_widget(this.container);
this.data_id = null;
if (this.opts.dataurl){
this.params = opts.params || {};
schedule_once(this.get_children_data.bind(this, this), 0.1);
} else {
this.user_data = {
@ -411,26 +412,18 @@ bricks.Tree = class extends bricks.VScrollPanel {
node_selected(node, flag){
console.log('node_selected():node=', node, flag);
node.selected(flag);
var d = {
node:node,
data:node.getValue(),
id:node.get_id(),
var d = bricks.extend(node.user_data, {
selected:flag
}
});
this.dispatch('node_selected', d);
}
async node_checked(node, event){
var cb = event.target.bricks_widget;
var stat = cb.getValue().check;
node.user_data[this.checkField] = stat;
var d = {
node:node,
data:node.getValue(),
id: node.get_id(),
check_stat:stat
}
console.log('value=', cb.getValue(), 'node=', node);
this.dispatch('check_changed', d);
this.dispatch('check_changed', node.user_data);
}
node_info_log(event){
if (event.params.selected == false){