fix: 修复 npm下钻和非下钻 性能统计父组件数据变化后子组件无法获取问题

This commit is contained in:
changcode
2022-11-28 16:36:05 +08:00
parent aa06553b17
commit 8f045125ea
2 changed files with 18 additions and 10 deletions

View File

@@ -96,18 +96,18 @@ export default {
} }
}, },
computed: { computed: {
npmThirdLevelMenuScore () { // npmThirdLevelMenuScore () {
return this.$store.getters.getNpmThirdLevelMenuScore // return this.$store.getters.getNpmThirdLevelMenuScore
} // }
}, },
watch: { watch: {
npmThirdLevelMenuScore: { // npmThirdLevelMenuScore: {
deep: true, // deep: true,
immediate: true, // immediate: true,
handler (n) { // handler (n) {
this.score = n // this.score = n
} // }
} // }
}, },
async mounted () { async mounted () {
// this.panelName = this.$store.getters.getPanelName // this.panelName = this.$store.getters.getPanelName

View File

@@ -71,6 +71,14 @@ export default {
newNpmNetworkData: [] // 整合处理传过来的数据列表 newNpmNetworkData: [] // 整合处理传过来的数据列表
} }
}, },
watch: {
npmNetworkData: {
deep: true,
handler () {
this.initData()
}
}
},
mounted () { mounted () {
this.initData() this.initData()
}, },