@persagy2/meri-design
Version:
fork from meri-design and extend it.
7 lines • 5.88 kB
JavaScript
/*!
* @@persagy2/meri-design v1.4.9-extend.2
* (c) 2019-2020 xiongshuang
* Released under the MIT License.
* 2022-12-07 10:32:51
*/
var t,e;t=this,e=function(){return function(){"use strict";var t={d:function(e,s){for(var n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function s(t,e,s,n,i,r,a,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),n&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}t.r(e),t.d(e,{default:function(){return o}});var n=s({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"14px",height:"14px",viewBox:"0 0 24 24","xml:space":"preserve"}},[e("title",[t._v("工单消息")]),t._v(" "),e("g",{attrs:{transform:"translate(2.000000, 0.000000)"}},[e("g",[e("path",{staticClass:"svg-fill-white",attrs:{d:"M6.8,0L6.8,0c0.6,0,1,0.4,1,1v2.1c0,0.6-0.4,1-1,1l0,0c-0.6,0-1-0.4-1-1V1\r\n\t\t\t\tC5.8,0.4,6.3,0,6.8,0z"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M13.5,0L13.5,0c0.6,0,1,0.4,1,1v2.1c0,0.6-0.4,1-1,1l0,0c-0.6,0-1-0.4-1-1V1\r\n\t\t\t\tC12.5,0.4,12.9,0,13.5,0z"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M2,3.3h16c1.1,0,2,0.9,2,2V21c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V5.3C0,4.2,0.9,3.3,2,3.3\r\n\t\t\t\tz M2,5.3V21h16V5.3H2z"}})]),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M6,9.9h8c0.6,0,1,0.4,1,1l0,0c0,0.6-0.4,1-1,1H6c-0.6,0-1-0.4-1-1l0,0C5,10.3,5.4,9.9,6,9.9z"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M6,14h8c0.6,0,1,0.4,1,1l0,0c0,0.6-0.4,1-1,1H6c-0.6,0-1-0.4-1-1l0,0C5,14.4,5.4,14,6,14z"}})])])}),[],!1,null,null,null).exports,i=s({},(function(){var t=this._self._c;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"14px",height:"14px",viewBox:"0 0 24 24","xml:space":"preserve"}},[t("g",{attrs:{transform:"translate(2.000000, 1.000000)"}},[t("path",{staticClass:"svg-fill-white",attrs:{d:"M9.2,11.5L6.5,8.9c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l4.1,4l5.7-5.6c0.4-0.4,0.4-1,0-1.4\r\n\t\t\t\t\ts-1-0.4-1.4,0L9.2,11.5z"}}),this._v(" "),t("path",{staticClass:"svg-fill-white",attrs:{d:"M2,0h16c1.1,0,2,0.9,2,2v18c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V2C0,0.9,0.9,0,2,0z M2,2v18\r\n\t\t\t\t\th16V2H2z"}})])])}),[],!1,null,null,null).exports,r=s({},(function(){var t=this,e=t._self._c;return e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"14px",height:"14px",viewBox:"0 0 24 24","xml:space":"preserve"}},[e("title",[t._v("事件")]),t._v(" "),e("g",{attrs:{transform:"translate(2.000000, 1.000000)"}},[e("path",{staticClass:"svg-fill-white",attrs:{d:"M6.1,17c0,2.2,1.9,4,4.2,4s4.2-1.8,4.2-4h-2c0,1.1-1,2-2.2,2s-2.2-0.9-2.2-2H6.1z"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M4,11V8.4C4,4.9,6.8,2,10.3,2s6.3,2.9,6.3,6.4v2.7c2.3,1.9,3.4,3.2,3.4,4.3\r\n\t\t\t\t\tc0,1.7-1.4,3-3.1,3H3.1c-1.7,0-3.1-1.3-3.1-3C0,14.2,1.3,12.9,4,11z M5.5,12.3c-1.3,0.9-2.2,1.7-2.9,2.3\r\n\t\t\t\t\tc-0.3,0.3-0.5,0.5-0.6,0.7C2,15.4,2,15.4,2,15.4c0,0.5,0.5,1,1.1,1h13.8c0.6,0,1.1-0.5,1.1-1c0-0.2-1.1-1.4-3.1-3L14.6,12V8.4\r\n\t\t\t\t\tC14.6,6,12.6,4,10.3,4S6,6,6,8.4V12L5.5,12.3z"}}),t._v(" "),e("path",{staticClass:"svg-fill-white",attrs:{d:"M12.4,2.5c0-1.1-0.9-2-2.1-2s-2.1,0.9-2.1,2h1c0-0.5,0.5-1,1.1-1s1.1,0.5,1.1,1H12.4z"}})])])}),[],!1,null,null,null),a=s({name:"CarouselText",components:{CommissionSvg:n,ExecutorySvg:i,PendingSvg:r.exports},props:{data:{type:Array,default:function(){return[]}},time:{type:Number,default:3}},data:function(){return{num:0}},mounted:function(){this.setTimer()},methods:{setTimer:function(){var t=this;this.data&&this.data.length&&(this.timer=window.setInterval((function(){t.num<t.data.length-1?t.num++:t.num=0}),1e3*this.time))},stopTimer:function(){this.data&&this.data.length&&window.clearInterval(this.timer)},itemClick:function(t){this.$emit("click",t)}},beforeDestroy:function(){this.data&&this.data.length&&this.stopTimer()}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"p-carousel",on:{mouseenter:t.stopTimer,mouseleave:t.setTimer}},[e("transition-group",{attrs:{name:"slideUpUi"}},t._l(t.data,(function(s,n){return e("div",{directives:[{name:"show",rawName:"v-show",value:t.num===n,expression:"num === i"}],key:s.id,staticClass:"p-carousel-msg",attrs:{title:s.text},on:{click:function(e){return t.itemClick(s.id)}}},[e("i",{staticClass:"p-carousel-icon"},["commission"===s.type?e("CommissionSvg"):t._e(),t._v(" "),"executory"===s.type?e("ExecutorySvg"):t._e(),t._v(" "),"pending"===s.type?e("PendingSvg"):t._e()],1),t._v(" "),e("section",{staticClass:"p-carousel-item"},[t._v(t._s(s.text))])])})),0)],1)}),[],!1,null,null,null).exports;a.install=function(t){return t.component(a.name,a)};var o=a;return e}()},"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("CarouselText",[],e):"object"==typeof exports?exports.CarouselText=e():t.CarouselText=e();