dk-plus
Version:
6 lines (5 loc) • 1.5 kB
JavaScript
;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("./index3.js"),g=require("../../_hooks/public/get-StyleList/index.js"),h=require("../../_icon/index.js"),f=["color"],m=["color"],k={class:"dk-loading_title"},y=e.defineComponent({__name:"loading",props:p.loadingProps,setup(s){const t=s,i=e.ref(),{classes:l,styles:r}=g.getStyleList(t,"loading"),c=l(["loading"],"dk-loading"),a=r(["background","color","textSize","flexDirection"]),n=t.spinnerSize?t.spinnerSize:"20px",d=t.spinner,u=`
<svg viewBox="0 0 1024 1024" width="${n}" height="${n}">
${d}
</svg>
`;return i.value&&(i.value.innerHTML=u),(o,v)=>o.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(c)),style:e.normalizeStyle(e.unref(a))},[o.spinner===""?(e.openBlock(),e.createElementBlock("div",{key:0,color:o.color,style:e.normalizeStyle([`width:${e.unref(n)}; height:${e.unref(n)};`]),class:"dk-loading_animation"},[e.createVNode(e.unref(h.IconRefresh),{width:e.unref(n),height:e.unref(n)},null,8,["width","height"])],12,f)):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle([`width:${e.unref(n)}; height:${e.unref(n)};`]),color:o.color,class:"dk-loading_animation"},[e.createElementVNode("span",{ref_key:"nbSpinner",ref:i},null,512)],12,m)),e.createElementVNode("span",k,e.toDisplayString(o.text),1)],6)):e.createCommentVNode("",!0)}});exports.default=y;