Commit ff29ae2e authored by 赵伟庚's avatar 赵伟庚

fix:组织树形交互样式优化

parent f77bdbb5
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
:title="data.name" :title="data.name"
>{{ data.name }} >{{ data.name }}
</span> </span>
<span v-if="data.data_type === 2" class="tree-action-box first_node" :class="{'first_node_focus': selectData && selectData.id === data.id}" @click.stop="showAction($event, data,node)"> <span v-if="data.data_type === 2" class="tree-action-box first_node" :class="{'first_node_focus': selectData && selectData.id === data.id || !selectData}" @click.stop="showAction($event, data,node)">
<bg-icon <bg-icon
class="tree-more" class="tree-more"
icon="#bg-ic-s-more" icon="#bg-ic-s-more"
...@@ -115,10 +115,12 @@ import { useRouter } from 'vue-router'; ...@@ -115,10 +115,12 @@ import { useRouter } from 'vue-router';
if(data) { if(data) {
treeRef.value.setCurrentKey(data,true); treeRef.value.setCurrentKey(data,true);
const curNode = treeRef.value.getCurrentNode(); const curNode = treeRef.value.getCurrentNode();
selectData.value = curNode
emit('select',{data:ref(curNode),type: 'click'}); emit('select',{data:ref(curNode),type: 'click'});
}else { }else {
treeRef.value.setCurrentKey(orgData.value[0].id,true); treeRef.value.setCurrentKey(orgData.value[0].id,true);
const curNode = treeRef.value.getCurrentNode(); const curNode = treeRef.value.getCurrentNode();
selectData.value = curNode
emit('select',{data:ref(curNode),type: 'click'}); emit('select',{data:ref(curNode),type: 'click'});
} }
......
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