vc-drawings绘图组件中before-load和ready执行先后顺序问题求助 #447
Answered
by
zouyaoji
xiaobaicxk
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
zouyaoji
Sep 13, 2023
Replies: 1 comment 1 reply
-
你好,可以在你异步请求完成之后再加载组件哈,用v-if。 然后想灵活一点可以参考源码进行初始化对象, 最终都是存到renderDatas里面的。 https://github.com/kireiyume/cesium-supermap-demo/blob/master/src/views/map/index.vue |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
xiaobaicxk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,可以在你异步请求完成之后再加载组件哈,用v-if。 然后想灵活一点可以参考源码进行初始化对象,
https://github.com/zouyaoji/vue-cesium/blob/dev/packages/composables/use-drawing/use-drawing-polyline.ts#L69
最终都是存到renderDatas里面的。
这儿有些参考代码
https://github.com/kireiyume/cesium-supermap-demo/blob/master/src/views/map/index.vue