zhitong.yu
8 天以前 378d781e6f35f89652aa36e079a8b7fc44cea77e
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
/* el-alert */
.el-alert {
  border: 1px solid;
}
 
/* 当前页面最大化 css */
.main-maximize {
  .aside-split,
  .el-aside,
  .el-header,
  .el-footer,
  .tabs-box {
    display: none !important;
  }
}
 
/* mask image */
.mask-image {
  padding-right: 50px;
  mask-image: linear-gradient(90deg, #000000 0%, #000000 calc(100% - 50px), transparent);
}
 
/* custom card */
.card {
  box-sizing: border-box;
  padding: 20px;
  overflow-x: hidden;
  background-color: var(--el-bg-color);
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgb(179 179 179 / 46.6%);
}
 
/* ProTable 不需要 card 样式(在组件内使用 ProTable 会使用到) */
.no-card {
  .card {
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .table-search {
    padding: 18px 0 0 !important;
    margin-bottom: 0 !important;
  }
}
 
/* content-box (常用内容盒子) */
.content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  .text {
    margin: 20px 0 30px;
    font-size: 23px;
    font-weight: bold;
    color: var(--el-text-color-regular);
  }
  .el-descriptions {
    width: 100%;
    padding: 40px 0 0;
    .el-descriptions__title {
      font-size: 18px;
    }
    .el-descriptions__label {
      width: 200px;
    }
  }
}
 
/* main-box (树形表格 treeFilter 页面会使用,左右布局 flex) */
.main-box {
  display: flex;
  width: 100%;
  height: 100%;
  .table-box {
    overflow: hidden;
  }
}
 
/* proTable */
.table-box,
.table-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-shadow: 0 1px 5px 0 rgb(179 179 179 / 46.6%);
 
  // table-search 表格搜索样式
  .table-search {
    padding: 18px 18px 0;
    margin-bottom: 10px;
    .el-form {
      .el-form-item__content > * {
        width: 100%;
      }
 
      // 去除时间选择器上下 padding
      .el-range-editor.el-input__wrapper {
        padding: 0 10px;
      }
    }
    .operation {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      margin-bottom: 18px;
    }
  }
 
  // 表格 header 样式
  .table-header {
    .header-button-lf,
    .header-button-ri {
      display: flex;
      flex-wrap: wrap;
      gap: 15px 12px;
      margin-bottom: 15px;
      .el-button:not(.el-input .el-button) {
        margin-left: 0;
      }
    }
    .header-button-lf {
      float: left;
    }
    .header-button-ri {
      float: right;
    }
  }
 
  // el-table 表格样式
  .el-table {
    flex: 1;
 
    // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
    table {
      width: 100%;
    }
    .el-table__header th {
      height: 45px;
      font-size: 15px;
      font-weight: bold;
      color: var(--el-text-color-primary);
      background: var(--el-fill-color-light);
    }
    .el-table__row {
      height: 45px;
      font-size: 14px;
      .move {
        cursor: move;
        .el-icon {
          cursor: move;
        }
      }
    }
 
    // 设置 el-table 中 header 文字不换行,并省略
    .el-table__header .el-table__cell > .cell {
      // white-space: nowrap;
      white-space: wrap;
    }
 
    // 解决表格数据为空时样式不居中问题(仅在element-plus中)
    .el-table__empty-block {
      position: absolute;
      .table-empty {
        line-height: 30px;
        img {
          display: inline-flex;
        }
      }
    }
 
    // table 中 image 图片样式
    .table-image {
      width: 50px;
      height: 50px;
      border-radius: 50%;
    }
  }
 
  // 表格 pagination 样式
  .el-pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
  }
}
 
/* el-table 组件大小 */
.el-table--small {
  .el-table__header th {
    height: 40px !important;
    font-size: 14px !important;
  }
  .el-table__row {
    height: 40px !important;
    font-size: 13px !important;
  }
}
.el-table--large {
  .el-table__header th {
    height: 50px !important;
    font-size: 16px !important;
  }
  .el-table__row {
    height: 50px !important;
    font-size: 15px !important;
  }
}
 
/* el-drawer */
.el-drawer {
  .el-drawer__header {
    padding: 16px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
    span {
      font-size: 17px;
      line-height: 17px;
      color: var(--el-text-color-primary) !important;
    }
  }
  .el-drawer__footer {
    border-top: 1px solid var(--el-border-color-lighter);
  }
 
  // select 样式
  .el-select {
    width: 100%;
  }
 
  // drawer-form 中存在两列 form-item 样式
  .drawer-multiColumn-form {
    display: flex;
    flex-wrap: wrap;
    .el-form-item {
      width: 47%;
      &:nth-child(2n-1) {
        margin-right: 5%;
      }
    }
  }
}
 
/* el-dialog */
.el-dialog {
  padding: 0;
  .el-dialog__header {
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid var(--el-border-color-lighter);
    .el-dialog__title {
      font-size: 17px;
    }
  }
  .el-dialog__body,
  .el-dialog__footer {
    padding: 15px 20px;
  }
}