forked from p96170835/amis
没有指定新 hash 时保留原有 hash
This commit is contained in:
parent
85fd7e2433
commit
73a67cd4e7
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue