Skip to content

Commit 82274fe

Browse files
fix: Page style optimization
1 parent 826858d commit 82274fe

File tree

26 files changed

+202
-302
lines changed

26 files changed

+202
-302
lines changed
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading

ui/src/components/dropdown_menu/application/NodeContent.vue

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,5 @@ watch([() => filterText.value, () => props.list], () => {
100100
</script>
101101

102102
<style lang="scss" scoped>
103-
.list {
104-
cursor: default;
105-
padding: 12px;
106-
gap: 12px;
107-
box-sizing: border-box;
108103
109-
.list-item {
110-
background-color: #ffffff;
111-
box-sizing: border-box;
112-
113-
&:hover {
114-
border-color: var(--el-color-primary);
115-
}
116-
}
117-
118-
.el-empty {
119-
margin: 0 auto;
120-
}
121-
}
122104
</style>

ui/src/components/dropdown_menu/application/index.vue

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -310,39 +310,5 @@ async function handleClick(val: string) {
310310
onMounted(() => {})
311311
</script>
312312
<style lang="scss" scoped>
313-
.workflow-dropdown-menu {
314-
-moz-user-select: none; /* Firefox */
315-
-webkit-user-select: none; /* WebKit内核 */
316-
-ms-user-select: none; /* IE10及以后 */
317-
-khtml-user-select: none; /* 早期浏览器 */
318-
-o-user-select: none; /* Opera */
319-
user-select: none; /* CSS3属性 */
320-
position: absolute;
321-
top: 49px;
322-
right: 16px;
323-
z-index: 99;
324-
width: 600px;
325-
box-shadow: 0px 4px 8px 0px var(--app-text-color-light-1);
326-
padding-bottom: 8px;
327313
328-
.title {
329-
padding: 12px 12px 4px;
330-
}
331-
.workflow-dropdown-item {
332-
&:hover {
333-
background: var(--app-text-color-light-1);
334-
}
335-
}
336-
337-
.list-item {
338-
box-sizing: border-box;
339-
&:hover {
340-
border-color: var(--el-color-primary);
341-
}
342-
}
343-
344-
:deep(.el-tabs__header) {
345-
margin-bottom: 0;
346-
}
347-
}
348314
</style>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.workflow-dropdown-menu {
2+
-moz-user-select: none; /* Firefox */
3+
-webkit-user-select: none; /* WebKit内核 */
4+
-ms-user-select: none; /* IE10及以后 */
5+
-khtml-user-select: none; /* 早期浏览器 */
6+
-o-user-select: none; /* Opera */
7+
user-select: none; /* CSS3属性 */
8+
position: absolute;
9+
top: 49px;
10+
right: 16px;
11+
z-index: 99;
12+
width: 600px;
13+
box-shadow: 0px 4px 8px 0px var(--app-text-color-light-1);
14+
padding-bottom: 8px;
15+
16+
.title {
17+
padding: 12px 12px 4px;
18+
}
19+
.workflow-dropdown-item {
20+
&:hover {
21+
background: var(--app-text-color-light-1);
22+
}
23+
}
24+
25+
.list-item {
26+
box-sizing: border-box;
27+
&:hover {
28+
border-color: var(--el-color-primary);
29+
}
30+
}
31+
32+
.el-tabs__header {
33+
margin-bottom: 0;
34+
}
35+
.list {
36+
cursor: default;
37+
padding: 12px;
38+
gap: 12px;
39+
box-sizing: border-box;
40+
41+
.el-empty {
42+
margin: 0 auto;
43+
}
44+
}
45+
}

ui/src/components/dropdown_menu/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ const kw: any = {
2323
[WorkflowMode.Knowledge]: KnowledgeDropdownMenu,
2424
}
2525
</script>
26-
<style lang="scss" scoped></style>
26+
<style lang="scss">
27+
@use './index.scss';
28+
</style>

ui/src/components/dropdown_menu/knowledge/NodeContent.vue

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
>
3131
<img :src="resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt="" />
3232
</el-avatar>
33-
<el-avatar v-else class="avatar-green" shape="square" :size="20">
34-
<img src="@/assets/tool/icon_tool.svg" style="width: 58%" alt="" />
35-
</el-avatar>
33+
<ToolIcon v-else :size="20" :type="item?.tool_type" />
3634
<span class="ml-8 ellipsis" :title="item.name">{{ item.name }}</span>
3735
</div>
3836
</template>
@@ -48,19 +46,9 @@
4846
>
4947
<img :src="resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt="" />
5048
</el-avatar>
51-
<el-avatar v-else class="avatar-green" shape="square" :size="20">
52-
<img src="@/assets/tool/icon_tool.svg" style="width: 58%" alt="" />
53-
</el-avatar>
49+
<ToolIcon v-else :size="20" :type="item?.tool_type" />
5450
<span class="font-medium ml-8 break-all" :title="item.name">{{ item.name }}</span>
5551
</div>
56-
<div v-if="item.type" class="status-tag" style="margin-left: auto">
57-
<el-tag class="warning-tag" v-if="isWorkFlow(item.type)">
58-
{{ $t('views.application.workflow') }}
59-
</el-tag>
60-
<el-tag class="blue-tag" v-else>
61-
{{ $t('views.application.simple') }}
62-
</el-tag>
63-
</div>
6452
</div>
6553
<el-text type="info" size="small" class="mt-4">{{ item.desc }}</el-text>
6654
</template>
@@ -73,7 +61,6 @@
7361
<script setup lang="ts">
7462
import { watch, ref } from 'vue'
7563
import { isAppIcon, resetUrl } from '@/utils/common'
76-
import { isWorkFlow } from '@/utils/application'
7764
7865
const props = defineProps<{
7966
list: any[]
@@ -99,24 +86,4 @@ watch([() => filterText.value, () => props.list], () => {
9986
})
10087
</script>
10188

102-
<style lang="scss" scoped>
103-
.list {
104-
cursor: default;
105-
padding: 12px;
106-
gap: 12px;
107-
box-sizing: border-box;
108-
109-
.list-item {
110-
background-color: #ffffff;
111-
box-sizing: border-box;
112-
113-
&:hover {
114-
border-color: var(--el-color-primary);
115-
}
116-
}
117-
118-
.el-empty {
119-
margin: 0 auto;
120-
}
121-
}
122-
</style>
89+
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)