Closed ShenWeiQun closed 1 year ago
When the component VcCollectionPrimitive
of a component is VcPrimitiveGround
, Unable to manage child components
In file packages\composables\use-primitives\index.ts
,I found
const primitives = vcInstance.cesiumClass.includes('Ground') ? commonState.$services.groundPrimitives : commonState.$services.primitives
I think it's affecting you here
我测试了,确实改成
const primitives = commonState.$services.primitives
就能管理到,想请教一下你清楚 viewer.scene.groundPrimitives 和 viewe.scene.primitives 有啥区别不。
我之前就简单的把带‘ground’的放到groundPrimitives 中了。
搜索了一下没找到直接的解释
根据issues
https://github.com/CesiumGS/cesium/pull/6316
https://github.com/CesiumGS/cesium/pull/2960
推测,增加groundPrimitives
的目的是为了贴地的primitive
排序方便
根据issues
https://github.com/CesiumGS/cesium/issues/7639
推测,在未来的计划中该属性可能会被移除
不论原始目的如何,如果组件VcPrimitiveGround
是VcCollectionPrimitive
的子组件,状态应该能被父组件管理到
嗯,下个版本改一下。
VueCesium version
3.1.3
OS/Browsers version
Google Chrome 110.0.5481.78
Vue version
3.2.47
Cesium version
1.102.0
Reproduction Link
https://codepen.io/shenweiqun/pen/wvEvzrK
Steps to reproduce
vc-collection-primitive :show="false" @click="onClick" 在示例页面上给组件vc-collection-primitive增加属性不会生效 例如 属性 :show="false" 时间 @click="onClick"
What is Expected?
属性设置正常 操作设置正常
What is actually happening?
属性设置异常 操作设置异常