Merge branch 'dev-3.3' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.3

This commit is contained in:
likexuan
2022-06-10 14:55:52 +08:00
3 changed files with 16 additions and 14 deletions

View File

@@ -114,7 +114,8 @@ export default {
}, },
filterNode (value, data) { filterNode (value, data) {
if (!value) return true if (!value) return true
return data.name.indexOf(value) !== -1 // 不区分大小写
return data.name.toLowerCase().indexOf(value.toLowerCase()) !== -1
}, },
updateWeight () { updateWeight () {
const toUpdate = [] const toUpdate = []

View File

@@ -61,6 +61,7 @@
:metricOptionsParent="metricOptions" :metricOptionsParent="metricOptions"
v-for="index of promqlKeys.length" v-for="index of promqlKeys.length"
:id="promqlKeys[index-1]" :id="promqlKeys[index-1]"
:pqid="tabIndex.toString()"
:key="promqlKeys[index-1]" :key="promqlKeys[index-1]"
:ref="'promql-'+(index-1)" :ref="'promql-'+(index-1)"
:expression-list="expressions" :expression-list="expressions"
@@ -78,6 +79,7 @@
<promql-input <promql-input
v-for="index of promqlKeys.length" v-for="index of promqlKeys.length"
:id="promqlKeys[index-1]" :id="promqlKeys[index-1]"
:pqid="tabIndex.toString()"
:key="promqlKeys[index-1]" :key="promqlKeys[index-1]"
:ref="'promql-'+(index-1)" :ref="'promql-'+(index-1)"
:expression-list="expressions" :expression-list="expressions"

View File

@@ -77,7 +77,7 @@
@click="dropDownVisible = false" @click="dropDownVisible = false"
> >
<div <div
:id="'editor'+index" :id="pqid + 'editor'+index"
v-if="type !== 'log'" v-if="type !== 'log'"
class="not-fixed-height no-resize no-close" class="not-fixed-height no-resize no-close"
> >
@@ -439,7 +439,7 @@ export default {
pqid: { pqid: {
type: String, default: '' type: String, default: ''
}, },
expressionList: {}, expressionList: { type: Array },
plugins: { type: Array }, plugins: { type: Array },
styleType: Number, styleType: Number,
historyParam: { type: Object }, historyParam: { type: Object },
@@ -1097,16 +1097,15 @@ export default {
deep: true, deep: true,
immediate: true, immediate: true,
handler (n, o) { handler (n, o) {
// console.log(n, n[this.index])
this.codeMirrorValue[this.index] = n[this.index] this.codeMirrorValue[this.index] = n[this.index]
setTimeout(() => { // setTimeout(() => {
const text = this.newView.state.doc.toString() // const text = this.newView.state.doc.toString()
this.newView.dispatch( // this.newView.dispatch(
this.newView.state.update({ // this.newView.state.update({
changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] } // changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] }
}) // })
) // )
}, 200) // }, 200)
} }
}, },