title: electron-vue中使用iview 报错this. is readonly的解决办法
toc: false
date: 2019-02-12 19:33:28
categories:

  • Web

tags:

  • vue
  • iview

报大段xxx is readonly的解决办法

修改.electron-vue文件夹中的webpack.renderer.config.js内第22行的

let whiteListedModules = ['vue']

为:

let whiteListedModules = ['vue', 'iview']

即可。

原理:

.electron-vue/webpack.renderer.config.js

Targets electron's renderer process. This configuration handles your Vue application, so it includes vue-loader and many other configurations that are available in the official vuejs-templates/webpack boilerplate.

White-listing Externals

One important thing to consider about this config is that you can whitelist specific modules to not treat as webpack externals. There aren't many use cases where this functionality is needed, but for the case of Vue UI libraries that provide raw *.vue components they will need to be whitelisted, so vue-loader is able to compile them. Another use case would be using webpack aliases, such as setting vue to import the full Compiler + Runtime build. Because of this, vue is already in the whitelist.

参考链接: https://github.com/iview/iview/issues/2513

最新文章

  1. Storm Windowing storm滑动窗口简介
  2. cookie被禁用session怎么办
  3. Arduino 极速入门系列 - 光控灯(1)- 关于理论和 LED 那些事
  4. LEETCODE —— Populating Next Right Pointers in Each Node
  5. Mysql 分段统计
  6. BZOJ3868 : The only survival
  7. 【redmine】密码忘了后重新设置
  8. 关于用了SSH连接之后,但是Chrome中访问stackoverflow超慢的原因
  9. BZOJ3276 : 磁力
  10. android 与usb 设备通信(二)
  11. 006 Python的操作符
  12. servlet单例多线程
  13. Java native(转)
  14. Swift的基础,操作符,字符串和集合类型
  15. [汇编语言]-debug跟踪执行
  16. SQL learning
  17. swaggerui在asp.net web api core 中的应用
  18. Springboot 之 解决IDEA读取properties配置文件的中文乱码问题
  19. iOS开发-添加圆角效果高效实现
  20. BZOJ 4644

热门文章

  1. Codeforces Round #451 & Codeforces Round #452
  2. Static variables in JavaScript
  3. python安装Django需要环境
  4. IIS网站调用FFMPEG执行截图命令失败的原因(暂时记录)
  5. ubuntu 搭建简易的https网站
  6. iPhone Mach-O文件格式与代码签名
  7. 【转】Oracle基础结构认知—初识oracle 礼记八目 2017-12-12 21:19:30
  8. VS2013 opencv 无法删除“继承的值”问题解决方案
  9. obj-c部分对象快捷赋值和取值
  10. vue 配置页面动态的 title