最近使用了echarts的树图,由于树图的叶子比较多,文字重叠了,想让一个文字占一行,所以做了一下处理。
leaves: {
label: {
position: 'bottom',
rotate: 0,
verticalAlign: 'top',
align: 'center',
formatter: function(val) {
let strs = val.name.split(''); //字符串数组
let str