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 format is incorrect when the end tag is not used #4278

Closed
ghost opened this issue Nov 7, 2021 · 8 comments
Closed

Comments

@ghost
Copy link

ghost commented Nov 7, 2021

Element Plus version

1.2.0-beta.2

OS/Browsers version

95.0.4638.54

Vue version

3.2.21

Reproduction Link

https://codepen.io/HMWCS/pen/oNeqrxr

Steps to reproduce

  1. Open the reproduction link
  2. The table turned into a wrong format with 7 rows and 1 column
  3. Add end tag to each HTML element (e.g. change "" to "")
  4. The table turned into the correct format which has 5 rows and 3 columns

What is Expected?

The table should have 5 rows and 3 columns as follows:


Date Name Address

2016-05-03 Tom No. 189, Grove St, Los Angeles

2016-05-02 Tom No. 189, Grove St, Los Angeles

2016-05-04 Tom No. 189, Grove St, Los Angeles

2016-05-01 Tom No. 189, Grove St, Los Angeles

What is actually happening?

The table wrongly turned into a table with 7 rows and 1 column table as follows:


Date

Name

Address

No. 189, Grove St, Los Angeles

No. 189, Grove St, Los Angeles

No. 189, Grove St, Los Angeles

No. 189, Grove St, Los Angeles

@ghost
Copy link
Author

ghost commented Nov 7, 2021

Step 2 image:
image

Step 3: Add end tag to each HTML element (e.g. change <el-table-column /> to <el-table-column></el-table-column>

@msidolphin
Copy link
Collaborator

msidolphin commented Nov 8, 2021

Can you reproduce this problem in platforms other than codepen, i think it's cause by codepen.

@ghost
Copy link
Author

ghost commented Nov 8, 2021

Can you reproduce this problem in platforms other than codepen, i think it's cause by codepen.

Hello, thank you for your reply, I have reproduced this problem on another platform which is JSFiddle, the link is https://jsfiddle.net/1zt3kfbq/

In addition, this problem occurs on my own computer as well, so I think this is probably a bug instead of some problems caused by CodePen. And yeah, I think this bug is caused by using the self-closing tag. As I mentioned in my reproduction steps, when I add the end tag, the table can display correctly.

@msidolphin
Copy link
Collaborator

@element-plus/backers Is anyone can reproduce this issue?

@msidolphin
Copy link
Collaborator

Can you reproduce this problem in platforms other than codepen, i think it's cause by codepen.

Hello, thank you for your reply, I have reproduced this problem on another platform which is JSFiddle, the link is https://jsfiddle.net/1zt3kfbq/

In addition, this problem occurs on my own computer as well, so I think this is probably a bug instead of some problems caused by CodePen. And yeah, I think this bug is caused by using the self-closing tag. As I mentioned in my reproduction steps, when I add the end tag, the table can display correctly.

Can you provide details of your environment?

@ghost
Copy link
Author

ghost commented Nov 8, 2021

Can you reproduce this problem in platforms other than codepen, i think it's cause by codepen.

Hello, thank you for your reply, I have reproduced this problem on another platform which is JSFiddle, the link is https://jsfiddle.net/1zt3kfbq/
In addition, this problem occurs on my own computer as well, so I think this is probably a bug instead of some problems caused by CodePen. And yeah, I think this bug is caused by using the self-closing tag. As I mentioned in my reproduction steps, when I add the end tag, the table can display correctly.

Can you provide details of your environment?

Hello, my environment is Chrome Version 95.0.4638.54 - Windows 10 Version 10.0.19042 Build 19042, Element Plus version 1.2.0-beta.2, and Vue version 3.2.21, thanks

@msidolphin msidolphin added the Project::Bug Something isn't working label Nov 8, 2021
@msidolphin
Copy link
Collaborator

msidolphin commented Nov 8, 2021

Can you reproduce this problem in platforms other than codepen, i think it's cause by codepen.

Hello, thank you for your reply, I have reproduced this problem on another platform which is JSFiddle, the link is https://jsfiddle.net/1zt3kfbq/
In addition, this problem occurs on my own computer as well, so I think this is probably a bug instead of some problems caused by CodePen. And yeah, I think this bug is caused by using the self-closing tag. As I mentioned in my reproduction steps, when I add the end tag, the table can display correctly.

Can you provide details of your environment?

Hello, my environment is Chrome Version 95.0.4638.54 - Windows 10 Version 10.0.19042 Build 19042, Element Plus version 1.2.0-beta.2, and Vue version 3.2.21, thanks

This seems to be an issue with vue (of course we need to reconfirm), when I try to using self-close with a custom component, it triggers a similar problem (only one custom component was rendered)

This issue causes the table-column to be rendered incorrectly as a subColumn

image

const Custom = {
  name: 'custom',
  render () {
    return Vue.h('div', 'custom')
  }
}

@msidolphin msidolphin added the 🔨 Vue issue Issue caused by Vue. Can't do anything label Nov 8, 2021
@msidolphin
Copy link
Collaborator

This issue is mentioned in the documentation

https://vuejs.org/v2/style-guide/index.html#Self-closing-components-strongly-recommended

@msidolphin msidolphin removed Project::Bug Something isn't working 🔨 Vue issue Issue caused by Vue. Can't do anything labels Nov 8, 2021
@sxzz sxzz closed this as completed Nov 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants