befly-admin 3.4.55 → 3.4.57
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/components/DetailPanel.vue +53 -13
- package/src/config/index.js +1 -1
- package/src/layouts/default.vue +270 -120
- package/src/main.js +0 -4
- package/src/styles/global.scss +94 -101
- package/src/types/auto-imports.d.ts +0 -4
- package/src/types/components.d.ts +8 -0
- package/src/types/typed-router.d.ts +87 -35
- package/src/utils/index.js +52 -19
- package/src/utils/useTablePage.js +0 -174
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
|
}
|
|
@@ -82,14 +82,12 @@ declare global {
|
|
|
82
82
|
const useRoute: typeof import('vue-router').useRoute
|
|
83
83
|
const useRouter: typeof import('vue-router').useRouter
|
|
84
84
|
const useSlots: typeof import('vue').useSlots
|
|
85
|
-
const useTablePage: typeof import('../utils/useTablePage.js').useTablePage
|
|
86
85
|
const useTemplateRef: typeof import('vue').useTemplateRef
|
|
87
86
|
const watch: typeof import('vue').watch
|
|
88
87
|
const watchEffect: typeof import('vue').watchEffect
|
|
89
88
|
const watchPostEffect: typeof import('vue').watchPostEffect
|
|
90
89
|
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
|
91
90
|
const withDefaultColumns: typeof import('../utils/index.js').withDefaultColumns
|
|
92
|
-
const withTableProps: typeof import('../utils/index.js').withTableProps
|
|
93
91
|
const withTreeTableProps: typeof import('../utils/index.js').withTreeTableProps
|
|
94
92
|
}
|
|
95
93
|
// for type re-export
|
|
@@ -180,14 +178,12 @@ declare module 'vue' {
|
|
|
180
178
|
readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']>
|
|
181
179
|
readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']>
|
|
182
180
|
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
|
183
|
-
readonly useTablePage: UnwrapRef<typeof import('../utils/useTablePage.js')['useTablePage']>
|
|
184
181
|
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
|
|
185
182
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
|
186
183
|
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
|
187
184
|
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
|
188
185
|
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
|
|
189
186
|
readonly withDefaultColumns: UnwrapRef<typeof import('../utils/index.js')['withDefaultColumns']>
|
|
190
|
-
readonly withTableProps: UnwrapRef<typeof import('../utils/index.js')['withTableProps']>
|
|
191
187
|
readonly withTreeTableProps: UnwrapRef<typeof import('../utils/index.js')['withTreeTableProps']>
|
|
192
188
|
}
|
|
193
189
|
}
|
|
@@ -13,16 +13,23 @@ declare module 'vue' {
|
|
|
13
13
|
export interface GlobalComponents {
|
|
14
14
|
DetailPanel: typeof import('./../components/DetailPanel.vue')['default']
|
|
15
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']
|
|
16
18
|
'ILucide:fileText': typeof import('~icons/lucide/file-text')['default']
|
|
17
19
|
'ILucide:folder': typeof import('~icons/lucide/folder')['default']
|
|
18
20
|
'ILucide:home': typeof import('~icons/lucide/home')['default']
|
|
19
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']
|
|
20
26
|
'ILucide:x': typeof import('~icons/lucide/x')['default']
|
|
21
27
|
RouterLink: typeof import('vue-router')['RouterLink']
|
|
22
28
|
RouterView: typeof import('vue-router')['RouterView']
|
|
23
29
|
TAvatar: typeof import('tdesign-vue-next')['Avatar']
|
|
24
30
|
TButton: typeof import('tdesign-vue-next')['Button']
|
|
25
31
|
TCard: typeof import('tdesign-vue-next')['Card']
|
|
32
|
+
TIcon: typeof import('tdesign-vue-next')['Icon']
|
|
26
33
|
TIconBell: typeof import('tdesign-vue-next')['IconBell']
|
|
27
34
|
TIconChevronDown: typeof import('tdesign-vue-next')['IconChevronDown']
|
|
28
35
|
TIconChevronUp: typeof import('tdesign-vue-next')['IconChevronUp']
|
|
@@ -38,5 +45,6 @@ declare module 'vue' {
|
|
|
38
45
|
TSpace: typeof import('tdesign-vue-next')['Space']
|
|
39
46
|
TSubmenu: typeof import('tdesign-vue-next')['Submenu']
|
|
40
47
|
TTag: typeof import('tdesign-vue-next')['Tag']
|
|
48
|
+
TUpload: typeof import('tdesign-vue-next')['Upload']
|
|
41
49
|
}
|
|
42
50
|
}
|
|
@@ -30,51 +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/login/
|
|
62
|
-
'/addon/admin/login/
|
|
63
|
-
'/addon/admin/login
|
|
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
71
|
Record<never, never>,
|
|
72
72
|
Record<never, never>,
|
|
73
73
|
| never
|
|
74
74
|
>,
|
|
75
|
-
'/addon/admin/
|
|
76
|
-
'/addon/admin/
|
|
77
|
-
'/addon/admin/
|
|
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',
|
|
78
106
|
Record<never, never>,
|
|
79
107
|
Record<never, never>,
|
|
80
108
|
| never
|
|
@@ -112,45 +140,69 @@ declare module 'vue-router/auto-routes' {
|
|
|
112
140
|
views:
|
|
113
141
|
| never
|
|
114
142
|
}
|
|
115
|
-
'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': {
|
|
116
168
|
routes:
|
|
117
|
-
| '/addon/admin/
|
|
169
|
+
| '/addon/admin/log/login/'
|
|
118
170
|
views:
|
|
119
171
|
| never
|
|
120
172
|
}
|
|
121
|
-
'node_modules/@befly-addon/admin/views/
|
|
173
|
+
'node_modules/@befly-addon/admin/views/log/operate/index.vue': {
|
|
122
174
|
routes:
|
|
123
|
-
| '/addon/admin/
|
|
175
|
+
| '/addon/admin/log/operate/'
|
|
124
176
|
views:
|
|
125
177
|
| never
|
|
126
178
|
}
|
|
127
|
-
'node_modules/@befly-addon/admin/views/
|
|
179
|
+
'node_modules/@befly-addon/admin/views/login_1/index.vue': {
|
|
128
180
|
routes:
|
|
129
|
-
| '/addon/admin/
|
|
181
|
+
| '/addon/admin/login_1/'
|
|
130
182
|
views:
|
|
131
183
|
| never
|
|
132
184
|
}
|
|
133
|
-
'node_modules/@befly-addon/admin/views/
|
|
185
|
+
'node_modules/@befly-addon/admin/views/people/admin/index.vue': {
|
|
134
186
|
routes:
|
|
135
|
-
| '/addon/admin/
|
|
187
|
+
| '/addon/admin/people/admin/'
|
|
136
188
|
views:
|
|
137
189
|
| never
|
|
138
190
|
}
|
|
139
|
-
'node_modules/@befly-addon/admin/views/
|
|
191
|
+
'node_modules/@befly-addon/admin/views/permission/api/index.vue': {
|
|
140
192
|
routes:
|
|
141
|
-
| '/addon/admin/
|
|
193
|
+
| '/addon/admin/permission/api/'
|
|
142
194
|
views:
|
|
143
195
|
| never
|
|
144
196
|
}
|
|
145
|
-
'node_modules/@befly-addon/admin/views/menu/index.vue': {
|
|
197
|
+
'node_modules/@befly-addon/admin/views/permission/menu/index.vue': {
|
|
146
198
|
routes:
|
|
147
|
-
| '/addon/admin/menu/'
|
|
199
|
+
| '/addon/admin/permission/menu/'
|
|
148
200
|
views:
|
|
149
201
|
| never
|
|
150
202
|
}
|
|
151
|
-
'node_modules/@befly-addon/admin/views/role/index.vue': {
|
|
203
|
+
'node_modules/@befly-addon/admin/views/permission/role/index.vue': {
|
|
152
204
|
routes:
|
|
153
|
-
| '/addon/admin/role/'
|
|
205
|
+
| '/addon/admin/permission/role/'
|
|
154
206
|
views:
|
|
155
207
|
| never
|
|
156
208
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -33,16 +33,64 @@ const defaultColumnConfig = {
|
|
|
33
33
|
ellipsisTitle: true
|
|
34
34
|
};
|
|
35
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
|
+
|
|
36
78
|
/**
|
|
37
79
|
* 为表格列添加默认配置
|
|
38
80
|
* @param {Array} columns - 列配置数组
|
|
39
81
|
* @returns {Array} 添加默认配置后的列数组
|
|
40
82
|
*/
|
|
41
83
|
export function withDefaultColumns(columns) {
|
|
42
|
-
return columns.map((col) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
});
|
|
46
94
|
}
|
|
47
95
|
|
|
48
96
|
/**
|
|
@@ -55,18 +103,6 @@ const defaultTableProps = {
|
|
|
55
103
|
activeRowType: 'single'
|
|
56
104
|
};
|
|
57
105
|
|
|
58
|
-
/**
|
|
59
|
-
* 生成表格通用属性
|
|
60
|
-
* @param {Object} overrides - 覆盖或扩展的属性
|
|
61
|
-
* @returns {Object} 合并后的表格属性
|
|
62
|
-
*/
|
|
63
|
-
export function withTableProps(overrides = {}) {
|
|
64
|
-
return {
|
|
65
|
-
...defaultTableProps,
|
|
66
|
-
...overrides
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
106
|
/**
|
|
71
107
|
* 树形表格默认配置
|
|
72
108
|
*/
|
|
@@ -92,6 +128,3 @@ export function withTreeTableProps(treeOverrides = {}, tableOverrides = {}) {
|
|
|
92
128
|
}
|
|
93
129
|
};
|
|
94
130
|
}
|
|
95
|
-
|
|
96
|
-
// 导出组合式函数
|
|
97
|
-
export { useTablePage } from './useTablePage.js';
|