Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]The table component column render function can not be rendered if it returns a string directly #3199

Closed
Hishengs opened this issue Mar 20, 2018 · 7 comments

Comments

@Hishengs
Copy link

Hishengs commented Mar 20, 2018

Environment

vue^2.5.14 vue-template-compiler^2.5.14 chrome@64.0.3282.186 node@8.2.1 win7 iview^2.11.0 webpack^3.8.1

Reproduction link

https://github.com/Hishengs/iview-bug-report

Steps to reproduce

  1. clone repo
  2. npm install & npm run dev

aim file:https://github.com/Hishengs/iview-bug-report/blob/master/App.vue

What is expected?

can render primitive values

What is actually happening?

can not render


I guessis vue@2.5.14 's changs for functional component cause,but I can not reappear

@iview-bot
Copy link
Collaborator

Translation of this issue:

Environment

Vue^2.5.14 vue-template-compiler^2.5.14 chrome@64.0.3282.186 node@8.2.1 win7 iview^2.11.0 webpack^3.8.1

Reproduction link

https://github.com/Hishengs/iview-bug-report

Steps to reproduce

  1. clone warehouse
  2. NPM install & NPM run dev
    Specific document: https://github.com/Hishengs/iview-bug-report/blob/master/App.vue

What is expected?

The original value can be rendered correctly

What is actually happening?

Unable to render

The guess is that the vue@2.5.14 version has led to the update of functional component, but I can't make it back.

@iview-bot iview-bot changed the title [Bug Report]table组件column render函数如果直接返回字符串,无法渲染 The [Bug Report]table component column render function can not be rendered if it returns a string directly Mar 20, 2018
@iamzhangjinpeng
Copy link

I met the same problem.

@icarusion
Copy link
Contributor

have to set a node after using Vue.js 2.5.14

@Hishengs
Copy link
Author

@icarusion is it vue's bug or just intended, can not return primitive values in the new version(^2.5.14)? is that means I have to change all the places I return primitive values in the table column render function if I use vue^2.5.14? thx

@icarusion
Copy link
Contributor

The correct way to use the render function is to use h.

@Hishengs
Copy link
Author

@icarusion I know that's the correct way, but your answer is not for my question. Sometimes in the render function u just got a computed result which is primitive value, and u just want a text node. If u are not clear if primitive value is not supported any more after vue^2.5.14, just admit it. that will also be helpful.

@icarusion
Copy link
Contributor

@Hishengs Maybe you can find something here vuejs/vue#7282

@icarusion icarusion changed the title The [Bug Report]table component column render function can not be rendered if it returns a string directly [Bug Report]The table component column render function can not be rendered if it returns a string directly Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants