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

showLoading在div较小的时候无法居中 #638

Closed
huoshan12345 opened this issue Sep 2, 2014 · 5 comments
Closed

showLoading在div较小的时候无法居中 #638

huoshan12345 opened this issue Sep 2, 2014 · 5 comments

Comments

@huoshan12345
Copy link

        var loading2 = {
            text: 'Loading...',
            effect: 'spin',
            textStyle: {
                fontSize: 5
            },
        };

这是一个loading选项,采用之后的效果如下
qq 20140902100353

如果改成这样:
var loading2 = {
text: 'Loading...',
effect: 'spin',
textStyle: {
fontSize: 5
},
x: 'center',
y: 'center',
};
qq 2014090210035s3
文字就不显示了

@kener
Copy link
Contributor

kener commented Sep 2, 2014

x,y不支持left、right、center等定位,只支持数值,需要在定位时通过dom大小自己计算后传入

@huoshan12345
Copy link
Author

那就是loadoption里面写错了啊
{string | number} x 'center' 水平安放位置,默认为全图居中,可选为:'center' | 'left' | 'right' | {number}(x坐标,单位px)
{string | number} y 'center' 垂直安放位置,默认为全图居中,可选为:'center' | 'bottom' | 'top' | {number}(y坐标,单位px)

另外第一个例子里面,并没有指定x,y。并没有默认居中

@kener
Copy link
Contributor

kener commented Sep 2, 2014

抱歉。
好吧,文档居然这样写了 -_-||
改文档还不如改代码,我待会升级实现了

@huoshan12345
Copy link
Author

哈哈。辛苦啊

@huoshan12345
Copy link
Author

艾玛,点错了,点成关闭了

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

No branches or pull requests

2 participants