修复demo中action blank无效问题

This commit is contained in:
RickCole21 2020-08-20 15:49:22 +08:00
parent c66bd5a31c
commit 57f82fdc84
1 changed files with 8 additions and 1 deletions

View File

@ -88,9 +88,16 @@ export default function (schema) {
const link = normalizeLink(to);
return router.isActive(link);
},
jumpTo: to => {
jumpTo: (to, action) => {
to = normalizeLink(to);
if (action && action.actionType === 'url') {
action.blank === false
? (window.location.href = to)
: window.open(to);
return;
}
if (/^https?:\/\//.test(to)) {
window.location.replace(to);
} else {