DocumentView 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用 DocsView
从 Google 云端硬盘中选择文件。
签名
export class DocsView extends View
遗产
详细信息
构造函数
方法
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],null,["# Class DocsView\n\nUse `DocsView` to select files from Google Drive.\n\nSignature\n---------\n\n export class DocsView extends View\n\nHeritage\n--------\n\n| Extends | [View](./picker.view.md) |\n|---------|--------------------------|\n\nDetails\n-------\n\n| Final | No |\n|-------|----|\n\nConstructors\n------------\n\n| Name | Description |\n|------------------------------------------------------------|---------------------------------------------------|\n| [`(constructor)(viewId)`](./picker.docsview._constructor_) | Constructs a new instance of the `DocsView` class |\n\nMethods\n-------\n\n| Name | Description |\n|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`getId()`](./picker.view.getid.md) | Returns the `ViewId` of the view. *(Inherited from [`View`](./picker.view))* |\n| [~~`getLabel()`~~](./picker.view.getlabel.md) | *(Deprecated)* *(Inherited from [`View`](./picker.view))* |\n| [`setEnableDrives(enabled)`](./picker.docsview.setenabledrives) | Shows shared drives and the files they contain. Before enabling, refer to [GoogleDrive API documentation for enabling shared drives](/workspace/drive/v3/web/enable-shareddrives). |\n| [`setFileIds(fileIds)`](./picker.docsview.setfileids) | Sets the file IDs included in the view. |\n| [`setIncludeFolders(included)`](./picker.docsview.setincludefolders) | Show folders in the view items. |\n| [~~`setLabel(label)`~~](./picker.view.setlabel.md) | *(Deprecated)* *(Inherited from [`View`](./picker.view))* |\n| [`setMimeTypes(mimeTypes)`](./picker.view.setmimetypes.md) | Sets the MIME types included in the view. Use commas to separate MIME types if more than one is required. If you don't set MIME types, files of all MIME types are displayed in the view. *(Inherited from [`View`](./picker.view))* |\n| [`setMode(mode)`](./picker.docsview.setmode) | Selects which mode the view will use to display the documents. |\n| [`setOwnedByMe(me)`](./picker.docsview.setownedbyme) | Filters the documents based on whether they are owned by the user, or shared with the user. |\n| [`setParent(parentId)`](./picker.docsview.setparent) | Sets the initial parent folder to display. |\n| [`setQuery(query)`](./picker.view.setquery.md) | For views involving searches, prepopulate the search query with these terms. *(Inherited from [`View`](./picker.view))* |\n| [`setSelectFolderEnabled(enabled)`](./picker.docsview.setselectfolderenabled) | Allows the user to select a folder in Google Drive. |\n| [`setStarred(starred)`](./picker.docsview.setstarred) | Filters the documents based on whether they are starred by the user. |"]]