单击选择菜单可在松弛模式视图中打开其他菜单

时间:2019-10-27 21:12:39

标签: slack slack-api slack-dialog

我正在使用Slack的views.open API创建模态。我有1个频道选择器和1个用户选择器。每当我单击频道选择器时,它就会打开用户选择器,就像我单击它一样。我在滥用API还是一个错误? 下面是可用于在Slack Block Kit Builder中可视化模式的JSON代码

{
    "type": "modal",
    "title": {
        "type": "plain_text",
        "text": "Search",
        "emoji": true
    },
    "submit": {
        "type": "plain_text",
        "text": "Search",
        "emoji": true
    },
    "close": {
        "type": "plain_text",
        "text": "Cancel",
        "emoji": true
    },
    "blocks": [
        {
            "type": "divider"
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "Enter topics:"
            },
            "accessory": {
                "type": "multi_static_select",
                "placeholder": {
                    "type": "plain_text",
                    "text": "topic",
                    "emoji": true
                },
                "options": [
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 1",
                            "emoji": true
                        },
                        "value": "value-0"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 2",
                            "emoji": true
                        },
                        "value": "value-1"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 3",
                            "emoji": true
                        },
                        "value": "value-2"
                    }
                ]
            }
        },
        {
            "type": "context",
            "elements": [
                {
                    "type": "mrkdwn",
                    "text": "Entering multiple topics will filter snippets containing all of them"
                }
            ]
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "Only show results from following user"
            },
            "accessory": {
                "type": "static_select",
                "placeholder": {
                    "type": "plain_text",
                    "text": "Choose a user",
                    "emoji": true
                },
                "options": [
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 1",
                            "emoji": true
                        },
                        "value": "value-0"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 2",
                            "emoji": true
                        },
                        "value": "value-1"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 3",
                            "emoji": true
                        },
                        "value": "value-2"
                    }
                ]
            }
        },
        {
            "type": "section",
            "text": {
                "type": "plain_text",
                "text": "or",
                "emoji": true
            }
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "Only show results from following channel"
            },
            "accessory": {
                "type": "static_select",
                "placeholder": {
                    "type": "plain_text",
                    "text": "Choose a channel",
                    "emoji": true
                },
                "options": [
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 1",
                            "emoji": true
                        },
                        "value": "value-0"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 2",
                            "emoji": true
                        },
                        "value": "value-1"
                    },
                    {
                        "text": {
                            "type": "plain_text",
                            "text": "Choice 3",
                            "emoji": true
                        },
                        "value": "value-2"
                    }
                ]
            }
        }
    ]
}

1 个答案:

答案 0 :(得分:0)

问题在3天前消失了。我猜无提示更新已解决