This commit is contained in:
yumoqing 2024-08-20 19:01:38 +08:00
parent b0ba57b76d
commit 2ee2a758e7

View File

@ -23,7 +23,7 @@ bricks.Menu = class extends bricks.VBox {
async menu_clicked(event){ async menu_clicked(event){
console.log(event); console.log(event);
let e = event.target; let e = event.target;
let opts = event.params.opts; let opts = event.params;
var menu = e.bricks_widget; var menu = e.bricks_widget;
console.log('menu_clicked(): item=', menu, opts); console.log('menu_clicked(): item=', menu, opts);
if (! opts.url){ if (! opts.url){
@ -90,8 +90,8 @@ bricks.Menu = class extends bricks.VBox {
w[k] = item[k]; w[k] = item[k];
} }
} }
iw.bind('click', this.regen_menuitem_event.bind(this, w)); iw.bind('click', this.regen_menuitem_event.bind(this, item));
tw.bind('click', this.regen_menuitem_event.bind(this, w)); tw.bind('click', this.regen_menuitem_event.bind(this, item));
iw.menuitem = w; iw.menuitem = w;
tw.menuitem = w; tw.menuitem = w;
w.set_css(this.menuitem_css || 'menuitem'); w.set_css(this.menuitem_css || 'menuitem');