"use strict";const uni_modules_uviewPlus_components_uLoadingIcon_props=require("./props.js");const uni_modules_uviewPlus_libs_mixin_mpMixin=require("../../libs/mixin/mpMixin.js");const uni_modules_uviewPlus_libs_mixin_mixin=require("../../libs/mixin/mixin.js");const uni_modules_uviewPlus_libs_function_index=require("../../libs/function/index.js");const uni_modules_uviewPlus_libs_function_colorGradient=require("../../libs/function/colorGradient.js");const common_vendor=require("../../../../common/vendor.js");const _sfc_main={name:"u-loading-icon",mixins:[uni_modules_uviewPlus_libs_mixin_mpMixin.mpMixin,uni_modules_uviewPlus_libs_mixin_mixin.mixin,uni_modules_uviewPlus_components_uLoadingIcon_props.props],data(){return{array12:Array.from({length:12}),aniAngel:360,webviewHide:false,loading:false}},computed:{otherBorderColor(){const lightColor=uni_modules_uviewPlus_libs_function_colorGradient.colorGradient$1(this.color,"#ffffff",100)[80];if(this.mode==="circle"){return this.inactiveColor?this.inactiveColor:lightColor}else{return"transparent"}}},watch:{show(n){}},mounted(){this.init()},methods:{addUnit:uni_modules_uviewPlus_libs_function_index.addUnit,addStyle:uni_modules_uviewPlus_libs_function_index.addStyle,init(){setTimeout((()=>{}),20)},addEventListenerToWebview(){const pages=getCurrentPages();const page=pages[pages.length-1];const currentWebview=page.$getAppWebview();currentWebview.addEventListener("hide",(()=>{this.webviewHide=true}));currentWebview.addEventListener("show",(()=>{this.webviewHide=false}))}}};function _sfc_render(_ctx,_cache,$props,$setup,$data,$options){return common_vendor.e({a:_ctx.show},_ctx.show?common_vendor.e({b:!$data.webviewHide},!$data.webviewHide?common_vendor.e({c:_ctx.mode==="spinner"},_ctx.mode==="spinner"?{d:common_vendor.f($data.array12,((item,index,i0)=>({a:index})))}:{},{e:common_vendor.n(`u-loading-icon__spinner--${_ctx.mode}`),f:_ctx.color,g:$options.addUnit(_ctx.size),h:$options.addUnit(_ctx.size),i:_ctx.color,j:$options.otherBorderColor,k:$options.otherBorderColor,l:$options.otherBorderColor,m:`${_ctx.duration}ms`,n:_ctx.mode==="semicircle"||_ctx.mode==="circle"?_ctx.timingFunction:""}):{},{o:_ctx.text},_ctx.text?{p:common_vendor.t(_ctx.text),q:$options.addUnit(_ctx.textSize),r:_ctx.textColor}:{},{s:common_vendor.s($options.addStyle(_ctx.customStyle)),t:common_vendor.n(_ctx.vertical&&"u-loading-icon--vertical")}):{})}const Component=common_vendor._export_sfc(_sfc_main,[["render",_sfc_render],["__scopeId","data-v-40fecea9"]]);my.createComponent(Component);
