zouyaoji / vue-cesium

🎉 Vue 3.x components for CesiumJS.
https://zouyaoji.top/vue-cesium
MIT License
1.53k stars 325 forks source link

[Bug Report] VcDrawings props默认属性与自定义属性合并问题 #166

Closed brantroy closed 2 years ago

brantroy commented 2 years ago

VueCesium version

3.0.10

OS/Browsers version

windows 10

Vue version

3.2.31

Cesium version

1.91.0

Reproduction Link

https://github.com/

Steps to reproduce

https://zouyaoji.top/vue-cesium/#/zh-CN/component/analyses/vc-drawings

示例中,pinDrawingOpts自定义配置未生效, components/drawings/src/index.ts 中 第52-54行 Object.assign合并参数时,后两个参数传递反了

const regularDrawingOpts = reactive<VcDrawingOpts>(Object.assign({}, props.regularDrawingOpts, defaultOptions.regularDrawingOpts))
const pinActionOpts = reactive<VcActionTooltipProps>(Object.assign({}, props.pinActionOpts, defaultOptions.pinActionOpts))
const pinDrawingOpts = reactive<VcDrawingOpts>(Object.assign({}, props.pinDrawingOpts, defaultOptions.pinDrawingOpts))

修改为:

const regularDrawingOpts = reactive<VcDrawingOpts>(Object.assign({}, defaultOptions.regularDrawingOpts, props.regularDrawingOpts))
const pinActionOpts = reactive<VcActionTooltipProps>(Object.assign({}, defaultOptions.pinActionOpts, props.pinActionOpts))
const pinDrawingOpts = reactive<VcDrawingOpts>(Object.assign({}, defaultOptions.pinDrawingOpts, props.pinDrawingOpts))

What is Expected?

修复问题

What is actually happening?

尚未处理

zouyaoji commented 2 years ago

收到,谢谢指正。将在下个版本修复。