![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
文章平均质量分 65
爱写bug的小邓程序员
这个作者很懒,什么都没留下…
展开
-
一文教你搞懂Vue生命周期
vue2生命周期,beforeCreate,created,beforeMounted,mounted,beforeUpdate,update,beforeActived,actived,beforeDestory,destoryed,errorCaptured,watch,computed,props,provide,inject。面试常问问题原创 2024-03-08 13:19:26 · 1600 阅读 · 0 评论 -
一个Vue页面中多次复用同一个echarts组件echarts.js?f2a6:2278 There is a chart instance already initialized on the do
错误echarts.js?f2a62278Thereisachartinstancealreadyinitializedonthedom.当封装为组件使用的时候,类名是一样的,同一个页面多次出现相同类名,只能显示一个。问题今天封装了一个echarts组件,想要在一个也页面中调用多次。当为id不能显示,因为id不能重复。但是问题却发生了,只会渲染一次。所以不能用这种方法来获取。...原创 2022-07-24 17:31:57 · 1416 阅读 · 2 评论 -
Vue Cli学习笔记
如果你在开发大型项目, 那么你需要, 并且必然需要使用Vue CLI使用Vue.js开发大型应用时,我们需要考虑代码目录结构、项目结构和部署、热加载、代码单元测试等事情。CLI是什么意思?安装NodeJS可以直接在官方网站中下载安装.网址: http://nodejs.cn/download/检测安装的版本默认情况下自动安装Node和NPMNode环境要求8.9以上或者更高版本由于国内直接使用 npm 的官方镜像是非常慢的,这里推荐使用淘宝 NPM 镜像。你可以使用淘宝定制的 cnpm (gzip 压缩原创 2022-07-07 17:48:11 · 175 阅读 · 0 评论 -
Vue-Router学习笔记
路由(routing)就是通过互联的网络把信息从源地址传输到目的地址的活动. — 维基百科早期的网站开发整个HTML页面是由服务器来渲染的.但是, 一个网站, 这么多页面服务器如何处理呢?一个页面有自己对应的网址, 也就是URL.URL会发送到服务器, 服务器会通过正则对该URL进行匹配, 并且最后交给一个Controller进行处理.Controller进行各种处理, 最终生成HTML或者数据, 返回给前端.这就完成了一个IO操作上面的这种操作, 就是后端路由.当我们页面中需要请求不同的路径内容时, 交原创 2022-07-07 17:47:44 · 172 阅读 · 0 评论 -
npm run serve 一直卡在40%
用图形化界面运行也是一直在building不报错误。出现错误原因:template写了多个根元素template里面只能有一个根元素template里面只能有一个根元素template里面只能有一个根元素原创 2022-07-03 09:36:37 · 440 阅读 · 0 评论 -
Vue-Router点击相同路由报错,vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided r
vue-router.esm.js?8c4f:2065 Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: “/home”.at createRouterError (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2066:15)at createNavigationDuplic原创 2022-07-01 20:59:04 · 2251 阅读 · 0 评论 -
router-view渲染不出来(一个很低级的错误)
今天写代码遇到的一个问题,router-view渲染不出来。仔细检查了一下,看不出来问题,仔细看了半天。最后发现竟然是字母拼写错误。另外在网上看到其他集中原因,可能导致渲染不成功1.to属性的值要和路由里面的path值一样2.导入和导出vue-router官网介绍:https://router.vuejs.org/zh/官网入门案例:官网给的教程代码,仅供参考...原创 2022-07-01 19:21:59 · 1767 阅读 · 0 评论 -
ncaught TypeError: Object(...) is not a function at eval (webpack-internal:///./node_modules/vue
vue-router.esm-bundler.js?6c02:2143 Uncaught TypeError: Object(…) is not a functionat eval (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm-bundler.js:2161:97)at Module…/node_modules/vue-router/dist/vue-router.esm-bundler.js (chunk-vend原创 2022-07-01 16:29:48 · 2954 阅读 · 0 评论 -
[Vue warn]: Error compiling template: Component template should contain exactly one root element.
Vue报错:[Vue warn]: Error compiling template:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.错误原因:template里面只能一个根元素下面这种是正确的给出错误示例:这种也是正确的。只能包含一个根元素...原创 2022-06-29 14:43:38 · 834 阅读 · 0 评论