Share via


Office.MailboxEnums.OWAView enum

Outlook on the webの現在のビューを表します。

注釈

// 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"

1 列の狭いビュー。 画面幅が 436 ピクセル未満の場合に表示されます。 たとえば、Outlook on the webは、古いスマートフォンの画面全体でこのビューを使用します。

OneColumn = "OneColumn"

1 列ビュー。 画面幅が 436 ピクセル以上、536 ピクセル未満の場合に表示されます。 たとえば、Outlook on the webは、新しいスマートフォンの画面全体でこのビューを使用します。

TwoColumns = "TwoColumns"

2 列ビュー。 画面幅が 536 ピクセル以上、780 ピクセル未満の場合に表示されます。 たとえば、Outlook on the webはほとんどのタブレットでこのビューを使用します。

ThreeColumns = "ThreeColumns"

3 列ビュー。 画面幅が 780 ピクセル以上の場合に表示されます。 たとえば、Outlook on the webはデスクトップ コンピューターの全画面表示ウィンドウでこのビューを使用します。