Skip to content

Commit 628b2d7

Browse files
committed
fix: bug fix
1 parent 59d574d commit 628b2d7

File tree

4 files changed

+95
-11
lines changed

4 files changed

+95
-11
lines changed

frontend/src/style.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ body {
122122
height: 24px !important;
123123
width: 24px !important;
124124
font-size: 16px !important;
125-
border-radius: 4px;
125+
border-radius: 6px;
126126
color: #646a73 !important;
127127

128128
&[aria-expanded='true'] {

frontend/src/views/dashboard/canvas/ComponentBar.vue

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ const doDeleteComponent = (e: MouseEvent) => {
4646
<template>
4747
<div class="component-bar-main" :class="{ 'bar-hidden': !active }">
4848
<div>
49-
<el-dropdown ref="curDropdown" trigger="click" placement="bottom-end">
49+
<el-dropdown
50+
popper-class="bar-main_popper"
51+
ref="curDropdown"
52+
trigger="click"
53+
placement="bottom-end"
54+
>
5055
<el-icon class="bar-more">
5156
<el-tooltip :content="t('dashboard.more')" placement="bottom">
5257
<icon name="icon_more_outlined"><icon_more_outlined class="svg-icon" /></icon>
@@ -106,3 +111,50 @@ const doDeleteComponent = (e: MouseEvent) => {
106111
}
107112
}
108113
</style>
114+
115+
<style lang="less">
116+
.bar-main_popper {
117+
box-shadow: 0px 4px 8px 0px #1f23291a !important;
118+
border-radius: 4px;
119+
border: 1px solid #dee0e3 !important;
120+
width: 120px !important;
121+
min-width: 120px !important;
122+
padding: 0 !important;
123+
124+
.handle-icon {
125+
color: #646a73;
126+
margin-right: 8px;
127+
}
128+
129+
.ed-dropdown-menu__item--divided {
130+
margin: 4px 0;
131+
}
132+
133+
.ed-dropdown-menu__item {
134+
position: relative;
135+
padding-left: 12px;
136+
background: none;
137+
color: #1f2329;
138+
139+
&:focus {
140+
background: none;
141+
color: #1f2329;
142+
}
143+
&:hover {
144+
background: none;
145+
color: #1f2329;
146+
&::after {
147+
content: '';
148+
width: 112px;
149+
height: 32px;
150+
border-radius: 4px;
151+
position: absolute;
152+
top: 50%;
153+
left: 50%;
154+
transform: translate(-50%, -50%);
155+
background: #1f23291a;
156+
}
157+
}
158+
}
159+
}
160+
</style>

frontend/src/views/dashboard/common/HandleMore.vue

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts" setup>
2-
import { Icon } from '@/components/icon-custom'
32
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
43
import type { Placement } from 'element-plus-secondary'
54
@@ -43,18 +42,14 @@ const emit = defineEmits(['handleCommand'])
4342
@command="handleCommand"
4443
>
4544
<el-icon class="hover-icon" :class="inTable && 'hover-icon-in-table'" @click.stop>
46-
<Icon>
47-
<component :is="iconName || icon_more_outlined" class="svg-icon"></component>
48-
</Icon>
45+
<component :is="iconName || icon_more_outlined" class="svg-icon"></component>
4946
</el-icon>
5047
<template #dropdown>
5148
<el-dropdown-menu :persistent="false">
5249
<template v-for="ele in menuList" :key="ele">
5350
<el-dropdown-item :divided="ele.divided" :command="ele.command" :disabled="ele.disabled">
5451
<el-icon v-if="ele.svgName" class="handle-icon" :style="{ fontSize: iconSize }">
55-
<Icon>
56-
<component :is="ele.svgName" class="svg-icon"></component>
57-
</Icon>
52+
<component :is="ele.svgName"></component>
5853
</el-icon>
5954
{{ ele.label }}
6055
</el-dropdown-item>
@@ -66,10 +61,47 @@ const emit = defineEmits(['handleCommand'])
6661

6762
<style lang="less">
6863
.menu-more_popper {
69-
margin-top: -2px !important;
64+
box-shadow: 0px 4px 8px 0px #1f23291a !important;
65+
border-radius: 4px;
66+
border: 1px solid #dee0e3 !important;
67+
width: 120px !important;
68+
min-width: 120px !important;
69+
padding: 0 !important;
7070
7171
.handle-icon {
7272
color: #646a73;
73+
margin-right: 8px;
74+
}
75+
76+
.ed-dropdown-menu__item--divided {
77+
margin: 4px 0;
78+
}
79+
80+
.ed-dropdown-menu__item {
81+
position: relative;
82+
padding-left: 12px;
83+
background: none;
84+
color: #1f2329;
85+
&:focus {
86+
background: none;
87+
color: #1f2329;
88+
}
89+
&:hover {
90+
background: none;
91+
color: #1f2329;
92+
93+
&::after {
94+
content: '';
95+
width: 112px;
96+
height: 32px;
97+
border-radius: 4px;
98+
position: absolute;
99+
top: 50%;
100+
left: 50%;
101+
transform: translate(-50%, -50%);
102+
background: #1f23291a;
103+
}
104+
}
73105
}
74106
}
75107
</style>

frontend/src/views/dashboard/common/ResourceTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ defineExpose({
438438
<HandleMore
439439
:menu-list="state.menuList"
440440
:icon-name="icon_more_outlined"
441-
placement="bottom-start"
441+
placement="bottom-end"
442442
@handle-command="(opt: string) => operation(opt, data)"
443443
></HandleMore>
444444
</div>

0 commit comments

Comments
 (0)