From e7d0ff62e8c86ff8e0a239abde8b7fc36cccaf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= <523037378@qq.com> Date: Thu, 13 Feb 2020 17:06:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=87=8F=E5=B0=91=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E9=9D=A2=E7=A7=AF=E3=80=81=E5=8F=96=E6=B6=88?= =?UTF-8?q?module=E4=BE=A7=E6=BB=91path=E5=92=8Cport=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/stylus/main.scss | 3 +++ nezha-fronted/src/components/charts/chart-table.vue | 2 +- nezha-fronted/src/components/charts/line-chart-block.scss | 2 +- nezha-fronted/src/components/charts/line-chart-block.vue | 3 ++- nezha-fronted/src/components/common/js/validate.js | 4 +++- nezha-fronted/src/components/common/rightBox/moduleBox.vue | 2 -- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 1097b65d9..8f5b5b998 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1060,6 +1060,9 @@ li{ .nz-dialog .el-dialog { border-radius: 10px; } +.nz-dialog .el-dialog__body { + padding: 0 20px 30px 20px; +} .nz-dialog-title { font-size: 18px; color: $box-title-color; diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index 8befa3a4b..d9c4c76d7 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -52,7 +52,7 @@ - + diff --git a/nezha-fronted/src/components/charts/line-chart-block.scss b/nezha-fronted/src/components/charts/line-chart-block.scss index 14f6e674c..b39bbc8da 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.scss +++ b/nezha-fronted/src/components/charts/line-chart-block.scss @@ -19,7 +19,7 @@ color:lightgray; } .legend-container{ - width:80%; + width: calc(100% - 130px); max-height:80px; min-height:40px; overflow-y: auto; diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index ca7405d4a..c586111eb 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -432,7 +432,8 @@ export default { }, grid: { //height:"50%", - //top: '13%', + left: 65, + right: 65, containLabel: false, bottom:70//156 }, diff --git a/nezha-fronted/src/components/common/js/validate.js b/nezha-fronted/src/components/common/js/validate.js index cf8c23ccf..0daeb733f 100644 --- a/nezha-fronted/src/components/common/js/validate.js +++ b/nezha-fronted/src/components/common/js/validate.js @@ -30,7 +30,9 @@ export function phone(rule, value, callback) { export function port(rule, value, callback) { setTimeout(() => { - if(typeof value != 'number'){ + if (!value) { + callback(); + } else if(typeof value != 'number'){ callback(new Error(vm.$t('validate.number'))) }else{ if(value < 1 ||value > 65535){ diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index a5f262c2e..e3726f175 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -122,10 +122,8 @@ ], port: [ {validator:port, trigger: 'blur'}, - {required: true, message: this.$t('validate.required'), trigger: 'blur'}, ], path: [ - {required: true, message: this.$t('validate.required'), trigger: 'blur'}, ] }, projectList: [],