Commit b91fe379 authored by 单奇雲's avatar 单奇雲

优化代码

parent f0de9c50
......@@ -20,7 +20,7 @@ class PlanTreeView extends Component {
componentDidMount() {
this.getPlanTree();
let viewSideDiv = document.getElementsByClassName('aaa')[0];
let viewSideDiv = document.getElementsByClassName('plan-tree')[0];
viewSideDiv && viewSideDiv.addEventListener('click', this.props.onRightCancel);
}
......@@ -134,7 +134,7 @@ class PlanTreeView extends Component {
let { expandedKeys, selectedKeys, treeData,autoExpandParent } = this.state;
let { activeKey, onRightClick } = this.props;
return (
<div className='aaa'>
<div className='plan-tree'>
<Tree
showIcon
expandedKeys={expandedKeys}
......
......@@ -138,12 +138,11 @@ class PublishView extends Component {
});
}
}
/////////////////////////////////////////////////////
// tree列表上右键事件
onRightClick = e => {
let { activeKey } = this.state;
if( activeKey === 'textPlan'){//文本预案添加发布,导出功能
if( activeKey === 'textPlan' && e.node.props.type === 'textNode'){//文本预案添加发布,导出功能 并为文本
console.log("asdfasdfasdf")
this.setState({
rightClickNodeTreeItem: {
......@@ -254,8 +253,6 @@ class PublishView extends Component {
});
}
////////////////////////////////////////////
render() {
const { activeKey,visible,animateDelay,shareVisible } = this.state;
const animateProps = {
......
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