Skip to content

Update BaseNode.zh.md#7370

Merged
Aarebecca merged 2 commits intoantvis:v5from
Gitsifu:patch-1
Sep 12, 2025
Merged

Update BaseNode.zh.md#7370
Aarebecca merged 2 commits intoantvis:v5from
Gitsifu:patch-1

Conversation

@Gitsifu
Copy link
Copy Markdown
Contributor

@Gitsifu Gitsifu commented Sep 2, 2025

更新iconSrc 和 iconText 类型

更新iconSrc 和 iconText 类型
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @Gitsifu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求旨在更新文档,以更准确地反映节点属性 iconSrciconText 的可用类型。这有助于用户更好地理解和使用这些属性,提高文档的准确性。

Highlights

  • 文档更新: 更新了 iconSrciconText 属性的类型定义,现在它们除了接受 string 类型外,还可以接受一个返回 string 的函数。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

感谢您的贡献!本次更新为 iconSrciconText 属性增加了函数类型的支持,使其能够动态配置,这对于提升组件的灵活性非常有帮助。我在文档的格式和类型签名方面提出了一些小的修改建议,以提高文档的统一性和准确性。请查看具体的评论。

Comment on lines +644 to +645
| iconSrc | 节点图片来源。其优先级高于 iconText | string \| ((datum) => string) | - |
| iconText | 节点图标文字 | string \| ((datum) => string) | - |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

你好,感谢你的贡献!为了保持文档格式的统一性和准确性,建议对 iconSrciconText 的类型定义做如下调整:

  1. 格式统一:参考第 430 行 labelText 的格式,为类型加上反引号(`),使其在表格中作为代码片段高亮,增强可读性。
  2. 修正函数签名:函数类型签名 ((datum) => string) 中有多余的括号,应为 (datum) => string
Suggested change
| iconSrc | 节点图片来源。其优先级高于 iconText | string \| ((datum) => string) | - |
| iconText | 节点图标文字 | string \| ((datum) => string) | - |
| iconSrc | 节点图片来源。其优先级高于 iconText | `string` \| `(datum) => string` | - |
| iconText | 节点图标文字 | `string` \| `(datum) => string` | - |

@Aarebecca
Copy link
Copy Markdown
Contributor

@Gitsifu 感谢贡献

@Aarebecca Aarebecca merged commit 236c32a into antvis:v5 Sep 12, 2025
1 check passed
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