2025-03-21 16:50:18 +08:00

12 lines
4.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["tuniao-ui/components/tn-row-notice/tn-row-notice"],{646:function(t,n,e){"use strict";e.r(n);var o=e(647),i=e(649);for(var r in i)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(r);e(651);var c,a=e(42),u=Object(a["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"770a6f7a",null,!1,o["components"],c);u.options.__file="tuniao-ui/components/tn-row-notice/tn-row-notice.vue",n["default"]=u.exports},647:function(t,n,e){"use strict";e.r(n);var o=e(648);e.d(n,"render",(function(){return o["render"]})),e.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(n,"components",(function(){return o["components"]}))},648:function(t,n,e){"use strict";var o;e.r(n),e.d(n,"render",(function(){return i})),e.d(n,"staticRenderFns",(function(){return c})),e.d(n,"recyclableRender",(function(){return r})),e.d(n,"components",(function(){return o}));var i=function(){var t=this,n=t.$createElement,e=(t._self._c,t.show?t.__get_style([t.noticeStyle]):null),o=t.show&&t.leftIcon?t.__get_style([t.fontStyle("leftIcon")]):null,i=t.show?t.__get_style([t.fontStyle()]):null,r=t.show&&t.rightIcon?t.__get_style([t.fontStyle("rightIcon")]):null,c=t.show&&t.closeBtn?t.__get_style([t.fontStyle("close")]):null;t.$mp.data=Object.assign({},{$root:{s0:e,s1:o,s2:i,s3:r,s4:c}})},r=!1,c=[];i._withStripped=!0},649:function(t,n,e){"use strict";e.r(n);var o=e(650),i=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(r);n["default"]=i.a},650:function(t,n,e){"use strict";(function(t){var o=e(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o(e(396)),r={name:"tn-row-notice",mixins:[i.default],props:{list:{type:Array,default:function(){return[]}},show:{type:Boolean,default:!0},playStatus:{type:String,default:"play"},leftIcon:{type:Boolean,default:!0},leftIconName:{type:String,default:"sound"},leftIconSize:{type:Number,default:34},rightIcon:{type:Boolean,default:!1},rightIconName:{type:String,default:"right"},rightIconSize:{type:Number,default:26},closeBtn:{type:Boolean,default:!1},radius:{type:Number,default:0},padding:{type:String,default:"18rpx 24rpx"},autoplay:{type:Boolean,default:!0},speed:{type:Number,default:160}},computed:{fontStyle:function(){var t=this;return function(n){var e={};return e.color=t.fontColorStyle?t.fontColorStyle:"",e.fontSize=t.fontSizeStyle?t.fontSizeStyle:"","leftIcon"===n&&t.leftIconSize&&(e.fontSize=t.leftIconSize+"rpx"),"rightIcon"===n&&t.rightIconSize&&(e.fontSize=t.rightIconSize+"rpx"),"close"===n&&(e.fontSize="24rpx"),e}},noticeStyle:function(){var t={};return t.backgroundColor=this.backgroundColorStyle?this.backgroundColorStyle:"transparent",this.padding&&(t.padding=this.padding),t}},data:function(){return{textWidth:0,textBoxWidth:0,animationDuration:"10s",animationPlayState:"paused",showText:""}},watch:{list:{handler:function(t){var n=this;this.showText=t.join(""),this.$nextTick((function(){n.initNotice()}))},immediate:!0},playStatus:function(t){this.animationPlayState="play"===t?"running":"paused"},speed:function(t){this.initNotice()}},methods:{initNotice:function(){var n=this,e=[],o=new Promise((function(e,o){t.createSelectorQuery().in(n).select("#tn-row-notice__content").boundingClientRect().exec((function(t){n.textWidth=t[0].width,e()}))}));e.push(o),Promise.all(e).then((function(){n.animationDuration="".concat(n.textWidth/t.upx2px(n.speed),"s"),n.animationPlayState="paused",setTimeout((function(){n.autoplay&&"play"===n.playStatus&&(n.animationPlayState="running")}),10)}))},click:function(){this.$emit("click")},close:function(){this.$emit("close")},clickLeftIcon:function(){this.$emit("clickLeft")},clickRightIcon:function(){this.$emit("clickRight")}}};n.default=r}).call(this,e(2)["default"])},651:function(t,n,e){"use strict";e.r(n);var o=e(652),i=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(r);n["default"]=i.a},652:function(t,n,e){}}]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/tuniao-ui/components/tn-row-notice/tn-row-notice.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'tuniao-ui/components/tn-row-notice/tn-row-notice-create-component',
{
'tuniao-ui/components/tn-row-notice/tn-row-notice-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('2')['createComponent'](__webpack_require__(646))
})
},
[['tuniao-ui/components/tn-row-notice/tn-row-notice-create-component']]
]);