vue中使用go()和back()两种返回上一页的区别

vue中使用go()和back()两种返回上一页的区别

https://blog.csdn.net/qq_42618566/article/details/91045282
展开
go(-1): 原页面表单中的内容会丢失;
history.go(-1):后退+刷新;

history.go(1) :前进

back(): 原页表表单中的内容会保留;
history.back():后退 ;

history.back(0) 刷新;

history.back(1):前进

原文地址:https://www.cnblogs.com/dianzan/p/12658497.html