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: 修改table中的mapping使用tag的时候展示不符合预期的bug #6395

Merged

Conversation

CheshireJCat
Copy link
Collaborator

复现schema

{
    "type": "page",
    "data": {
        "items": [
            {
                "engine": "engine - 1",
                "version": "version - 1",
                "id": 1
            }
        ]
    },
    "body": [
        {
            "type": "table",
            "title": "表格1",
            "columns": [
                {
                    "name": "engine",
                    "label": "Engine"
                },
                {
                    "name": "id",
                    "label": "id",
                    "type": "mapping",
                    "map": {
                        "1": {
                            "type": "tag",
                            "label": "id - 1"
                        }
                    }
                },
                {
                    "name": "version",
                    "label": "Version"
                }
            ]
        }
    ]
}

@github-actions github-actions bot added bug Something isn't working fix labels Mar 17, 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.

@CheshireJCat CheshireJCat force-pushed the fix-mapping-in-table-tag-schema-invalid branch from b8061b7 to 735f919 Compare March 17, 2023 11:33
&& label.label != null
) {
// 解决 table 中使用 mapping,tag.label 渲染不出来的问题
realValue = label.label;
Copy link
Collaborator

Choose a reason for hiding this comment

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

label可以是变量

@CheshireJCat CheshireJCat force-pushed the fix-mapping-in-table-tag-schema-invalid branch from 735f919 to 51e48dc Compare March 20, 2023 10:54
@CheshireJCat CheshireJCat force-pushed the fix-mapping-in-table-tag-schema-invalid branch from 51e48dc to 08f7c79 Compare March 28, 2023 06:32
@lurunze1226 lurunze1226 merged commit dfb6587 into baidu:master Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants