diff --git a/src/App.vue b/src/App.vue index 8b7bb64..d97b438 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,9 +33,15 @@ export default { lang(val) { this.setLanguage(val) }, + theme(val) { + let closeMessage = this.$message.loading(`您选择了主题模式 ${val}, 正在切换...`) + themeUtil.changeThemeColor(this.themeColor, val).then(() => { + setTimeout(closeMessage, 1000) + }) + }, themeColor(val) { let closeMessage = this.$message.loading(`您选择了主题色 ${val}, 正在切换...`) - themeUtil.changeThemeColor(val).then(() => { + themeUtil.changeThemeColor(val, this.theme).then(() => { setTimeout(closeMessage, 1000) }) } diff --git a/src/components/card/ChartCard.vue b/src/components/card/ChartCard.vue index fc0ae7f..43cca3f 100644 --- a/src/components/card/ChartCard.vue +++ b/src/components/card/ChartCard.vue @@ -27,7 +27,7 @@ export default { } - diff --git a/src/components/menu/index.less b/src/components/menu/index.less new file mode 100644 index 0000000..171897f --- /dev/null +++ b/src/components/menu/index.less @@ -0,0 +1,37 @@ +.shadow{ + box-shadow: 2px 0 6px rgba(0, 21, 41, .35); +} +.side-menu{ + min-height: 100%; + z-index: 10; + .logo{ + height: 64px; + position: relative; + line-height: 64px; + padding-left: 24px; + -webkit-transition: all .3s; + transition: all .3s; + overflow: hidden; + background-color: @layout-trigger-background; + &.light{ + background-color: #fff; + h1{ + color: @primary-color; + } + } + h1{ + color: @menu-dark-highlight-color; + font-size: 20px; + margin: 0 0 0 12px; + display: inline-block; + vertical-align: middle; + } + img{ + width: 32px; + vertical-align: middle; + } + } +} +.menu{ + padding: 16px 0; +} diff --git a/src/components/menu/menu.js b/src/components/menu/menu.js index 638493b..f3e5a49 100644 --- a/src/components/menu/menu.js +++ b/src/components/menu/menu.js @@ -73,6 +73,9 @@ export default { keys.push(item.path) }) return keys + }, + menuTheme() { + return this.theme == 'light' ? this.theme : 'dark' } }, beforeMount() { @@ -212,7 +215,7 @@ export default { Menu, { props: { - theme: this.$props.theme, + theme: this.menuTheme, mode: this.$props.mode, openKeys: this.openKeys, selectedKeys: this.selectedKeys diff --git a/src/components/page/PageHeader.vue b/src/components/page/header/PageHeader.vue similarity index 63% rename from src/components/page/PageHeader.vue rename to src/components/page/header/PageHeader.vue index 5920abb..2ae5e85 100644 --- a/src/components/page/PageHeader.vue +++ b/src/components/page/header/PageHeader.vue @@ -57,46 +57,5 @@ export default { diff --git a/src/components/page/header/index.less b/src/components/page/header/index.less new file mode 100644 index 0000000..ba5b1d5 --- /dev/null +++ b/src/components/page/header/index.less @@ -0,0 +1,42 @@ +.page-header{ + background: @base-bg-color; + padding: 16px 24px; + .page-header-wide{ + &.head{ + margin: auto; + max-width: 1400px; + } + &.side{ + } + .breadcrumb{ + margin-bottom: 20px; + } + .detail{ + display: flex; + .row { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + } + .avatar { + margin:0 24px 0 0; + } + .main{ + width: 100%; + .title{ + font-size: 20px; + color: @title-color; + margin-bottom: 16px; + } + .content{ + display: flex; + flex-wrap: wrap; + color: @text-color-second; + } + .extra{ + display: flex; + } + } + } + } +} diff --git a/src/components/result/Result.vue b/src/components/result/Result.vue index c0d0238..58d1a7a 100644 --- a/src/components/result/Result.vue +++ b/src/components/result/Result.vue @@ -35,11 +35,11 @@ export default { color: @success-color; } .error { - color: red; + color: @error-color; } .title{ font-size: 24px; - color: rgba(0,0,0,.85); + color: @title-color; font-weight: 500; line-height: 32px; margin-bottom: 16px; @@ -47,11 +47,11 @@ export default { .desc{ font-size: 14px; line-height: 22px; - color: rgba(0, 0, 0, 0.45); + color: @text-color-second; margin-bottom: 24px; } .content{ - background: #fafafa; + background-color: @background-color-light; padding: 24px 40px; border-radius: 2px; text-align: left; diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue index ab6b60f..8cd02d9 100644 --- a/src/components/setting/Setting.vue +++ b/src/components/setting/Setting.vue @@ -4,6 +4,7 @@ + @@ -136,7 +137,7 @@ export default { diff --git a/src/layouts/header/HeaderNotice.vue b/src/layouts/header/HeaderNotice.vue index 7fd3f66..9fd10ce 100644 --- a/src/layouts/header/HeaderNotice.vue +++ b/src/layouts/header/HeaderNotice.vue @@ -2,7 +2,7 @@
- + @@ -32,7 +32,7 @@
- + @@ -65,20 +65,24 @@ export default { } - diff --git a/src/pages/dashboard/workplace/index.less b/src/pages/dashboard/workplace/index.less new file mode 100644 index 0000000..c684c26 --- /dev/null +++ b/src/pages/dashboard/workplace/index.less @@ -0,0 +1,59 @@ +.project-list { + .card-title { + span{ + vertical-align: middle; + &:last-child{ + margin-left: 12px; + } + } + } + .project-item { + display: flex; + justify-content: space-between; + margin-top: 8px; + overflow: hidden; + font-size: 12px; + color: inherit; + .group{ + color: @text-color; + flex: 1 1 0; + &:hover { + color: @primary-color; + } + } + .datetime { + color: @text-color-second; + flex: 0 0 auto; + } + } + .ant-card-meta-description { + height: 44px; + line-height: 22px; + overflow: hidden; + } +} +.item-group{ + padding: 20px 0 8px 24px; + font-size: 0; + a{ + color: inherit; + display: inline-block; + font-size: 14px; + margin-bottom: 13px; + width: 25%; + } +} +.members { + a { + display: block; + margin: 12px 0; + color: @text-color; + &:hover { + color: @primary-color; + } + .member { + vertical-align: middle; + margin-left: 12px; + } + } +} diff --git a/src/pages/detail/BasicDetail.vue b/src/pages/detail/BasicDetail.vue index c93fda2..567b907 100644 --- a/src/pages/detail/BasicDetail.vue +++ b/src/pages/detail/BasicDetail.vue @@ -199,7 +199,7 @@ export default {