Commit ec46abea by Joey

fix(@rbc/workflow-job-view): initTemplate页面初始化时调用报错

parent 1361e00f
...@@ -79,7 +79,10 @@ export default { ...@@ -79,7 +79,10 @@ export default {
watch: { watch: {
templateName() { templateName() {
this.handleClear() this.handleClear()
this.$refs.customQuery.initTemplate(this.templateName) this.$refs
&& this.$refs.customQuery
&& this.$refs.customQuery.initTemplate
&& this.$refs.customQuery.initTemplate(this.templateName)
} }
}, },
mounted() { mounted() {
...@@ -166,7 +169,10 @@ export default { ...@@ -166,7 +169,10 @@ export default {
} }
} }
this.seniorQuery = conditions this.seniorQuery = conditions
this.$refs.customQuery.initTemplate(this.templateName) this.$refs
&& this.$refs.customQuery
&& this.$refs.customQuery.initTemplate
&& this.$refs.customQuery.initTemplate(this.templateName)
}, },
handleClear() { handleClear() {
this.queryFields = { timeRange: [] }; this.queryFields = { timeRange: [] };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment