2017-02-20 42 views
3

builder.Prompts.choice當listStyle出現在選項中時,組件不顯示選項嗎?builder.Prompts.choice獲取選項作爲按鈕

例如:

builder.Prompts.choice(session, "Please confirm your choice", "Yes|No", {listStyle:"buttons"}); 

只呈現 「請確認您的選擇」,而不是選擇。

刪除{listStyle}選項,顯示「是|否」與文本內嵌。

有關我們如何解決此問題的任何建議?

+0

有關listStyle的詳細信息,請參閱:https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-dialog-prompt#promptschoice – pheeleeppoo

回答

4

我不認爲「按鈕」映射到正確的風格,而不是你可以嘗試:

builder.Prompts.choice(session, "Please confirm your choice", "Yes|No", {listStyle:3}); 

或者更好的使用:

builder.Prompts.choice(session, "Please confirm your choice", "Yes|No", {listStyle: builder.ListStyle.button}); 

你還需要確保你」重新使用與按鈕兼容的通道(SMS和其他一些通道不顯示它們)。