Commit d02b3bf0 authored by 涂茜's avatar 涂茜

fix: bug

parent af0b05af
Pipeline #27436 failed with stages
in 8 seconds
......@@ -37,7 +37,7 @@ const Demo = () => {
checkable
onTreeCheck={onTreeCheck}
onTreeSelect={onTreeSelect}
deviceTreeService={getDeviceList}
deviceTreeService={dtService.getDeviceList}
serviceParams={
{
// pageIndex: 1,
......
......@@ -37,6 +37,8 @@ const DeviceTree = (props) => {
setParams(param);
}, []);
console.log(deviceTreeService, 'deviceTreeService');
const handleData = (data) => {
data.forEach((item) => {
item.title = item.deviceName;
......@@ -122,7 +124,6 @@ DeviceTree.defaultProps = {
serviceParams: {},
onTreeCheck: () => {},
onTreeSelect: () => {},
deviceTreeService: () => {},
};
DeviceTree.propTypes = {
......@@ -131,7 +132,10 @@ DeviceTree.propTypes = {
serviceParams: PropTypes.object,
onTreeCheck: PropTypes.func,
onTreeSelect: PropTypes.func,
deviceTreeService: PropTypes.func,
deviceTreeService: PropTypes.shape({
then: PropTypes.func.isRequired,
catch: PropTypes.func.isRequired,
}),
};
export default DeviceTree;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment