feat--气泡地图增加提示语配置

qianming 1 year ago
parent 8ec3e6abc3
commit 13007cb248

@ -291,6 +291,27 @@ export const widgetAirbubbleMap = {
}, },
], ],
}, },
{
name: '提示语设置',
list: [
{
type: 'el-input-number',
label: '字体字号',
name: 'tipsFontSize',
required: false,
placeholder: '',
value: 16
},
{
type: 'vue-color',
label: '字体颜色',
name: 'tipsColor',
required: false,
placeholder: '',
value: '#00FEFF'
},
],
},
], ],
], ],
data: [ data: [

@ -448,7 +448,8 @@ export default {
//this.setOptionDataValue(); //this.setOptionDataValue();
this.setOptionsData(); this.setOptionsData();
this.setOptionAirSize(); this.setOptionAirSize();
this.setOptionMapBlocak(); this.setOptionsTooltip();
this.setOptionMapBlock();
}, },
// //
setOptionsTitle() { setOptionsTitle() {
@ -484,7 +485,7 @@ export default {
}; };
label["normal"] = normal; label["normal"] = normal;
}, },
setOptionMapBlocak() { setOptionMapBlock() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const itemStyle = this.options.series[0]["itemStyle"]; const itemStyle = this.options.series[0]["itemStyle"];
const normal = { const normal = {
@ -534,6 +535,26 @@ export default {
maxSize4Pin = this.optionsSetup.fontmaxSize4Pin; maxSize4Pin = this.optionsSetup.fontmaxSize4Pin;
minSize4Pin = this.optionsSetup.fontminSize4Pin; minSize4Pin = this.optionsSetup.fontminSize4Pin;
}, },
// tooltip
setOptionsTooltip() {
const optionsSetup = this.optionsSetup;
const tooltip = {
trigger: "item",
show: true,
textStyle: {
color: optionsSetup.tipsColor,
fontSize: optionsSetup.tipsFontSize,
},
formatter: function (params) {
if (params.value.length > 1) {
return params.data.name + "" + params.data.value[2];
} else {
return params.name;
}
},
};
this.options.tooltip = tooltip;
},
// //
setOptionsData(e, paramsConfig) { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or

Loading…
Cancel
Save