-
Notifications
You must be signed in to change notification settings - Fork 267
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在服务端不渲染class和style #133
Conversation
src/packages/popover/Trigger.tsx
Outdated
@@ -91,7 +91,7 @@ export default class Trigger extends React.Component<TriggerProps, TriggerState> | |||
...newChildProps, | |||
} | |||
cloneProps.ref = composeRef(this.props.forwardedRef, (child as any).ref) | |||
const trigger = React.cloneElement(child, cloneProps) | |||
const trigger = React.cloneElement(child, cloneProps) as JSX.Element |
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.
每个组件一个 PR
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.
已经把Trigger.tsx修改的部分还原了,只更改了Button组件。
还原trigger.tsx,保证每个组件一个PR
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.
1、修改Button在服务端不渲染class和style
2、修改了生成class的方式。原来生成的class太多的空格和换行
src/packages/popover/Trigger.tsx
Outdated
@@ -91,7 +91,7 @@ export default class Trigger extends React.Component<TriggerProps, TriggerState> | |||
...newChildProps, | |||
} | |||
cloneProps.ref = composeRef(this.props.forwardedRef, (child as any).ref) | |||
const trigger = React.cloneElement(child, cloneProps) | |||
const trigger = React.cloneElement(child, cloneProps) as JSX.Element |
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.
已经把Trigger.tsx修改的部分还原了,只更改了Button组件。
1、修改了按钮服务端渲染的时候不渲染class和style的问题
2、调整了class生成的字符串换行的问题
3、修改Trigger TS校验错误
by liujianchuan