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. 前端-JS思维导图

    看不清的朋友右键保存或者新窗口打开哦!喜欢我可以关注我,还有更多前端思维导图笔记

  2. MAVEN学习笔记之私服Nexus(2)

    MAVEN学习笔记之私服Nexus(2) 私有服务器搭建 Nexus www.snatype.org下载 snatype-work 是默认nexus存储nexus a:将bin添加到环境中 Admin ...

  3. List 常用方法解析

    1.Count属性 (获得List中元素数目) 2.Add( ) 在List中添加一个对象的公有方法 3.AddRange( ) 公有方法,在List尾部添加实现了ICollection接口的多个元素 ...

  4. vs添加浏览器

    点击桌面谷歌图标,查看属性,赋值全部地址 在vs中,直接添加,把地址复制进去就ok了

  5. sqoop从DB2迁移数据到HDFS

    Sqoop import job failed to read data from DB2 database which has UTF8 encoding. Essentially, even th ...

  6. 基于SLIC分割的特征点检测

    一:pipeLIne (1):基于模型的pose估计综述: 对于一个3D模型,可以投影到平面,得到不同的位姿,而pose识别是利用所见的2.5D图像,来估计模型,并同时识别出位姿. 3D模型投影时注意 ...

  7. Selenium3+python自动化008-常用操作

    一.元素常用操作 1. clear()            清除文本 2. send_keys()        模拟输入 3. click()            单击元素 4.get_attr ...

  8. 动态给某一个元素添加active

    <li class="one_data" data-id='+ navGroup.self_first_nav[i].id +'><a  href='+ navG ...

  9. 记Spring搭建功能完整的个人博客「Oyster」全过程[其二] Idea中Maven+SpringBoot多模块项目开发的设计和各种坑(模块间依赖和打包问题)

    大家好嘞,今天闲着没事干开写写博客,记录一下Maven+SpringBoot的多模块设计和遇到的坑. 多模块设计 简单说明一下截止目前的需求: 需要RESTful API:对文章.标签.分类和评论等的 ...

  10. JZOJ5804. 【2018.08.12提高A组模拟】简单的序列

    性质:每个位置的前缀和必须大于0,总和=0.以此dp即可. #include <iostream> #include <cstdio> #include <cstring ...