Ant Design Vue踩坑记录

作者: MJ 分类: vue 发布时间: 2019-04-09 15:18

问题一:

Ant Design Vue初始化项目之后,按官方配置了babel-plugin-import按需加载之后一直报错,先是缺少less-loader和less

yarn add less-loader less

然后又报错 Inline JavaScript is not enabled. Is it set in your options

最后查了一下是less版本太高了,降为2.x就行了。

问题二:

Error in render: “TypeError: Cannot read property ‘propsData’ of undefined”

建议使用Vue.use(Menu)全局注册, 会自动为你注册Menu下子组件

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

https://github.com/vueComponent/ant-design-vue/issues/577

问题三:

在使用Modal 里边的 confirm方法的 content 用vNode的方式 如何添加动态数据? 试了很久,还是要用react的思维来解决,用jsx的 ()包裹一下

content: (<p>123456</p>)

欢迎关注小程序,感谢您的支持!

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

发表评论

邮箱地址不会被公开。 必填项已用*标注