befly-admin 3.4.54 → 3.4.56
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 +1 -1
- package/package.json +5 -5
- package/src/App.vue +9 -0
- package/src/components/DetailPanel.vue +162 -0
- package/src/config/index.js +1 -1
- package/src/layouts/default.vue +271 -121
- package/src/main.js +0 -4
- package/src/router/index.js +2 -2
- package/src/styles/global.scss +94 -101
- package/src/types/auto-imports.d.ts +4 -0
- package/src/types/components.d.ts +9 -0
- package/src/types/typed-router.d.ts +96 -31
- package/src/utils/index.js +105 -0
- package/vite.config.js +2 -2
package/src/styles/global.scss
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* 全局基础样式 */
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
*,
|
|
4
|
+
*::before,
|
|
5
|
+
*::after {
|
|
4
6
|
box-sizing: border-box;
|
|
5
7
|
}
|
|
6
8
|
|
|
@@ -9,6 +11,11 @@ body {
|
|
|
9
11
|
margin: 0;
|
|
10
12
|
padding: 0;
|
|
11
13
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'PingFang SC', 'Microsoft YaHei';
|
|
14
|
+
font-size: var(--font-size-md);
|
|
15
|
+
color: var(--text-primary);
|
|
16
|
+
background: var(--bg-color-page);
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
#app {
|
|
@@ -16,19 +23,20 @@ body {
|
|
|
16
23
|
min-height: 100vh;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
/* 滚动条样式 */
|
|
26
|
+
/* 滚动条样式 - 更精致 */
|
|
20
27
|
::-webkit-scrollbar {
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
28
|
+
width: 6px;
|
|
29
|
+
height: 6px;
|
|
23
30
|
}
|
|
24
31
|
|
|
25
32
|
::-webkit-scrollbar-track {
|
|
26
|
-
background:
|
|
33
|
+
background: transparent;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
::-webkit-scrollbar-thumb {
|
|
30
37
|
background: #d9d9d9;
|
|
31
|
-
border-radius:
|
|
38
|
+
border-radius: 3px;
|
|
39
|
+
transition: background var(--transition-fast);
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
::-webkit-scrollbar-thumb:hover {
|
|
@@ -73,6 +81,10 @@ body {
|
|
|
73
81
|
padding-left: 0 !important;
|
|
74
82
|
}
|
|
75
83
|
|
|
84
|
+
.t-button .t-button__suffix:not(:empty) {
|
|
85
|
+
margin-left: 2px;
|
|
86
|
+
}
|
|
87
|
+
|
|
76
88
|
// 首页组件通用样式 - 临时注释未定义变量
|
|
77
89
|
// .section-block {
|
|
78
90
|
// background: $dashboard-section-bg;
|
|
@@ -114,69 +126,98 @@ body {
|
|
|
114
126
|
justify-content: center;
|
|
115
127
|
}
|
|
116
128
|
|
|
129
|
+
// 通用卡片样式
|
|
130
|
+
.section-block {
|
|
131
|
+
background: var(--bg-color-container);
|
|
132
|
+
border-radius: var(--card-radius);
|
|
133
|
+
box-shadow: var(--shadow-1);
|
|
134
|
+
padding: var(--spacing-md);
|
|
135
|
+
|
|
136
|
+
.section-header {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: var(--spacing-sm);
|
|
140
|
+
margin-bottom: var(--spacing-md);
|
|
141
|
+
padding-bottom: var(--spacing-sm);
|
|
142
|
+
border-bottom: 1px solid var(--border-color-light);
|
|
143
|
+
|
|
144
|
+
h2 {
|
|
145
|
+
font-size: var(--font-size-md);
|
|
146
|
+
font-weight: var(--font-weight-semibold);
|
|
147
|
+
color: var(--text-primary);
|
|
148
|
+
margin: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
svg {
|
|
152
|
+
width: 18px;
|
|
153
|
+
height: 18px;
|
|
154
|
+
color: var(--primary-color);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
117
159
|
// 数据列表页面通用布局样式
|
|
118
160
|
.page-table {
|
|
119
|
-
|
|
120
|
-
top: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
right: 0;
|
|
123
|
-
bottom: 0;
|
|
161
|
+
height: 100%;
|
|
124
162
|
display: flex;
|
|
125
163
|
flex-direction: column;
|
|
126
|
-
|
|
164
|
+
gap: var(--layout-gap);
|
|
165
|
+
overflow: hidden;
|
|
127
166
|
|
|
128
|
-
//
|
|
167
|
+
// 搜索栏区域(卡片样式)
|
|
129
168
|
.main-search {
|
|
130
169
|
height: var(--search-height);
|
|
131
170
|
flex-shrink: 0;
|
|
132
171
|
display: flex;
|
|
133
172
|
align-items: center;
|
|
134
|
-
padding: 0
|
|
173
|
+
padding: 0 var(--spacing-md);
|
|
135
174
|
background: var(--bg-color-container);
|
|
136
|
-
border-
|
|
175
|
+
border-radius: var(--card-radius);
|
|
176
|
+
box-shadow: var(--shadow-1);
|
|
137
177
|
|
|
138
178
|
.search-left {
|
|
139
179
|
display: flex;
|
|
140
|
-
gap:
|
|
180
|
+
gap: var(--spacing-sm);
|
|
141
181
|
align-items: center;
|
|
142
182
|
}
|
|
143
183
|
|
|
144
184
|
.search-right {
|
|
145
185
|
display: flex;
|
|
146
|
-
gap:
|
|
186
|
+
gap: var(--spacing-sm);
|
|
147
187
|
align-items: center;
|
|
148
188
|
margin-left: auto;
|
|
149
189
|
}
|
|
150
190
|
}
|
|
151
191
|
|
|
152
|
-
//
|
|
192
|
+
// 工具栏
|
|
153
193
|
.main-tool {
|
|
154
194
|
height: var(--search-height);
|
|
155
195
|
flex-shrink: 0;
|
|
156
196
|
display: flex;
|
|
157
197
|
justify-content: space-between;
|
|
158
198
|
align-items: center;
|
|
159
|
-
padding: 0
|
|
199
|
+
padding: 0 var(--spacing-md);
|
|
160
200
|
background: var(--bg-color-container);
|
|
161
|
-
border-
|
|
201
|
+
border-radius: var(--card-radius);
|
|
202
|
+
box-shadow: var(--shadow-1);
|
|
162
203
|
|
|
163
204
|
.left,
|
|
164
205
|
.toolbar-left {
|
|
165
206
|
display: flex;
|
|
166
|
-
gap:
|
|
207
|
+
gap: var(--spacing-sm);
|
|
167
208
|
align-items: center;
|
|
168
209
|
}
|
|
169
210
|
|
|
170
211
|
.right,
|
|
171
212
|
.toolbar-right {
|
|
172
213
|
display: flex;
|
|
173
|
-
gap:
|
|
214
|
+
gap: var(--spacing-sm);
|
|
174
215
|
align-items: center;
|
|
175
216
|
}
|
|
176
217
|
|
|
177
218
|
.toolbar-search {
|
|
178
219
|
display: flex;
|
|
179
|
-
gap:
|
|
220
|
+
gap: var(--spacing-sm);
|
|
180
221
|
align-items: center;
|
|
181
222
|
}
|
|
182
223
|
}
|
|
@@ -186,115 +227,67 @@ body {
|
|
|
186
227
|
flex: 1;
|
|
187
228
|
display: flex;
|
|
188
229
|
overflow: hidden;
|
|
230
|
+
gap: var(--layout-gap);
|
|
231
|
+
min-height: 0;
|
|
189
232
|
|
|
190
233
|
// 表格区域
|
|
191
234
|
.main-table {
|
|
192
235
|
flex: 1;
|
|
193
236
|
overflow: hidden;
|
|
194
237
|
background: var(--bg-color-container);
|
|
195
|
-
border-
|
|
238
|
+
border-radius: var(--card-radius);
|
|
239
|
+
box-shadow: var(--shadow-1);
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: column;
|
|
242
|
+
flex: 1;
|
|
196
243
|
|
|
197
|
-
//
|
|
198
|
-
.
|
|
199
|
-
background-color: var(--
|
|
200
|
-
|
|
201
|
-
|
|
244
|
+
// 表头样式 - 增强对比
|
|
245
|
+
.t-table__header tr th {
|
|
246
|
+
background-color: var(--table-header-bg) !important;
|
|
247
|
+
border-bottom: 1px solid #ddd !important;
|
|
248
|
+
font-weight: var(--font-weight-semibold);
|
|
202
249
|
}
|
|
203
250
|
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
}
|
|
251
|
+
// 单元格边框
|
|
252
|
+
td {
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
border-bottom: 1px solid var(--border-color-light) !important;
|
|
228
255
|
}
|
|
229
256
|
}
|
|
230
257
|
|
|
231
|
-
// 详情侧栏(默认隐藏)
|
|
232
258
|
.main-detail {
|
|
233
259
|
background: var(--bg-color-container);
|
|
234
260
|
width: var(--detail-width);
|
|
261
|
+
border-radius: var(--card-radius);
|
|
262
|
+
box-shadow: var(--shadow-1);
|
|
263
|
+
overflow: hidden;
|
|
235
264
|
|
|
236
265
|
.detail-content {
|
|
237
|
-
padding:
|
|
266
|
+
padding: var(--spacing-md);
|
|
238
267
|
overflow-y: auto;
|
|
239
268
|
height: 100%;
|
|
240
269
|
}
|
|
241
270
|
}
|
|
242
271
|
}
|
|
243
272
|
|
|
244
|
-
//
|
|
245
|
-
& > .main-table {
|
|
246
|
-
flex: 1;
|
|
247
|
-
overflow: hidden;
|
|
248
|
-
background: var(--bg-color-container);
|
|
249
|
-
|
|
250
|
-
.custom-table-cell-class {
|
|
251
|
-
background-color: var(--bg-color-page) !important;
|
|
252
|
-
font-weight: 600;
|
|
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
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// 分页栏
|
|
273
|
+
// 分页栏 - 卡片样式
|
|
280
274
|
.main-page {
|
|
281
275
|
height: var(--pagination-height);
|
|
282
276
|
flex-shrink: 0;
|
|
283
|
-
padding: 0
|
|
277
|
+
padding: 0 var(--spacing-md);
|
|
284
278
|
background: var(--bg-color-container);
|
|
285
|
-
border-
|
|
279
|
+
border-radius: var(--card-radius);
|
|
280
|
+
box-shadow: var(--shadow-1);
|
|
286
281
|
display: flex;
|
|
287
282
|
align-items: center;
|
|
288
283
|
|
|
289
|
-
|
|
290
|
-
|
|
284
|
+
// 分页文字样式
|
|
285
|
+
.t-pagination__total {
|
|
286
|
+
color: var(--text-secondary);
|
|
291
287
|
}
|
|
292
288
|
}
|
|
293
289
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
align-items: center;
|
|
298
|
-
height: 52px;
|
|
299
|
-
justify-content: space-between;
|
|
290
|
+
|
|
291
|
+
.t-dialog--default {
|
|
292
|
+
padding: 24px;
|
|
300
293
|
}
|
|
@@ -87,6 +87,8 @@ declare global {
|
|
|
87
87
|
const watchEffect: typeof import('vue').watchEffect
|
|
88
88
|
const watchPostEffect: typeof import('vue').watchPostEffect
|
|
89
89
|
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
|
90
|
+
const withDefaultColumns: typeof import('../utils/index.js').withDefaultColumns
|
|
91
|
+
const withTreeTableProps: typeof import('../utils/index.js').withTreeTableProps
|
|
90
92
|
}
|
|
91
93
|
// for type re-export
|
|
92
94
|
declare global {
|
|
@@ -181,5 +183,7 @@ declare module 'vue' {
|
|
|
181
183
|
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
|
182
184
|
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
|
183
185
|
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
|
|
186
|
+
readonly withDefaultColumns: UnwrapRef<typeof import('../utils/index.js')['withDefaultColumns']>
|
|
187
|
+
readonly withTreeTableProps: UnwrapRef<typeof import('../utils/index.js')['withTreeTableProps']>
|
|
184
188
|
}
|
|
185
189
|
}
|
|
@@ -11,17 +11,25 @@ export {}
|
|
|
11
11
|
/* prettier-ignore */
|
|
12
12
|
declare module 'vue' {
|
|
13
13
|
export interface GlobalComponents {
|
|
14
|
+
DetailPanel: typeof import('./../components/DetailPanel.vue')['default']
|
|
14
15
|
Dialog: typeof import('./../components/Dialog.vue')['default']
|
|
16
|
+
'ILucide:box': typeof import('~icons/lucide/box')['default']
|
|
17
|
+
'ILucide:camera': typeof import('~icons/lucide/camera')['default']
|
|
15
18
|
'ILucide:fileText': typeof import('~icons/lucide/file-text')['default']
|
|
16
19
|
'ILucide:folder': typeof import('~icons/lucide/folder')['default']
|
|
17
20
|
'ILucide:home': typeof import('~icons/lucide/home')['default']
|
|
18
21
|
'ILucide:logOut': typeof import('~icons/lucide/log-out')['default']
|
|
22
|
+
'ILucide:panelLeftClose': typeof import('~icons/lucide/panel-left-close')['default']
|
|
23
|
+
'ILucide:panelLeftOpen': typeof import('~icons/lucide/panel-left-open')['default']
|
|
24
|
+
'ILucide:settings': typeof import('~icons/lucide/settings')['default']
|
|
25
|
+
'ILucide:user': typeof import('~icons/lucide/user')['default']
|
|
19
26
|
'ILucide:x': typeof import('~icons/lucide/x')['default']
|
|
20
27
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
21
28
|
RouterView: typeof import('vue-router')['RouterView']
|
|
22
29
|
TAvatar: typeof import('tdesign-vue-next')['Avatar']
|
|
23
30
|
TButton: typeof import('tdesign-vue-next')['Button']
|
|
24
31
|
TCard: typeof import('tdesign-vue-next')['Card']
|
|
32
|
+
TIcon: typeof import('tdesign-vue-next')['Icon']
|
|
25
33
|
TIconBell: typeof import('tdesign-vue-next')['IconBell']
|
|
26
34
|
TIconChevronDown: typeof import('tdesign-vue-next')['IconChevronDown']
|
|
27
35
|
TIconChevronUp: typeof import('tdesign-vue-next')['IconChevronUp']
|
|
@@ -37,5 +45,6 @@ declare module 'vue' {
|
|
|
37
45
|
TSpace: typeof import('tdesign-vue-next')['Space']
|
|
38
46
|
TSubmenu: typeof import('tdesign-vue-next')['Submenu']
|
|
39
47
|
TTag: typeof import('tdesign-vue-next')['Tag']
|
|
48
|
+
TUpload: typeof import('tdesign-vue-next')['Upload']
|
|
40
49
|
}
|
|
41
50
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* prettier-ignore */
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
// noinspection ES6UnusedImports
|
|
5
|
-
// Generated by unplugin-vue-router.
|
|
5
|
+
// Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !!
|
|
6
6
|
// It's recommended to commit this file.
|
|
7
7
|
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
|
8
8
|
|
|
@@ -30,44 +30,79 @@ declare module 'vue-router/auto-routes' {
|
|
|
30
30
|
Record<never, never>,
|
|
31
31
|
| never
|
|
32
32
|
>,
|
|
33
|
-
'/addon/admin/
|
|
34
|
-
'/addon/admin/
|
|
35
|
-
'/addon/admin/
|
|
33
|
+
'/addon/admin/403_1/': RouteRecordInfo<
|
|
34
|
+
'/addon/admin/403_1/',
|
|
35
|
+
'/addon/admin/403_1',
|
|
36
36
|
Record<never, never>,
|
|
37
37
|
Record<never, never>,
|
|
38
38
|
| never
|
|
39
39
|
>,
|
|
40
|
-
'/addon/admin/
|
|
41
|
-
'/addon/admin/
|
|
42
|
-
'/addon/admin/
|
|
40
|
+
'/addon/admin/config/dict/': RouteRecordInfo<
|
|
41
|
+
'/addon/admin/config/dict/',
|
|
42
|
+
'/addon/admin/config/dict',
|
|
43
43
|
Record<never, never>,
|
|
44
44
|
Record<never, never>,
|
|
45
45
|
| never
|
|
46
46
|
>,
|
|
47
|
-
'/addon/admin/
|
|
48
|
-
'/addon/admin/
|
|
49
|
-
'/addon/admin/
|
|
47
|
+
'/addon/admin/config/system/': RouteRecordInfo<
|
|
48
|
+
'/addon/admin/config/system/',
|
|
49
|
+
'/addon/admin/config/system',
|
|
50
50
|
Record<never, never>,
|
|
51
51
|
Record<never, never>,
|
|
52
52
|
| never
|
|
53
53
|
>,
|
|
54
|
-
'/addon/admin/
|
|
55
|
-
'/addon/admin/
|
|
56
|
-
'/addon/admin/
|
|
54
|
+
'/addon/admin/log/email/': RouteRecordInfo<
|
|
55
|
+
'/addon/admin/log/email/',
|
|
56
|
+
'/addon/admin/log/email',
|
|
57
57
|
Record<never, never>,
|
|
58
58
|
Record<never, never>,
|
|
59
59
|
| never
|
|
60
60
|
>,
|
|
61
|
-
'/addon/admin/
|
|
62
|
-
'/addon/admin/
|
|
63
|
-
'/addon/admin/
|
|
61
|
+
'/addon/admin/log/login/': RouteRecordInfo<
|
|
62
|
+
'/addon/admin/log/login/',
|
|
63
|
+
'/addon/admin/log/login',
|
|
64
64
|
Record<never, never>,
|
|
65
65
|
Record<never, never>,
|
|
66
66
|
| never
|
|
67
67
|
>,
|
|
68
|
-
'/addon/admin/
|
|
69
|
-
'/addon/admin/
|
|
70
|
-
'/addon/admin/
|
|
68
|
+
'/addon/admin/log/operate/': RouteRecordInfo<
|
|
69
|
+
'/addon/admin/log/operate/',
|
|
70
|
+
'/addon/admin/log/operate',
|
|
71
|
+
Record<never, never>,
|
|
72
|
+
Record<never, never>,
|
|
73
|
+
| never
|
|
74
|
+
>,
|
|
75
|
+
'/addon/admin/login_1/': RouteRecordInfo<
|
|
76
|
+
'/addon/admin/login_1/',
|
|
77
|
+
'/addon/admin/login_1',
|
|
78
|
+
Record<never, never>,
|
|
79
|
+
Record<never, never>,
|
|
80
|
+
| never
|
|
81
|
+
>,
|
|
82
|
+
'/addon/admin/people/admin/': RouteRecordInfo<
|
|
83
|
+
'/addon/admin/people/admin/',
|
|
84
|
+
'/addon/admin/people/admin',
|
|
85
|
+
Record<never, never>,
|
|
86
|
+
Record<never, never>,
|
|
87
|
+
| never
|
|
88
|
+
>,
|
|
89
|
+
'/addon/admin/permission/api/': RouteRecordInfo<
|
|
90
|
+
'/addon/admin/permission/api/',
|
|
91
|
+
'/addon/admin/permission/api',
|
|
92
|
+
Record<never, never>,
|
|
93
|
+
Record<never, never>,
|
|
94
|
+
| never
|
|
95
|
+
>,
|
|
96
|
+
'/addon/admin/permission/menu/': RouteRecordInfo<
|
|
97
|
+
'/addon/admin/permission/menu/',
|
|
98
|
+
'/addon/admin/permission/menu',
|
|
99
|
+
Record<never, never>,
|
|
100
|
+
Record<never, never>,
|
|
101
|
+
| never
|
|
102
|
+
>,
|
|
103
|
+
'/addon/admin/permission/role/': RouteRecordInfo<
|
|
104
|
+
'/addon/admin/permission/role/',
|
|
105
|
+
'/addon/admin/permission/role',
|
|
71
106
|
Record<never, never>,
|
|
72
107
|
Record<never, never>,
|
|
73
108
|
| never
|
|
@@ -105,39 +140,69 @@ declare module 'vue-router/auto-routes' {
|
|
|
105
140
|
views:
|
|
106
141
|
| never
|
|
107
142
|
}
|
|
108
|
-
'node_modules/@befly-addon/admin/views/
|
|
143
|
+
'node_modules/@befly-addon/admin/views/403_1/index.vue': {
|
|
144
|
+
routes:
|
|
145
|
+
| '/addon/admin/403_1/'
|
|
146
|
+
views:
|
|
147
|
+
| never
|
|
148
|
+
}
|
|
149
|
+
'node_modules/@befly-addon/admin/views/config/dict/index.vue': {
|
|
150
|
+
routes:
|
|
151
|
+
| '/addon/admin/config/dict/'
|
|
152
|
+
views:
|
|
153
|
+
| never
|
|
154
|
+
}
|
|
155
|
+
'node_modules/@befly-addon/admin/views/config/system/index.vue': {
|
|
156
|
+
routes:
|
|
157
|
+
| '/addon/admin/config/system/'
|
|
158
|
+
views:
|
|
159
|
+
| never
|
|
160
|
+
}
|
|
161
|
+
'node_modules/@befly-addon/admin/views/log/email/index.vue': {
|
|
162
|
+
routes:
|
|
163
|
+
| '/addon/admin/log/email/'
|
|
164
|
+
views:
|
|
165
|
+
| never
|
|
166
|
+
}
|
|
167
|
+
'node_modules/@befly-addon/admin/views/log/login/index.vue': {
|
|
168
|
+
routes:
|
|
169
|
+
| '/addon/admin/log/login/'
|
|
170
|
+
views:
|
|
171
|
+
| never
|
|
172
|
+
}
|
|
173
|
+
'node_modules/@befly-addon/admin/views/log/operate/index.vue': {
|
|
109
174
|
routes:
|
|
110
|
-
| '/addon/admin/
|
|
175
|
+
| '/addon/admin/log/operate/'
|
|
111
176
|
views:
|
|
112
177
|
| never
|
|
113
178
|
}
|
|
114
|
-
'node_modules/@befly-addon/admin/views/
|
|
179
|
+
'node_modules/@befly-addon/admin/views/login_1/index.vue': {
|
|
115
180
|
routes:
|
|
116
|
-
| '/addon/admin/
|
|
181
|
+
| '/addon/admin/login_1/'
|
|
117
182
|
views:
|
|
118
183
|
| never
|
|
119
184
|
}
|
|
120
|
-
'node_modules/@befly-addon/admin/views/
|
|
185
|
+
'node_modules/@befly-addon/admin/views/people/admin/index.vue': {
|
|
121
186
|
routes:
|
|
122
|
-
| '/addon/admin/
|
|
187
|
+
| '/addon/admin/people/admin/'
|
|
123
188
|
views:
|
|
124
189
|
| never
|
|
125
190
|
}
|
|
126
|
-
'node_modules/@befly-addon/admin/views/
|
|
191
|
+
'node_modules/@befly-addon/admin/views/permission/api/index.vue': {
|
|
127
192
|
routes:
|
|
128
|
-
| '/addon/admin/
|
|
193
|
+
| '/addon/admin/permission/api/'
|
|
129
194
|
views:
|
|
130
195
|
| never
|
|
131
196
|
}
|
|
132
|
-
'node_modules/@befly-addon/admin/views/menu/index.vue': {
|
|
197
|
+
'node_modules/@befly-addon/admin/views/permission/menu/index.vue': {
|
|
133
198
|
routes:
|
|
134
|
-
| '/addon/admin/menu/'
|
|
199
|
+
| '/addon/admin/permission/menu/'
|
|
135
200
|
views:
|
|
136
201
|
| never
|
|
137
202
|
}
|
|
138
|
-
'node_modules/@befly-addon/admin/views/role/index.vue': {
|
|
203
|
+
'node_modules/@befly-addon/admin/views/permission/role/index.vue': {
|
|
139
204
|
routes:
|
|
140
|
-
| '/addon/admin/role/'
|
|
205
|
+
| '/addon/admin/permission/role/'
|
|
141
206
|
views:
|
|
142
207
|
| never
|
|
143
208
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -23,3 +23,108 @@ export function arrayToTree(items, pid = 0) {
|
|
|
23
23
|
|
|
24
24
|
return tree;
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 表格列默认配置
|
|
29
|
+
* 统一设置超出显示省略号等通用配置
|
|
30
|
+
*/
|
|
31
|
+
const defaultColumnConfig = {
|
|
32
|
+
ellipsis: true,
|
|
33
|
+
ellipsisTitle: true
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 常用字段默认宽度映射
|
|
38
|
+
* 根据 colKey 自动设置宽度,页面可覆盖
|
|
39
|
+
*/
|
|
40
|
+
const columnWidthMap = {
|
|
41
|
+
'row-select': 50,
|
|
42
|
+
id: 150,
|
|
43
|
+
index: 60,
|
|
44
|
+
state: 100,
|
|
45
|
+
operation: 100,
|
|
46
|
+
username: 150,
|
|
47
|
+
nickname: 150,
|
|
48
|
+
name: 150,
|
|
49
|
+
title: 150,
|
|
50
|
+
code: 150,
|
|
51
|
+
roleCode: 120,
|
|
52
|
+
path: 250,
|
|
53
|
+
icon: 120,
|
|
54
|
+
value: 200,
|
|
55
|
+
description: 200,
|
|
56
|
+
createdAt: 170,
|
|
57
|
+
updatedAt: 170,
|
|
58
|
+
deletedAt: 170,
|
|
59
|
+
email: 200,
|
|
60
|
+
phone: 130,
|
|
61
|
+
sort: 80,
|
|
62
|
+
pid: 80
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 特定字段的默认配置
|
|
67
|
+
* 某些字段需要特殊的 ellipsis、align 等配置
|
|
68
|
+
*/
|
|
69
|
+
const columnDefaultProps = {
|
|
70
|
+
'row-select': { ellipsis: false },
|
|
71
|
+
id: { align: 'center' },
|
|
72
|
+
index: { align: 'center' },
|
|
73
|
+
state: { ellipsis: false, align: 'center' },
|
|
74
|
+
operation: { ellipsis: false, align: 'center', fixed: 'right' },
|
|
75
|
+
sort: { align: 'center' }
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 为表格列添加默认配置
|
|
80
|
+
* @param {Array} columns - 列配置数组
|
|
81
|
+
* @returns {Array} 添加默认配置后的列数组
|
|
82
|
+
*/
|
|
83
|
+
export function withDefaultColumns(columns) {
|
|
84
|
+
return columns.map((col) => {
|
|
85
|
+
const defaultWidth = columnWidthMap[col.colKey];
|
|
86
|
+
const defaultProps = columnDefaultProps[col.colKey] || {};
|
|
87
|
+
return {
|
|
88
|
+
...defaultColumnConfig,
|
|
89
|
+
...(defaultWidth && !col.width ? { width: defaultWidth } : {}),
|
|
90
|
+
...defaultProps,
|
|
91
|
+
...col
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 表格通用属性配置
|
|
98
|
+
* 统一管理 height、row-key、active-row-type 等通用配置
|
|
99
|
+
*/
|
|
100
|
+
const defaultTableProps = {
|
|
101
|
+
rowKey: 'id',
|
|
102
|
+
height: '100%',
|
|
103
|
+
activeRowType: 'single'
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* 树形表格默认配置
|
|
108
|
+
*/
|
|
109
|
+
const defaultTreeConfig = {
|
|
110
|
+
childrenKey: 'children',
|
|
111
|
+
treeNodeColumnIndex: 0,
|
|
112
|
+
defaultExpandAll: true
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 生成树形表格通用属性
|
|
117
|
+
* @param {Object} treeOverrides - 树形配置覆盖
|
|
118
|
+
* @param {Object} tableOverrides - 表格属性覆盖
|
|
119
|
+
* @returns {Object} 合并后的树形表格属性
|
|
120
|
+
*/
|
|
121
|
+
export function withTreeTableProps(treeOverrides = {}, tableOverrides = {}) {
|
|
122
|
+
return {
|
|
123
|
+
...defaultTableProps,
|
|
124
|
+
...tableOverrides,
|
|
125
|
+
tree: {
|
|
126
|
+
...defaultTreeConfig,
|
|
127
|
+
...treeOverrides
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}
|
package/vite.config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createBeflyViteConfig } from 'befly-vite';
|
|
2
|
-
import { scanViews } from 'befly-
|
|
2
|
+
import { scanViews } from 'befly-shared/scanViews';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
|
|
5
5
|
export default createBeflyViteConfig({
|
|
6
6
|
root: fileURLToPath(new URL('.', import.meta.url)),
|
|
7
7
|
scanViews: scanViews,
|
|
8
8
|
optimizeDeps: {
|
|
9
|
-
include: ['befly-
|
|
9
|
+
include: ['befly-shared']
|
|
10
10
|
}
|
|
11
11
|
});
|