diff --git a/src/components/TendencyChart.vue b/src/components/TendencyChart.vue index 69f4452..6f00f3b 100644 --- a/src/components/TendencyChart.vue +++ b/src/components/TendencyChart.vue @@ -20,18 +20,17 @@ export default { }, watch: { enable: function (val) { + console.log("ENABLE"+val) if(val) this.initEcharts(); }, }, - computed: { - getTotalNumber() { - return this.dataList.reduce((prev, item) => { - prev += item.value - return prev - }, 0); - } + mounted() { + console.log("ENABLE"+this.enable) + if(this.enable) + this.initEcharts(); }, + methods: { // 获取配置 getOption() { diff --git a/src/components/echartsBar.vue b/src/components/echartsBar.vue index e6a0415..01a7f0c 100644 --- a/src/components/echartsBar.vue +++ b/src/components/echartsBar.vue @@ -20,14 +20,19 @@ export default { } }, props: { - task: {} + task: null }, - + emits: ['mounted'], watch: { task: function (val) { + console.log("initEchartsBar") + console.log(this.task) this.initEcharts() } }, + mounted() { + this.$emit("mounted"); + }, methods: { @@ -113,9 +118,10 @@ export default { this.init() }); + const that = this //this.chart.setOption(option); window.addEventListener("resize", function () { - this.chart.resize(); + that.chart.resize(); }); } diff --git a/src/views/ProjectGroup.vue b/src/views/ProjectGroup.vue index 8f24566..4c077c9 100644 --- a/src/views/ProjectGroup.vue +++ b/src/views/ProjectGroup.vue @@ -5,7 +5,7 @@
项目团队
-项目
-个人
-详细信息
-