feat(web-ui): 重构地图设置与目标列表页面并优化实时地图导航体验

- 重构地图设置页面布局,采用 flex 替代 grid,新增导航栏、标签页
  和下载步骤组件,改善响应式断点适配
- 将目标列表管理从侧边抽屉方案改为全页面内联编辑器,包含表格视图
  与分类侧栏,支持移动端卡片式降级展示
- 为实时地图屏幕添加半透明毛玻璃导航栏样式,支持 backdrop-filter
  降级,并在地图模式下调整内容区域偏移量
- 修复地图渲染器在画布尺寸为 0 时的边界异常,增加宽高校验
- 优化 fitBounds 的 padding 计算,改为基于容器宽度的比例值并
  限制最大值,避免小屏下地图偏移过大
- 新增 B5、B6、B7 三组 SVG 壁纸资源
```
This commit is contained in:
2026-10-23 14:50:27 +08:00
parent cd1b717e74
commit 461e2c8e7f
29 changed files with 910 additions and 319 deletions
+7
View File
@@ -12,6 +12,7 @@ async function fixture(run){
addControl(){}on(name,f){(this.handlers[name]??=[]).push(f)}getCanvasContainer(){return this.canvas}getCanvas(){return this.canvas}getContainer(){return this.container}
getSource(k){if(!this.loadedStyle)return;return {setTiles:tiles=>this.sources[k].tiles=tiles}}
load(){this.loadedStyle=true;for(const f of this.handlers.load??[])f()}
fitBounds(bounds,options){this.fit={bounds,options}}
dragPan={disable(){},enable(){}};unproject([x,y]){return {lng:x/100,lat:10-y/100}}remove(){}resize(){}
}
class Marker{setLngLat(){return this}addTo(){return this}}
@@ -39,3 +40,9 @@ test('panning does not leave an obsolete screen rectangle over another area',()=
api.tool('box');map().canvas.handlers.pointerdown({button:0,clientX:20,clientY:30,pointerId:1,preventDefault(){}});map().canvas.handlers.pointermove({clientX:160,clientY:170});map().canvas.handlers.pointerup();
for(const f of map().handlers.movestart??[])f();assert.equal(root.selection.hidden,true);
}));
test('region framing uses the actual map viewport without obsolete drawer padding',()=>fixture(({api,map})=>{
const bounds={west:118,south:32,east:119,north:33};
api.bounds(bounds);assert.equal(map().fit.options.padding.left,60);assert.equal(map().fit.options.padding.right,60);
map().container.clientWidth=200;api.bounds(bounds);assert.equal(map().fit.options.padding.left,40);assert.equal(map().fit.options.padding.right,40);
}));