angular - Outlook 插件:messageCompose vs message
问题描述
我试图找出当前在 Outlook 中打开的电子邮件是 messageCompose 还是 message 类型(即,我的插件试图确定用户是在写电子邮件还是在阅读电子邮件)。
在这两种情况下,Office.context.mailbox.item.itemType 都是“消息”
但是,当我 console.log(Office.context.mailbox.item)如果我正在阅读电子邮件,我会在 chrome inspect (r.message)中看到以下内容,如果我正在撰写电子邮件,我会在 (r.messageCompose) 中看到以下内容。
基本上我想要的是
if(I am writing an email) {
// do stuff
}
if(I am reading an email) {
// do other stuff
}
另外,有没有办法区分撰写新消息和回复消息?
我正在使用 Angular 7。
解决方案
推荐阅读
- php - 在 PHP 中,如何将一个类实例传递给另一个类的构造函数
- ssis - SSIS 脚本任务无法读取项目变量
- sql - 它自己的列中的数量总计
- sql - 从重叠的时间间隔创建完整的历史时间线
- hadoop - 通过命令行运行 HQL 查询时出错
- go - Goroutines 和互斥体
- netlogo - Netlogo - BehaviorSpace - 测量运行的报告器未能报告结果
- python - Tensorflow python AI(sentdex错误教程)
- django - Django - 在表单字段中预设外键值
- sql-server - 开发服务器上的备份集服务器名称显示 Prod 服务器名称