admin/plugins/decorate/views/page-design2/41.js

1 line
4.5 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{2565:function(t,s,n){var i=n(2566);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,n(18).default)("8fb95684",i,!1,{})},2566:function(t,s,n){(t.exports=n(15)(!1)).push([t.i,"\n.component-wrapper[data-v-107ef423] {\n display: flex;\n justify-content: center;\n width: 375px;\n}\n.component-wrapper .all .category-list[data-v-107ef423] {\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n padding: 0;\n text-align: center;\n line-height: 16px;\n}\n.component-wrapper .all .category-list .category-item[data-v-107ef423] {\n width: 20%;\n list-style: none;\n margin-top: 10px;\n}\n",""])},2631:function(t,s,n){"use strict";n.r(s);var i=n(40),a=n.n(i),e=function(){if(this.datas.preview_color){var t=this.datas,s=t.preview_color,n=t.font_color,i=t.category_color,a=t.module_bg_color;return"\n .component-"+this.id+" .all{\n background-color: "+(s||"#f8f8f8")+";\n width:100%;\n padding: 10px; \n }\n .component-"+this.id+" .all .content{\n background-color: "+(a||"#f8f8f8")+";\n padding: 10px 8px;\n border-radius:10px\n } \n .component-"+this.id+" .top{\n color: "+n+";\n }\n .component-"+this.id+" .category-list .category-item .category-name{\n margin-top:10px;\n font-size:12px;\n color:"+i+"\n }\n "}},l={props:["id","datas","styles","languages"],data:function(){return{emptyImage:a.a,scroll_list:[],swiperOption:{autoplay:!1,delay:3e3,observer:!0,pagination:{el:".swiper-pagination",bulletClass:"my-bullet",bulletActiveClass:"my-bullet-active"}}}},computed:{css:function(){return"<style>"+e.call(this)+"</style>"},className:function(){return["component-wrapper","component-"+this.id]},list:function(){return this.datas.list},button_number:function(){return this.datas.button_number},button_line:function(){return this.datas.button_line||1}},watch:{list:{deep:!0,handler:function(){var t=this.datas.list;this.scroll_list=[],this.datas.button_line||(this.datas.button_line=1);for(var s=Math.ceil(this.datas.list.length/this.datas.button_number/this.datas.button_line),n=this.datas.button_number*this.datas.button_line,i=0;i<s;i++)this.scroll_list.push(t.slice(i*n,(i+1)*n))}},button_number:function(t){var s=this.datas.list;this.scroll_list=[],this.datas.button_line||(this.datas.button_line=1);for(var n=Math.ceil(this.datas.list.length/t/this.datas.button_line),i=t*this.datas.button_line,a=0;a<n;a++)this.scroll_list.push(s.slice(a*i,(a+1)*i))},button_line:function(t){var s=this.datas.list;this.scroll_list=[],t||(t=1);for(var n=Math.ceil(this.datas.list.length/this.datas.button_number/t),i=this.datas.button_number*t,a=0;a<n;a++)this.scroll_list.push(s.slice(a*i,(a+1)*i))}},methods:{initButtons:function(){if(this.datas.list){var t=this.datas.list;this.scroll_list=[],this.datas.button_line||(this.datas.button_line=1);for(var s=Math.ceil(this.datas.list.length/this.datas.button_number/this.datas.button_line),n=this.datas.button_number*this.datas.button_line,i=0;i<s;i++)this.scroll_list.push(t.slice(i*n,(i+1)*n))}}},components:{},mounted:function(){var t=this;this.$nextTick((function(){t.initButtons()}))}},o=function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("div",{staticClass:"U000004-template1",class:t.className},[n("div",{domProps:{innerHTML:t._s(t.css)}}),t._v(" "),t.datas.preview_color?[n("div",{staticClass:"all"},[n("div",{staticClass:"content"},[n("div",{staticClass:"top"},[t._v("推荐分类")]),t._v(" "),t.list.length<=0?n("ul",{staticClass:"category-list"},t._l(5,(function(s,i){return n("li",{key:i,staticClass:"category-item"},[n("img",{staticStyle:{width:"32px",height:"32px","border-radius":"5px"},attrs:{src:t.emptyImage,alt:""}}),t._v(" "),n("div",{staticClass:"category-name"},[t._v("分类名称")])])})),0):t._e(),t._v(" "),t.list&&t.list.length>0?n("ul",{staticClass:"category-list"},t._l(t.list,(function(s,i){return n("li",{key:i+"-"+s.id,staticClass:"category-item"},[n("img",{staticStyle:{width:"32px",height:"32px","border-radius":"5px"},attrs:{src:s.thumb||t.emptyImage,alt:""}}),t._v(" "),n("div",{staticClass:"category-name"},[t._v(t._s(s.name))])])})),0):t._e()])])]:t._e()],2)};o._withStripped=!0;var r=n(10);var c=function(t){n(2565)},u=Object(r.a)(l,o,[],!1,c,"data-v-107ef423",null);u.options.__file="src\\ui-component\\U_yzSupplyCamiloResources\\m\\index.vue";s.default=u.exports}}]);