Commit d02b3bf0 authored by 涂茜's avatar 涂茜

fix: bug

parent af0b05af
Pipeline #27436 failed with stages
in 8 seconds
...@@ -37,7 +37,7 @@ const Demo = () => { ...@@ -37,7 +37,7 @@ const Demo = () => {
checkable checkable
onTreeCheck={onTreeCheck} onTreeCheck={onTreeCheck}
onTreeSelect={onTreeSelect} onTreeSelect={onTreeSelect}
deviceTreeService={getDeviceList} deviceTreeService={dtService.getDeviceList}
serviceParams={ serviceParams={
{ {
// pageIndex: 1, // pageIndex: 1,
......
...@@ -37,6 +37,8 @@ const DeviceTree = (props) => { ...@@ -37,6 +37,8 @@ const DeviceTree = (props) => {
setParams(param); setParams(param);
}, []); }, []);
console.log(deviceTreeService, 'deviceTreeService');
const handleData = (data) => { const handleData = (data) => {
data.forEach((item) => { data.forEach((item) => {
item.title = item.deviceName; item.title = item.deviceName;
...@@ -122,7 +124,6 @@ DeviceTree.defaultProps = { ...@@ -122,7 +124,6 @@ DeviceTree.defaultProps = {
serviceParams: {}, serviceParams: {},
onTreeCheck: () => {}, onTreeCheck: () => {},
onTreeSelect: () => {}, onTreeSelect: () => {},
deviceTreeService: () => {},
}; };
DeviceTree.propTypes = { DeviceTree.propTypes = {
...@@ -131,7 +132,10 @@ DeviceTree.propTypes = { ...@@ -131,7 +132,10 @@ DeviceTree.propTypes = {
serviceParams: PropTypes.object, serviceParams: PropTypes.object,
onTreeCheck: PropTypes.func, onTreeCheck: PropTypes.func,
onTreeSelect: PropTypes.func, onTreeSelect: PropTypes.func,
deviceTreeService: PropTypes.func, deviceTreeService: PropTypes.shape({
then: PropTypes.func.isRequired,
catch: PropTypes.func.isRequired,
}),
}; };
export default DeviceTree; 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