1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[198],{"6V0J":function(e,t,a){},LMhh:function(e,t,a){"use strict";a.r(t);var n=a("yQr1"),i=a.n(n),r=(a("T2oS"),a("W9HT")),s=(a("DjyN"),a("NUBc")),c=a("06Pm"),l=a.n(c),o=a("kA7L"),m=a.n(o),u=a("3SUL"),p=a.n(u),d=a("eYnF"),f=a.n(d),g=a("hO3g"),v=a.n(g),h=a("X5/F"),E=a.n(h),N=a("04Ix"),b=a.n(N),k=a("o+MX"),y=a.n(k),S=a("FLGM"),L=a.n(S),j=a("cDcd"),w=a.n(j),x=a("2iEm"),C=a("vDqi"),D=a.n(C),F=a("sYIF"),T=(a("6V0J"),a("2CTR"));var U=function(e){function t(e){var a;return l()(this,t),a=function(e,t,a){return t=f()(t),p()(e,function(){try{var e=!Boolean.prototype.valueOf.call(i()(Boolean,[],(function(){})))}catch(e){}return!!e}()?i()(t,a||[],f()(e).constructor):t.apply(e,a))}(this,t,[e]),b()(v()(a),"componentDidMount",(function(){a.getUsersList(),a.updateTitle()})),b()(v()(a),"componentDidUpdate",(function(){a.updateTitle()})),b()(v()(a),"updateTitle",(function(){var e=a.props.projectDetail;if(e){var t,n=e.author,i=e.name;document.title=y()(t="Fork用户-".concat(n.name,"/")).call(t,i)}})),b()(v()(a),"getUsersList",(function(e,t){var n;a.setState({isSpin:!0});var i=a.props.match.params,r=i.projectsId,s=i.owner,c=y()(n="/".concat(s,"/")).call(n,r,"/forks.json");D.a.get(c,{params:{page:e,limit:t}}).then((function(e){e&&a.setState({count:e.data.count,users:e.data.users,isSpin:!1})})).catch((function(e){}))})),b()(v()(a),"ChangePage",(function(e){a.setState({page:e,isSpin:!0});var t=a.state.limit;a.getUsersList(e,t)})),b()(v()(a),"Paginations",(function(){var e=a.state,t=e.count,n=e.page,i=e.limit;if(t>i)return w.a.createElement("div",{className:"mt50 mb30 edu-txt-center"},w.a.createElement(s.a,{simple:!0,defaultCurrent:n,total:t,pageSize:i,onChange:a.ChangePage}))})),b()(v()(a),"renderList",(function(e){if(e&&e.length>0)return L()(e).call(e,(function(e,t){var a;return w.a.createElement("div",{className:"w-25 pull-left",key:t},w.a.createElement("div",{className:"pbt25 grid-item mlr10 border-b-line"},w.a.createElement("div",null,w.a.createElement(x.a,{to:"/".concat(e.login),className:"show-user-link"},w.a.createElement("img",{className:"avatar-60",src:Object(F.i)("/".concat(e.image_url)),alt:""}))),w.a.createElement("div",{className:"ml12"},w.a.createElement("div",null,w.a.createElement(x.a,{to:y()(a="/".concat(e.login,"/")).call(a,e.identifier),className:"font-16 text-primary task-hide max-w-200",style:{display:"block"},title:e.name},e.name)),w.a.createElement("div",{className:"font-12 text-gray grid-item pb5"},w.a.createElement("i",{className:"iconfont icon-shijian user-join-time"}),w.a.createElement("span",{className:"ml4"},"fork时间:",e.format_time)))))}))})),a.state={users:null,count:0,limit:20,page:1,isSpin:!1},a}return E()(t,e),m()(t,[{key:"render",value:function(){var e=this.state,t=e.users,a=e.isSpin;return w.a.createElement("div",{className:"pbt15"},w.a.createElement("div",{className:"main background-f minH-670",style:{padding:"0px"}},w.a.createElement("div",{className:"user-list-items"},w.a.createElement("div",{className:"font-18 padding10-20 border-b-line"},"Fork列表"),w.a.createElement(r.a,{spinning:a},w.a.createElement("div",{className:"w-100 inline-block",style:{minHeight:"400px"}},t&&0===t.length?w.a.createElement(T.a,{_html:"暂时还没有相关数据!"}):"",this.renderList(t))),this.Paginations())))}}]),t}(j.Component);t.default=U}}]); |