-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat: support loadingRender & rm useless margin #165
Conversation
📝 WalkthroughWalkthrough此次更改为 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Bubble
participant LoadingComponent
User->>Bubble: 触发加载
Bubble->>Bubble: 设置loading为true
Bubble->>Bubble: 判断loadingRender是否存在
alt loadingRender存在
Bubble->>Bubble: 使用loadingRender渲染内容
else loadingRender不存在
Bubble->>LoadingComponent: 渲染默认Loading组件
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Deploying ant-design-x with Cloudflare Pages
|
if (loading) { | ||
contentNode = loadingRender ? loadingRender() : <Loading prefixCls={prefixCls} />; | ||
} else { | ||
contentNode = mergedContent as React.ReactNode; |
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.
最好别 as
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.
mergedContent
上面跑完是 ReactNode,但是 TS 自己推断不出来,还会把 object 作为其中之一的类型。
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
效果:
Summary by CodeRabbit
新功能
Bubble
组件中添加了可选的loadingRender
属性,允许在加载状态下自定义渲染内容。bubble-custom.tsx
组件,展示了可定制的聊天界面。文档
bubble-custom.md
文件,增加了中英文示例,增强了多语言支持。index.en-US.md
和index.zh-CN.md
中添加了关于loadingRender
属性的详细说明和示例代码。样式
BubbleToken
接口,移除了bubbleContentMaxWidth
属性。