diff --git a/docs/zh/api/control/identify.md b/docs/zh/api/control/identify.md index 0f6d1944..acd43ce1 100644 --- a/docs/zh/api/control/identify.md +++ b/docs/zh/api/control/identify.md @@ -12,6 +12,7 @@ | 参数 | 说明 | 类型 | 可选值 | 默认值 | | :------------- | :--------------------------------------------------------------------- | :------------------------------------------------------------ | :----- | :----- | +| title | 标题 | string | - | - | | showPopup | 是否显示弹窗 | boolean | - | true | | multiSelect | 是否开启多选 | boolean | - | false | | layers | 查询的图层 Id | string[ ] | - | - | diff --git a/src/common/attribute-panel/style/attribute-panel.scss b/src/common/attribute-panel/style/attribute-panel.scss index 06de9000..2614d6a0 100644 --- a/src/common/attribute-panel/style/attribute-panel.scss +++ b/src/common/attribute-panel/style/attribute-panel.scss @@ -9,13 +9,16 @@ border-radius: 4px; border: 1px solid $border-color-split; @include e(header) { + display: inline-flex; + align-items: center; + justify-content: space-between; width: 100%; border-bottom: 1px solid $border-color-split; .title { - margin: 8px 14px; + padding: 8px 16px; } .ellipsis { - max-width: calc(100% - 80px); + width: calc(100% - 80px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/src/mapboxgl/web-map/control/identify/Identify.vue b/src/mapboxgl/web-map/control/identify/Identify.vue index e9aa19b2..fdcf47bc 100644 --- a/src/mapboxgl/web-map/control/identify/Identify.vue +++ b/src/mapboxgl/web-map/control/identify/Identify.vue @@ -12,6 +12,7 @@ :textColor="textColor" :mapTarget="mapTarget" :showPopup="showPopup" + :title="title" @mapselectionchanged="handleMapSelectionChanged" /> @@ -29,6 +30,9 @@ export default { mixins: [MapGetter, Theme], components: { SmLayerHighlight }, props: { + title: { + type: String + }, showPopup: { type: Boolean, default: true