build/static/js/144.cd46041c.chunk.js

1 line
3.6 KiB
JavaScript
Raw Permalink 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.

(this.webpackJsonp=this.webpackJsonp||[]).push([[144],{"6V0J":function(e,t,n){},LMhh:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=m(n("W9HT")),r=m(n("NUBc")),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("04bd"),n("YQTV");var l=n("q1tI"),s=m(l),o=n("eO8H"),u=m(n("vDqi")),c=n("sYIF");n("6V0J");var f=m(n("2CTR"));function m(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.getUsersList()},n.getUsersList=function(e,t){n.setState({isSpin:!0});var a=n.props.match.params,r=a.projectsId,i="/"+a.owner+"/"+r+"/forks.json";u.default.get(i,{params:{page:e,limit:t}}).then((function(e){e&&n.setState({count:e.data.count,users:e.data.users,isSpin:!1})})).catch((function(e){console.log(e)}))},n.ChangePage=function(e){n.setState({page:e,isSpin:!0});var t=n.state.limit;n.getUsersList(e,t)},n.Paginations=function(){var e=n.state,t=e.count,a=e.page,i=e.limit;if(t>i)return s.default.createElement("div",{className:"mt50 mb30 edu-txt-center"},s.default.createElement(r.default,{simple:!0,defaultCurrent:a,total:t,pageSize:i,onChange:n.ChangePage}))},n.renderList=function(e){if(e&&e.length>0)return e.map((function(e,t){return s.default.createElement("div",{className:"w-25 pull-left",key:t},s.default.createElement("div",{className:"pbt25 grid-item mlr10 border-b-line"},s.default.createElement("div",null,s.default.createElement(o.Link,{to:"/"+e.login,className:"show-user-link"},s.default.createElement("img",{className:"avatar-60",src:(0,c.getImageUrl)("/"+e.image_url),alt:""}))),s.default.createElement("div",{className:"ml12"},s.default.createElement("div",null,s.default.createElement(o.Link,{to:"/"+e.login+"/"+e.identifier,className:"font-16 text-primary task-hide max-w-200",style:{display:"block"},title:e.name},e.name)),s.default.createElement("div",{className:"font-12 text-gray grid-item pb5"},s.default.createElement("i",{className:"iconfont icon-shijian user-join-time"}),s.default.createElement("span",{className:"ml4"},"fork时间",e.format_time)))))}))},n.state={users:null,count:0,limit:20,page:1,isSpin:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"render",value:function(){var e=this.state,t=e.users,n=e.isSpin;return s.default.createElement("div",{className:"pbt15"},s.default.createElement("div",{className:"main background-f minH-670",style:{padding:"0px"}},s.default.createElement("div",{className:"user-list-items"},s.default.createElement("div",{className:"font-18 padding10-20 border-b-line"},"Fork列表"),s.default.createElement(a.default,{spinning:n},s.default.createElement("div",{className:"w-100 inline-block",style:{minHeight:"400px"}},t&&0===t.length?s.default.createElement(f.default,{_html:"暂时还没有相关数据!"}):"",this.renderList(t))),this.Paginations())))}}]),t}(l.Component);t.default=d}}]);