Skip to content

AttributeTable

可用于图层属性的展示,支持单个图层和多个图层,并提供各类操作,支持扩展。

<mapgis-attribute-table></mapgis-attribute-table>

<mapgis-attribute-table-list></mapgis-attribute-table-list>

<mapgis-attribute-table-composer></mapgis-attribute-table-composer>

基本用法

图层列表

事件响应

API

以下 API 为 AttributeTable、AttributeTableList、AttributeTableComposer 共享的 API。

属性

参数说明类型默认值版本
layerParams图层参数QueryLayerParams
queryOtherOptions其他查询选项QueryOtherOptions
queryShowStyle查询结果显示样式QueryShowStyle
customMaxHeight自定义属性表容器高度functiontableElement => { return document.body.clientHeight - tableElement.getBoundingClientRect().top }
closable是否可关闭,默认不显示关闭按钮booleanfalse
toolbar工具栏作用域插槽,{layer, filterAttributes}slottrue
enableFilter是否启用属性过滤,默认启用booleantrue
enableStatistics是否启用属性统计,默认启用booleantrue

事件

事件名称说明回调参数版本
attributeTableRowClick属性表行单击{ layer, feature, prevent }
attributeTableRowDoubleClick属性表行双击{ layer, feature, prevent }
beforePopupOpen打开弹窗前{ layer, feature, popupOptions: { component, anchor, nameWidth, valueWidth, prevent } }
afterPopupClosed关闭弹窗后{ layer }
close属性表关闭事件

AttributeTableComposer 属性

参数说明类型默认值版本
layersParams图层列表参数QueryLayerParams[]