改为Object.defineProperties
参考:https://www.cnblogs.com/lilei2blog/p/8622438.html
http://cesium.xin/wordpress/archives/cesium-dynamic-entity.html
Object中的defineProperties主要功能是用来定义或修改内部属性
功能:方法直接在一个对象上定义一个或多个新的属性或修改现有属性,并返回该对象。
语法: Object.defineProperties(obj, props)
疑问:为什么不直接在函数内部定义然后再生成对象呢?
浙公网安备 33010602011771号