Skip to content

Commit 8101a36

Browse files
authored
更新面包屑导航和修复SourceDialog一些问题
1 parent a585314 commit 8101a36

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<template>
2+
<a-breadcrumb :style="{ margin: '16px 0' }">
3+
<a-breadcrumb-item>{{ navigation_title }}</a-breadcrumb-item>
4+
5+
<div class="header-left">
6+
<a-button type="outline" status="success" shape="round" @click="handleOpenForm">
7+
<template #icon>
8+
<icon-apps />
9+
</template>
10+
<template #default>{{ now_site_title }}</template>
11+
</a-button>
12+
13+
<a-button type="outline" status="success" shape="round" @click="refreshPage">
14+
<template #icon>
15+
<icon-refresh />
16+
</template>
17+
<template #default>重载源</template>
18+
</a-button>
19+
</div>
20+
21+
<!-- 中间搜索框 -->
22+
<div class="header-center">
23+
<a-input-search
24+
placeholder="搜索视频"
25+
enter-button
26+
@search="onSearch"
27+
style="width: 300px"
28+
/>
29+
</div>
30+
31+
<!-- 右侧控制按钮 -->
32+
<div class="header-right">
33+
<a-button type="outline" status="success" shape="round" @click="minimize">
34+
<template #icon>
35+
<icon-bug />
36+
</template>
37+
<template #default>调试</template>
38+
</a-button>
39+
40+
<a-button type="outline" status="success" shape="round" @click="maximize">
41+
<template #icon>
42+
<icon-settings />
43+
</template>
44+
<template #default>设置</template>
45+
</a-button>
46+
<a-button type="outline" status="success" shape="round" @click="closeWindow">
47+
<template #icon>
48+
<icon-user />
49+
</template>
50+
<template #default>用户设置</template>
51+
</a-button>
52+
53+
<slot name="default"></slot>
54+
</div>
55+
</a-breadcrumb>
56+
</template>
57+
58+
<script setup>
59+
const props = defineProps({
60+
navigation_title: String,
61+
now_site_title: String,
62+
});
63+
const emit = defineEmits([
64+
"handleOpenForm",
65+
"closeWindow",
66+
"maximize",
67+
"minimize",
68+
"refreshPage",
69+
"onSearch",
70+
]);
71+
72+
const handleOpenForm = () => {
73+
emit("handleOpenForm");
74+
};
75+
const refreshPage = () => {
76+
emit("refreshPage");
77+
};
78+
const onSearch = (value) => {
79+
emit("onSearch", value);
80+
};
81+
82+
const closeWindow = () => {
83+
emit("closeWindow");
84+
};
85+
const minimize = () => {
86+
emit("minimize");
87+
};
88+
const maximize = () => {
89+
emit("maximize");
90+
};
91+
</script>
92+
93+
<style scoped>
94+
.header-left,
95+
.header-right {
96+
display: flex;
97+
align-items: center;
98+
}
99+
100+
.header-left button,
101+
.header-right button {
102+
margin-right: 10px;
103+
}
104+
105+
.header-center {
106+
flex-grow: 1;
107+
display: flex;
108+
justify-content: center;
109+
}
110+
111+
.header-center a-input-search {
112+
width: 300px;
113+
}
114+
</style>

dashboard/src/components/SourceDialog.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:width="dialogWidth"
66
class="change_rule_dialog"
77
append-to-body
8+
:on-before-cancel="handleConfirmClear"
89
>
910
<a-input
1011
v-model="siteFilter"
@@ -128,9 +129,13 @@ const handleConfirmChange = () => {
128129
display: flex;
129130
flex-wrap: wrap;
130131
}
132+
/* .btn-item:nth-child(8) {
133+
margin-right: 0;
134+
} */
131135
.btn-item {
132136
text-align: center;
133137
width: calc(31.3%);
134138
padding: 2px;
135139
}
140+
.btn-item button {width: 100%;}
136141
</style>

0 commit comments

Comments
 (0)