From 57f82fdc84717121ac29650463ec26e74ae4c31e Mon Sep 17 00:00:00 2001 From: RickCole21 Date: Thu, 20 Aug 2020 15:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddemo=E4=B8=ADaction=20blank?= =?UTF-8?q?=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/components/SchemaRender.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/components/SchemaRender.jsx b/examples/components/SchemaRender.jsx index 13ff5bb0..2ad37134 100644 --- a/examples/components/SchemaRender.jsx +++ b/examples/components/SchemaRender.jsx @@ -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 {