This commit is contained in:
yumoqing 2026-01-28 16:08:44 +08:00
parent 13fc52e288
commit 3d7c2bae3c
2 changed files with 6 additions and 2 deletions

View File

@ -529,7 +529,9 @@ bricks.getWidgetById = function(idset, from_widget){
if (bricks.Factory.isWidgetType(p, typename)) return p; if (bricks.Factory.isWidgetType(p, typename)) return p;
return get_by_typename(p, typename, downward); return get_by_typename(p, typename, downward);
}; };
if (!idset) return from_widget; if (!idset) {
return from_widget;
}
const parts = idset.split('.', 2); const parts = idset.split('.', 2);
var downward = true; var downward = true;
var typename = ''; var typename = '';
@ -548,6 +550,9 @@ bricks.getWidgetById = function(idset, from_widget){
w = get_by_id(id, from_widget, downward); w = get_by_id(id, from_widget, downward);
} }
if (!w) return null; if (!w) return null;
if (!parts[1]){
console.log('idset=',idset, 'id=', id, w);
}
return bricks.getWidgetById(parts[1], w); return bricks.getWidgetById(parts[1], w);
} }

View File

@ -108,7 +108,6 @@ bricks.HttpText = class {
async bricks_fetch(url, {method='GET', headers=null, params=null}={}){ async bricks_fetch(url, {method='GET', headers=null, params=null}={}){
url = this.url_parse(url); url = this.url_parse(url);
var data = this.add_own_params(params); var data = this.add_own_params(params);
console.log('bricks_fetch(): data=', data, 'url=', url);
var header = this.add_own_headers(headers); var header = this.add_own_headers(headers);
var _params = { var _params = {
method:method method:method