Ant-design-vue: table组件的columns中使用customRender渲染图片报错

Created on 7 Sep 2018  ·  3Comments  ·  Source: vueComponent/ant-design-vue

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.0.3

Environment

windows X64, Google Chrome 版本 69.0.3497.81,Vue 版本 2.5.2

Reproduction link

Edit on CodeSandbox

Steps to reproduce

渲染表格数据时通过设置columns的customRender方法渲染图片,在控制台抛出[Vue warn]: Error in render: "ReferenceError: h is not defined"的错误

What is expected?

应该不是我环境配置的问题,在codesandbox这个问题也存在,希望得到作者大大的指点,怎么解决这个问题?

What is actually happening?

使用table组件的customRender无法渲染出图片并报错


是在后台商品列表时使用到这个组件,需要在表格中展示商品的图片,看文档介绍可以用customRender生成渲染函数

Most helpful comment

https://codesandbox.io/s/x2l6o14p5q
放在外部是拿不到h的

All 3 comments

https://codesandbox.io/s/x2l6o14p5q
放在外部是拿不到h的

谢谢大大,是我没看清楚文档

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

li-xiaoyin picture li-xiaoyin  ·  3Comments

ZhaoAndQian picture ZhaoAndQian  ·  3Comments

liu2080019 picture liu2080019  ·  3Comments

oleksii-shaposhnikov picture oleksii-shaposhnikov  ·  4Comments

jave-joe picture jave-joe  ·  3Comments