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

electron-vue中使用iview 报错this. is readonly的解决办法的更多相关文章

  1. vue中使用JSX报错,如何解决

    Support for the experimental syntax 'jsx' isn't currently enabled (32:12): 30 | }, 31 | render() { & ...

  2. Intellij里检出svn报错找不到svn解决办法

    Intellij里检出svn报错找不到,解决办法: 1. 安装svn客户端: 2. 去掉settings->version control->subversion里的use command ...

  3. 在vue中使用echarts报错Cannot read property getAttribute of null

    报错信息如下: 报错代码: mounted() { // ... this.drwaCharts() // drawCharts方法为自己定义的包含渲染 echarts 图表的方法 // ...} 之 ...

  4. vue中npm install 报错之一

    报错原因: 这是因为文件phantomjs-2.1.1-windows.zip过大,网络不好,容易下载失败 PhantomJS not found on PATH 解决方案一: 选择用cnpm ins ...

  5. jupyter notebook中出现ValueError: signal only works in main thread 报错 即 长时间in[*] 解决办法

    我在jupyter notebook中新建了一个基于py3.6的kernel用来进行tensorflow学习 但是在jupyter notebook中建立该kernel时,右上角总是显示 服务正在启动 ...

  6. 关于Drupal中使用hook_schema建立数据库报错PDOException: SQLSTATE[42000]的解决办法

    报错信息如下:PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l ...

  7. eclips 中的 svn 更新报错,被锁住解决办法

    svn更新不下来,在文件的目录上选择 Team,然后选择 Refresh/Cleanup ,然后就可以了,这个方法我自己试有效,做为参考,对其它情况不一定有效 报错如下 解决方法

  8. http://localhost/ 或 http://127.0.0.1/ 报错:HTTP 404 的解决办法

    一些初次接触使用 Eclipse 工具来开发 JAVA Web 工程的开发人员,可能会对 Eclipse 和 Tomcat 的绑定产生一个疑惑. 那就是 在修改了 Tomcat 的8080端口为80后 ...

  9. GIT 报错:Result too large 解决办法

    在使用bower install命令下载前端依赖的js插件时,git出错了,报错信息如下: bower ECMDERR Failed to execute "git ls-remote -- ...

随机推荐

  1. Educational Codeforces Round 33

    # Who = Penalty * A B C D E F 479 arkethos 4 247   + 00:08 + 00:19 +1 00:59 +2 01:41     479  ne-leo ...

  2. RocketMQ之基本信息

    1.Producer 即消息生产者,负责产生消息,一般由业务系统负责产生消息. 2.Consumer 即消息消费者,负责消费消息,一般是后台系统负责异步消费. 3.Push Consumer Cons ...

  3. 谈谈c++中继承中的虚函数

      c++继承中的虚函数 c++是一种面向对象的编程语言的一个很明显的体现就是对继承机制的支持,c++中继承分很多种,按不同的分类有不同分类方法,比如可以按照基类的个数分为多继承和单继承,可以按照访问 ...

  4. ACM___数学___九的余数

    九的余数 时间限制:3000 ms  |            内存限制:65535 KB 难度:3   描述  现在给你一个自然数n,它的位数小于等于一百万,现在你要做的就是求出这个数整除九之后的余 ...

  5. sqlserver 时间测试

    select * from GropBy where [date] BETWEEN '2010-10' and '2015-10' --从字符串转换日期和/或时间时,转换失败. select * fr ...

  6. 插入排序InsertSort

    插入排序:从第二个数开始  一直和前面的数组比较 获得排序定位 ​ 代码 /** *插入排序 */ public class InsertSort { public static void inser ...

  7. ZooKeeper伪集群的搭建(Windows)

    首先下载 zookeeper 地址:https://www.apache.org/dyn/closer.cgi/zookeeper/ 1.下载完成解压后修改文件夹名字为zookeeper1,然后删除c ...

  8. kernel对NTP的API,系统调用函数

    kenrel API for NTP kernel 提供两个API(即系统调用 system call)给应用程序NTP,去校准kernel system clock Kernel Applicati ...

  9. HDU 5322 Hope (分治NTT优化DP)

    题面传送门 题目大意: 假设现在有一个排列,每个数和在它右面第一个比它大的数连一条无向边,会形成很多联通块. 定义一个联通块的权值为:联通块内元素数量的平方. 定义一个排列的权值为:每个联通块的权值之 ...

  10. useradd常用参数介绍

    -c :新账号passwd档的说明栏 -d :新账号每次登录时所使用的home_dir,预设值为default_home内login名称,并当成登录时目录名称 -e :*账号终止日期,日期的指定格式为 ...