layui.define(["jquery"],function(h){var a=layui.jquery,l={init:function(o){o.data=o.data||[{name:"暂无数据"}],o.rows=o.rows||1,o.moreUpText=o.moreUpText||"更多",o.moreDownText=o.moreDownText||"收起",o.href=o.href||!1,o.herfBlank=o.herfBlank?"_blank":"_self",o.themeColor=o.themeColor||"green",o.size=o.size?"layui-btn-"+o.size:"layui-btn";var s,r=a(o.elemId),p,c,t=!0,f=!1;r.addClass("box-item-pcc"),o.data.forEach(i=>{p=r.height(),c=a(".item-pcc").outerHeight(!0),o.href?s=''+i.name+"":s=''+i.name+"",p>c*o.rows&&t&&(n(),t=!1),r.append(s)}),p=r.height(),c=a(".item-pcc").outerHeight(!0),p>c*o.rows&&(u(),f=!0),a(document).on("click","#more-pcc",function(){u()});function n(i){if(t){i&&f?r.find("#more-box-pcc").remove():a(".item-pcc").wrapAll("");var e=a(".pack-pcc .item-pcc").eq(-3);e.before(''+o.moreUpText+"")}}function u(){r.height()>c*o.rows?(r.css("height",c*o.rows),n(!0)):(r.css("height","auto"),r.find("#more-box-pcc").remove(),r.append(''+o.moreDownText+""),t=!0)}}},d=a('');a(a("head")[0]).append(d),h("moreMenus",l)});