diff --git a/nezha-fronted/src/assets/css/common.scss b/nezha-fronted/src/assets/css/common.scss index 0ef1358f9..0040d16ae 100644 --- a/nezha-fronted/src/assets/css/common.scss +++ b/nezha-fronted/src/assets/css/common.scss @@ -19,3 +19,27 @@ margin-top: 0; transform: translate(-50%, -50%); } + +/* 自定义的dropdown */ +.nz-dropdown { + width: 90px; + right: 0; + left: unset !important; + top: 35px; +} +.nz-dropdown::after { + content: ''; + display: block; + width:0; + height:0; + overflow: hidden; + font-size: 0; + line-height: 0; + border: 5px; + border-style: dashed dashed solid dashed; + border-color: transparent transparent #fff transparent; + position: absolute; + right: 3px; + top: 44px; + transform: translate(-50%, -54px); +} diff --git a/nezha-fronted/src/assets/css/common/tableCommon.scss b/nezha-fronted/src/assets/css/common/tableCommon.scss index 0016d7fe4..135493d3a 100644 --- a/nezha-fronted/src/assets/css/common/tableCommon.scss +++ b/nezha-fronted/src/assets/css/common/tableCommon.scss @@ -36,10 +36,10 @@ .top-tool-btn-group { display: flex; - .top-tool-btn:first-of-type { + .top-tool-btn:first-of-type:not(:last-of-type) { border-radius: $--button-border-radius 0 0 $--button-border-radius; } - .top-tool-btn:last-of-type { + .top-tool-btn:last-of-type:not(:first-of-type) { border-radius: 0 $--button-border-radius $--button-border-radius 0; border-left: none; } @@ -76,6 +76,9 @@ color: #F0745A; } } + .top-tool-btn--dropdown { + position: relative; + } } .nz-table2 { diff --git a/nezha-fronted/src/assets/css/theme.scss b/nezha-fronted/src/assets/css/theme.scss index 02902d698..724a0d5d6 100644 --- a/nezha-fronted/src/assets/css/theme.scss +++ b/nezha-fronted/src/assets/css/theme.scss @@ -3,8 +3,11 @@ } $--theme-color: var(--theme-color); // 主题色 +$--primary-border-color: #DEDEDE; +$--primary-border-radius: 2px; + /* 按钮 */ -$--button-border-radius: 2px; // 按钮圆角 +$--button-border-radius: $--primary-border-radius; // 按钮圆角 $--button-primary-color: #FFF; // 普通按钮字色 $--button-primary-background-color: var(--theme-color); // 普通按钮背景色 @@ -17,10 +20,13 @@ $--button-gray-active-color: var(--theme-color); // 灰色按钮focus字色 $--button-gray-background-color: #F9F9F9; // 灰色按钮背景色 $--button-gray-hover-background-color: #FFF; // 灰色按钮hover背景色 $--button-gray-active-background-color: $--button-gray-hover-background-color; // 灰色按钮focus背景色 -$--button-gray-border-color: #DEDEDE; // 灰色按钮边框色 +$--button-gray-border-color: $--primary-border-color; // 灰色按钮边框色 $--button-gray-hover-border-color: $--button-gray-border-color; // 灰色按钮hover边框色 $--button-gray-active-border-color-tint-percent: 30%; // 灰色按钮在focus时边框色相对于主题色变浅的幅度 +:export { + themeColor: $--theme-color +} /* element-ui变量覆盖 */ /*$--color-primary: red; // 覆盖element-ui的主题色 $--box-shadow-base: none; // 取消box-shadow diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 00f21e164..9fe3d3f54 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1876,7 +1876,7 @@ li{ } /* panel-tool-tip列表搜索框 样式重写*/ -.relative-position{ +/*.relative-position{ position: relative; } .query-input-inactive{ @@ -1893,7 +1893,7 @@ li{ .query-input-active .el-input__inner, .query-input-inactive .el-input__inner { height: 30px; line-height: 30px !important; -} +}*/ .el-textarea:not(.not-fixed-height) textarea { height: 140px !important; diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 1b116401d..420adfaa2 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -1,4 +1,4 @@ - - diff --git a/nezha-fronted/src/components/common/rightBox/accountBox.vue b/nezha-fronted/src/components/common/rightBox/userBox.vue similarity index 84% rename from nezha-fronted/src/components/common/rightBox/accountBox.vue rename to nezha-fronted/src/components/common/rightBox/userBox.vue index debfb5b72..641cdf2fd 100644 --- a/nezha-fronted/src/components/common/rightBox/accountBox.vue +++ b/nezha-fronted/src/components/common/rightBox/userBox.vue @@ -2,12 +2,12 @@ $--input-focus-border: red; - + - + {{$t('overall.delete')}} @@ -23,22 +23,22 @@ $--input-focus-border: red; - + - + - + - + @@ -59,7 +59,7 @@ $--input-focus-border: red; {{$t('config.account.notification')}} - + @@ -67,11 +67,11 @@ $--input-focus-border: red; - - + + - - + + @@ -83,9 +83,9 @@ $--input-focus-border: red; class="nz-btn nz-btn-size-normal-new nz-btn-style-light-new"> {{$t('overall.cancel')}} - {{$t('overall.save')}} diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index d004e16cf..019c35f18 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -1364,13 +1364,12 @@ export default { .top-tools input { background-color: white; } -.new-search{ + .new-search{ display: flex; position: relative; line-height: 25px; border-radius: 2px; - border: 1px solid #D8D8D8; - /*box-shadow: inset 0 0 5px 0 rgba(184,184,184,0.80);*/ + border: 1px solid $--primary-border-color; } .new-search .search-input-all{ width: 226px !important; diff --git a/nezha-fronted/src/components/common/table/nzDataList.vue b/nezha-fronted/src/components/common/table/nzDataList.vue index 0b45fef0b..f221ca75f 100644 --- a/nezha-fronted/src/components/common/table/nzDataList.vue +++ b/nezha-fronted/src/components/common/table/nzDataList.vue @@ -9,17 +9,17 @@ - + - + - + @@ -76,7 +76,7 @@ export default { customTableTitle: { type: Array }, - components: { + layout: { type: Array, default () { return [] } }, @@ -114,7 +114,6 @@ export default { // 全屏 fullScreen () { const vm = this - // this.$bottomBoxWindow.fullScreen(vm) bottomBoxWindow.fullScreen(vm) }, // 退出全屏 diff --git a/nezha-fronted/src/components/common/table/settings/userTable.vue b/nezha-fronted/src/components/common/table/settings/userTable.vue new file mode 100644 index 000000000..f8c01e4ef --- /dev/null +++ b/nezha-fronted/src/components/common/table/settings/userTable.vue @@ -0,0 +1,162 @@ + + { batchDeleteObjs = selection }" + > + + + + + {{item.label}} + + + + + + + + + + + - + + + + {statusChange(scope.row)}"> + + + {{utcTimeToTimezoneStr(scope.row[item.prop])}} + {{scope.row[item.prop]}} + + + + {{$t('overall.option')}} + + + + + … + + + {{$t('overall.edit')}} + {{$t('overall.delete')}} + + + + + + + + diff --git a/nezha-fronted/src/components/common/timePicker.vue b/nezha-fronted/src/components/common/timePicker.vue index 35402ebf1..ded9bfd79 100644 --- a/nezha-fronted/src/components/common/timePicker.vue +++ b/nezha-fronted/src/components/common/timePicker.vue @@ -1,26 +1,39 @@ - - + --> - + - diff --git a/nezha-fronted/src/components/page/config/account.vue b/nezha-fronted/src/components/page/config/account.vue index 3d13249e0..8f86f6ddd 100644 --- a/nezha-fronted/src/components/page/config/account.vue +++ b/nezha-fronted/src/components/page/config/account.vue @@ -134,7 +134,7 @@ diff --git a/nezha-fronted/src/components/page/config/assetMeta.vue b/nezha-fronted/src/components/page/config/assetMeta.vue index 82f8f423b..b3b47500c 100644 --- a/nezha-fronted/src/components/page/config/assetMeta.vue +++ b/nezha-fronted/src/components/page/config/assetMeta.vue @@ -191,11 +191,6 @@ export default { label: this.$t('config.assetMeta.params'), prop: 'param', show: false - }, { - label: this.$t('alert.config.option'), - prop: 'option', - show: true, - width: 120 } ], groupData: [{ diff --git a/nezha-fronted/src/components/page/config/user.vue b/nezha-fronted/src/components/page/config/user.vue new file mode 100644 index 000000000..89c165b41 --- /dev/null +++ b/nezha-fronted/src/components/page/config/user.vue @@ -0,0 +1,124 @@ + + + + + + + + + + + { $refs.dataList.showBottomBox(targetTab, object) }"> + + + + + + + + + + + diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 32907de47..93bd5033e 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -1,5 +1,5 @@ - + {{$t("dashboard.panel.createPanelTitleSec")}} @@ -10,12 +10,12 @@ @deletePanel="del" @editPanel="edit" @selectPanel="panelChange" ref="selectPanel" style="width: 300px;display: inline-block"> - + - + @@ -64,8 +64,8 @@ --> - - + + @@ -82,18 +82,16 @@ export: 'panel_chart_export' }" @afterImport="dateChange" - class="margin-r-20" + class="top-tool-export margin-l-10" > + id="panel-add-chart" class="top-tool-btn"> - - - + @@ -788,7 +786,7 @@ export default { } } - - - diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js index f92a1c7b6..51108f803 100644 --- a/nezha-fronted/src/main.js +++ b/nezha-fronted/src/main.js @@ -30,6 +30,7 @@ import elementSet from './components/common/elementSet' // 自定义表头组件 import loading from '@/components/common/loading' import pickTime from '@/components/common/pickTime' import bus from '@/libs/bus' +import theme from '@/assets/css/theme.scss' Vue.component('Pagination', Pagination) Vue.component('searchInput', searchInput) @@ -66,11 +67,12 @@ Vue.mixin({ prevent_opt: { save: false, import: false, - dumplicate: false, + duplicate: false, delete: false, refresh: false, query: false - } + }, + theme: theme // scss主题变量 } }, methods: { diff --git a/nezha-fronted/src/router/index.js b/nezha-fronted/src/router/index.js index 1a41d3b35..3c7325f5e 100644 --- a/nezha-fronted/src/router/index.js +++ b/nezha-fronted/src/router/index.js @@ -43,7 +43,7 @@ export default new Router({ }, { path: '/account', - component: resolve => require(['../components/page/config/account2.vue'], resolve) + component: resolve => require(['../components/page/config/user.vue'], resolve) }, { path: '/menu',