0

我希望在 slack 中使用模态将按钮与块 id 集成,目前无法成功集成,不确定我在这里缺少什么,我也是 JSON 的新手,所以这里肯定会缺少一些小东西。所以基本上当有人点击评论按钮时,它应该弹出另一个表单。如果有人可以在这里提供一些输入,我将不胜感激。提前致谢

测试几乎可以在这里完成 - https://app.slack.com/block-kit-builder

"blocks": [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\n\n *Please select a restaurant:*"
            }
        },
        {
            "type": "divider"
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "*Farmhouse Thai Cuisine*\n:star::star::star::star: 1528 reviews\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here"
            },
            "accessory": {
                "type": "image",
                "image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg",
                "alt_text": "alt text for image"
            }
        },
        {
            "type": "divider"
        },
        {
            "type": "actions",
            "elements": [
                {
                    "type": "button",
                    "text": {
                        "type": "plain_text",
                        "text": "Review",
                        "emoji": true
                    },
                    "value": "click_me_123",
                    "title": {
                        "type": "plain_text",
                        "text": "hello world"
                    },
                    "submit": {
                        "type": "plain_text",
                        "text": "Submit"
                    },
                    "blocks": [
                        {
                            "type": "input",
                            "element": {
                                "type": "plain_text_input",
                                "action_id": "ml_input",
                                "multiline": true,
                                "placeholder": {
                                    "type": "plain_text",
                                    "text": "If you need help, please review it here detail"
                                }
                            }
                        }
                    ]
                }
            ]
        }
    ]
    "type": "modal"
}
4

0 回答 0