|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <ElTree class="hc-tree-node tree-line" ref="ElTreeRef" :props="ElTreeProps" :data="datas" highlight-current accordion node-key="primaryKeyId"
|
|
|
+ <ElTree class="hc-tree-node tree-line el-radio-group" ref="ElTreeRef" :props="ElTreeProps" :data="datas" highlight-current accordion node-key="primaryKeyId"
|
|
|
:default-expanded-keys="TreeExpandKey" @node-click="ElTreeClick" @node-contextmenu="ElTreeLabelContextMenu" :indent="0" :filter-node-method="filterNode">
|
|
|
<template #default="{ node, data }">
|
|
|
<div class="data-custom-tree-node" :id="`${idPrefix}${data['primaryKeyId']}`">
|
|
@@ -10,7 +10,7 @@
|
|
|
</div>
|
|
|
<div class="text-blue submit-counts" v-if="isSubmitCounts">【{{ data.submitCounts ?? 0 }}】</div>
|
|
|
<!--树组件,操作菜单-->
|
|
|
- <div class="menu-icon" :class="node.showTreeMenu?'show':''" v-if="node.level !== 1 && menusData.length > 0" @click.stop>
|
|
|
+ <div class="menu-icon1" :class="node.showTreeMenu?'show':''" v-if="node.level !== 1 && menusData.length > 0" @click.stop>
|
|
|
<div class="cu-tree-node-popover-menu-icon" @click.prevent.stop="ElTreeLabelContextMenu($event,data,node)">
|
|
|
<HcIcon name="menu" ui="text-2xl"/>
|
|
|
</div>
|
|
@@ -229,30 +229,64 @@ defineExpose({
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import "../../../styles/app/tree.scss";
|
|
|
+.el-radio-group {
|
|
|
+ width: auto;
|
|
|
+
|
|
|
+}
|
|
|
+// .data-custom-tree-node {
|
|
|
+// .menu-icon {
|
|
|
+// position: relative;
|
|
|
+// font-size: 20px;
|
|
|
+// opacity: 0;
|
|
|
+// pointer-events: none;
|
|
|
+// transition: opacity 0.2s;
|
|
|
+// .cu-tree-node-popover-menu-icon {
|
|
|
+// display: flex;
|
|
|
+// align-items: center;
|
|
|
+// justify-content: center;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// &:hover {
|
|
|
+// .menu-icon {
|
|
|
+// opacity: 1;
|
|
|
+// pointer-events: all;
|
|
|
+// cursor: context-menu;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// .menu-icon.show {
|
|
|
+// opacity: 1;
|
|
|
+// pointer-events: all;
|
|
|
+// cursor: context-menu;
|
|
|
+// }
|
|
|
+// }
|
|
|
.data-custom-tree-node {
|
|
|
- .menu-icon {
|
|
|
- position: relative;
|
|
|
- font-size: 20px;
|
|
|
- opacity: 0;
|
|
|
- pointer-events: none;
|
|
|
- transition: opacity 0.2s;
|
|
|
+ .menu-icon1 {
|
|
|
+ // position: absolute;
|
|
|
+ vertical-align: bottom;
|
|
|
+ display:inline-block;
|
|
|
+ pointer-events: none;
|
|
|
+ transition: opacity 0.2s;
|
|
|
+ opacity: 0;
|
|
|
+ // right: 0;
|
|
|
+ background: rgba(255, 255, 255, 0.25);
|
|
|
+ border-radius: 2px;
|
|
|
.cu-tree-node-popover-menu-icon {
|
|
|
- display: flex;
|
|
|
+ display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
&:hover {
|
|
|
- .menu-icon {
|
|
|
+ .menu-icon1 {
|
|
|
+ opacity: 1;
|
|
|
+ pointer-events: all;
|
|
|
+ cursor: context-menu;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .menu-icon1.show {
|
|
|
opacity: 1;
|
|
|
pointer-events: all;
|
|
|
cursor: context-menu;
|
|
|
}
|
|
|
- }
|
|
|
- .menu-icon.show {
|
|
|
- opacity: 1;
|
|
|
- pointer-events: all;
|
|
|
- cursor: context-menu;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|