befly-admin 3.4.37 → 3.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.development +2 -2
- package/.env.production +2 -2
- package/package.json +10 -9
- package/src/App.vue +12 -5
- package/src/layouts/default.vue +67 -57
- package/src/main.js +38 -0
- package/src/plugins/http.js +13 -5
- package/src/styles/global.scss +139 -37
- package/src/types/auto-imports.d.ts +0 -2
- package/src/types/components.d.ts +15 -0
- package/src/types/typed-router.d.ts +26 -0
- package/src/views/index2.vue +448 -0
- package/src/views/index3.vue +707 -0
- package/vite.config.js +5 -2
- package/src/styles/variables.scss +0 -75
- package/src/views/index.vue +0 -18
package/.env.development
CHANGED
package/.env.production
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-admin",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.38",
|
|
4
4
|
"description": "Befly Admin - 基于 Vue3 + OpenTiny Vue 的后台管理系统",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -27,21 +27,22 @@
|
|
|
27
27
|
"sync:admin": "bunx befly sync:admin"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@befly-addon/admin": "1.0.
|
|
30
|
+
"@befly-addon/admin": "1.0.38",
|
|
31
|
+
"@iconify-json/lucide": "^1.2.72",
|
|
31
32
|
"axios": "^1.13.2",
|
|
33
|
+
"befly-util": "0.1.1",
|
|
34
|
+
"befly-vite": "1.0.3",
|
|
35
|
+
"echarts": "^6.0.0",
|
|
32
36
|
"pinia": "^3.0.4",
|
|
33
37
|
"tdesign-vue-next": "^1.10.6",
|
|
38
|
+
"vite": "^7.2.2",
|
|
34
39
|
"vue": "^3.5.22",
|
|
35
40
|
"vue-router": "^4.6.3"
|
|
36
41
|
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@iconify-json/lucide": "^1.2.72",
|
|
39
|
-
"befly-vite": "1.0.2",
|
|
40
|
-
"vite": "^7.2.2"
|
|
41
|
-
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=24.0.0",
|
|
44
|
-
"pnpm": ">=10.0.0"
|
|
44
|
+
"pnpm": ">=10.0.0",
|
|
45
|
+
"bun": ">=1.3.0"
|
|
45
46
|
},
|
|
46
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "afb329b2cce2ab5f5821d8515ae7dba4622a4f1f"
|
|
47
48
|
}
|
package/src/App.vue
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
2
|
+
<ConfigProvider :global-config="globalConfig">
|
|
3
|
+
<div id="app">
|
|
4
|
+
<RouterView />
|
|
5
|
+
</div>
|
|
6
|
+
</ConfigProvider>
|
|
5
7
|
</template>
|
|
6
8
|
|
|
7
9
|
<script setup>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
import { ConfigProvider } from 'tdesign-vue-next';
|
|
11
|
+
|
|
12
|
+
const globalConfig = {
|
|
13
|
+
dialog: {
|
|
14
|
+
closeOnOverlayClick: false
|
|
15
|
+
}
|
|
16
|
+
};
|
|
10
17
|
</script>
|
|
11
18
|
|
|
12
19
|
<style scoped>
|
package/src/layouts/default.vue
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
<span class="user-name">{{ $Data.userInfo.nickname || '管理员' }}</span>
|
|
12
12
|
<t-tag theme="primary" size="small" variant="light">{{ $Data.userInfo.role || '超级管理员' }}</t-tag>
|
|
13
13
|
</div>
|
|
14
|
-
<t-button
|
|
14
|
+
<t-button class="logout-btn" theme="danger" shape="square" @click="$Method.handleLogout">
|
|
15
15
|
<template #icon>
|
|
16
|
-
<i-lucide:
|
|
16
|
+
<i-lucide:log-out style="color: #fff" />
|
|
17
17
|
</template>
|
|
18
18
|
</t-button>
|
|
19
19
|
</div>
|
|
@@ -22,24 +22,24 @@
|
|
|
22
22
|
|
|
23
23
|
<!-- 菜单栏 -->
|
|
24
24
|
<div class="layout-menu">
|
|
25
|
-
<t-menu :value="$Data.currentMenuKey" :expanded="$Data.expandedKeys" style="height: 100%" @change="$Method.onMenuClick"
|
|
25
|
+
<t-menu v-model:value="$Data.currentMenuKey" v-model:expanded="$Data.expandedKeys" style="height: 100%" @change="$Method.onMenuClick">
|
|
26
26
|
<template v-for="menu in $Data.userMenus" :key="menu.id">
|
|
27
27
|
<!-- 无子菜单 -->
|
|
28
28
|
<t-menu-item v-if="!menu.children || menu.children.length === 0" :value="menu.path">
|
|
29
29
|
<template #icon>
|
|
30
|
-
<i-lucide:home v-if="menu.path === '/addon/admin/'" />
|
|
31
|
-
<i-lucide:file-text v-else />
|
|
30
|
+
<i-lucide:home v-if="menu.path === '/addon/admin/'" style="margin-right: 8px" />
|
|
31
|
+
<i-lucide:file-text v-else style="margin-right: 8px" />
|
|
32
32
|
</template>
|
|
33
33
|
{{ menu.name }}
|
|
34
34
|
</t-menu-item>
|
|
35
35
|
<!-- 有子菜单 -->
|
|
36
36
|
<t-submenu v-else :value="String(menu.id)" :title="menu.name">
|
|
37
37
|
<template #icon>
|
|
38
|
-
<i-lucide:folder />
|
|
38
|
+
<i-lucide:folder style="margin-right: 8px" />
|
|
39
39
|
</template>
|
|
40
40
|
<t-menu-item v-for="child in menu.children" :key="child.id" :value="child.path">
|
|
41
41
|
<template #icon>
|
|
42
|
-
<i-lucide:file-text />
|
|
42
|
+
<i-lucide:file-text style="margin-right: 8px" />
|
|
43
43
|
</template>
|
|
44
44
|
{{ child.name }}
|
|
45
45
|
</t-menu-item>
|
|
@@ -49,14 +49,19 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
51
|
<!-- 内容区域 -->
|
|
52
|
-
<div class="layout-
|
|
52
|
+
<div class="layout-content">
|
|
53
53
|
<RouterView />
|
|
54
54
|
</div>
|
|
55
|
+
|
|
56
|
+
<!-- 底部分页栏 -->
|
|
57
|
+
<div class="layout-footer">
|
|
58
|
+
<span>© 2024 Befly. All rights reserved.</span>
|
|
59
|
+
</div>
|
|
55
60
|
</div>
|
|
56
61
|
</template>
|
|
57
62
|
|
|
58
63
|
<script setup>
|
|
59
|
-
import { arrayToTree } from '
|
|
64
|
+
import { arrayToTree } from 'befly-util/arrayToTree';
|
|
60
65
|
|
|
61
66
|
const router = useRouter();
|
|
62
67
|
const route = useRoute();
|
|
@@ -119,11 +124,9 @@ const $Method = {
|
|
|
119
124
|
}
|
|
120
125
|
}
|
|
121
126
|
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
$Data.currentMenuKey = currentPath;
|
|
126
|
-
});
|
|
127
|
+
// 设置展开的父级和当前激活的菜单
|
|
128
|
+
$Data.expandedKeys = expandedKeys;
|
|
129
|
+
$Data.currentMenuKey = currentPath;
|
|
127
130
|
},
|
|
128
131
|
|
|
129
132
|
// 处理菜单点击
|
|
@@ -152,31 +155,26 @@ $Method.fetchUserMenus();
|
|
|
152
155
|
|
|
153
156
|
<style scoped lang="scss">
|
|
154
157
|
.layout-0-wrapper {
|
|
155
|
-
$menu-width: 240px;
|
|
156
|
-
$head-height: 64px;
|
|
157
|
-
$gap: 16px;
|
|
158
158
|
position: absolute;
|
|
159
159
|
top: 0;
|
|
160
160
|
left: 0;
|
|
161
161
|
height: 100vh;
|
|
162
162
|
width: 100vw;
|
|
163
|
-
background:
|
|
163
|
+
background: var(--bg-color-page);
|
|
164
164
|
overflow: hidden;
|
|
165
165
|
|
|
166
166
|
.layout-header {
|
|
167
167
|
position: absolute;
|
|
168
|
-
top:
|
|
169
|
-
left:
|
|
170
|
-
right:
|
|
171
|
-
height:
|
|
168
|
+
top: 0;
|
|
169
|
+
left: 0;
|
|
170
|
+
right: 0;
|
|
171
|
+
height: var(--header-height);
|
|
172
172
|
display: flex;
|
|
173
173
|
align-items: center;
|
|
174
174
|
justify-content: space-between;
|
|
175
|
-
padding: 0
|
|
176
|
-
background:
|
|
177
|
-
border-
|
|
178
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
179
|
-
border: 1px solid #e8eaed;
|
|
175
|
+
padding: 0 var(--spacing-md) 0 var(--spacing-lg);
|
|
176
|
+
background: var(--bg-color-page);
|
|
177
|
+
border-bottom: 1px solid var(--border-color);
|
|
180
178
|
z-index: 100;
|
|
181
179
|
|
|
182
180
|
.logo {
|
|
@@ -184,30 +182,23 @@ $Method.fetchUserMenus();
|
|
|
184
182
|
margin: 0;
|
|
185
183
|
font-size: 22px;
|
|
186
184
|
font-weight: 700;
|
|
187
|
-
color:
|
|
185
|
+
color: var(--text-primary);
|
|
188
186
|
letter-spacing: 0.5px;
|
|
189
|
-
background: linear-gradient(135deg, #0052d9 0%, #0084f4 100%);
|
|
190
|
-
-webkit-background-clip: text;
|
|
191
|
-
-webkit-text-fill-color: transparent;
|
|
192
|
-
background-clip: text;
|
|
193
187
|
}
|
|
194
188
|
}
|
|
195
189
|
|
|
196
190
|
.header-right {
|
|
197
191
|
display: flex;
|
|
198
192
|
align-items: center;
|
|
199
|
-
gap:
|
|
193
|
+
gap: var(--spacing-md);
|
|
200
194
|
|
|
201
195
|
.user-info-bar {
|
|
202
196
|
display: flex;
|
|
203
197
|
align-items: center;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
height: 32px;
|
|
209
|
-
flex-shrink: 0;
|
|
210
|
-
}
|
|
198
|
+
padding: var(--spacing-xs) var(--spacing-sm);
|
|
199
|
+
background: var(--bg-color-container);
|
|
200
|
+
border: 1px solid var(--border-color);
|
|
201
|
+
border-radius: var(--border-radius-small);
|
|
211
202
|
|
|
212
203
|
.user-text {
|
|
213
204
|
display: flex;
|
|
@@ -215,36 +206,55 @@ $Method.fetchUserMenus();
|
|
|
215
206
|
align-items: flex-start;
|
|
216
207
|
|
|
217
208
|
.user-name {
|
|
218
|
-
font-size:
|
|
209
|
+
font-size: var(--font-size-sm);
|
|
219
210
|
font-weight: 500;
|
|
220
|
-
color:
|
|
211
|
+
color: var(--text-primary);
|
|
221
212
|
}
|
|
222
213
|
}
|
|
214
|
+
.logout-btn {
|
|
215
|
+
color: var(--text-secondary);
|
|
216
|
+
margin-left: var(--spacing-md);
|
|
217
|
+
}
|
|
223
218
|
}
|
|
224
219
|
}
|
|
225
220
|
}
|
|
226
221
|
|
|
227
222
|
.layout-menu {
|
|
228
223
|
position: absolute;
|
|
229
|
-
top:
|
|
230
|
-
left:
|
|
231
|
-
bottom:
|
|
232
|
-
width:
|
|
233
|
-
background:
|
|
234
|
-
border-
|
|
224
|
+
top: var(--header-height);
|
|
225
|
+
left: 0;
|
|
226
|
+
bottom: var(--footer-height);
|
|
227
|
+
width: var(--sidebar-width);
|
|
228
|
+
background: var(--bg-color-container);
|
|
229
|
+
border-right: 1px solid var(--border-color);
|
|
235
230
|
z-index: 99;
|
|
236
|
-
|
|
237
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
238
|
-
border: 1px solid #e8eaed;
|
|
231
|
+
overflow-y: auto;
|
|
239
232
|
}
|
|
240
233
|
|
|
241
|
-
.layout-
|
|
234
|
+
.layout-content {
|
|
242
235
|
position: absolute;
|
|
243
|
-
top:
|
|
244
|
-
left:
|
|
245
|
-
right:
|
|
246
|
-
bottom:
|
|
247
|
-
background:
|
|
236
|
+
top: var(--header-height);
|
|
237
|
+
left: var(--sidebar-width);
|
|
238
|
+
right: 0;
|
|
239
|
+
bottom: var(--footer-height);
|
|
240
|
+
background: var(--bg-color-page);
|
|
241
|
+
overflow-y: auto;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.layout-footer {
|
|
245
|
+
position: absolute;
|
|
246
|
+
bottom: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
right: 0;
|
|
249
|
+
height: var(--footer-height);
|
|
250
|
+
display: flex;
|
|
251
|
+
align-items: center;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
background: var(--bg-color-container);
|
|
254
|
+
border-top: 1px solid var(--border-color);
|
|
255
|
+
color: var(--text-secondary);
|
|
256
|
+
font-size: var(--font-size-sm);
|
|
257
|
+
z-index: 98;
|
|
248
258
|
}
|
|
249
259
|
}
|
|
250
260
|
</style>
|
package/src/main.js
CHANGED
|
@@ -6,12 +6,18 @@ import 'tdesign-vue-next/es/style/index.css';
|
|
|
6
6
|
// 引入 UnoCSS 样式
|
|
7
7
|
import 'virtual:uno.css';
|
|
8
8
|
|
|
9
|
+
// 引入 addonAdmin 的 CSS 变量
|
|
10
|
+
import '@befly-addon/admin/styles/variables.scss';
|
|
11
|
+
|
|
9
12
|
// 引入全局基础样式(reset、通用类、滚动条等)
|
|
10
13
|
import '@/styles/global.scss';
|
|
11
14
|
|
|
12
15
|
// 引入路由实例
|
|
13
16
|
import { router } from './router';
|
|
14
17
|
|
|
18
|
+
// 引入 TDesign 组件
|
|
19
|
+
import { Table as TTable } from 'tdesign-vue-next';
|
|
20
|
+
|
|
15
21
|
const app = createApp(App);
|
|
16
22
|
|
|
17
23
|
// 安装基础插件
|
|
@@ -20,4 +26,36 @@ app.use(createPinia());
|
|
|
20
26
|
// 使用路由
|
|
21
27
|
app.use(router);
|
|
22
28
|
|
|
29
|
+
// 全局配置 TTable 默认属性
|
|
30
|
+
app.component('TTable', {
|
|
31
|
+
...TTable,
|
|
32
|
+
props: {
|
|
33
|
+
...TTable.props,
|
|
34
|
+
bordered: {
|
|
35
|
+
type: [Boolean, Object],
|
|
36
|
+
default: () => ({ cell: 'horizontal' })
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'small'
|
|
41
|
+
},
|
|
42
|
+
height: {
|
|
43
|
+
type: [String, Number],
|
|
44
|
+
default: '100%'
|
|
45
|
+
},
|
|
46
|
+
headerCellClassName: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'custom-table-cell-class'
|
|
49
|
+
},
|
|
50
|
+
selectOnRowClick: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
activeRowType: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: 'single'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
23
61
|
app.mount('#app');
|
package/src/plugins/http.js
CHANGED
|
@@ -47,17 +47,25 @@ request.interceptors.response.use(
|
|
|
47
47
|
(response) => {
|
|
48
48
|
const res = response.data;
|
|
49
49
|
|
|
50
|
-
// 如果code不是0
|
|
50
|
+
// 如果code不是0,说明业务失败(不显示提示,由业务层处理)
|
|
51
51
|
if (res.code !== 0) {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
return Promise.reject({
|
|
53
|
+
code: res.code,
|
|
54
|
+
msg: res.msg || '请求失败',
|
|
55
|
+
data: res.data
|
|
56
|
+
});
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
// 成功时返回 data
|
|
56
60
|
return res;
|
|
57
61
|
},
|
|
58
62
|
(error) => {
|
|
59
63
|
MessagePlugin.error('网络连接失败');
|
|
60
|
-
return Promise.reject(
|
|
64
|
+
return Promise.reject({
|
|
65
|
+
code: -1,
|
|
66
|
+
msg: '网络连接失败',
|
|
67
|
+
error: error
|
|
68
|
+
});
|
|
61
69
|
}
|
|
62
70
|
);
|
|
63
71
|
|
|
@@ -68,7 +76,7 @@ request.interceptors.response.use(
|
|
|
68
76
|
* @param {any} [data={}] - 请求数据,默认为空对象
|
|
69
77
|
* @param {'get' | 'post'} [method='post'] - 请求方法,默认为 'post',可选 'get' | 'post'
|
|
70
78
|
* @param {import('axios').AxiosRequestConfig} [config] - axios 请求配置
|
|
71
|
-
* @returns {Promise<
|
|
79
|
+
* @returns {Promise<any>} 成功返回 data,失败抛出 {code, msg, data} 对象
|
|
72
80
|
*/
|
|
73
81
|
export function $Http(url, data = {}, method = 'post', config) {
|
|
74
82
|
const methodLower = method.toLowerCase();
|
package/src/styles/global.scss
CHANGED
|
@@ -103,6 +103,17 @@ body {
|
|
|
103
103
|
// }
|
|
104
104
|
// }
|
|
105
105
|
|
|
106
|
+
.dialog-wrapper {
|
|
107
|
+
background-color: var(--bg-color-page);
|
|
108
|
+
padding: var(--spacing-md);
|
|
109
|
+
border-radius: var(--border-radius);
|
|
110
|
+
}
|
|
111
|
+
.dialog-footer {
|
|
112
|
+
width: 100%;
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
106
117
|
// 数据列表页面通用布局样式
|
|
107
118
|
.page-table {
|
|
108
119
|
position: absolute;
|
|
@@ -110,24 +121,44 @@ body {
|
|
|
110
121
|
left: 0;
|
|
111
122
|
right: 0;
|
|
112
123
|
bottom: 0;
|
|
113
|
-
|
|
114
|
-
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
background: var(--bg-color-page);
|
|
127
|
+
|
|
128
|
+
// 搜索栏区域
|
|
129
|
+
.main-search {
|
|
130
|
+
height: var(--search-height);
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
padding: 0 16px;
|
|
135
|
+
background: var(--bg-color-container);
|
|
136
|
+
border-bottom: 1px solid var(--border-color);
|
|
137
|
+
|
|
138
|
+
.search-left {
|
|
139
|
+
display: flex;
|
|
140
|
+
gap: 12px;
|
|
141
|
+
align-items: center;
|
|
142
|
+
}
|
|
115
143
|
|
|
116
|
-
|
|
144
|
+
.search-right {
|
|
145
|
+
display: flex;
|
|
146
|
+
gap: 12px;
|
|
147
|
+
align-items: center;
|
|
148
|
+
margin-left: auto;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 工具栏(兼容旧代码)
|
|
117
153
|
.main-tool {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
left: 0;
|
|
121
|
-
right: 0;
|
|
122
|
-
height: 56px;
|
|
154
|
+
height: var(--search-height);
|
|
155
|
+
flex-shrink: 0;
|
|
123
156
|
display: flex;
|
|
124
157
|
justify-content: space-between;
|
|
125
158
|
align-items: center;
|
|
126
|
-
padding: 0
|
|
127
|
-
background:
|
|
128
|
-
border-
|
|
129
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
130
|
-
border: 1px solid #e8eaed;
|
|
159
|
+
padding: 0 16px;
|
|
160
|
+
background: var(--bg-color-container);
|
|
161
|
+
border-bottom: 1px solid var(--border-color);
|
|
131
162
|
|
|
132
163
|
.left,
|
|
133
164
|
.toolbar-left {
|
|
@@ -150,40 +181,111 @@ body {
|
|
|
150
181
|
}
|
|
151
182
|
}
|
|
152
183
|
|
|
153
|
-
//
|
|
154
|
-
.main-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
left: 0;
|
|
158
|
-
right: 0;
|
|
159
|
-
bottom: 72px;
|
|
184
|
+
// 主内容区域(包含表格和详情)
|
|
185
|
+
.main-content {
|
|
186
|
+
flex: 1;
|
|
187
|
+
display: flex;
|
|
160
188
|
overflow: hidden;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
189
|
+
|
|
190
|
+
// 表格区域
|
|
191
|
+
.main-table {
|
|
192
|
+
flex: 1;
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
background: var(--bg-color-container);
|
|
195
|
+
border-right: 1px solid var(--border-color);
|
|
196
|
+
|
|
197
|
+
// 表格头部样式
|
|
198
|
+
.custom-table-cell-class {
|
|
199
|
+
background-color: var(--bg-color-page) !important;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
color: var(--text-primary);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// 覆盖 TDesign 默认选中行样式
|
|
205
|
+
:deep(.t-table) {
|
|
206
|
+
// 单选框选中样式
|
|
207
|
+
.t-table__row--selected {
|
|
208
|
+
background-color: rgba(var(--primary-color-rgb), 0.08) !important;
|
|
209
|
+
|
|
210
|
+
&:hover {
|
|
211
|
+
background-color: rgba(var(--primary-color-rgb), 0.12) !important;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// 行高亮样式(active-row)
|
|
216
|
+
.t-table__row--active {
|
|
217
|
+
background-color: rgba(var(--primary-color-rgb), 0.08) !important;
|
|
218
|
+
|
|
219
|
+
&:hover {
|
|
220
|
+
background-color: rgba(var(--primary-color-rgb), 0.12) !important;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// 普通行悬停样式
|
|
225
|
+
.t-table__row:hover {
|
|
226
|
+
background-color: var(--bg-color-hover);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// 详情侧栏(默认隐藏)
|
|
232
|
+
.main-detail {
|
|
233
|
+
background: var(--bg-color-container);
|
|
234
|
+
width: var(--detail-width);
|
|
235
|
+
|
|
236
|
+
.detail-content {
|
|
237
|
+
padding: 16px;
|
|
238
|
+
overflow-y: auto;
|
|
239
|
+
height: 100%;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 兼容旧版独立表格区域(未使用 main-content 包裹时)
|
|
245
|
+
& > .main-table {
|
|
246
|
+
flex: 1;
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
background: var(--bg-color-container);
|
|
165
249
|
|
|
166
250
|
.custom-table-cell-class {
|
|
167
|
-
background-color:
|
|
251
|
+
background-color: var(--bg-color-page) !important;
|
|
168
252
|
font-weight: 600;
|
|
169
|
-
color:
|
|
253
|
+
color: var(--text-primary);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
:deep(.t-table) {
|
|
257
|
+
.t-table__row--selected {
|
|
258
|
+
background-color: rgba(var(--primary-color-rgb), 0.08) !important;
|
|
259
|
+
|
|
260
|
+
&:hover {
|
|
261
|
+
background-color: rgba(var(--primary-color-rgb), 0.12) !important;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.t-table__row--active {
|
|
266
|
+
background-color: rgba(var(--primary-color-rgb), 0.08) !important;
|
|
267
|
+
|
|
268
|
+
&:hover {
|
|
269
|
+
background-color: rgba(var(--primary-color-rgb), 0.12) !important;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.t-table__row:hover {
|
|
274
|
+
background-color: var(--bg-color-hover);
|
|
275
|
+
}
|
|
170
276
|
}
|
|
171
277
|
}
|
|
172
278
|
|
|
173
|
-
//
|
|
279
|
+
// 分页栏
|
|
174
280
|
.main-page {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
padding: 0 20px;
|
|
181
|
-
background: #fff;
|
|
182
|
-
border-radius: 8px;
|
|
183
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
184
|
-
border: 1px solid #e8eaed;
|
|
281
|
+
height: var(--pagination-height);
|
|
282
|
+
flex-shrink: 0;
|
|
283
|
+
padding: 0 16px;
|
|
284
|
+
background: var(--bg-color-container);
|
|
285
|
+
border-top: 1px solid var(--border-color);
|
|
185
286
|
display: flex;
|
|
186
287
|
align-items: center;
|
|
288
|
+
|
|
187
289
|
.tiny-pager {
|
|
188
290
|
width: 100%;
|
|
189
291
|
}
|
|
@@ -103,9 +103,7 @@ declare module 'vue' {
|
|
|
103
103
|
readonly $Config: UnwrapRef<typeof import('../config/index.js')['$Config']>
|
|
104
104
|
readonly $Http: UnwrapRef<typeof import('../plugins/http.js')['$Http']>
|
|
105
105
|
readonly $Storage: UnwrapRef<typeof import('../plugins/storage.js')['$Storage']>
|
|
106
|
-
readonly DialogPlugin: UnwrapRef<typeof import('tdesign-vue-next')['DialogPlugin']>
|
|
107
106
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
|
108
|
-
readonly MessagePlugin: UnwrapRef<typeof import('tdesign-vue-next')['MessagePlugin']>
|
|
109
107
|
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
|
|
110
108
|
readonly arrayToTree: UnwrapRef<typeof import('../utils/index.js')['arrayToTree']>
|
|
111
109
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
|
@@ -11,15 +11,30 @@ export {}
|
|
|
11
11
|
/* prettier-ignore */
|
|
12
12
|
declare module 'vue' {
|
|
13
13
|
export interface GlobalComponents {
|
|
14
|
+
Dialog: typeof import('./../components/Dialog.vue')['default']
|
|
14
15
|
'ILucide:fileText': typeof import('~icons/lucide/file-text')['default']
|
|
15
16
|
'ILucide:folder': typeof import('~icons/lucide/folder')['default']
|
|
16
17
|
'ILucide:home': typeof import('~icons/lucide/home')['default']
|
|
18
|
+
'ILucide:logOut': typeof import('~icons/lucide/log-out')['default']
|
|
17
19
|
'ILucide:x': typeof import('~icons/lucide/x')['default']
|
|
18
20
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
19
21
|
RouterView: typeof import('vue-router')['RouterView']
|
|
22
|
+
TAvatar: typeof import('tdesign-vue-next')['Avatar']
|
|
20
23
|
TButton: typeof import('tdesign-vue-next')['Button']
|
|
24
|
+
TCard: typeof import('tdesign-vue-next')['Card']
|
|
25
|
+
TIconBell: typeof import('tdesign-vue-next')['IconBell']
|
|
26
|
+
TIconChevronDown: typeof import('tdesign-vue-next')['IconChevronDown']
|
|
27
|
+
TIconChevronUp: typeof import('tdesign-vue-next')['IconChevronUp']
|
|
28
|
+
TIconMoney: typeof import('tdesign-vue-next')['IconMoney']
|
|
29
|
+
TIconShop: typeof import('tdesign-vue-next')['IconShop']
|
|
30
|
+
TIconUser: typeof import('tdesign-vue-next')['IconUser']
|
|
31
|
+
TLink: typeof import('tdesign-vue-next')['Link']
|
|
21
32
|
TMenu: typeof import('tdesign-vue-next')['Menu']
|
|
22
33
|
TMenuItem: typeof import('tdesign-vue-next')['MenuItem']
|
|
34
|
+
TOption: typeof import('tdesign-vue-next')['Option']
|
|
35
|
+
TProgress: typeof import('tdesign-vue-next')['Progress']
|
|
36
|
+
TSelect: typeof import('tdesign-vue-next')['Select']
|
|
37
|
+
TSpace: typeof import('tdesign-vue-next')['Space']
|
|
23
38
|
TSubmenu: typeof import('tdesign-vue-next')['Submenu']
|
|
24
39
|
TTag: typeof import('tdesign-vue-next')['Tag']
|
|
25
40
|
}
|