fix error
This commit is contained in:
parent
e5bf72435c
commit
efdc7e01c2
@ -89,6 +89,7 @@ class LocStatus extends React.Component{
|
||||
|
||||
render (){
|
||||
let {i18n} = this.props;
|
||||
console.log(this.state.list);
|
||||
return (
|
||||
<Container fluid>
|
||||
<Segment className="clearfix">
|
||||
|
@ -7,10 +7,11 @@
|
||||
* @return {string}
|
||||
*/
|
||||
export const padding = (str, lng = 0, arrow = -1, txt = '0') => {
|
||||
if(typeof str != 'string') str = str.toString();
|
||||
if(typeof txt != 'string') txt = txt.toString();
|
||||
if(!isFinite(lng) || lng <= 0) return str;
|
||||
if(str.length < lng) return padding(arrow < 0 ? `${txt}${str}` : `${str}${txt}`, lng, arrow, txt);
|
||||
if (!str) str = '';
|
||||
if (typeof str != 'string') str = str.toString();
|
||||
if (typeof txt != 'string') txt = txt.toString();
|
||||
if (!isFinite(lng) || lng <= 0) return str;
|
||||
if (str.length < lng) return padding(arrow < 0 ? `${txt}${str}` : `${str}${txt}`, lng, arrow, txt);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user