acdr-ui/dist/build/mp-weixin/components/LoadingAnimation.js

2 lines
651 B
JavaScript

"use strict";const e=require("../common/vendor.js");if(!Array){e.resolveComponent("wd-overlay")()}Math;const o={__name:"LoadingAnimation",props:{modelValue:Boolean,timeout:{type:Number,default:5e3}},emits:["update:modelValue"],setup(o,{emit:t}){const a=o,n=t;let l=null;const m=["#FF6347","#4682B4","#32CD32","#FFD700","#FF69B4","#00FA9A"],u=()=>{clearTimeout(l),n("update:modelValue",!1)};return e.onLoad((()=>{clearTimeout(l),l=setTimeout((()=>{u()}),a.timeout)})),e.onUnload((()=>{clearTimeout(l)})),(t,a)=>({a:e.f(m,((e,o,t)=>({a:e,b:e}))),b:e.p({show:o.modelValue})})}},t=e._export_sfc(o,[["__scopeId","data-v-b7c4989b"]]);wx.createComponent(t);