dvgis / dc-sdk

DC-SDK is based on the open source project Cesium for the second development of two three-dimensional WebGis application framework , the framework optimizes the use of Cesium and adds some additional features , designed for developers to quickly build WebGis application.🌎
http://dc.dvgis.cn
Apache License 2.0
824 stars 256 forks source link

fix: 修复 vue 使用 proxy 代理时找不到对象的BUG #158

Closed ShenWeiQun closed 1 year ago

ShenWeiQun commented 1 year ago

异常的示例代码

import { readonly } from "vue"

const map = new DC.Viewer('viewer-container')
const rMap = readonly(map)
console.log(rMap.popup)

当数据被 vue 使用 proxy 代理 后会报如下错误

TypeError: 'get' on proxy: property 'popup' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '#<As>' but got '#<As>')

image 国内使用 vue 的还是比较多的,难免会遇到错误