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

[需求]upload组件允许设置最大上传数量 #1610

Closed
ottomao opened this issue May 9, 2016 · 15 comments
Closed

[需求]upload组件允许设置最大上传数量 #1610

ottomao opened this issue May 9, 2016 · 15 comments

Comments

@ottomao
Copy link

ottomao commented May 9, 2016

http://ant.design/components/upload/

如题,咱这个组件能不能增加一个参数,指定最大上传文件数量?

@afc163
Copy link
Member

afc163 commented May 9, 2016

@afc163 afc163 closed this as completed May 9, 2016
@ottomao
Copy link
Author

ottomao commented May 9, 2016

感谢!

@ottomao
Copy link
Author

ottomao commented May 10, 2016

现在这个交互感觉很坑爹啊,用户先传上去,再直接slice掉,还以为是系统故障....
能不能指定一个max值,达到上限时隐藏按钮

@afc163
Copy link
Member

afc163 commented May 10, 2016

用 uploadList 的长度自行判断控制一下就好,那只是一个示范用例而已。

@ottomao
Copy link
Author

ottomao commented May 10, 2016

问题是,upload组件没有参数可以隐藏这个“上传”按钮...
我的需求:保留已经上传的内容,隐藏“上传”按钮。

现在我的做法是自己判断数量,然后加个class,对上传按钮做display:none

@afc163
Copy link
Member

afc163 commented May 10, 2016

隐藏这么基础的功能为啥要参数呢?用属性也要看基本法呢,不要没参数就干不了活呀...

<Upload>
  {this.state.fileList.length > 0 ? <Button>上传</Button> : null}
</Upload>

@ottomao
Copy link
Author

ottomao commented May 10, 2016

我的场景里是listType="picture-card",隐藏children不顶用啊....

@ottomao
Copy link
Author

ottomao commented May 12, 2016

listType="picture-card" 这个场景的问题,确认一下呗?
如果确实有问题,咱排个期优化下?
@afc163

@afc163
Copy link
Member

afc163 commented May 12, 2016

我看看。

@afc163 afc163 reopened this May 12, 2016
@afc163 afc163 closed this as completed in 664bb8e May 12, 2016
@afc163
Copy link
Member

afc163 commented May 12, 2016

现在,<Upload></Upload> 里面没东西的话,就不显示上传按钮,包括了 listType="picture-card" 这个场景。

@ottomao
Copy link
Author

ottomao commented May 12, 2016

赞效率!!!

On Thu, May 12, 2016 at 5:04 PM, 偏右 notifications@github.com wrote:

现在, 里面没东西的话,就不显示上传按钮,包括了 listType="picture-card" 这个场景。


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1610 (comment)

Mao Xiaofeng(茅晓锋)
Profession: *F2E
*Tel:
(86) 15801916167
_Email:_ottomao@gmail.com
SinaWeibo:@茅晓锋Otto http://www.weibo.com/ottomao
_Blog:_ottomao.com

@ottomao
Copy link
Author

ottomao commented May 12, 2016

这个改动有预期发布时间么?如果赶得上我们项目,我就把自己的兼容代码删了....

@afc163
Copy link
Member

afc163 commented May 12, 2016

在 1.0.x 上修复,可能未来几天上。

估计你还是 0.12.x 的,未来改版再删吧。。。

@ottomao
Copy link
Author

ottomao commented May 12, 2016

我已经搞到1.0了,发布之后ping一下,我来升

On Thursday, 12 May 2016, 偏右 notifications@github.com wrote:

在 1.0.x 上修复,可能未来几天上。

估计你还是 0.12.x 的,未来改版再删吧。。。


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1610 (comment)

Mao Xiaofeng(茅晓锋)
Profession: *F2E
*Tel:
(86) 15801916167
_Email:_ottomao@gmail.com
SinaWeibo:@茅晓锋Otto http://www.weibo.com/ottomao
_Blog:_ottomao.com

@lock
Copy link

lock bot commented May 5, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
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