electron-vue引入ant-desigin-vue使用ant自定义指令 v-decorator报销

        <a-form-item>
<a-input
v-decorator="[
'username',
{
rules: [{ required: true, message: '请输入账号' }],
initialValue: 'sg_lyc1',
},
]"
placeholder="账号"
>
<a-icon
slot="prefix"
type="user"
style="color: rgba(0,0,0,.25)"
/>
</a-input>
</a-form-item>

解决办法

在 .electron-vue/webpack.renderer.config.js 添加 ant-design-vue

let whiteListedModules = ['vue', 'ant-design-vue']

参考 https://github.com/vueComponent/ant-design-vue/issues/134

electron-vue [Vue warn]: Failed to resolve directive: decorator的更多相关文章

  1. Vue自定义指令报错:Failed to resolve directive: xxx

    Vue自定义指令报错 Failed to resolve directive: modle 这个报错有2个原因: 1.指令单词拼错 2.Vue.directive() 这个方法没有写在 new Vue ...

  2. [Vue warn]:vue-Failed to resolve directive: clipboard

    前言 需求:移动端需要一个按钮,复制到剪切板,分享给好友(没有调用微信内置的分享接口) 插件 vue-clipboard2 环境:vue,node 安装:npm install --save vue- ...

  3. Failed to resolve directive: el vue2报错

    vue2报错 Failed to resolve directive: el 为什么会报这个错呢,主要还是因为vue升级的时候,v-el在vue2.x以后被淘汰.使用新的标签ref替换v-el,接下来 ...

  4. Vue.js Failed to resolve filter: key

    转自:https://stackoverflow.com/questions/35835214/vue-js-failed-to-resolve-filter-key I am following t ...

  5. vue 过滤器filters的使用以及常见报错小坑(Failed to resolve filter)

    今天使用vue 过滤器中发现一个小坑,网上查到的大都是不正确的解决方法,故分享给大家: 原错误代码: // 过滤器 filter:{ FdishList:function(value){ if (!v ...

  6. Vue.js报错Failed to resolve filter问题原因

    Vue.js报错Failed to resolve filter问题原因 金刚 vue Vue.js js javascript 之前使用vue.js写分页功能时,写了一个过滤器,发现一个比较奇怪的错 ...

  7. "[Vue warn]: Failed to mount component: template or render function not defined"错误的解决

    VUE中动态路由出错: vue.esm.js?a026: [Vue warn]: Failed to mount component: template or render function not ...

  8. 解决[BScroll warn]: Can not resolve the wrapper DOM. Vue better-scroll

    在开发项目过程中,使用better-scroll插件中遇到了滚动一次重复提示相同错误 [BScroll warn]: Can not resolve the wrapper DOM. Vue bett ...

  9. electron打包vue项目

    electron是什么 Electron是由Github开发,用HTML,CSS和JavaScript来构建跨平台桌面应用程序的一个开源库. Electron通过将Chromium和Node.js合并 ...

随机推荐

  1. 【LOJ】#3088. 「GXOI / GZOI2019」旧词

    LOJ#3088. 「GXOI / GZOI2019」旧词 不懂啊5e4感觉有点小 就是离线询问,在每个x上挂上y的询问 然后树剖,每个节点维护轻儿子中已经被加入的点的个数个数乘上\(dep[u]^{ ...

  2. 小白简单快速搭建lnmp环境(centos7)

    本来想着自己搭建lnmp,由于php包下载不下来因此这次本人使用的lnmp一键包搭建的环境(很遗憾还没有php7.3.5)很详细并且方便快捷网址https://lnmp.org/install.htm ...

  3. (0)c++入门——认识指针与数组——指针即是内存中地址。

    初识指针 首先需要了解一个概念,计算机的内存(或者说是寄存器)都是有地址的. <c++ primer plus>一书P37中提到这样一个概念:为把信息存储在计算机中,程序必须记录3个基本属 ...

  4. Python特色数据类型--列表

    #list[起始索引:终止索引(不包含):步长间隔] list1[5:8] #步长省略则默认为1 #修改元素列表 #列表是一种可变的数据类型,所以可以修改内容 list1 = [0,1,2,3,4] ...

  5. SSD目标检测实战(TF项目)——人脸检测2

    数据转化为VOC格式: 一.我们先看 VOC格式的数据是什么??? Annotations:存放xml 包括 文件夹信息   图片名称. 图片尺寸信息. 图片中object的信息. JPEGImage ...

  6. Mysql-Sqlalchemy-ORM-多外键关联

    创建表结构:orm_many_fk.py from sqlalchemy import Integer, ForeignKey, String, Column,create_engine from s ...

  7. 并不对劲的2-SAT

    说明 板板题链接 这个人讲得很清楚 WAWAWAWA 建的边"不完整",比如当限制是"x为1时y一定为1"时,连x->y的边时,忘记连y'->x'的 ...

  8. Linux下离线安装Docker最新版本

    一.基础环境1.操作系统:CentOS 7.32.Docker版本:18.06.1 官方下载地址(打不开可能需要梯子)3.百度云Docker 18.06.1地址:https://pan.baidu.c ...

  9. O059、Backup Volume 操作

    参考https://www.cnblogs.com/CloudMan6/p/5662236.html   BackUp是将Volume备份到别的地方(备份设备),将来可以通过restore操作恢复. ...

  10. Win32 编程

    1.ShowWindow(SW_SHOWNORMAL)  参数 : SW_HIDE激活另外一个窗口,当前窗口就跑到那个窗口后面了SW_MAXIMIZE显示的窗口是最大化的SW_MINIMIZE显示的窗 ...