From 73a67cd4e7e23051b856dc0e1a7271a7213bc10c Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Thu, 12 Dec 2019 23:58:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=8C=87=E5=AE=9A=E6=96=B0?= =?UTF-8?q?=20hash=20=E6=97=B6=E4=BF=9D=E7=95=99=E5=8E=9F=E6=9C=89=20hash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/components/SchemaRender.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/components/SchemaRender.jsx b/examples/components/SchemaRender.jsx index 9183d63d..ee3e1fde 100644 --- a/examples/components/SchemaRender.jsx +++ b/examples/components/SchemaRender.jsx @@ -55,7 +55,7 @@ export default function(schema) { ? to.substring(0, idx2) : to; let search = ~idx ? to.substring(idx, ~idx2 ? idx2 : undefined) : ''; - let hash = ~idx2 ? to.substring(idx2) : ''; + let hash = ~idx2 ? to.substring(idx2) : location.hash; if (!pathname) { pathname = location.pathname; @@ -77,6 +77,7 @@ export default function(schema) { }; this.env = { updateLocation: (location, replace) => { + debugger; router[replace ? 'replace' : 'push'](normalizeLink(location)); }, isCurrentUrl: to => {