wangxx il y a 4 mois
Parent
commit
48647d788d

+ 99 - 0
src/assets/styles/btn.scss

@@ -0,0 +1,99 @@
1
+@use './variables.module.scss' as *;
2
+
3
+@mixin colorBtn($color) {
4
+  background: $color;
5
+
6
+  &:hover {
7
+    color: $color;
8
+
9
+    &:before,
10
+    &:after {
11
+      background: $color;
12
+    }
13
+  }
14
+}
15
+
16
+.blue-btn {
17
+  @include colorBtn($blue)
18
+}
19
+
20
+.light-blue-btn {
21
+  @include colorBtn($light-blue)
22
+}
23
+
24
+.red-btn {
25
+  @include colorBtn($red)
26
+}
27
+
28
+.pink-btn {
29
+  @include colorBtn($pink)
30
+}
31
+
32
+.green-btn {
33
+  @include colorBtn($green)
34
+}
35
+
36
+.tiffany-btn {
37
+  @include colorBtn($tiffany)
38
+}
39
+
40
+.yellow-btn {
41
+  @include colorBtn($yellow)
42
+}
43
+
44
+.pan-btn {
45
+  font-size: 14px;
46
+  color: #fff;
47
+  padding: 14px 36px;
48
+  border-radius: 8px;
49
+  border: none;
50
+  outline: none;
51
+  transition: 600ms ease all;
52
+  position: relative;
53
+  display: inline-block;
54
+
55
+  &:hover {
56
+    background: #fff;
57
+
58
+    &:before,
59
+    &:after {
60
+      width: 100%;
61
+      transition: 600ms ease all;
62
+    }
63
+  }
64
+
65
+  &:before,
66
+  &:after {
67
+    content: '';
68
+    position: absolute;
69
+    top: 0;
70
+    right: 0;
71
+    height: 2px;
72
+    width: 0;
73
+    transition: 400ms ease all;
74
+  }
75
+
76
+  &::after {
77
+    right: inherit;
78
+    top: inherit;
79
+    left: 0;
80
+    bottom: 0;
81
+  }
82
+}
83
+
84
+.custom-button {
85
+  display: inline-block;
86
+  line-height: 1;
87
+  white-space: nowrap;
88
+  cursor: pointer;
89
+  background: #fff;
90
+  color: #fff;
91
+  -webkit-appearance: none;
92
+  text-align: center;
93
+  box-sizing: border-box;
94
+  outline: 0;
95
+  margin: 0;
96
+  padding: 10px 15px;
97
+  font-size: 14px;
98
+  border-radius: 4px;
99
+}

+ 96 - 0
src/assets/styles/element-ui.scss

@@ -0,0 +1,96 @@
1
+// cover some element-ui styles
2
+
3
+.el-breadcrumb__inner,
4
+.el-breadcrumb__inner a {
5
+  font-weight: 400 !important;
6
+}
7
+
8
+.el-upload {
9
+  input[type="file"] {
10
+    display: none !important;
11
+  }
12
+}
13
+
14
+.el-upload__input {
15
+  display: none;
16
+}
17
+
18
+.cell {
19
+  .el-tag {
20
+    margin-right: 0px;
21
+  }
22
+}
23
+
24
+.small-padding {
25
+  .cell {
26
+    padding-left: 5px;
27
+    padding-right: 5px;
28
+  }
29
+}
30
+
31
+.fixed-width {
32
+  .el-button--mini {
33
+    padding: 7px 10px;
34
+    width: 60px;
35
+  }
36
+}
37
+
38
+.status-col {
39
+  .cell {
40
+    padding: 0 10px;
41
+    text-align: center;
42
+
43
+    .el-tag {
44
+      margin-right: 0px;
45
+    }
46
+  }
47
+}
48
+
49
+// to fixed https://github.com/ElemeFE/element/issues/2461
50
+.el-dialog {
51
+  transform: none;
52
+  left: 0;
53
+  position: relative;
54
+  margin: 0 auto;
55
+}
56
+
57
+// refine element ui upload
58
+.upload-container {
59
+  .el-upload {
60
+    width: 100%;
61
+
62
+    .el-upload-dragger {
63
+      width: 100%;
64
+      height: 200px;
65
+    }
66
+  }
67
+}
68
+
69
+// dropdown
70
+.el-dropdown-menu {
71
+  a {
72
+    display: block
73
+  }
74
+}
75
+
76
+// fix date-picker ui bug in filter-item
77
+.el-range-editor.el-input__inner {
78
+  display: inline-flex !important;
79
+}
80
+
81
+// to fix el-date-picker css style
82
+.el-range-separator {
83
+  box-sizing: content-box;
84
+}
85
+
86
+.el-menu--collapse
87
+  > div
88
+  > .el-submenu
89
+  > .el-submenu__title
90
+  .el-submenu__icon-arrow {
91
+  display: none;
92
+}
93
+
94
+.el-dropdown .el-dropdown-link{
95
+  color: var(--el-color-primary) !important;
96
+}

+ 179 - 0
src/assets/styles/index.scss

@@ -0,0 +1,179 @@
1
+@use './mixin.scss';
2
+@use './transition.scss';
3
+@use './element-ui.scss';
4
+@use './sidebar.scss';
5
+@use './btn.scss';
6
+@use './ruoyi.scss';
7
+
8
+body {
9
+  height: 100%;
10
+  margin: 0;
11
+  -moz-osx-font-smoothing: grayscale;
12
+  -webkit-font-smoothing: antialiased;
13
+  text-rendering: optimizeLegibility;
14
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
15
+}
16
+
17
+label {
18
+  font-weight: 700;
19
+}
20
+
21
+html {
22
+  height: 100%;
23
+  box-sizing: border-box;
24
+}
25
+
26
+#app {
27
+  height: 100%;
28
+}
29
+
30
+*,
31
+*:before,
32
+*:after {
33
+  box-sizing: inherit;
34
+}
35
+
36
+.no-padding {
37
+  padding: 0px !important;
38
+}
39
+
40
+.padding-content {
41
+  padding: 4px 0;
42
+}
43
+
44
+a:focus,
45
+a:active {
46
+  outline: none;
47
+}
48
+
49
+a,
50
+a:focus,
51
+a:hover {
52
+  cursor: pointer;
53
+  color: inherit;
54
+  text-decoration: none;
55
+}
56
+
57
+div:focus {
58
+  outline: none;
59
+}
60
+
61
+.fr {
62
+  float: right;
63
+}
64
+
65
+.fl {
66
+  float: left;
67
+}
68
+
69
+.pr-5 {
70
+  padding-right: 5px;
71
+}
72
+
73
+.pl-5 {
74
+  padding-left: 5px;
75
+}
76
+
77
+.block {
78
+  display: block;
79
+}
80
+
81
+.pointer {
82
+  cursor: pointer;
83
+}
84
+
85
+.inlineBlock {
86
+  display: block;
87
+}
88
+
89
+.clearfix {
90
+  &:after {
91
+    visibility: hidden;
92
+    display: block;
93
+    font-size: 0;
94
+    content: " ";
95
+    clear: both;
96
+    height: 0;
97
+  }
98
+}
99
+
100
+aside {
101
+  background: #eef1f6;
102
+  padding: 8px 24px;
103
+  margin-bottom: 20px;
104
+  border-radius: 2px;
105
+  display: block;
106
+  line-height: 32px;
107
+  font-size: 16px;
108
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
109
+  color: #2c3e50;
110
+  -webkit-font-smoothing: antialiased;
111
+  -moz-osx-font-smoothing: grayscale;
112
+
113
+  a {
114
+    color: #337ab7;
115
+    cursor: pointer;
116
+
117
+    &:hover {
118
+      color: rgb(32, 160, 255);
119
+    }
120
+  }
121
+}
122
+
123
+//main-container全局样式
124
+.app-container {
125
+  padding: 20px;
126
+}
127
+
128
+.components-container {
129
+  margin: 30px 50px;
130
+  position: relative;
131
+}
132
+
133
+.text-center {
134
+  text-align: center
135
+}
136
+
137
+.sub-navbar {
138
+  height: 50px;
139
+  line-height: 50px;
140
+  position: relative;
141
+  width: 100%;
142
+  text-align: right;
143
+  padding-right: 20px;
144
+  transition: 600ms ease position;
145
+  background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
146
+
147
+  .subtitle {
148
+    font-size: 20px;
149
+    color: #fff;
150
+  }
151
+
152
+  &.draft {
153
+    background: #d0d0d0;
154
+  }
155
+
156
+  &.deleted {
157
+    background: #d0d0d0;
158
+  }
159
+}
160
+
161
+.link-type,
162
+.link-type:focus {
163
+  color: #337ab7;
164
+  cursor: pointer;
165
+
166
+  &:hover {
167
+    color: rgb(32, 160, 255);
168
+  }
169
+}
170
+
171
+.filter-container {
172
+  padding-bottom: 10px;
173
+
174
+  .filter-item {
175
+    display: inline-block;
176
+    vertical-align: middle;
177
+    margin-bottom: 10px;
178
+  }
179
+}

+ 66 - 0
src/assets/styles/mixin.scss

@@ -0,0 +1,66 @@
1
+@mixin clearfix {
2
+  &:after {
3
+    content: "";
4
+    display: table;
5
+    clear: both;
6
+  }
7
+}
8
+
9
+@mixin scrollBar {
10
+  &::-webkit-scrollbar-track-piece {
11
+    background: #d3dce6;
12
+  }
13
+
14
+  &::-webkit-scrollbar {
15
+    width: 6px;
16
+  }
17
+
18
+  &::-webkit-scrollbar-thumb {
19
+    background: #99a9bf;
20
+    border-radius: 20px;
21
+  }
22
+}
23
+
24
+@mixin relative {
25
+  position: relative;
26
+  width: 100%;
27
+  height: 100%;
28
+}
29
+
30
+@mixin pct($pct) {
31
+  width: #{$pct};
32
+  position: relative;
33
+  margin: 0 auto;
34
+}
35
+
36
+@mixin triangle($width, $height, $color, $direction) {
37
+  $width: $width/2;
38
+  $color-border-style: $height solid $color;
39
+  $transparent-border-style: $width solid transparent;
40
+  height: 0;
41
+  width: 0;
42
+
43
+  @if $direction==up {
44
+    border-bottom: $color-border-style;
45
+    border-left: $transparent-border-style;
46
+    border-right: $transparent-border-style;
47
+  }
48
+
49
+  @else if $direction==right {
50
+    border-left: $color-border-style;
51
+    border-top: $transparent-border-style;
52
+    border-bottom: $transparent-border-style;
53
+  }
54
+
55
+  @else if $direction==down {
56
+    border-top: $color-border-style;
57
+    border-left: $transparent-border-style;
58
+    border-right: $transparent-border-style;
59
+  }
60
+
61
+  @else if $direction==left {
62
+    border-right: $color-border-style;
63
+    border-top: $transparent-border-style;
64
+    border-bottom: $transparent-border-style;
65
+  }
66
+}

+ 290 - 0
src/assets/styles/ruoyi.scss

@@ -0,0 +1,290 @@
1
+/**
2
+ * 通用css样式布局处理
3
+ * Copyright (c) 2019 ruoyi
4
+ */
5
+
6
+/** 基础通用 **/
7
+.pt5 {
8
+  padding-top: 5px;
9
+}
10
+.pr5 {
11
+  padding-right: 5px;
12
+}
13
+.pb5 {
14
+  padding-bottom: 5px;
15
+}
16
+.mt5 {
17
+  margin-top: 5px;
18
+}
19
+.mr5 {
20
+  margin-right: 5px;
21
+}
22
+.mb5 {
23
+  margin-bottom: 5px;
24
+}
25
+.mb8 {
26
+  margin-bottom: 8px;
27
+}
28
+.ml5 {
29
+  margin-left: 5px;
30
+}
31
+.mt10 {
32
+  margin-top: 10px;
33
+}
34
+.mr10 {
35
+  margin-right: 10px;
36
+}
37
+.mb10 {
38
+  margin-bottom: 10px;
39
+}
40
+.ml10 {
41
+  margin-left: 10px;
42
+}
43
+.mt20 {
44
+  margin-top: 20px;
45
+}
46
+.mr20 {
47
+  margin-right: 20px;
48
+}
49
+.mb20 {
50
+  margin-bottom: 20px;
51
+}
52
+.ml20 {
53
+  margin-left: 20px;
54
+}
55
+
56
+.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
57
+  font-family: inherit;
58
+  font-weight: 500;
59
+  line-height: 1.1;
60
+  color: inherit;
61
+}
62
+
63
+.el-form .el-form-item__label {
64
+  font-weight: 700;
65
+}
66
+.el-dialog:not(.is-fullscreen) {
67
+  margin-top: 6vh !important;
68
+}
69
+
70
+.el-dialog.scrollbar .el-dialog__body {
71
+  overflow: auto;
72
+  overflow-x: hidden;
73
+  max-height: 70vh;
74
+  padding: 10px 20px 0;
75
+}
76
+
77
+.el-table {
78
+  .el-table__header-wrapper, .el-table__fixed-header-wrapper {
79
+    th {
80
+      word-break: break-word;
81
+      background-color: #f8f8f9 !important;
82
+      color: #515a6e;
83
+      height: 40px !important;
84
+      font-size: 13px;
85
+    }
86
+  }
87
+  .el-table__body-wrapper {
88
+    .el-button [class*="el-icon-"] + span {
89
+      margin-left: 1px;
90
+    }
91
+  }
92
+}
93
+
94
+/** 表单布局 **/
95
+.form-header {
96
+  font-size:15px;
97
+  color:#6379bb;
98
+  border-bottom:1px solid #ddd;
99
+  margin:8px 10px 25px 10px;
100
+  padding-bottom:5px
101
+}
102
+
103
+/** 表格布局 **/
104
+.pagination-container {
105
+  display: flex;
106
+  justify-content: flex-end;
107
+  margin-top: 20px;
108
+  background-color: transparent !important;
109
+}
110
+
111
+/* 弹窗中的分页器 */
112
+.el-dialog .pagination-container {
113
+  position: static !important;
114
+  margin: 10px 0 0 0;
115
+  padding: 0 !important;
116
+  
117
+  .el-pagination {
118
+    position: static;
119
+  }
120
+}
121
+
122
+/* 移动端适配 */
123
+@media (max-width: 768px) {
124
+  .pagination-container {
125
+    .el-pagination {
126
+      > .el-pagination__jump {
127
+        display: none !important;
128
+      }
129
+      > .el-pagination__sizes {
130
+        display: none !important;
131
+      }
132
+    }
133
+  }
134
+}
135
+
136
+/* tree border */
137
+.tree-border {
138
+  margin-top: 5px;
139
+  border: 1px solid var(--el-border-color-light, #e5e6e7);
140
+  background: var(--el-bg-color, #FFFFFF) none;
141
+  border-radius:4px;
142
+  width: 100%;
143
+}
144
+
145
+.el-table .fixed-width .el-button--small {
146
+  padding-left: 0;
147
+  padding-right: 0;
148
+  width: inherit;
149
+}
150
+
151
+/** 表格更多操作下拉样式 */
152
+.el-table .el-dropdown-link {
153
+  cursor: pointer;
154
+  color: #409EFF;
155
+  margin-left: 10px;
156
+}
157
+
158
+.el-table .el-dropdown, .el-icon-arrow-down {
159
+  font-size: 12px;
160
+}
161
+
162
+.el-tree-node__content > .el-checkbox {
163
+  margin-right: 8px;
164
+}
165
+
166
+.list-group-striped > .list-group-item {
167
+  border-left: 0;
168
+  border-right: 0;
169
+  border-radius: 0;
170
+  padding-left: 0;
171
+  padding-right: 0;
172
+}
173
+
174
+.list-group {
175
+  padding-left: 0px;
176
+  list-style: none;
177
+}
178
+
179
+.list-group-item {
180
+  border-bottom: 1px solid #e7eaec;
181
+  border-top: 1px solid #e7eaec;
182
+  margin-bottom: -1px;
183
+  padding: 11px 0px;
184
+  font-size: 13px;
185
+}
186
+
187
+.pull-right {
188
+  float: right !important;
189
+}
190
+
191
+.el-card__header {
192
+  padding: 14px 15px 10px;
193
+  min-height: 40px;
194
+}
195
+
196
+.el-card__body {
197
+  padding: 15px 20px 20px 20px;
198
+}
199
+
200
+.card-box {
201
+  margin-bottom: 10px;
202
+}
203
+
204
+/* button color */
205
+.el-button--cyan.is-active,
206
+.el-button--cyan:active {
207
+  background: #20B2AA;
208
+  border-color: #20B2AA;
209
+  color: #FFFFFF;
210
+}
211
+
212
+.el-button--cyan:focus,
213
+.el-button--cyan:hover {
214
+  background: #48D1CC;
215
+  border-color: #48D1CC;
216
+  color: #FFFFFF;
217
+}
218
+
219
+.el-button--cyan {
220
+  background-color: #20B2AA;
221
+  border-color: #20B2AA;
222
+  color: #FFFFFF;
223
+}
224
+
225
+/* text color */
226
+.text-navy {
227
+  color: #1ab394;
228
+}
229
+
230
+.text-primary {
231
+  color: inherit;
232
+}
233
+
234
+.text-success {
235
+  color: #1c84c6;
236
+}
237
+
238
+.text-info {
239
+  color: #23c6c8;
240
+}
241
+
242
+.text-warning {
243
+  color: #f8ac59;
244
+}
245
+
246
+.text-danger {
247
+  color: #ed5565;
248
+}
249
+
250
+.text-muted {
251
+  color: #888888;
252
+}
253
+
254
+/* image */
255
+.img-circle {
256
+  border-radius: 50%;
257
+}
258
+
259
+.img-lg {
260
+  width: 120px;
261
+  height: 120px;
262
+}
263
+
264
+.avatar-upload-preview {
265
+  position: absolute;
266
+  top: 50%;
267
+  transform: translate(50%, -50%);
268
+  width: 200px;
269
+  height: 200px;
270
+  border-radius: 50%;
271
+  box-shadow: 0 0 4px #ccc;
272
+  overflow: hidden;
273
+}
274
+
275
+/* 拖拽列样式 */
276
+.sortable-ghost{
277
+  opacity: .8;
278
+  color: #fff!important;
279
+  background: #42b983!important;
280
+}
281
+
282
+/* 表格右侧工具栏样式 */
283
+.top-right-btn {
284
+  margin-left: auto;
285
+}
286
+
287
+/* 分割面板样式 */
288
+.splitpanes.default-theme .splitpanes__pane {
289
+  background-color: var(--splitpanes-default-bg) !important;
290
+}

+ 238 - 0
src/assets/styles/sidebar.scss

@@ -0,0 +1,238 @@
1
+@use './variables.module.scss' as vars;
2
+
3
+#app {
4
+
5
+  .main-container {
6
+    min-height: 100%;
7
+    transition: margin-left .28s;
8
+    margin-left: vars.$base-sidebar-width;
9
+    position: relative;
10
+  }
11
+
12
+  .sidebarHide {
13
+    margin-left: 0!important;
14
+  }
15
+
16
+  .sidebar-container {
17
+    transition: width 0.28s;
18
+    width: vars.$base-sidebar-width !important;
19
+    height: 100%;
20
+    position: fixed;
21
+    font-size: 0px;
22
+    top: 0;
23
+    bottom: 0;
24
+    left: 0;
25
+    z-index: 1001;
26
+    overflow: hidden;
27
+    -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
28
+    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
29
+
30
+    // reset element-ui css
31
+    .horizontal-collapse-transition {
32
+      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
33
+    }
34
+
35
+    .scrollbar-wrapper {
36
+      overflow-x: hidden !important;
37
+    }
38
+
39
+    .el-scrollbar__bar.is-vertical {
40
+      right: 0px;
41
+    }
42
+
43
+    .el-scrollbar {
44
+      height: 100%;
45
+    }
46
+
47
+    &.has-logo {
48
+      .el-scrollbar {
49
+        height: calc(100% - 50px);
50
+      }
51
+    }
52
+
53
+    .is-horizontal {
54
+      display: none;
55
+    }
56
+
57
+    a {
58
+      display: inline-block;
59
+      width: 100%;
60
+      overflow: hidden;
61
+    }
62
+
63
+    .svg-icon {
64
+      margin-right: 16px;
65
+    }
66
+
67
+    .el-menu {
68
+      border: none;
69
+      height: 100%;
70
+      width: 100% !important;
71
+    }
72
+
73
+    .el-menu-item, .menu-title {
74
+      overflow: hidden !important;
75
+      text-overflow: ellipsis !important;
76
+      white-space: nowrap !important;
77
+    }
78
+
79
+    .el-menu-item .el-menu-tooltip__trigger {
80
+      display: inline-block !important;
81
+    }
82
+
83
+    // menu hover
84
+    .sub-menu-title-noDropdown,
85
+    .el-sub-menu__title {
86
+      &:hover {
87
+        background-color: rgba(0, 0, 0, 0.06) !important;
88
+      }
89
+    }
90
+
91
+    & .theme-dark .is-active > .el-sub-menu__title {
92
+      color: vars.$base-menu-color-active !important;
93
+    }
94
+
95
+    & .nest-menu .el-sub-menu>.el-sub-menu__title,
96
+    & .el-sub-menu .el-menu-item {
97
+      min-width: vars.$base-sidebar-width !important;
98
+
99
+      &:hover {
100
+        background-color: rgba(0, 0, 0, 0.06) !important;
101
+      }
102
+    }
103
+
104
+    & .theme-dark .nest-menu .el-sub-menu>.el-sub-menu__title,
105
+    & .theme-dark .el-sub-menu .el-menu-item {
106
+      background-color: vars.$base-sub-menu-background;
107
+
108
+      &:hover {
109
+        background-color: vars.$base-sub-menu-hover !important;
110
+      }
111
+    }
112
+  }
113
+
114
+  .hideSidebar {
115
+    .sidebar-container {
116
+      width: 54px !important;
117
+    }
118
+
119
+    .main-container {
120
+      margin-left: 54px;
121
+    }
122
+
123
+    .sub-menu-title-noDropdown {
124
+      padding: 0 !important;
125
+      position: relative;
126
+
127
+      .el-tooltip {
128
+        padding: 0 !important;
129
+
130
+        .svg-icon {
131
+          margin-left: 20px;
132
+        }
133
+      }
134
+    }
135
+
136
+    .el-sub-menu {
137
+      overflow: hidden;
138
+
139
+      &>.el-sub-menu__title {
140
+        padding: 0 !important;
141
+
142
+        .svg-icon {
143
+          margin-left: 20px;
144
+        }
145
+
146
+      }
147
+    }
148
+
149
+    .el-menu--collapse {
150
+      .el-sub-menu {
151
+        &>.el-sub-menu__title {
152
+          &>span {
153
+            height: 0;
154
+            width: 0;
155
+            overflow: hidden;
156
+            visibility: hidden;
157
+            display: inline-block;
158
+          }
159
+          &>i {
160
+            height: 0;
161
+            width: 0;
162
+            overflow: hidden;
163
+            visibility: hidden;
164
+            display: inline-block;
165
+          }
166
+        }
167
+      }
168
+    }
169
+  }
170
+
171
+  .el-menu--collapse .el-menu .el-sub-menu {
172
+    min-width: vars.$base-sidebar-width !important;
173
+  }
174
+
175
+  // mobile responsive
176
+  .mobile {
177
+    .main-container {
178
+      margin-left: 0px;
179
+    }
180
+
181
+    .sidebar-container {
182
+      transition: transform .28s;
183
+      width: vars.$base-sidebar-width !important;
184
+    }
185
+
186
+    &.hideSidebar {
187
+      .sidebar-container {
188
+        pointer-events: none;
189
+        transition-duration: 0.3s;
190
+        transform: translate3d(-(vars.$base-sidebar-width), 0, 0);
191
+      }
192
+    }
193
+  }
194
+
195
+  .withoutAnimation {
196
+
197
+    .main-container,
198
+    .sidebar-container {
199
+      transition: none;
200
+    }
201
+  }
202
+}
203
+
204
+// when menu collapsed
205
+.el-menu--vertical {
206
+  &>.el-menu {
207
+    .svg-icon {
208
+      margin-right: 16px;
209
+    }
210
+  }
211
+
212
+  .nest-menu .el-sub-menu>.el-sub-menu__title,
213
+  .el-menu-item {
214
+    &:hover {
215
+      // you can use $sub-menuHover
216
+      background-color: rgba(0, 0, 0, 0.06) !important;
217
+    }
218
+  }
219
+
220
+  // the scroll bar appears when the sub-menu is too long
221
+  >.el-menu--popup {
222
+    max-height: 100vh;
223
+    overflow-y: auto;
224
+
225
+    &::-webkit-scrollbar-track-piece {
226
+      background: #d3dce6;
227
+    }
228
+
229
+    &::-webkit-scrollbar {
230
+      width: 6px;
231
+    }
232
+
233
+    &::-webkit-scrollbar-thumb {
234
+      background: #99a9bf;
235
+      border-radius: 20px;
236
+    }
237
+  }
238
+}

+ 49 - 0
src/assets/styles/transition.scss

@@ -0,0 +1,49 @@
1
+// global transition css
2
+
3
+/* fade */
4
+.fade-enter-active,
5
+.fade-leave-active {
6
+  transition: opacity 0.28s;
7
+}
8
+
9
+.fade-enter,
10
+.fade-leave-active {
11
+  opacity: 0;
12
+}
13
+
14
+/* fade-transform */
15
+.fade-transform--move,
16
+.fade-transform-leave-active,
17
+.fade-transform-enter-active {
18
+  transition: all .5s;
19
+}
20
+
21
+.fade-transform-enter {
22
+  opacity: 0;
23
+  transform: translateX(-30px);
24
+}
25
+
26
+.fade-transform-leave-to {
27
+  opacity: 0;
28
+  transform: translateX(30px);
29
+}
30
+
31
+/* breadcrumb transition */
32
+.breadcrumb-enter-active,
33
+.breadcrumb-leave-active {
34
+  transition: all .5s;
35
+}
36
+
37
+.breadcrumb-enter,
38
+.breadcrumb-leave-active {
39
+  opacity: 0;
40
+  transform: translateX(20px);
41
+}
42
+
43
+.breadcrumb-move {
44
+  transition: all .5s;
45
+}
46
+
47
+.breadcrumb-leave-active {
48
+  position: absolute;
49
+}

+ 221 - 0
src/assets/styles/variables.module.scss

@@ -0,0 +1,221 @@
1
+// base color
2
+$blue: #324157;
3
+$light-blue: #333c46;
4
+$red: #C03639;
5
+$pink: #E65D6E;
6
+$green: #30B08F;
7
+$tiffany: #4AB7BD;
8
+$yellow: #FEC171;
9
+$panGreen: #30B08F;
10
+
11
+// 默认主题变量
12
+$menuText: #bfcbd9;
13
+$menuActiveText: #409eff;
14
+$menuBg: #304156;
15
+$menuHover: #263445;
16
+
17
+// 浅色主题theme-light
18
+$menuLightBg: #ffffff;
19
+$menuLightHover: #f0f1f5;
20
+$menuLightText: #303133;
21
+$menuLightActiveText: #409EFF;
22
+
23
+// 基础变量
24
+$base-sidebar-width: 200px;
25
+$sideBarWidth: 200px;
26
+
27
+// 菜单暗色变量
28
+$base-menu-color: #bfcbd9;
29
+$base-menu-color-active: #f4f4f5;
30
+$base-menu-background: #304156;
31
+$base-sub-menu-background: #1f2d3d;
32
+$base-sub-menu-hover: #001528;
33
+
34
+// 组件变量
35
+$--color-primary: #409EFF;
36
+$--color-success: #67C23A;
37
+$--color-warning: #E6A23C;
38
+$--color-danger: #F56C6C;
39
+$--color-info: #909399;
40
+
41
+:export {
42
+  menuText: $menuText;
43
+  menuActiveText: $menuActiveText;
44
+  menuBg: $menuBg;
45
+  menuHover: $menuHover;
46
+  menuLightBg: $menuLightBg;
47
+  menuLightHover: $menuLightHover;
48
+  menuLightText: $menuLightText;
49
+  menuLightActiveText: $menuLightActiveText;
50
+  sideBarWidth: $sideBarWidth;
51
+  // 导出基础颜色
52
+  blue: $blue;
53
+  lightBlue: $light-blue;
54
+  red: $red;
55
+  pink: $pink;
56
+  green: $green;
57
+  tiffany: $tiffany;
58
+  yellow: $yellow;
59
+  panGreen: $panGreen;
60
+  // 导出组件颜色
61
+  colorPrimary: $--color-primary;
62
+  colorSuccess: $--color-success;
63
+  colorWarning: $--color-warning;
64
+  colorDanger: $--color-danger;
65
+  colorInfo: $--color-info;
66
+}
67
+
68
+// CSS变量定义
69
+:root {
70
+  /* 亮色模式变量 */
71
+  --sidebar-bg: #{$menuBg};
72
+  --sidebar-text: #{$menuText};
73
+  --menu-hover: #{$menuHover};
74
+  
75
+  --navbar-bg: #ffffff;
76
+  --navbar-text: #303133;
77
+  
78
+  /* splitpanes default-theme 变量 */
79
+  --splitpanes-default-bg: #ffffff;
80
+
81
+}
82
+
83
+// 暗黑模式变量
84
+html.dark {
85
+  /* 默认通用 */
86
+  --el-bg-color: #141414;
87
+  --el-bg-color-overlay: #1d1e1f;
88
+  --el-text-color-primary: #ffffff;
89
+  --el-text-color-regular: #d0d0d0;
90
+  --el-border-color: #434343;
91
+  --el-border-color-light: #434343;
92
+
93
+  /* 侧边栏 */
94
+  --sidebar-bg: #141414;
95
+  --sidebar-text: #ffffff;
96
+  --menu-hover: #2d2d2d;
97
+  --menu-active-text: #{$menuActiveText};
98
+
99
+  /* 顶部导航栏 */
100
+  --navbar-bg: #141414;
101
+  --navbar-text: #ffffff;
102
+  --navbar-hover: #141414;
103
+
104
+  /* 标签栏 */
105
+  --tags-bg: #141414;
106
+  --tags-item-bg: #1d1e1f;
107
+  --tags-item-border: #303030;
108
+  --tags-item-text: #d0d0d0;
109
+  --tags-item-hover: #2d2d2d;
110
+  --tags-close-hover: #64666a;
111
+
112
+  /* splitpanes 组件暗黑模式变量 */
113
+  --splitpanes-bg: #141414;
114
+  --splitpanes-border: #303030;
115
+  --splitpanes-splitter-bg: #1d1e1f;
116
+  --splitpanes-splitter-hover-bg: #2d2d2d;
117
+
118
+  /* blockquote 暗黑模式变量 */
119
+  --blockquote-bg: #1d1e1f;
120
+  --blockquote-border: #303030;
121
+  --blockquote-text: #d0d0d0;
122
+  
123
+  /* Cron 时间表达式 模式变量 */
124
+  --cron-border: #303030;
125
+
126
+  /* splitpanes default-theme 暗黑模式变量 */
127
+  --splitpanes-default-bg: #141414;
128
+
129
+  /* 侧边栏菜单覆盖 */
130
+   .sidebar-container {
131
+    .el-menu-item, .menu-title {
132
+      color: var(--el-text-color-regular);
133
+    }
134
+    & .theme-dark .nest-menu .el-sub-menu>.el-sub-menu__title,
135
+    & .theme-dark .el-sub-menu .el-menu-item {
136
+      background-color: var(--el-bg-color) !important;
137
+    }
138
+  }
139
+
140
+  /* 顶部栏栏菜单覆盖 */
141
+  .el-menu--horizontal {
142
+    .el-menu-item {
143
+      &:not(.is-disabled) {
144
+        &:hover,
145
+        &:focus {
146
+          background-color: var(--navbar-hover) !important;
147
+        }
148
+      }
149
+    }
150
+  }
151
+
152
+  /* 分割窗格覆盖 */
153
+  .splitpanes {
154
+    background-color: var(--splitpanes-bg);
155
+
156
+    .splitpanes__pane {
157
+      background-color: var(--splitpanes-bg);
158
+      border-color: var(--splitpanes-border);
159
+    }
160
+
161
+    .splitpanes__splitter {
162
+      background-color: var(--splitpanes-splitter-bg);
163
+      border-color: var(--splitpanes-border);
164
+
165
+      &:hover {
166
+        background-color: var(--splitpanes-splitter-hover-bg);
167
+      }
168
+
169
+      &:before,
170
+      &:after {
171
+        background-color: var(--splitpanes-border);
172
+      }
173
+    }
174
+  }
175
+
176
+  /* 表格样式覆盖 */
177
+  .el-table {
178
+    --el-table-header-bg-color: var(--el-bg-color-overlay) !important;
179
+    --el-table-header-text-color: var(--el-text-color-regular) !important;
180
+    --el-table-border-color: var(--el-border-color-light) !important;
181
+    --el-table-row-hover-bg-color: var(--el-bg-color-overlay) !important;
182
+
183
+    .el-table__header-wrapper, .el-table__fixed-header-wrapper {
184
+      th {
185
+        background-color: var(--el-bg-color-overlay, #f8f8f9) !important;
186
+        color: var(--el-text-color-regular, #515a6e);
187
+      }
188
+    }
189
+  }
190
+
191
+  /* 树组件高亮样式覆盖 */
192
+  .el-tree {
193
+    .el-tree-node.is-current > .el-tree-node__content {
194
+      background-color: var(--el-bg-color-overlay) !important;
195
+      color: var(--el-color-primary);
196
+    }
197
+
198
+    .el-tree-node__content:hover {
199
+      background-color: var(--el-bg-color-overlay);
200
+    }
201
+  }
202
+  
203
+  /* 下拉菜单样式覆盖 */
204
+  .el-dropdown-menu__item:not(.is-disabled):focus, .el-dropdown-menu__item:not(.is-disabled):hover{
205
+    background-color: var(--navbar-hover) !important;
206
+  }
207
+
208
+  /* blockquote样式覆盖 */
209
+  blockquote {
210
+    background-color: var(--blockquote-bg) !important;
211
+    border-left-color: var(--blockquote-border) !important;
212
+    color: var(--blockquote-text) !important;
213
+  }
214
+  
215
+  /* 时间表达式标题样式覆盖 */
216
+  .popup-result .title {
217
+    background: var(--cron-border);
218
+  }
219
+
220
+}
221
+