export default { methods: { // 编辑矢量 editVector(editType, vector) { let type = this.data.class; let value = Cesium.defaultValue(this.data[this.data.class][editType], this.data[editType]) if (type === 'point') { editType === 'color' && (editType = 'fillColor') editType === 'pointHeight' && (editType = 'height') editType === 'size' && (editType = 'font_size') } else { editType === 'color' && (editType = 'material') } let data = {} if (editType === 'pointType') { if (this.pointType === 'label') { data = { text: this.data.text, image: '' } } else if (this.pointType === 'billboard') { data = { image: this.data.image, text: '' } } else { data = { text: this.data.text, image: this.data.image } } } else if (editType === 'IgnoreShelter') { this.IgnoreShelter ? (data.disableDepthTestDistance = "Infinity") : (data.disableDepthTestDistance = 0); } else if (editType === 'fontStyle') { this.fontStyle.includes("bold") ? data.bold = true : data.bold = false; this.fontStyle.includes("italic") ? data.italic = true : data.italic = false; } else { data[editType] = value } vector.updataVector(data) }, // 还原 restore(vector) { vector.restoreVector && vector.restoreVector() } } }