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

需求讨论 #36

Closed
warmhug opened this issue Dec 4, 2015 · 1 comment
Closed

需求讨论 #36

warmhug opened this issue Dec 4, 2015 · 1 comment

Comments

@warmhug
Copy link
Contributor

warmhug commented Dec 4, 2015

业务中有这种需求:在 tags input select 里,想直接输入一串如 name1,name2,name3,name4,nam5,.... 这样比较长的内容(预先准备好的人员列表),组件自动根据分隔符(例如这里的逗号),split 出来,然后分别验证这些条目是否合法(如果分别发Ajax将会很多、不可行),再转换为一个个 tag。

这种需求一般是单独做一个「导入」文件或组的功能来实现,但放到 tags-input 组件或 select 组件里,感觉也有一定合理性。

在 select2 的 Automatic tokenization example 里输入 red,blue,green, 这串特定分割的字符串,会自动根据逗号 split 出三个 tag 出来。select2 这个还能输入更多自动保存到选择list里,也不涉及到发Ajax操作。

@yiminghe
Copy link
Member

Automatic tokenization 可做,pr 吧

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

2 participants