diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 51a97f7..0f6761b 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -137,7 +137,7 @@ ul{ } .app-container { - margin: 20px; + margin: 0 20px 20px 20px; } .components-container { diff --git a/src/assets/styles/mixin.scss b/src/assets/styles/mixin.scss index 639516a..40ee245 100644 --- a/src/assets/styles/mixin.scss +++ b/src/assets/styles/mixin.scss @@ -94,7 +94,6 @@ } } - @mixin breadcrumb-bg{ [data-theme="dark"] & { background-color: $background-color-dark; @@ -122,17 +121,39 @@ } } -@mixin bg_color() { +@mixin main_bg_color() { [data-theme="dark"] & { background-color: $background-color-dark; @include font-color($font-color-dark); } [data-theme="light"] & { - background-color: $background-color-light; + background-color: transparent; @include font-color($font-color-light); } } +@mixin dropdown_bg() { + [data-theme="dark"] & { + box-shadow: rgb(51 156 255) 0px 0px 10px 1px inset; + background: #02255F; + } + [data-theme="light"] & { + box-shadow: 0px 5px 11px 0px rgba(0,0,0,0.17); + background: #fff; + } +} + +@mixin dropdown_bg_hover() { + [data-theme="dark"] & { + background: #13439E; + color: #fff; + } + [data-theme="light"] & { + background: #F5F9FC; + color: #0348F3; + } +} + @mixin icon_color() { [data-theme="dark"] & { color: $icon-color-dark; @@ -142,28 +163,276 @@ } } -@mixin dropdown_bg() { +@mixin bg_color() { [data-theme="dark"] & { - box-shadow: rgb(51 156 255) 0px 0px 10px 1px inset; - background: #02255F; + background-color: $background-color-dark; + @include font-color($font-color-dark); } [data-theme="light"] & { - box-shadow: 0px 5px 11px 0px rgba(0,0,0,0.17); - background: #fff; + background-color: $background-color-light; + @include font-color($font-color-light); } } -@mixin dropdown_bg_hover() { +// 内容模块 背景-线条-font设置 +@mixin user_cont() { [data-theme="dark"] & { - background: #13439E; + background-color: $background-color-dark; + border: $mainContainerBorder; + @include font-color($font-color-dark); + } + [data-theme="light"] & { + background-color: $background-color-light; + border: none; + @include font-color($font-color-light); + } +} + +@mixin before_line_color() { + [data-theme="dark"] & { + border-top: 1px solid $mainColor; + border-left: 1px solid $mainColor; + } + [data-theme="light"] & { + border-top: none; + border-left: none; + } +} + +@mixin after_line_color() { + [data-theme="dark"] & { + border-right: 1px solid $mainColor; + border-bottom: 1px solid $mainColor; + } + [data-theme="light"] & { + border-right: none; + border-bottom: none; + } +} + +@mixin left_bottom_line_color() { + [data-theme="dark"] & { + border-bottom: 1px solid $mainColor; + border-left: 1px solid $mainColor; + } + [data-theme="light"] & { + border-left: none; + border-bottom: none; + } +} + +@mixin right_top_line_color() { + [data-theme="dark"] & { + border-right: 1px solid $mainColor; + border-top: 1px solid $mainColor; + } + [data-theme="light"] & { + border-right: none; + border-top: none; + } +} + +@mixin box_padding{ + [data-theme="dark"] & { + padding: 0 !important; + margin-top: 20px; + } + [data-theme="light"] & { + padding: 20px !important; + } +} + +@mixin tree_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 210px); + } + [data-theme="light"] & { + min-height: calc(100vh - 230px); + } +} + +@mixin table_height_min{ + [data-theme="dark"] & { + min-height: calc(100vh - 260px); + } + [data-theme="light"] & { + min-height: calc(100vh - 280px); + } +} + +@mixin input_style{ + [data-theme="dark"] & { + border: 1px solid $mainColor; color: #fff; } [data-theme="light"] & { - background: #F5F9FC; + border: 1px solid #E3E7EE; + color: #0C0E1E; + } +} + +@mixin tree_font_color{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} + +@mixin tree_style{ + @include tree_font_color; + [data-theme="dark"] & { + padding: 0 30px !important; + } +} + + + +@mixin tree_children_font{ + [data-theme="light"] & { + color: #545B65; + } +} + + +@mixin tree_children_padding{ + [data-theme="light"] & { + padding: 0 !important; + } +} + +@mixin tree_hover{ + [data-theme="dark"] & { + background-color: transparent !important; + background-image: $subMenuActiveBg; + } + [data-theme="light"] & { + background-color: #E8F2FF !important; color: #0348F3; } } +@mixin tree_active{ + [data-theme="dark"] & { + background-image: $subMenuActiveBg !important; + color: #fff; + } + [data-theme="light"] & { + background-color: #E8F2FF !important; + color: #0348F3 !important; + } +} + +@mixin elButton-style{ + [data-theme="dark"] & { + border-color: $mainColor; + color: #fff; + } + [data-theme="light"] & { + font-weight: bold; + border-color: #0348F3; + color: #0348F3; + } +} + +@mixin elButton-disabled-style{ + [data-theme="dark"] & { + color: #13439E; + background-color: transparent; + border-color: #13439E; + } + [data-theme="light"] & { + color: #B4C8FB; + border-color: #B4C8FB; + background-color: #F2F5FE; + } +} + +@mixin elButton-hover-style{ + [data-theme="dark"] & { + color: #fff; + background-color: #02255F; + border-color: $mainColor; + } + [data-theme="light"] & { + background-color: #E8F2FF; + } +} + + +@mixin elTable-style{ + [data-theme="dark"] & { + background-color: #02255f; + } + [data-theme="light"] & { + background-color: #F5F9FC; + } +} +@mixin elTable-font-style{ + [data-theme="dark"] & { + color: $mainColor; + } + [data-theme="light"] & { + color: #0C0E1E; + } +} +@mixin elTable-td-font-style{ + [data-theme="dark"] & { + color: $mainColor; + border-bottom: 1px dashed #113D72; + } + [data-theme="light"] & { + color: #545B65; + border-bottom: 1px solid #F5F9FC; + } +} +@mixin elTable-hover-style{ + [data-theme="dark"] & { + color: #fff; + background-color: #13439E; + } + [data-theme="light"] & { + background-color: #EAF3FB; + color: #545B65; + } +} + +@mixin checkbox-style{ + [data-theme="dark"] & { + border-color: $mainColor; + } + [data-theme="light"] & { + border-color: #D6D8DD; + } +} + +@mixin checkbox-disabled-style{ + [data-theme="dark"] & { + border-color: $mainColor; + background: transparent; + } + [data-theme="light"] & { + background-color: #E6E7E9; + } +} + +@mixin checkbox-active-style{ + [data-theme="dark"] & { + border-color: $mainColor; + background: transparent; + &::after{ + border-color: $mainColor; + } + } + [data-theme="light"] & { + border-color:#0348F3; + background-color: #0348F3; + &::after{ + border-color: #fff; + } + } +} \ No newline at end of file diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index ade36a8..50f223a 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -17,7 +17,7 @@ $font-color-dark : #fff; $background-color-light: #fff; //亮色bg主题 $main-bg-light: #F6F8FC; //亮色bg主题 $icon-color-light: #1C1C1C; -$font-color-light : #545B65; +$font-color-light: #545B65; $headerHeight: 64px; $sideBarWidth: 256px; diff --git a/src/assets/styles/yxk-admin.scss b/src/assets/styles/yxk-admin.scss index 3d4786f..edc1c4b 100644 --- a/src/assets/styles/yxk-admin.scss +++ b/src/assets/styles/yxk-admin.scss @@ -1,17 +1,15 @@ .head-container { - padding: 20px; + // padding: 20px; .filter-item { - display: inline-block; + // display: inline-block; vertical-align: middle; - margin-right: 20px; + margin-right: 10px; input { - border: 1px solid $mainColor; + @include input_style; background-color: transparent; - // @include bg_color; height: 30px; line-height: 30px; - color: #fff; } .iconfont{ line-height: 30px; @@ -23,9 +21,9 @@ .date-item { display: inline-block; vertical-align: middle; - border: 1px solid $mainColor; @include bg_color; - margin-right: 20px; + @include input_style; + margin-right: 10px; height: 30px !important; width: 230px !important; } @@ -45,7 +43,8 @@ margin-right: 0 !important; } .container-left{ - margin-right: 20px; + // margin-right: 20px; + // @include box_padding; } .container-left, .container-right, @@ -54,8 +53,7 @@ .header-container-wrap{ position: relative; min-height: 100%; - padding: 0 !important; - border: $mainContainerBorder; + @include user_cont; min-height: calc(100vh - 190px); &::before, &::after{ @@ -68,14 +66,12 @@ &::before{ top: -1px; left: -1px; - border-top: 1px solid $mainColor; - border-left: 1px solid $mainColor; + @include before_line_color; } &::after{ right: -1px; bottom: -1px; - border-right: 1px solid $mainColor; - border-bottom: 1px solid $mainColor; + @include after_line_color; } } @@ -110,6 +106,8 @@ // xu el-button .head-search{ + display: flex; + justify-content: flex-start; margin-bottom: 20px; .el-button{ margin-left: 0; @@ -120,24 +118,19 @@ .el-button, .el-button--info.is-plain{ font-size: 14px; - color: #fff; - border-color: $mainColor; background-color: transparent; + @include elButton-style; } .el-button.is-disabled, .el-button.is-disabled:hover, .el-button.is-disabled:focus{ - color: #13439E; - background-color: transparent; - border-color: #13439E; + @include elButton-disabled-style; } .el-button:hover, .el-button:focus, .el-button--info.is-plain:hover, .el-button--info.is-plain:focus{ - color: #fff; - background-color: #02255F; - border-color: $mainColor; + @include elButton-hover-style; } .el-button--mini{ @@ -182,21 +175,18 @@ .left-bottom-line{ bottom: -1px; left: -1px; - border-bottom: 1px solid $mainColor; - border-left: 1px solid $mainColor; + @include left_bottom_line_color; } .right-top-line{ right: -1px; top: -1px; - border-right: 1px solid $mainColor; - border-top: 1px solid $mainColor; + @include right_top_line_color; } .right-bottom-line{ right: -1px; bottom: -1px; - border-right: 1px solid $mainColor; - border-bottom: 1px solid $mainColor; + @include after_line_color; } .el-tree{ background: transparent !important; @@ -204,47 +194,49 @@ background-color: transparent !important; } .is-current>.el-tree-node__content { - background-image: $subMenuActiveBg !important; - color: #fff; + @include tree_active; } .el-tree-node__content{ - padding: 0 30px !important; height: 40px; - color: $mainColor; + @include tree_style; background-color: transparent; .el-tree-node__label{ font-size: 16px; font-weight: 600; } &:hover{ - background-color: transparent !important; - background-image: $subMenuActiveBg; + @include tree_hover; } } .el-tree-node__expand-icon{ font-size: 16px; - color: $mainColor; + @include tree_font_color; } .el-tree-node__children{ padding: 0 18px; .el-tree-node__content{ + @include tree_children_padding; height: 30px; } .el-tree-node__label{ + @include tree_children_font; font-size: 14px; font-weight: normal; + } } } .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{ - background-color: transparent; - background-image: $subMenuActiveBg; + @include tree_hover; +} +.el-tree .el-tree-node__children .is-current .el-tree-node__label{ + @include tree_active; } .el-date-editor .el-range-input{ background: transparent; - color: #fff; + @include tree_font_color; } // table @@ -261,12 +253,11 @@ .el-table__header-wrapper, .el-table__header{ th.el-table__cell{ - background-color: #02255F; - // border-top: 1px solid #113D72; + @include elTable-style; border-bottom: none; &>.cell{ - font-size: 16px; - color: $mainColor; + font-size: 14px; + @include elTable-font-style; } } } @@ -274,9 +265,8 @@ .el-table__body-wrapper, .el-table__fixed-right{ td.el-table__cell{ - color: $mainColor; + @include elTable-td-font-style; font-size: 14px; - border-bottom: 1px dashed #113D72; padding: 5px 0; } } @@ -288,24 +278,21 @@ background-color: transparent; } - .el-checkbox__input.is-checked .el-checkbox__inner, + .el-checkbox__input.is-checked .el-checkbox__inner{ + @include checkbox-active-style; + } + .el-checkbox__input.is-disabled .el-checkbox__inner{ - border-color: $mainColor; - background: transparent; - &::after{ - border-color: $mainColor; - } + @include checkbox-disabled-style; } .el-table__body tr.hover-row > td, .el-table__body tr.hover-row.current-row > td, .el-table__body tr.hover-row.el-table__row--striped > td, .el-table__body tr.hover-row.el-table__row--striped.current-row > td { - color: #fff; - background-color: #13439E; + @include elTable-hover-style; .el-checkbox__input.is-checked .el-checkbox__inner{ - background: #fff; - border-color: #fff; + @include checkbox-active-style; } } .el-button{ @@ -332,11 +319,9 @@ .el-table__body tr.el-table__row:focus>td.el-table__cell, .el-table__body tr.current-row:hover>td.el-table__cell, .el-table__body tr.current-row:focus>td.el-table__cell{ - color: #fff; - background-color: #13439E; + @include elTable-hover-style; .el-checkbox__input.is-checked .el-checkbox__inner{ - background: #fff; - border-color: #fff; + @include checkbox-active-style; } } @@ -346,7 +331,7 @@ .el-checkbox__inner{ background: transparent; - border-color: $mainColor; + @include checkbox-style; } .el-icon-arrow-right:before{ @@ -357,8 +342,10 @@ } // 分页 .el-pagination{ - padding: 2px 10px; - margin: 10px 0 !important; + display: flex; + justify-content: flex-end; + // padding: 2px 10px; + margin: 64px 0 10px 0 !important; .el-pagination__total{ color: $mainColor; } @@ -906,7 +893,7 @@ input[type ='number'] { color: #fff; } .el-table__header-wrapper{ - background-color: #02255f; + @include elTable-style; } .svg-style{ @@ -927,18 +914,22 @@ input[type ='number'] { .el-select-dropdown, .el-dropdown-menu{ - top: 46px !important; margin: 0; padding: 17px 0; @include dropdown_bg; border: none; } +.el-dropdown-menu{ + top: 46px !important; +} .el-select-dropdown__item{ - color: $mainColor; + // color: $mainColor; + @include icon_color; } .el-select-dropdown__item.hover, .el-select-dropdown__item:hover{ - background-color: #13439E; + // background-color: #13439E; + @include dropdown_bg_hover; } .el-select-dropdown.is-multiple .el-select-dropdown__item.selected{ diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 6bf3d14..2422b9f 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -74,7 +74,7 @@ export default { position: relative; flex: 1; font-size: 14px; - line-height: 50px; + line-height: 55px; padding-left: 30px; &::before { position: absolute; diff --git a/src/components/Crud/CRUD.operation.vue b/src/components/Crud/CRUD.operation.vue index 28a019f..4da7464 100644 --- a/src/components/Crud/CRUD.operation.vue +++ b/src/components/Crud/CRUD.operation.vue @@ -4,7 +4,8 @@ - + + 新增 @@ -31,7 +32,7 @@ - + @@ -203,7 +204,7 @@ export default { } - diff --git a/src/components/Crud/RR.operation.vue b/src/components/Crud/RR.operation.vue index 4e3e62e..4c6ec9a 100644 --- a/src/components/Crud/RR.operation.vue +++ b/src/components/Crud/RR.operation.vue @@ -1,9 +1,9 @@ diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index ac1e6c7..684177e 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -28,10 +28,9 @@ export default { .app-main { /* 100= navbar 100 */ min-height: calc(100vh - 64px); - width: 100%; - margin-top: 50px; + margin-top: 55px; position: relative; - @include bg_color; + @include main_bg_color; overflow: hidden; } @@ -41,14 +40,26 @@ export default { .hasTagsView { .app-main { - /* 84 = navbar + tags-view = 64 + 50 */ - min-height: calc(100vh - 114px); + /* 119px = navbar + tags-view = 64 + 55 */ + min-height: calc(100vh - 119px); } .fixed-header+.app-main { padding-top: $headerHeight; } } + +.hideSidebar{ + .app-main{ + max-width: calc(100vw - 54px); + } +} + +.openSidebar{ + .app-main{ + max-width: calc(100vw - 256px); + } +}