方法 DocsView.setMode
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
選取檢視畫面要用於顯示文件的模式。
如果使用 https://www.googleapis.com/auth/drive
或 https://www.googleapis.com/auth/drive.readonly
以外的範圍,建議使用 DocsViewMode.LIST
,因為使用者未授予縮圖存取權。
簽名
setMode(mode: DocsViewMode): DocsView;
詳細資料
參數
傳回
DocsView
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method DocsView.setMode\n\nSelects which mode the view will use to display the documents.\n\nIf using a scope other than `https://www.googleapis.com/auth/drive` or\n`https://www.googleapis.com/auth/drive.readonly`, it is recommended to use\n`DocsViewMode.LIST` as the user has not granted access to thumbnails.\n\nSignature\n---------\n\n setMode(mode: DocsViewMode): DocsView;\n\nDetails\n-------\n\n| Optional | No |\n| Final | No |\n| Protected | No |\n| Static | No |\n|-----------|----|\n\nParameters\n----------\n\n| Name | Type | Optional | Description |\n|--------|---------------------------------------|----------|-------------|\n| `mode` | [DocsViewMode](./picker.docsviewmode) | No | |\n\nReturns\n-------\n\n[DocsView](./picker.docsview)"]]