![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
程序员之始路
这个作者很懒,什么都没留下…
展开
-
vue中 $router 和 $route 属性的区别
在vue中经常分不清$router 和 $route 的区别this.$route:当前激活的路由的信息对象。每个对象都是局部的,可以获取当前路由的 path, name, params, query 等属性。this.$router:全局的 router 实例。通过 vue 根实例中注入 router 实例,然后再注入到每个子组件,从而让整个应用都有路由功能。其中包含了很多属性和对象(比如 history 对象),任何页面也都可以调用其 push(), replace(), go() 等方法原创 2022-02-20 15:28:33 · 412 阅读 · 0 评论 -
javascript里裁切图片插件库
第三方库 cropperjs适用于JS、Vue、Jquery安装npm install cropperjs按照格式要求配置如下<!-- Wrap the image or canvas element with a block element (container) --><div> <img id="image" src="picture.jpg"></div>CSS如下配置/* Ensure the size ...原创 2022-01-22 19:05:18 · 738 阅读 · 0 评论