From 41b6f2b08a609c9cb106369ebd65ea691af50853 Mon Sep 17 00:00:00 2001 From: chenxianhui Date: Fri, 1 Nov 2024 18:26:51 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E4=BF=AE=E6=94=B9=E5=9B=BE=E5=B1=82?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E5=9B=BE=E5=B1=82=E7=AE=A1=E7=90=86?= =?UTF-8?q?API=20review=20by=20luox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh/api/control/layer-list.md | 8 +-- docs/zh/api/control/layer-manager.md | 2 +- src/mapboxgl/web-map/LayerGroup.vue | 14 ++--- .../web-map/control/layer-list/LayerList.vue | 8 +-- .../control/layer-manager/LayerManager.vue | 56 +++++++++++++------ .../__tests__/LayerManager.spec.js | 27 +++++++-- 6 files changed, 75 insertions(+), 40 deletions(-) diff --git a/docs/zh/api/control/layer-list.md b/docs/zh/api/control/layer-list.md index cade60a5..fd79cf89 100644 --- a/docs/zh/api/control/layer-list.md +++ b/docs/zh/api/control/layer-list.md @@ -15,7 +15,7 @@ | iconClass | 收缩按钮的 Font class 类名 | string | - | 'sm-components-icon-layer-list' | | headerName | 标题名 | string | - | '图层' | | attributes | 属性表配置 配置项 | object | - | - | -| layerOperations | 图层操作配置 配置项 | object | - | - | +| operations | 图层操作配置 配置项 | object | - | - | > 支持[主题混入参数](/zh/api/mixin/mixin.md#theme)和[卡片混入参数](/zh/api/mixin/mixin.md#collapsedcard)和 [Control 混入参数](/zh/api/mixin/mixin.md#control) @@ -31,10 +31,10 @@ > 更多配置项,请查看 [Attributes](/zh/api/common/attributes.md)(其中不支持layerName、dataset和mapTarget参数)。 -### layerOperations +### operations | 参数 | 说明 | 类型 | 可选值 | 默认值 | | :--------------- | :------------------------------------------------------------------------ | :---------------- | :--------------------------------------------------------------------------------- | :--------------------------------------------------------------- | -| zoomToLayer | 是否开启缩放至图层功能 | boolean | - | true | -| layerOrder | 是否开启拖拽调整图层顺序功能 | boolean | - | false | +| fitBounds | 是否开启缩放至图层功能 | boolean | - | true | +| draggable | 是否开启拖拽调整图层顺序功能 | boolean | - | false | | opacity | 是否开启调整图层不透明度功能 | boolean | - | false | diff --git a/docs/zh/api/control/layer-manager.md b/docs/zh/api/control/layer-manager.md index 651ddd48..ecfe4bfb 100644 --- a/docs/zh/api/control/layer-manager.md +++ b/docs/zh/api/control/layer-manager.md @@ -47,7 +47,6 @@ new Vue({ | defaultExpandAll | 默认展开所有树节点 | boolean | - | false | | iconClass | 收缩按钮的 Font class 类名 | string | - | 'sm-components-icon-layer-manager' | | headerName | 标题名 | string | - | '图层管理' | -| defaultCheckedKeys | 默认选中复选框的树节点 | string[] | - | [] | > 支持[主题混入参数](/zh/api/mixin/mixin.md#theme)和[卡片混入参数](/zh/api/mixin/mixin.md#collapsedcard)和 [Control 混入参数](/zh/api/mixin/mixin.md#control) @@ -58,6 +57,7 @@ new Vue({ | title | 标题 | string | - | - | | children | 子节点数据 | array | - | - | | mapInfo | 地图配置对象 | mapInfo | - | - | +| visible | 地图是否初始加载 | boolean | - | - | ### mapInfo diff --git a/src/mapboxgl/web-map/LayerGroup.vue b/src/mapboxgl/web-map/LayerGroup.vue index 0113f200..445e1218 100644 --- a/src/mapboxgl/web-map/LayerGroup.vue +++ b/src/mapboxgl/web-map/LayerGroup.vue @@ -1,6 +1,6 @@