-
Notifications
You must be signed in to change notification settings - Fork 277
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
fix(button): classname use prefix #51
Conversation
src/button/button.wxml
Outdated
wx:if="{{icon}}" | ||
name="{{icon}}" | ||
size="44rpx" | ||
class="{{classPrefix}}__icon {{prefix}}-class" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{prefix}}-class放icon上?此处是否应该放 {{prefix}}-class-icon?
src/button/button.ts
Outdated
@@ -47,7 +49,7 @@ export default class Button extends SuperComponent { | |||
setClass() { | |||
const classList = [ | |||
name, | |||
't-class', | |||
`${prefix}-class`, | |||
`${name}--${this.data.theme || 'default'}`, | |||
`${name}--size-${this.data.size}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${prefix}-size-l
、${prefix}-size-m
、${prefix}-size-s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 这样和其他端保持一致了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
使用 prefix 设置 classname