Office.MailboxEnums.OWAView enum
表示Outlook 网页版的当前视图。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml
// This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the console.
const diagnostics = Office.context.mailbox.diagnostics;
console.log(`Client application: ${diagnostics.hostName}`);
console.log(`Client version: ${diagnostics.hostVersion}`);
switch (diagnostics.OWAView) {
case undefined:
console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use.");
break;
case Office.MailboxEnums.OWAView.OneColumnNarrow:
console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone");
break;
case Office.MailboxEnums.OWAView.OneColumn:
console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone");
break;
case Office.MailboxEnums.OWAView.TwoColumns:
console.log("Current view (Outlook on the web only): Viewed from a tablet");
break;
case Office.MailboxEnums.OWAView.ThreeColumns:
console.log("Current view (Outlook on the web only): Viewed from a desktop computer");
break;
}
字段
OneColumnNarrow = "OneColumnNarrow" | 窄单列视图。 当屏幕宽度小于 436 像素时显示。 例如,Outlook 网页版在旧版智能手机的整个屏幕上使用此视图。 |
OneColumn = "OneColumn" | 单列视图。 当屏幕宽度大于或等于 436 像素但小于 536 像素时显示。 例如,Outlook 网页版在较新的智能手机的整个屏幕上使用此视图。 |
TwoColumns = "TwoColumns" | 双列视图。 当屏幕宽度大于或等于 536 像素但小于 780 像素时显示。 例如,Outlook 网页版在大多数平板电脑上使用此视图。 |
ThreeColumns = "ThreeColumns" | 三列视图。 当屏幕宽度大于或等于 780 像素时显示。 例如,Outlook 网页版在台式计算机上的全屏窗口中使用此视图。 |