import * as React from 'react'; import './index.scss'; import ViewMore from '../common/viewMore' import Header from '../common/header' import { getApiUrl,taker } from '&/helper' import NodataView from '&/components/common/noDataView' import VacationItem from './VacationItem' interface State{ data:any } export default class MobileVacationBalance extends React.Component<{},{}>{ state:State refs:any async componentWillMount(){ this.state={ data:[] } const url = `${getApiUrl('proxy/attendance/vacationRemainDetailV2')}`; taker(url).then((response)=>{ const data =JSON.parse(response.param) this.setState({data:data}); }); this.setState({data:[]}); } componentDidMount(){ this.refs.wrap.parentElement.style.padding = ''; this.refs.wrap.parentElement.style.margin = '0px 10px'; } render(){ const { data } = this.state; const trueData = data?data.slice(0,3):[]; return