"use strict";const t=require("../../../../../common/vendor.js"),e={name:"uv-row-notice",emits:["click","close"],mixins:[t.mpMixin,t.mixin,t.props$3],data:()=>({animationDuration:"0",animationPlayState:"paused",nvueInit:!0,show:!0}),watch:{text:{immediate:!0,handler(t,e){this.vue(),this.$uv.test.string(t)||this.$uv.error("noticebar组件direction为row时，要求text参数为字符串形式")}},fontSize(){this.vue()},speed(){this.vue()}},computed:{textStyle(){let t={};return t.color=this.color,t.fontSize=this.$uv.addUnit(this.fontSize),t},animationStyle(){let t={};return t.animationDuration=this.animationDuration,t.animationPlayState=this.animationPlayState,t},innerText(){let t=[];const e=this.text?this.text.split(""):[];for(let i=0;i<e.length;i+=20)t.push(e.slice(i,i+20).join(""));return t}},mounted(){this.init()},methods:{init(){this.vue(),this.$uv.test.string(this.text)||this.$uv.error("noticebar组件direction为row时，要求text参数为字符串形式")},async vue(){let t=0;await this.$uv.sleep(),t=(await this.$uvGetRect(".uv-notice__content__text")).width,(await this.$uvGetRect(".uv-notice__content")).width,this.animationDuration=t/this.$uv.getPx(this.speed)+"s",this.animationPlayState="paused",setTimeout((()=>{this.animationPlayState="running"}),10)},async nvue(){},loopAnimation(t,e){},getNvueRect(t){},clickHandler(t){this.$emit("click")},close(){this.$emit("close")}}};if(!Array){t.resolveComponent("uv-icon")()}Math;const i=t._export_sfc(e,[["render",function(e,i,n,o,a,s){return t.e({a:e.icon},e.icon?{b:t.p({name:e.icon,color:e.color,size:"19"})}:{},{c:t.f(s.innerText,((e,i,n)=>({a:t.t(e),b:i}))),d:t.s(s.textStyle),e:t.s(s.animationStyle),f:["link","closable"].includes(e.mode)},["link","closable"].includes(e.mode)?t.e({g:"link"===e.mode},"link"===e.mode?{h:t.p({name:"arrow-right",size:17,color:e.color})}:{},{i:"closable"===e.mode},"closable"===e.mode?{j:t.o(s.close),k:t.p({name:"close",size:16,color:e.color})}:{}):{},{l:t.o(((...t)=>s.clickHandler&&s.clickHandler(...t)))})}],["__scopeId","data-v-07c5f837"]]);wx.createComponent(i);
