|
|
@ -1242,39 +1242,39 @@ |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// };
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
// function guardEvent (e) {
|
|
|
|
function guardEvent (e) { |
|
|
|
// // don't redirect with control keys
|
|
|
|
// don't redirect with control keys
|
|
|
|
// if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return }
|
|
|
|
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) { return } |
|
|
|
// // don't redirect when preventDefault called
|
|
|
|
// don't redirect when preventDefault called
|
|
|
|
// if (e.defaultPrevented) { return }
|
|
|
|
if (e.defaultPrevented) { return } |
|
|
|
// // don't redirect on right click
|
|
|
|
// don't redirect on right click
|
|
|
|
// if (e.button !== undefined && e.button !== 0) { return }
|
|
|
|
if (e.button !== undefined && e.button !== 0) { return } |
|
|
|
// // don't redirect if `target="_blank"`
|
|
|
|
// don't redirect if `target="_blank"`
|
|
|
|
// if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
|
|
if (e.currentTarget && e.currentTarget.getAttribute) { |
|
|
|
// var target = e.currentTarget.getAttribute('target');
|
|
|
|
var target = e.currentTarget.getAttribute('target'); |
|
|
|
// if (/\b_blank\b/i.test(target)) { return }
|
|
|
|
if (/\b_blank\b/i.test(target)) { return } |
|
|
|
// }
|
|
|
|
} |
|
|
|
// // this may be a Weex event which doesn't have this method
|
|
|
|
// this may be a Weex event which doesn't have this method
|
|
|
|
// if (e.preventDefault) {
|
|
|
|
if (e.preventDefault) { |
|
|
|
// e.preventDefault();
|
|
|
|
e.preventDefault(); |
|
|
|
// }
|
|
|
|
} |
|
|
|
// return true
|
|
|
|
return true |
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// function findAnchor (children) {
|
|
|
|
function findAnchor (children) { |
|
|
|
// if (children) {
|
|
|
|
if (children) { |
|
|
|
// var child;
|
|
|
|
var child; |
|
|
|
// for (var i = 0; i < children.length; i++) {
|
|
|
|
for (var i = 0; i < children.length; i++) { |
|
|
|
// child = children[i];
|
|
|
|
child = children[i]; |
|
|
|
// if (child.tag === 'a') {
|
|
|
|
if (child.tag === 'a') { |
|
|
|
// return child
|
|
|
|
return child |
|
|
|
// }
|
|
|
|
} |
|
|
|
// if (child.children && (child = findAnchor(child.children))) {
|
|
|
|
if (child.children && (child = findAnchor(child.children))) { |
|
|
|
// return child
|
|
|
|
return child |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// var _Vue;
|
|
|
|
// var _Vue;
|
|
|
|
|
|
|
|
|
|
|
@ -3169,6 +3169,8 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.router_view", RouterView); |
|
|
|
BI.shortcut("bi.router_view", RouterView); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.Router = VueRouter; |
|
|
|
|
|
|
|
BI.Router.isSameRoute = isSameRoute; |
|
|
|
return VueRouter; |
|
|
|
return VueRouter; |
|
|
|
|
|
|
|
|
|
|
|
}))); |
|
|
|
}))); |
|
|
|