Commit c3e24210 authored by 范雪寒's avatar 范雪寒

fix: buttonOnClick

parent 4e1862d3
...@@ -50,6 +50,7 @@ cc.Class({ ...@@ -50,6 +50,7 @@ cc.Class({
}, },
buttonOnClick(button, callback, scale = 1.0) { buttonOnClick(button, callback, scale = 1.0) {
button.on('click', () => {
if (button['cantClick']) { if (button['cantClick']) {
return; return;
} }
...@@ -62,5 +63,6 @@ cc.Class({ ...@@ -62,5 +63,6 @@ cc.Class({
callback && callback(); callback && callback();
}) })
.start(); .start();
});
} }
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment