![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
Lucywen_sea
这个作者很懒,什么都没留下…
展开
-
vue路由跳转的三种方式
<router-link to="需要跳转到页面的路径"> 1、this.$router.push()跳转到指定的url,并在history中添加记录,点击回退返回到上一个页面 2、this.$router.replace()跳转到指定的url,但是history中不会添加记录,点击回退到上上个页面 3、this.$touter.go(n)向前或者后跳转n个页面,n可以是正数也可以是负数 ...原创 2021-06-29 15:18:09 · 1304 阅读 · 0 评论 -
解析Vue中computed、watch、methods的区别
computed: 1.对data中普通数据进一步处理 2.具有缓存功能,只要计算属性中依赖的数据没有变,之后计算属性的结果直接从缓存中取,不会再执行计算属性里面的代码 3.如果计算属性的结果是需要通过异步方式得到的话, 这是不推荐使用计算属性 watch: 1.监听单个数据的变化 2.不具有缓存性 ...原创 2018-07-24 11:39:39 · 224 阅读 · 0 评论