azure - 带有 IE11 的 Azure 聊天机器人
问题描述
我知道我需要使用 webchat-es5.js,但在实现“styleOptions”时出现错误。
const styleOptions = {
XXXXXX
};
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({
secret: XXXX
}),
styleOptions
},
document.getElementById('webchat'));
我需要把这个放在哪里?它不是异步函数,我知道异步函数在 IE11 中不起作用。
这是一个样本,我是机器人新手。
解决方案
您只需要将整个“styleOptions”放入“renderWebChat”:
window.WebChat.renderWebChat({
directLine: window.WebChat.createDirectLine({
secret: XXXX
}),
styleOptions: {
XXXXXX
}
},
document.getElementById('webchat'));
推荐阅读
- maven - Apache cxf-codegen-plugin 未在 Spring Tool Suite 中生成 Java 存根
- python - 使用 python 托盘将 json 文件(3d 绘图)导入 ARCHICAD 24
- ruby-on-rails - 如何从 Rails 缓存哈希上传照片?
- spring - Spring Shedlock 使wiremock 服务器无响应
- c - 为什么会发生这种内存泄漏
- geode - 在 Apache Geode 区域中创建 Lucene 索引
- centos - 我可以在 CentOS 8 上安装 sikuli 吗?
- mysql - 如何在sql中获取字符串的第一个字符集?
- javascript - 如何在 React.js 中正确使用 componentDidMount 和 componentDidUpdate?
- javascript - nextjs api MaxListenersExceededWarning; 在哪里设置 setMaxListeners()