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

classPrefix通用性建议 #58

Open
qidizi opened this issue Jul 10, 2014 · 2 comments
Open

classPrefix通用性建议 #58

qidizi opened this issue Jul 10, 2014 · 2 comments

Comments

@qidizi
Copy link

qidizi commented Jul 10, 2014

classPrefix建议直接给什么就简单的拼接上去,而不要做判断,
如一种需求.我需要其它样式使用通用的.而某些情况下,我需要调整一下trigger或是怎么样,
如需要最后的class是'JSdistrictSelect ui-select'或是'JSdistrictSelect ui-select-item'

也就是说,我只需要 加入一个独立的类名,JSdistrictSelect 其它保持,
建议是要么简单的加入 另一个类名,要么,不要判断前缀的拼写方式

@popomore
Copy link
Member

这个场景可以用 className,widget 提供的

简单点可以自己设置

select.element.addClass('JSdistrictSelect')

@qidizi
Copy link
Author

qidizi commented Jul 11, 2014

按道理.jquery的addClass('aClass bClass')它是支持的.
如果简单的 'aClass bClass' + '-' +'后缀',addClass也应该是正常的.
只不过.elememt.get(时逻辑就需要做改变了.
反正, classPrefix:'aClass bClass'这样的风格会被直接忽略.

这个场景可以用 className,widget 提供的
不明白这个说法

目前,我是这样处理,在下面进行写上.

.after('render',function(){
console&&console.log(this.element,this.get('trigger'));
})

如果能把classPrefi或是或一个extClass什么的,就方便一点.

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