NEZ-1924 fix:Explore保存Metrics时不显示表达式
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
style="">
|
||||
<promql-input
|
||||
:from-father-data="true"
|
||||
:isTopo="true"
|
||||
:metricOptionsParent="metricOptions"
|
||||
:id="index"
|
||||
:key="index"
|
||||
@@ -222,6 +223,7 @@
|
||||
style="width: 100%; border-radius: 2px; padding-right: 60px;">
|
||||
<promql-input
|
||||
:from-father-data="true"
|
||||
:isTopo="true"
|
||||
:metricOptionsParent="metricOptions"
|
||||
:id="index"
|
||||
:pqid="'vm'"
|
||||
|
||||
@@ -464,6 +464,10 @@ export default {
|
||||
},
|
||||
type: {
|
||||
type: String // metric和log两种,为空时视为metric
|
||||
},
|
||||
isTopo: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
// metricOptions: {type: Array},
|
||||
// metricStore: {type: Array}
|
||||
@@ -1098,14 +1102,16 @@ export default {
|
||||
immediate: true,
|
||||
handler (n, o) {
|
||||
this.codeMirrorValue[this.index] = n[this.index]
|
||||
// setTimeout(() => {
|
||||
// const text = this.newView.state.doc.toString()
|
||||
// this.newView.dispatch(
|
||||
// this.newView.state.update({
|
||||
// changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] }
|
||||
// })
|
||||
// )
|
||||
// }, 200)
|
||||
if (this.isTopo) {
|
||||
setTimeout(() => {
|
||||
const text = this.newView.state.doc.toString()
|
||||
this.newView.dispatch(
|
||||
this.newView.state.update({
|
||||
changes: { from: 0, to: text.length, insert: this.codeMirrorValue[this.index] }
|
||||
})
|
||||
)
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user