Skip to content

Commit 4374387

Browse files
committed
feat: 样式优化
1 parent e279ae4 commit 4374387

File tree

18 files changed

+295
-205
lines changed

18 files changed

+295
-205
lines changed

frontend/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ yarn-debug.log*
66
yarn-error.log*
77
pnpm-debug.log*
88
lerna-debug.log*
9-
9+
components.d.ts
1010
node_modules
1111
dist
1212
dist-ssr

frontend/auto-imports.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
// biome-ignore lint: disable
77
export {}
88
declare global {
9-
const ElMessage: typeof import('element-plus/es')['ElMessage']
10-
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
9+
const ElMessage: typeof import('element-plus-secondary/es')['ElMessage']
10+
const ElMessageBox: typeof import('element-plus-secondary/es')['ElMessageBox']
1111
}

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"@vue/tsconfig": "^0.7.0",
2525
"axios": "^1.8.4",
2626
"crypto-js": "^4.2.0",
27-
"element-plus": "^2.9.7",
27+
"element-plus-secondary": "^1.0.0",
2828
"less": "^4.3.0",
2929
"pinia": "^3.0.2",
3030
"typescript": "~5.7.2",
3131
"unplugin-auto-import": "^19.1.2",
32-
"unplugin-vue-components": "^28.5.0",
32+
"unplugin-vue-components-secondary": "^0.24.6",
3333
"vite": "^6.3.1",
3434
"vite-plugin-svg-icons": "^2.0.1",
3535
"vite-svg-loader": "^5.1.0",

frontend/src/components/icon-custom/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { h } from 'vue'
2-
import { ElIcon } from 'element-plus'
2+
import { ElIcon } from 'element-plus-secondary'
33
import Icon from './src/Icon.vue'
44
const hIcon = (name: string) => {
55
return h(ElIcon, null, {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div class="single-page_layout">
3+
<router-view />
4+
</div>
5+
</template>
6+
<style lang="less" scoped>
7+
.single-page_layout {
8+
width: 100vw;
9+
height: 100vh;
10+
}
11+
</style>

frontend/src/components/layout/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ onMounted(() => {
225225
overflow: hidden;
226226
.workspace-select {
227227
width: 100% !important;
228-
:deep(.el-select__wrapper) {
228+
:deep(.ed-select__wrapper) {
229229
border-radius: 10px;
230230
box-shadow: none !important;
231231
background-color: #f1f3f4;
232232
line-height: 32px;
233233
min-height: 48px;
234-
.el-select__selected-item {
234+
.ed-select__selected-item {
235235
height: 32px;
236236
}
237237
.workspace-label {
@@ -308,7 +308,7 @@ onMounted(() => {
308308
display: flex;
309309
column-gap: 4px;
310310
align-items: center;
311-
.el-avatar {
311+
.ed-avatar {
312312
background-color: var(--el-color-primary);
313313
color: #fff;
314314
}
@@ -330,7 +330,7 @@ onMounted(() => {
330330
line-height: 54px;
331331
.workspace-select {
332332
width: 100% !important;
333-
:deep(.el-select__wrapper) {
333+
:deep(.ed-select__wrapper) {
334334
border-radius: 10px;
335335
box-shadow: none !important;
336336
background-color: #f1f3f4;
@@ -416,7 +416,7 @@ onMounted(() => {
416416
display: flex;
417417
column-gap: 4px;
418418
align-items: center;
419-
.el-avatar {
419+
.ed-avatar {
420420
background-color: var(--el-color-primary);
421421
color: #fff;
422422
}
@@ -467,7 +467,7 @@ onMounted(() => {
467467
border-right: 1px solid var(--el-menu-border-color);
468468
border-radius: 0;
469469
background-color: var(--white);
470-
:deep(.el-menu) {
470+
:deep(.ed-menu) {
471471
border: none;
472472
}
473473
}

frontend/src/router/index.ts

Lines changed: 76 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,119 @@
1-
import { createRouter, createWebHashHistory } from 'vue-router'
1+
import { createRouter, createWebHashHistory } from "vue-router";
22

3-
import Layout from '@/components/layout/index.vue'
4-
import login from '@/views/login/index.vue'
5-
import chat from '@/views/chat/index.vue'
6-
import ds from '@/views/ds/index.vue'
7-
import DashboardEditor from '@/views/dashboard/editor/index.vue'
8-
import Dashboard from '@/views/dashboard/index.vue'
9-
import setting from '@/views/setting/index.vue'
10-
import { watchRouter } from './watch'
3+
import Layout from "@/components/layout/index.vue";
4+
import SinglePage from "@/components/layout/SinglePage.vue";
5+
import login from "@/views/login/index.vue";
6+
import chat from "@/views/chat/index.vue";
7+
import ds from "@/views/ds/index.vue";
8+
import DashboardEditor from "@/views/dashboard/editor/index.vue";
9+
import Dashboard from "@/views/dashboard/index.vue";
10+
import setting from "@/views/setting/index.vue";
11+
import { watchRouter } from "./watch";
1112
const router = createRouter({
1213
history: createWebHashHistory(),
1314
routes: [
1415
{
15-
path: '/login',
16-
name: 'login',
17-
component: login
16+
path: "/login",
17+
name: "login",
18+
component: login,
1819
},
1920
{
20-
path: '/chat',
21+
path: "/chat",
2122
component: Layout,
22-
redirect: '/chat/index',
23+
redirect: "/chat/index",
2324
children: [
2425
{
25-
path: 'index',
26-
name: 'chat',
26+
path: "index",
27+
name: "chat",
2728
component: chat,
28-
meta: { title: 'Data Q&A', icon: 'chat' }
29-
}
30-
]
29+
meta: { title: "Data Q&A", icon: "chat" },
30+
},
31+
],
32+
},
33+
{
34+
path: "/dsTable",
35+
component: SinglePage,
36+
children: [
37+
{
38+
path: ":dsId/:dsName",
39+
name: "dsTable",
40+
component: () => import("@/views/ds/TableList.vue"),
41+
props: true,
42+
},
43+
],
3144
},
3245
{
33-
path: '/ds',
46+
path: "/ds",
3447
component: Layout,
35-
redirect: '/ds/index',
48+
redirect: "/ds/index",
3649
children: [
3750
{
38-
path: 'index',
39-
name: 'ds',
51+
path: "index",
52+
name: "ds",
4053
component: ds,
41-
meta: { title: 'Data Connections', icon: 'ds' }
54+
meta: { title: "Data Connections", icon: "ds" },
4255
},
43-
{
44-
path: 'dsTable/:dsId/:dsName',
45-
name: 'dsTable',
46-
component: () => import('@/views/ds/TableList.vue'),
47-
props: true
48-
}
49-
]
56+
],
5057
},
5158
{
52-
path: '/dashboard',
59+
path: "/dashboard",
5360
component: Layout,
54-
redirect: '/dashboard/index',
61+
redirect: "/dashboard/index",
5562
children: [
5663
{
57-
path: 'index',
58-
name: 'dashboard',
64+
path: "index",
65+
name: "dashboard",
5966
component: Dashboard,
60-
meta: { title: 'Dashboard', icon: 'dashboard' }
61-
}
62-
]
67+
meta: { title: "Dashboard", icon: "dashboard" },
68+
},
69+
],
6370
},
6471
{
65-
path: '/dashboard-edit',
66-
redirect: '/dashboard-edit/index',
72+
path: "/dashboard-edit",
73+
redirect: "/dashboard-edit/index",
6774
component: Layout,
6875
children: [
6976
{
70-
path: 'index',
71-
name: 'dashboard-edit',
77+
path: "index",
78+
name: "dashboard-edit",
7279
component: DashboardEditor,
73-
meta: { title: 'dashboard-edit', icon: 'dashboard' }
74-
}
75-
]
80+
meta: { title: "dashboard-edit", icon: "dashboard" },
81+
},
82+
],
7683
},
7784
{
78-
path: '/setting',
85+
path: "/setting",
7986
component: Layout,
80-
redirect: '/setting/index',
87+
redirect: "/setting/index",
8188
children: [
8289
{
83-
path: 'index',
84-
name: 'setting',
90+
path: "index",
91+
name: "setting",
8592
component: setting,
86-
meta: { title: 'Settings', icon: 'setting' }
87-
}
88-
]
93+
meta: { title: "Settings", icon: "setting" },
94+
},
95+
],
8996
},
9097
{
91-
path: '/system',
98+
path: "/system",
9299
component: Layout,
93-
redirect: '/system/user',
100+
redirect: "/system/user",
94101
children: [
95102
{
96-
path: 'user',
97-
name: 'user',
98-
component: () => import('@/views/system/user/index.vue'),
99-
meta: { title: 'User Management', icon: 'icon_user' }
103+
path: "user",
104+
name: "user",
105+
component: () => import("@/views/system/user/index.vue"),
106+
meta: { title: "User Management", icon: "icon_user" },
100107
},
101108
{
102-
path: 'model',
103-
name: 'model',
104-
component: () => import('@/views/system/model/index.vue'),
105-
meta: { title: 'AI Model Configuration', icon: 'icon_ai' }
106-
}
107-
]
108-
}
109-
]
110-
})
111-
watchRouter(router)
112-
export default router
109+
path: "model",
110+
name: "model",
111+
component: () => import("@/views/system/model/index.vue"),
112+
meta: { title: "AI Model Configuration", icon: "icon_ai" },
113+
},
114+
],
115+
},
116+
],
117+
});
118+
watchRouter(router);
119+
export default router;

frontend/src/router/watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ElMessage } from 'element-plus'
1+
import { ElMessage } from 'element-plus-secondary'
22
import { useCache } from '@/utils/useCache'
33
const { wsCache } = useCache()
44
const whiteList = ['/login']

frontend/src/views/dashboard/components/sq-tab/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const isEditMode = computed(() => true)
160160
</template>
161161

162162
<style scoped lang="less">
163-
.el-dropdown-link{
163+
.ed-dropdown-link{
164164
margin-top: 3px !important;
165165
}
166166

0 commit comments

Comments
 (0)