瀏覽代碼

isNew的判断

zhulizhen1111 5 年之前
父節點
當前提交
b9735479c0
共有 1 個文件被更改,包括 9 次插入7 次删除
  1. 9 7
      src/views/strategy/animationBox.vue

+ 9 - 7
src/views/strategy/animationBox.vue

@@ -62,7 +62,7 @@ import strategyLine from '@/components/strategyLine'
 export default {
     data() {
         return {
-            showDraw: false,
+            // showDraw: false,
             dataX: [],
             dataY1: [],
             dataY2: [],
@@ -77,17 +77,19 @@ export default {
     },
     components: { bomBox, strategyLine },
     mounted(){
-        this.isShowDraw()
     },
-    methods:{
-        isShowDraw(){
-            if(this.chillerCommandQ.isNew){
-                this.showDraw = true
+    computed:{
+        showDraw(){
+             if(Object.keys(this.chillerCommandQ).length>0 && this.chillerCommandQ.isNew){
+                console.log('111111111')
+                return true
             }else{
-                this.showDraw = false
+               return false
             }
         }
     },
+    methods:{
+    },
     props: ['data', 'chillerHourList', 'chillerCommandQ']
 }
 </script>