镇江外贸网站建设,网站网络资源建立,展示网站建设的ppt,做淘宝客网站推广被骗解决方案一#xff1a; 不使用showloading#xff0c;判断传入数据是否为空。 若数据为空#xff0c;覆盖一层div。 若数据不为空#xff0c;则隐藏div
解决方案2#xff1a; 利用echarts的graphic。初始化是加入graphic。有数据时再利用id移除掉graphic。
初始化时 不使用showloading判断传入数据是否为空。 若数据为空覆盖一层div。 若数据不为空则隐藏div
解决方案2 利用echarts的graphic。初始化是加入graphic。有数据时再利用id移除掉graphic。
初始化时
在setoption中加入
graphic:[{type: group,id:inittext,left: 1%,top: center,children: [{type: rect,z: 100,left: center,top: middle,shape: {width: 500,height: 242,},style: {fill: rgba(0,0,0,0.01),}},{type: text,z: 100,left: center,top: middle,style: {fill: #000,text: [暂无数据,].join(\n),font: 14px Microsoft YaHei}}]}],
在有数据的setoption中加入 graphic:[{id:inittext,$action:remove,}],
参考链接https://www.w3cschool.cn/echarts_tutorial/echarts_tutorial-3u872dym.html
https://echarts.baidu.com/option.html#graphic.elements-group.bounding
https://www.echartsjs.com/gallery/editor.html?cline-graphic
https://github.com/apache/incubator-echarts/issues/4829