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

The Height Attribute Problem of [Bug Report] Table #15858

Closed
dongxiaosun opened this issue Jun 3, 2019 · 11 comments · Fixed by #16013
Closed

The Height Attribute Problem of [Bug Report] Table #15858

dongxiaosun opened this issue Jun 3, 2019 · 11 comments · Fixed by #16013
Assignees
Milestone

Comments

@dongxiaosun
Copy link

Element UI version

2.9.1

OS/Browsers version

windos10/Google Chrome版本 73.0.3683.86(正式版本) (64 位)

Vue version

2.6.10

Reproduction Link

https://codepen.io/aime1991/pen/arXpyP

Steps to reproduce


其中height设置为100%,但是在实际的页面中显示的是100px。
在版本2.5.4中这样设置,在实际页面中显示的是100%。

What is Expected?

height设置为100%时,在实际页面中应该是 100%;和版本2.5.4保持一直。

What is actually happening?

height设置为100%时,在实际页面中是100px

@element-bot element-bot changed the title [Bug Report] table的height属性问题 The Height Attribute Problem of [Bug Report] Table Jun 3, 2019
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

Winos10/Google Chrome version 73.0.3683.86 (official version) (64 bits)

Vue version

2.6.10

Reproduction Link

Https://codepen.io/aime1991/pen/arXpyP

Steps to reproduce

<el-table

Data= "tableData"
Border

Height= "100%"
Style= "width: 100%">

The height is set to 100%, but the actual page shows 100 px.
In version 2.5.4, this setting shows 100% of the actual page.

What is Expected?

When the height is set to 100%, it should be 100% in the actual page; it should remain unchanged from version 2.5.4.

What is actually happening?

When height is set to 100%, it is 100px in the actual page.

@yuan-xiaogang
Copy link

I also encountered the same problem. Is there a solution?

@dongxiaosun
Copy link
Author

I also encountered the same problem. Is there a solution?

版本降级,降到2.9.0就可以了

@yuan-xiaogang
Copy link

我已经降级处理了,有啥比较实用的锁定版本号的方案?我使用package-lock.json未生效

@dongxiaosun
Copy link
Author

我已经降级处理了,有啥比较实用的锁定版本号的方案?我使用package-lock.json未生效

删除package-lock.json,在package.json中这样写"element-ui": "2.9.0", 然后再npm install

@TY-LIU
Copy link

TY-LIU commented Jun 3, 2019

我刚刚升级也发现这个问题了,
height="100%"会渲染成100px
@ziyoung

@dongxiaosun
Copy link
Author

我刚刚升级也发现这个问题了,
height="100%"会渲染成100px
@ziyoung

删除package-lock.json,在package.json中这样写"element-ui": "2.9.0", 然后再npm install

@TY-LIU
Copy link

TY-LIU commented Jun 4, 2019

我刚刚升级也发现这个问题了,
height="100%"会渲染成100px
@ziyoung

删除package-lock.json,在package.json中这样写"element-ui": "2.9.0", 然后再npm install

npm i element-ui@2.9.0
这样写也可以的哟老铁,不用删json文件,重新下所有包太慢了

@ziyoung
Copy link
Contributor

ziyoung commented Jun 10, 2019

类似 issue #15806

@jinghui70
Copy link

上一个版本的实现是好的:

    if (typeof value === 'number') {
      el.style[prop] = value + 'px';

      this.updateElsHeight();
    } else if (typeof value === 'string') {
      el.style[prop] = value;
      this.updateElsHeight();
    }

@ziyoung
Copy link
Contributor

ziyoung commented Jun 21, 2019

提了一个 pr #16013 大家可以帮忙 review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants