import React from 'react'; import { Button, Icon } from 'antd'; import { WeaTools, WeaLocaleProvider, WeaNewScroll, WeaTree } from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; class MaterialLibLeft extends React.Component { state = { datas: [] }; constructor(props) { super(props); this.onSelect = this.onSelect.bind(this); this.onLoadData = this.onLoadData.bind(this); this.onAdd = this.onAdd.bind(this); this.onEdit = this.onEdit.bind(this); this.onDelete = this.onDelete.bind(this); } componentWillMount() { WeaTools.callApi('/api/portal/materialLib/getDirs', 'GET', {}).then((result) => { this.setState({ datas: result.datas || [] }); }); } render() { const { hasRight } = this.props; const { datas } = this.state; return (