Commit 0d341976 by zhaochengxiang

地图优化

parent cdb158dc
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
"react-dnd": "^14.0.2", "react-dnd": "^14.0.2",
"react-dnd-html5-backend": "^14.0.0", "react-dnd-html5-backend": "^14.0.0",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"react-infinite-scroller": "^1.2.4",
"react-redux": "^7.1.0", "react-redux": "^7.1.0",
"react-router-dom": "^5.0.1", "react-router-dom": "^5.0.1",
"react-scripts": "4.0.3", "react-scripts": "4.0.3",
......
...@@ -47,7 +47,7 @@ class Org extends React.Component { ...@@ -47,7 +47,7 @@ class Org extends React.Component {
fill: '#fff', fill: '#fff',
stroke: '#666', stroke: '#666',
radius: 5, radius: 5,
cursor: 'pointer', cursor: (cfg.dbType==='Dir')?'pointer':'default',
}, },
}); });
...@@ -60,7 +60,7 @@ class Org extends React.Component { ...@@ -60,7 +60,7 @@ class Org extends React.Component {
textAlign: 'left', textAlign: 'left',
textBaseline: 'middle', textBaseline: 'middle',
text: (cfg.label||''), text: (cfg.label||''),
cursor: 'pointer', cursor: (cfg.dbType==='Dir')?'pointer':'default',
} }
}); });
......
...@@ -267,7 +267,7 @@ G6.registerNode( ...@@ -267,7 +267,7 @@ G6.registerNode(
fill: colors[cfg.depth % colors.length], fill: colors[cfg.depth % colors.length],
stroke: highlight, stroke: highlight,
lineWidth, lineWidth,
cursor: 'pointer', cursor: (cfg.dbType==='Dir')?'pointer':'default',
}, },
name: 'aggregated-node-keyShape', name: 'aggregated-node-keyShape',
}); });
......
...@@ -35,7 +35,7 @@ class SquareItem extends React.Component { ...@@ -35,7 +35,7 @@ class SquareItem extends React.Component {
return ( return (
<div className='map-square-item'> <div className='map-square-item'>
<Card <Card
hoverable hoverable={item.dbType==='Dir'}
onClick={this.onItemClick} onClick={this.onItemClick}
bordered={false} bordered={false}
className="overflow-hidden" className="overflow-hidden"
......
...@@ -46,7 +46,7 @@ class Tree extends React.Component { ...@@ -46,7 +46,7 @@ class Tree extends React.Component {
fill: '#fff', fill: '#fff',
stroke: '#666', stroke: '#666',
radius: 5, radius: 5,
cursor: 'pointer', cursor: (cfg.dbType==='Dir')?'pointer':'default',
}, },
}); });
...@@ -61,6 +61,7 @@ class Tree extends React.Component { ...@@ -61,6 +61,7 @@ class Tree extends React.Component {
textAlign: 'left', textAlign: 'left',
textBaseline: 'middle', textBaseline: 'middle',
text: content, text: content,
cursor: (cfg.dbType==='Dir')?'pointer':'default',
} }
}); });
...@@ -76,6 +77,7 @@ class Tree extends React.Component { ...@@ -76,6 +77,7 @@ class Tree extends React.Component {
symbol: EXPAND_ICON, symbol: EXPAND_ICON,
stroke: '#73d13d', stroke: '#73d13d',
lineWidth: 2, lineWidth: 2,
cursor: 'pointer'
} }
}); });
} else if ((cfg.children||[]).length>0) { } else if ((cfg.children||[]).length>0) {
...@@ -87,6 +89,7 @@ class Tree extends React.Component { ...@@ -87,6 +89,7 @@ class Tree extends React.Component {
symbol: cfg.collapsed ? EXPAND_ICON : COLLAPSE_ICON, symbol: cfg.collapsed ? EXPAND_ICON : COLLAPSE_ICON,
stroke: cfg.collapsed ? '#73d13d' : '#ff4d4f', stroke: cfg.collapsed ? '#73d13d' : '#ff4d4f',
lineWidth: 2, lineWidth: 2,
cursor: 'pointer',
} }
}); });
} }
......
...@@ -82,7 +82,7 @@ class MapContent extends React.Component { ...@@ -82,7 +82,7 @@ class MapContent extends React.Component {
text: topic.name || '', text: topic.name || '',
dirId: topic.id, dirId: topic.id,
id: `d${topic.id}`, id: `d${topic.id}`,
dbType: 'dir', dbType: 'Dir',
children: (data||[]).length===0 ? null : data children: (data||[]).length===0 ? null : data
}; };
......
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