vue
文章平均质量分 72
katja · 老王
这个作者很懒,什么都没留下…
展开
-
vue写echarts 报错 Cannot read property ‘init‘ of undefined“
试了在main.js里写import echarts from 'echarts'Vue.prototype.$echarts = echarts然后组件内引用this.$echarts.init(document.getElementById('idname'));无用2. 又试了只在组件内引用import echarts from 'echarts'echarts.init(document.getElementById('idname'));无用3. 在init.原创 2020-12-06 14:56:32 · 4451 阅读 · 16 评论 -
vue子组件调用父组件方法$emit没有生效
一开始查百度,别人都说 this.$emit(方法名, 参数);里面的方法名不能是驼峰法,试了下不行;还有说emit不能写在axios里的,于是我拿到外面去了也不行;最后谷歌查,原来是父组件里的子组件需要注册一下被监听的方法parent组件<el-parent> <wx-upload v-on:uploadsuccess="UploadSuccess"></wx-upload></el-parent>...<sc原创 2020-09-12 20:21:52 · 6561 阅读 · 1 评论 -
【VUE】error:Cannot assign to read only property 'exports' of object
之前在做项目的时候 webpack 中使用swiper会出现 error:Cannot assign to read only property ‘exports’ of object ‘#’ 似乎是exports和import不兼容引起的网上有很多解决办法,但都不尽如人意。这里介绍一种比较好的兼容办法需要引入插件npm install babel-plugin-transform-es20...转载 2019-06-20 16:08:47 · 253 阅读 · 0 评论