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

fix: 修改Button在服务端不渲染class和style #133

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

getOnce
Copy link
Contributor

@getOnce getOnce commented Jun 9, 2022

1、修改了按钮服务端渲染的时候不渲染class和style的问题
2、调整了class生成的字符串换行的问题
3、修改Trigger TS校验错误
by liujianchuan

@@ -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
Copy link
Collaborator

@oasis-cloud oasis-cloud Jun 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

每个组件一个 PR

Copy link
Contributor Author

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
Copy link
Contributor Author

@getOnce getOnce left a 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太多的空格和换行

@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经把Trigger.tsx修改的部分还原了,只更改了Button组件。

@oasis-cloud oasis-cloud merged commit 264ce16 into jdf2e:main Jun 23, 2022
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

Successfully merging this pull request may close these issues.

2 participants