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

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();
}, },
// //
@ -336,7 +338,7 @@ export default {
this.options.title = title; this.options.title = title;
}, },
// //
setOptionsText(){ setOptionsText() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const lable = this.options.series[2].label; const lable = this.options.series[2].label;
const normal = { const normal = {
@ -349,17 +351,33 @@ export default {
lable["normal"] = normal; lable["normal"] = normal;
}, },
// //
setOptionsPoint(){ setOptionsPoint() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const series = this.options.series[2]; const series = this.options.series[2];
pointSize = optionsSetup.pointSize pointSize = optionsSetup.pointSize
const itemStyle= { const itemStyle = {
normal: { normal: {
color: optionsSetup.pointColor, color: optionsSetup.pointColor,
} }
}; };
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