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

feat: tabsTransfer tab title 支持模版 #6614

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

2betop
Copy link
Collaborator

@2betop 2betop commented Apr 14, 2023

What

🤖 Generated by Copilot at 75ab428

The pull request enhances the TabsTransfer and Tree components in amis-ui. It allows using data variables in the tab titles of TabsTransfer, and fixes a possible key duplication issue in Tree.

🤖 Generated by Copilot at 75ab428

We are the masters of the tree
We forge the keys of destiny
We wield the power of the tabs
We shape the data with our crafts

Why

close: #6598

How

🤖 Generated by Copilot at 75ab428

  • Import createObject and filter functions from amis-core to render tab titles with data variables (link)
  • Destructure data prop from TabsTransfer component props and pass it to filter function (link)
  • Use filter function to interpolate data variables in tab title and createObject function to create new data object with option as context (link)
  • Change key prop of Tree-item component to include index and value field of item, to avoid duplicate keys when value field is not unique (link)

@github-actions github-actions bot added the feat label Apr 14, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@2betop
Copy link
Collaborator Author

2betop commented Apr 14, 2023

close: #6598

@2betop 2betop merged commit 1bdb464 into baidu:master Apr 19, 2023
@2betop 2betop deleted the feat-tabs-transfer branch April 19, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amis组件options属性中label字段无法解析JavaScript 模板引擎(<% 这里面是 js 语句 %>)
3 participants