在watch中直接使用sessionStorage做缓存存储无法执行。 根据相关搜索结果,localStorage也无法在watch中执行。 若一定要在watch中进行操作,可以在methods中创建方法,然后在watch中执行方法。