mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix play
This commit is contained in:
parent
014048e01d
commit
554cbcb58e
@ -135,9 +135,16 @@ export default class PlayGround extends React.Component {
|
|||||||
const link = normalizeLink(to);
|
const link = normalizeLink(to);
|
||||||
return router.isActive(link);
|
return router.isActive(link);
|
||||||
},
|
},
|
||||||
jumpTo: to => {
|
jumpTo: (to, action) => {
|
||||||
to = normalizeLink(to);
|
to = normalizeLink(to);
|
||||||
|
|
||||||
|
if (action && action.actionType === 'url') {
|
||||||
|
action.blank === false
|
||||||
|
? (window.location.href = to)
|
||||||
|
: window.open(to);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (/^https?:\/\//.test(to)) {
|
if (/^https?:\/\//.test(to)) {
|
||||||
window.location.replace(to);
|
window.location.replace(to);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user