Cannot assign to read only property 'exports' of object '#<Object>' 解决方案
来源:互联网 发布:数据库er图讲解 编辑:程序博客网 时间:2024/06/11 15:02
这个 报错是在我的vue单文件里面发生的 ,
当时 我想用一个 。vue的组件 引用 另一个。vue的组件,于是我代码如下
import ab from './ab.vue';//列表顶部的新增等按钮module.exports={
只是测试的 别纠结我的命名
然报Cannot assign to read only property 'exports' of object '#<Object>'
后面找了百度,基本原因是import 和module.exports 是不能混用在.vue的文件里面的
我的解决方案是
import ab from './ab.vue';//列表顶部的新增等按钮export default {//module.exports={
这样就OK了,
好,点不点赞看你了,或者 可以加入 我的 群153181864 前端交流群 ,绝对原创,转载请附上 本微博链接。
阅读全文
0 0
- Cannot assign to read only property 'exports' of object '#<Object>' 解决方案
- vue引入插件Cannot assign to read only property 'exports' of object '#<Object>'
- Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
- vue报错: Cannot assign to read only property 'exports' of object '#<Object>'
- Cannot assign to read only property 'exports' of object '#<Object>' (mix require and export) #4039
- OPCAutomation_TLB.pas(1240): Cannot assign to a read-only property 问题解决
- more safe way to assign a property value of an object to a variable
- Cannot serialize Object to ViewState only Session
- [Exception]Cannot set the value of read-only property 'outputFile'
- Cannot set the value of read-only property 'outputFile'
- Cannot set the value of read-only property 'outputFile'
- object-c:property,assign,copy,retain,release
- Property 'edgesForExtendedlayout' not found on object of type 解决方案
- Notice: Trying to get property of non-object problem
- Javascript: How to enumerate property of an object ?
- Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated
- android studio3.0(二)Cannot set the value of read-only property 'outputFile'
- Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=
- 二维码
- 预编译处理-----C语言中的宏以其和函数的区别
- 笔试_集合
- 工具类
- Android Arch Comp
- Cannot assign to read only property 'exports' of object '#<Object>' 解决方案
- SystemUI analysis---系统Notification数据生成流程
- 物理层
- javascript中的深复制方法一:jQuery中的extend方法
- Java网络编程之Netty拆包和黏包-yellowcong
- ubuntu 16.04 安装MySQL Workbench
- Delaunay 2D算法
- STM32硬件错误HardFault_Handler的处理方法
- hdu 3689 Infinite monkey theorem