要在展開的展開小部件中顯示的內容。
如果將 Slider 、 HistogramRangeSlider 或 TimeSlider 作為內容添加到展開小部件,則小部件的容器或父容器必須在 CSS 中設置
width
才能在展開小部件中呈現。如果在滑塊的容器(而不是父容器)上設置寬度,則將
slider.container
設置為展開的內容,而不是滑塊本身。expand.content = slider.container
例子:
// A. specify content with a widget let searchWidget = new Search({ view: view }); let expand = new Expand({ expandIconClass: "esri-icon-search", view: view, content: searchWidget }); view.ui.add(expand, "bottom-left");
// B. specify content with a string (of HTML) content: "Hi, I can have <input placeholder='HTML'/>!"
// C. specify content with a DOM node let node = domConstruct.create("div", { innerHTML: "I'm a real node!" }); let expand = new Expand({ expandIconClass: "esri-icon-right-arrow", view: view, content: node }); view.ui.add(expand, "top-right");
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/widgets/Expand"], (Expand) => { /* code goes here */ });
ESM:
import Expand from "@arcgis/core/widgets/Expand";
類:
esri/widgets/Expand
繼承: Expand > Widget > Accessor
自從:用於 JavaScript 4.3 的 ArcGIS API
用法說明
Expand.content
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Expand.container用法及代碼示例
- JavaScript ArcGIS Expand.classes用法及代碼示例
- JavaScript ArcGIS Expand.closeOnEsc用法及代碼示例
- JavaScript ArcGIS Expand.when用法及代碼示例
- JavaScript ArcGIS Expand.group用法及代碼示例
- JavaScript ArcGIS Expand.on用法及代碼示例
- JavaScript ArcGIS Expand.visible用法及代碼示例
- JavaScript ArcGIS Expand用法及代碼示例
- JavaScript ArcGIS ExpressionContent用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.title用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.expression用法及代碼示例
- JavaScript ArcGIS ExpressionInfo.name用法及代碼示例
- JavaScript ArcGIS ExpressionInfo用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.castShadows用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.clone用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.edges用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.size用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer.material用法及代碼示例
- JavaScript ArcGIS ExtrudeSymbol3DLayer用法及代碼示例
- JavaScript ArcGIS ElementExpressionInfo.expression用法及代碼示例
- JavaScript ArcGIS ElevationProfile.profiles用法及代碼示例
- JavaScript ArcGIS ElevationLayer.fullExtent用法及代碼示例
- JavaScript ArcGIS ElevationLayer layerview-create-error事件用法及代碼示例
- JavaScript ArcGIS Editor.classes用法及代碼示例
- JavaScript ArcGIS ElevationLayer.on用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Expand.content。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。