问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
new Style({
stroke: new Stroke({
color: strokeColor,
width: 4,
}),
fill: new Fill({
color: fillColor,
}),
text: new Text({
text: this.displayText ? name : '', // 设置这里的text,太长了
font: '13px font-size',
overflow: false,
fill: new Fill({
color: '#fff',
}),
backgroundFill: new Fill({
color: this.displayTextBgc ? 'rgba(0,0,0,0.6)' : 'transparent', // transparent,
}),
padding: [2, 0, 0, 2],
}),
})