router icon indicating copy to clipboard operation
router copied to clipboard

建议调用bind函数时不要使用call

Open zouzhenxing opened this issue 9 years ago • 0 comments

if (typeof route.bind === 'function'/* && !route.__isBind*/) {
             route.bind.call(node);
             //route.__isBind = true;
 }

修改成

if (typeof route.bind === 'function'/* && !route.__isBind*/) {
             route.bind(node);
             //route.__isBind = true;
 }

这样可以在bind函数中使用route对象,可以用来保存一些中间数据。

zouzhenxing avatar Nov 28 '16 08:11 zouzhenxing