antdv组件库的Spin组件没有提供直接的函数式全局调用方式;当需要调用ajax请求或者其他纯js的时候就比较麻烦了。基于SpinimportVuefrom"vue"扩展util/decorator/spin;import{Spin}from"ant-design-vue";letinstance=null;functiongetInstance(){if(!instance){instance=newVue({数据:{显示:假,},方法:{加载(){this.show=true;},关闭(){this.show=false;},渲染(h,数据){constfullScreenLoading={positive:“固定”,左:0,上:0,宽度:“100%”,高度:“100%”,显示:“flex”,justifyContent:“center”,alignitems:“center”,};返回this.show?(
