-
remove
(component)
inherited
從 UI 中刪除一個或多個 HTML 組件或widgets。
參數:
類型 說明 component Widget|HTMLElement|String|Array要從 UI 中移除的組件。這可以是小部件實例、HTML 元素、表示 DOM 節點 ID 的字符串值或包含任何這些類型組合的數組。有關代碼示例,請參閱下麵的示例片段。
例子:
// Removes the BasemapToggle widget from the view if added. // See the example for add() for more context view.ui.remove(toggle);
// Removes the default zoom widget from the view's container view.ui.remove("zoom");
// Removes multiple widgets from the view's UI view.ui.remove([ compass, toggle, "zoom" ]);
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/views/ui/DefaultUI"], (DefaultUI) => { /* code goes here */ });
ESM:
import DefaultUI from "@arcgis/core/views/ui/DefaultUI";
類:
esri/views/ui/DefaultUI
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
DefaultUI.remove
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS DefaultUI.padding用法及代碼示例
- JavaScript ArcGIS DefaultUI.find用法及代碼示例
- JavaScript ArcGIS DefaultUI.add用法及代碼示例
- JavaScript ArcGIS DefaultUI.components用法及代碼示例
- JavaScript ArcGIS DefaultUI.empty用法及代碼示例
- JavaScript ArcGIS DefaultUI.move用法及代碼示例
- JavaScript ArcGIS DefaultUI用法及代碼示例
- JavaScript ArcGIS Daylight.visibleElements用法及代碼示例
- JavaScript DataView.getInt16()用法及代碼示例
- JavaScript Date getYear()用法及代碼示例
- JavaScript Date.UTC()用法及代碼示例
- JavaScript ArcGIS Directions.visible用法及代碼示例
- JavaScript DataView.setUint32()用法及代碼示例
- JavaScript Date toISOString()用法及代碼示例
- JavaScript DataView.getInt8()用法及代碼示例
- JavaScript ArcGIS DistanceMeasurement2D.unitOptions用法及代碼示例
- JavaScript ArcGIS Daylight.on用法及代碼示例
- JavaScript ArcGIS DirectLineMeasurementAnalysisView3D用法及代碼示例
- JavaScript Date.getTimezoneOffset()用法及代碼示例
- JavaScript Date.getUTCSeconds()用法及代碼示例
- JavaScript ArcGIS Directions.routeServiceUrl用法及代碼示例
- JavaScript ArcGIS DirectLineMeasurement3D.when用法及代碼示例
- JavaScript ArcGIS DataFile用法及代碼示例
- JavaScript Date toJSON()用法及代碼示例
- JavaScript ArcGIS Daylight.container用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 DefaultUI.remove。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。