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

[Loading] 目前是 display: inline-block, 应该是 display: block 才正确 #124

Closed
yibn2008 opened this issue Dec 28, 2018 · 10 comments
Closed
Assignees

Comments

@yibn2008
Copy link

Describe the bug

Loading 目前是 display: inline-block, 应该是 display: block 才正确

Version of the Next Components
latest

Reproduce URL

直接看图:

image

@tao1991123
Copy link
Contributor

为什么要是block?理由?

@windyGex
Copy link
Member

windyGex commented Dec 29, 2018

对于大多数场景而言这种覆盖式的loading基本都是用于块状元素。如果默认设为inline-block会影响到子级元素的一些计算。

比如有可能会造成Table的锁列失效等

@yibn2008
Copy link
Author

是的,比如一个表单 form,各个组件的宽度是100%,如果加了loading,表单就会按内容宽度计算

@bindoon
Copy link
Member

bindoon commented Dec 30, 2018

这个修改影响比较大,可能会造成布局错乱。算br了

@windyGex
Copy link
Member

windyGex commented Jan 2, 2019

可以加个API吧。默认还是inline-block,可以通过这个属性变更为display: block。现在每次都是通过style的方式或者复写CSS来修改的。

@bindoon
Copy link
Member

bindoon commented Jan 4, 2019

inline=false 如何

@tao1991123
Copy link
Contributor

tao1991123 commented Jan 14, 2019

@jdkahn this issue reporter wants a loading with style display: block
but the default style of loading component is "display: inline-block".

Now bindoon provides a solution: add a new props inline and this default value = true, if inline === false, loading style should be "display: block"

@jdkahn
Copy link
Contributor

jdkahn commented Jan 14, 2019

@tao1991123 When used right now the loader is inline-block. Do I need to go to each of these usages and add inline: true? Or should the default value of inline be set to true?

@tao1991123
Copy link
Contributor

tao1991123 commented Jan 15, 2019

@tao1991123 When used right now the loader is inline-block. Do I need to go to each of these usages and add inline: true? Or should the default value of inline be set to true?

default value of inlineshould be set to true so it can work no difference just like right now without modify any code.
If it is set to 'false' , it will be "display: block"

@youluna
Copy link
Member

youluna commented Jan 18, 2019

1.11.10 released

@youluna youluna closed this as completed Jan 18, 2019
@jdkahn jdkahn changed the title Loading 目前是 display: inline-block, 应该是 display: block 才正确 [Loading] 目前是 display: inline-block, 应该是 display: block 才正确 Apr 26, 2019
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

6 participants