-
Notifications
You must be signed in to change notification settings - Fork 0
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
实现一个不定项级联选择器 #1
Comments
这种场景,用 className 替代 styles 也是不错的。value onChange 多用于 react,vue的话,可以直接用 value.sync 或者 v-model 替代。另外,angular 选手也可以尝试实现。 |
React.styles 表示可以给组件样式值 组件会 |
哈哈,我是指回答者,可以按照我那个去思考。因为级联组件内部有多个元素,所以直接styles,很难控制到内部的元素,没有 className 来得直接。 |
其实我想表达的是抽象组件设计和一般业务中实现的组件思路可能有些不同,考虑的更多的是兼容性,易用性。写组件的时候要意识到,这个组件的使用者不是开发者本身,而是别的用户,所以尽量要让这个组件保持和其他组件一致的习惯 |
这种抽象思路非常棒。
这也能引申出另外一个问题,组件的分层(不同层次的组件有不同的特点)。 |
要求
考察点
The text was updated successfully, but these errors were encountered: