[vue--development record] Use location.href to modify the pit encountered on ie by modifying the address jump page

The management background project is being developed with vue2.0, because I just switched to vue2.0, I am not too familiar with it. When jumping the page, directly use location.href to modify the address jump, which is normal on chrome and Firefox. Later, because it was said to be compatible with IE9, I polyfilled the project, and then when I browsed on IE, I found that the address was changed when I clicked the jump, but the page still stayed on the current page, and F5 refreshed it to a new page. .

I used location.href to only modify the hash value part, which is a habit I left behind when I wrote angular. The code is similar to this location.href = '/#/xxxx', and I added the previous domain name later, and found that I can jump Turned, but the page refreshed again.

Later, I still looked at the documentation and converted the jump to this.$router.push({path: 'XXXX'}) This may also jump normally, and the page will not be refreshed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325217767&siteId=291194637