wujingjing
2024-12-11 2144fb07b53812f565b2801f99e69cee9b28cab3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
@import 'mixins/index.scss';
/* element 莫名其妙bug,demo 没发现
--------------------------------------------------------- */
.el-dialog {
    padding: 0px;
    .el-dialog__header {
        padding: var(--el-dialog-padding-primary);
        padding-bottom: 10px;
        padding-top: 10px;
        .el-dialog__headerbtn {
            position: absolute;
            top: 6px;
            right: 0;
            padding: 0;
            width: 54px;
            background: 0 0;
            border: none;
            outline: 0;
            cursor: pointer;
            font-size: var(--el-message-close-size, 16px);
        }
    }
 
    .el-dialog__footer {
        padding: var(--el-dialog-padding-primary);
        padding-top: 10px;
        padding-bottom: 10px;
        
    }
}
 
/* Button 按钮
------------------------------- */
// 第三方字体图标大小
.el-button:not(.is-circle) i.el-icon,
.el-button i.iconfont,
.el-button i.ywifont,
.el-button i.fa,
.el-button--default i.iconfont,
.el-button--default i.ywifont,
.el-button--default i.fa {
    font-size: 14px !important;
    margin-right: 5px;
}
.el-button--small i.iconfont,
.el-button--small i.ywifont,
.el-button--small i.fa {
    font-size: 12px !important;
    margin-right: 5px;
}
 
/* Input 输入框、InputNumber 计数器
------------------------------- */
// 菜单搜索
.el-autocomplete-suggestion__wrap {
    max-height: 280px !important;
}
 
/* el-form-item select、select-number width 为100%
--------------------------------------------------------- */
.el-form-item {
    .el-form-item__content {
        > .el-select,
        .el-input-number,
        .el-tree-select {
            width: 100%;
        }
    }
}
 
/* Form 表单
------------------------------- */
.el-form {
    // 用于修改弹窗时表单内容间隔太大问题,如系统设置的新增菜单弹窗里的表单内容
    .el-form-item:last-of-type {
        margin-bottom: 0 !important;
    }
    // 修复行内表单最后一个 el-form-item 位置下移问题
    &.el-form--inline {
        .el-form-item--large.el-form-item:last-of-type {
            margin-bottom: 22px !important;
        }
        .el-form-item--default.el-form-item:last-of-type,
        .el-form-item--small.el-form-item:last-of-type {
            margin-bottom: 18px !important;
        }
    }
    // https://gitee.com/lyt-top/vue-next-admin/issues/I5K1PM
    .el-form-item .el-form-item__label .el-icon {
        margin-right: 0px;
    }
}
 
/* Alert 警告
------------------------------- */
.el-alert {
    border: 1px solid;
}
.el-alert__title {
    word-break: break-all;
}
 
/* Message 消息提示
------------------------------- */
.el-message {
    min-width: unset !important;
    padding: 15px !important;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.02);
}
 
/* NavMenu 导航菜单
------------------------------- */
// 鼠标 hover 时颜色
.el-menu-hover-bg-color {
    background: var(--next-bg-menuBarActiveColor) !important;
    //background-color: var(--el-color-primary-light-7) !important;
}
// 默认样式修改
.el-menu {
    border-right: none !important;
    width: var(--yw-columns-menu-width);
}
.el-menu-item {
    height: 50px !important;
    line-height: 50px !important;
    margin: 0 0 1px 0;
}
.el-menu-item,
.el-sub-menu__title {
    color: var(--next-bg-menuBarColor);
}
// 修复点击左侧菜单折叠再展开时,宽度不跟随问题
.el-menu--collapse {
    width: 64px !important;
}
// 外部链接时
.el-menu-item a,
.el-menu-item a:hover,
.el-menu-item i,
.el-sub-menu__title i {
    color: inherit;
    text-decoration: none;
}
// 第三方图标字体间距/大小设置
.el-menu-item .iconfont,
.el-sub-menu .iconfont,
.el-menu-item .ywifont,
.el-sub-menu .ywifont,
.el-menu-item .fa,
.el-sub-menu .fa {
    @include generalIcon;
}
// 水平菜单、横向菜单高亮 背景色,鼠标 hover 时,有子级菜单的背景色
.el-menu:not(.el-menu--horizontal) {
    .el-menu-item.is-active,
    .el-sub-menu:not(.is-opened):hover .el-sub-menu__title {
        @extend .el-menu-hover-bg-color;
        color: #fff;
    }
}
.el-menu--horizontal {
    .el-menu-item {
        font-size: 15px !important;
        &:not(.is-active) {
            opacity: 0.6;
        }
        &.is-active,
        &:hover,
        &:focus {
            background-color: unset !important;
            background: var(--yw-horizontal-menu-active-color);
            opacity: 1;
            color: #fff !important;
        }
    }
}
 
// 鼠标 hover 时背景色
.el-menu-item:hover {
    //@extend .el-menu-hover-bg-color;
    background: linear-gradient(90deg, rgba(80, 118, 255, 0.66), rgba(55, 93, 237, 0));
}
.el-sub-menu.is-active.is-opened .el-sub-menu__title {
    background-color: unset !important;
}
// 当前选中菜单右侧边框
.el-menu-item.is-active {
    border-right: solid 3px var(--el-color-primary);
}
// 子级菜单背景颜色
// .el-menu--inline {
//     background: var(--next-bg-menuBar-light-1);
// }
// 水平菜单、横向菜单折叠 a 标签
.el-popper.is-dark a {
    color: var(--el-color-white) !important;
    text-decoration: none;
}
// 水平菜单、横向菜单折叠背景色
.el-popper.is-pure.is-light {
    // 水平菜单
    .el-menu--vertical {
        background: var(--next-bg-menuBar);
        .el-sub-menu.is-active .el-sub-menu__title {
            color: var(--el-menu-active-color);
        }
        .el-popper.is-pure.is-light {
            .el-menu--vertical {
                .el-sub-menu .el-sub-menu__title {
                    background-color: unset !important;
                    color: var(--next-bg-menuBarColor);
                }
                .el-sub-menu.is-active .el-sub-menu__title {
                    color: var(--el-menu-active-color);
                }
            }
        }
    }
    // 横向菜单
    .el-menu--horizontal {
        background: var(--next-bg-topBar);
        .el-menu-item,
        .el-sub-menu {
            height: 50px !important;
            line-height: 50px !important;
            color: var(--next-bg-topBarColor);
            opacity: 0.6;
            .el-sub-menu__title {
                height: 50px !important;
                line-height: 50px !important;
                color: var(--next-bg-topBarColor);
            }
            .el-popper.is-pure.is-light {
                .el-menu--horizontal {
                    .el-sub-menu .el-sub-menu__title {
                        background-color: unset !important;
                        color: var(--next-bg-topBarColor);
                    }
                    .el-sub-menu.is-active .el-sub-menu__title {
                        color: var(--el-menu-active-color);
                    }
                }
            }
        }
        .el-menu-item.is-active,
        .el-sub-menu.is-active .el-sub-menu__title {
            color: var(--el-menu-active-color);
        }
        // 鼠标 hover 时背景色
        .el-menu-item:hover {
            background-color: var(--el-color-primary-light-9);
        }
    }
}
// 横向菜单(经典、横向)布局
.el-menu.el-menu--horizontal {
    border-bottom: none !important;
    width: 100% !important;
 
    .el-menu-item {
        border-bottom: none;
    }
 
    .el-menu-item,
    .el-sub-menu__title {
        height: var(--yw-horizontal-menu-height) !important;
        color: var(--next-bg-topBarColor);
    }
    .el-menu-item:not(.is-active):hover,
    .el-sub-menu:not(.is-active):hover .el-sub-menu__title {
        color: var(--next-bg-topBarColor);
        //border-right: solid 3px var(--el-color-primary);
    }
    // 鼠标 hover 时背景色
    .el-menu-item:hover {
        background-color: var(--el-color-primary-light-9);
    }
    // 菜单激活时去掉全局右边框
    .el-menu-item.is-active {
        border-right: none;
        border-bottom: solid 3px white;
    }
}
 
/* Tabs 标签页
------------------------------- */
.el-tabs__nav-wrap::after {
    height: 1px !important;
}
 
/* Dropdown 下拉菜单
------------------------------- */
.el-dropdown-menu {
    list-style: none !important; /*修复 Dropdown 下拉菜单样式问题 2022.03.04*/
}
.el-dropdown-menu .el-dropdown-menu__item {
    white-space: nowrap;
    &:not(.is-disabled):hover {
        background-color: var(--el-dropdown-menuItem-hover-fill);
        color: var(--el-dropdown-menuItem-hover-color);
    }
}
 
/* Steps 步骤条
------------------------------- */
.el-step__icon-inner {
    font-size: 30px !important;
    font-weight: 400 !important;
}
.el-step__title {
    font-size: 14px;
}
 
/* Dialog 对话框
------------------------------- */
.el-overlay {
    overflow: hidden;
    .el-overlay-dialog {
        display: flex;
        align-items: center;
        justify-content: center;
        position: unset !important;
        width: 100%;
        height: 100%;
        .el-dialog {
            margin: 0 auto !important;
            position: absolute;
            .el-dialog__body {
                padding: 20px !important;
            }
        }
    }
}
.el-dialog__body {
    max-height: calc(90vh - 111px) !important;
    overflow-y: auto;
    overflow-x: hidden;
}
.el-dialog__title {
    font-size: 14px;
    color: #fff;
    font-weight: 700;
}
.el-dialog__header {
    margin-right: 0;
    padding-top: 10px;
    background: var(--el-color-primary);
}
.el-dialog__footer {
    border-top: 1px dashed var(--el-color-primary-light-5);
    padding-bottom: 10px;
}
.el-dialog__headerbtn {
    height: 32px;
    font-weight: 900;
    .el-dialog__close {
        color: #fff;
    }
}
.el-dialog__headerbtn:hover .el-dialog__close {
    color: var(--el-color-danger) !important;
}
 
/* Card 卡片
------------------------------- */
.el-card {
    .el-card__header {
        padding: 15px 20px;
    }
    &_full-vertical-body {
        .el-card__body {
            height: 100%;
            display: flex;
            flex-direction: column;
        }
    }
    &_full-body {
        .el-card__body {
            height: 100%;
            width: 100%;
        }
    }
    &_padding-0 {
        .el-card__body {
            padding: 0;
        }
    }
}
 
/* Table 表格 element plus 2.2.0 版本
------------------------------- */
.el-table {
    --el-table-current-row-bg-color: rgb(230, 239, 255);
    --el-table-row-hover-bg-color: rgb(243, 249, 255);
    // 斑马条纹颜色
    --el-fill-color-lighter: rgb(248, 252, 255);
    --el-table-header-bg-color: #ecf5ff;
 
    .el-button.is-text {
        padding: 0;
    }
    // 表头背景色
    // 表头字体颜色
    thead {
        color: var(--el-text-color-regular);
        th {
            font-weight: 500;
        }
    }
}
 
/* 树形选择 proper
--------------------------------------------------------- */
.el-tree-select__popper {
    .el-tree-node__content {
        box-sizing: content-box;
        padding: 5px 0;
    }
}
 
/*防止分栏布局二级菜单很多时,滚动条消失问题*/
.layout-columns-warp .layout-aside .el-scrollbar__view {
    height: unset !important;
}
 
/* Pagination 分页
------------------------------- */
.el-pagination__editor {
    margin-right: 8px;
}
/*深色模式时分页高亮问题*/
.el-pagination.is-background .btn-next.is-active,
.el-pagination.is-background .btn-prev.is-active,
.el-pagination.is-background .el-pager li.is-active {
    background-color: var(--el-color-primary) !important;
    color: var(--el-color-white) !important;
}
// 分页组件靠右显示
.el-pagination {
    float: right;
    margin: 15px 0 15px 0 !important;
}
 
/* scrollbar
------------------------------- */
.el-scrollbar__bar {
    z-index: 4;
}
/*防止页面切换时,滚动条高度不变的问题(滚动条高度非滚动条滚动高度)*/
.el-scrollbar__wrap {
    max-height: 100%;
}
.el-select-dropdown .el-scrollbar__wrap {
    overflow-x: scroll !important;
}
/*修复Select 选择器高度问题*/
.el-select-dropdown__wrap {
    max-height: 274px !important;
}
/*修复Cascader 级联选择器高度问题*/
.el-cascader-menu__wrap.el-scrollbar__wrap {
    height: 204px !important;
}
/*用于界面高度自适应(main.vue),区分 scrollbar__view,防止其它使用 scrollbar 的地方出现滚动条消失*/
.layout-container-view .el-scrollbar__view {
    height: 100%;
}
 
/* Drawer 抽屉
------------------------------- */
.el-drawer {
    --el-drawer-padding-primary: unset !important;
    .el-drawer__header {
        padding: 0 15px !important;
        height: 50px;
        display: flex;
        align-items: center;
        margin-bottom: 0 !important;
        border-bottom: 1px solid var(--el-border-color);
        color: var(--el-text-color-primary);
    }
    .el-drawer__body {
        width: 100%;
        height: 100%;
        overflow: auto;
        padding: 18px;
    }
}
 
/* 数字输入(el-input-number 改造)
<el-input-number class="number-input" style="width: auto" controls-position="right" v-model="scope.row.X"></el-input-number>
--------------------------------------------------------- */
.number-input {
    .el-input-number__decrease {
        display: none;
    }
    .el-input-number__increase {
        display: none;
    }
    .el-input {
        .el-input__wrapper {
            padding: 0;
        }
    }
}
 
$--el-table-text-color: #fb6d49;