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] 事件添加修饰符后无法触发 #140

Closed 651778286 closed 2 years ago

651778286 commented 2 years ago

VueCesium version

3.0.3

OS/Browsers version

window 10 / chrome 96.0.4664.110

Vue version

3.2.26

Cesium version

1.88.0

Reproduction Link

https://codepen.io/651778286/pen/eYGGyBo?editors=1111

Steps to reproduce

直接查看页面,查看console控制台打印信息

What is Expected?

控制台打印出"onViewerReady ======"

What is actually happening?

未打印出"onViewerReady ======"

zouyaoji commented 2 years ago

vue-cesium对事件触发,有个判断逻辑, 先判断组件是否绑定该事件,绑定了才会触发。

目前判断逻辑没考虑修饰符的情况 https://github.com/zouyaoji/vue-cesium/blob/dev/packages/utils/private/vm.ts#L60

下个版本解决一下,谢谢反馈了