diff --git a/nezha-fronted/src/assets/css/components/common/timePicker.scss b/nezha-fronted/src/assets/css/components/common/timePicker.scss index 47432bc42..6b42f61ce 100644 --- a/nezha-fronted/src/assets/css/components/common/timePicker.scss +++ b/nezha-fronted/src/assets/css/components/common/timePicker.scss @@ -8,7 +8,7 @@ line-height: 40px; height: 40px; box-sizing: border-box; - border: 1px solid $--border-color-base; + border: 1px solid $--border-color-light; border-radius: $--border-radius-small; } .calendar.calendar--small { @@ -122,12 +122,12 @@ padding: 0 10px; display: flex; justify-content: space-around; - height: 26px; + height: 30px; background: $--background-color-empty; - border: 1px solid $--border-color-light; + //border: 1px solid $--border-color-light; box-shadow: 0 2px 4px 0 rgba(51, 51, 51, 0.02); border-radius: 2px; - line-height: 26px; + line-height: 30px; transition: width .3s; .cn-icon { diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue index edefebb9f..905af90a6 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue @@ -76,15 +76,18 @@ class="input-box" @click="dropDownVisible = false" > -
- + >
{{ errorMsg }} @@ -231,8 +234,10 @@ @click="dropDownVisible = false" v-if="plugins.indexOf('metric-input') > -1" > -
- + >
{{ errorMsg }}
@@ -528,8 +534,7 @@ export default { } }, mounted () { - this.initCodeMirror() - if (!this.fromFatherData && this.type !== 'logs') { + if (!this.fromFatherData && this.type !== 'log') { this.queryMetrics() } }, @@ -1092,7 +1097,7 @@ export default { // console.log(n, n[this.index]) this.codeMirrorValue[this.index] = n[this.index] } - } + }, // codeMirrorValue:{ // deep:true, @@ -1103,6 +1108,15 @@ export default { // } // } // } + type: { + deep: true, + immediate: true, + handler(n) { + if (n !== 'log') { + this.initCodeMirror() + } + } + } } } diff --git a/nezha-fronted/src/permission.js b/nezha-fronted/src/permission.js index 4b5bb2463..021ade4dd 100644 --- a/nezha-fronted/src/permission.js +++ b/nezha-fronted/src/permission.js @@ -143,6 +143,8 @@ router.beforeEach((to, from, next) => { }) }) } else { + const theme = localStorage.getItem(`nz-user-${localStorage.getItem('nz-user-id')}-theme`) || 'light' + document.getElementsByTagName('body')[0].setAttribute('class', 'theme-' + theme) resolve() } })