中国地图-路线图增加地图块颜色配置项

qianming 3 years ago
parent 86ace5ecc1
commit 5335d5f9d4

@ -188,6 +188,35 @@ export const widgetMap = {
}, },
], ],
}, },
{
name: '地图颜色',
list: [
{
type: 'vue-color',
label: '地图块颜色',
name: 'blockColor',
required: false,
placeholder: '',
value: '#073684'
},
{
type: 'vue-color',
label: '边界颜色',
name: 'borderColor',
required: false,
placeholder: '',
value: '#061E3D'
},
{
type: 'vue-color',
label: '高亮颜色',
name: 'highlightColor',
required: false,
placeholder: '',
value: '#2B91B7'
},
],
},
] ]
], ],
data: [ data: [

@ -305,7 +305,8 @@ export default {
value: dataItem.value, value: dataItem.value,
} }
) )
}; }
;
} }
return res; return res;
}, },
@ -313,6 +314,7 @@ export default {
this.setOptionsTitle(); this.setOptionsTitle();
this.setOptionsText(); this.setOptionsText();
this.setOptionsPoint(); this.setOptionsPoint();
this.setOptionsColor();
this.setOptionsData(); this.setOptionsData();
}, },
// //
@ -360,6 +362,22 @@ export default {
}; };
series["itemStyle"] = itemStyle; series["itemStyle"] = itemStyle;
}, },
//
setOptionsColor() {
const optionsSetup = this.optionsSetup;
const itemStyle = {
normal: {
//
areaColor: optionsSetup.blockColor,
borderColor: optionsSetup.borderColor,
},
emphasis: {
//
areaColor: optionsSetup.highlightColor,
}
};
this.options.geo["itemStyle"] = itemStyle;
},
// //
setOptionsData() { setOptionsData() {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or

Loading…
Cancel
Save