vue mounted中监听div的变化
00{ {$store.state.msg}}
methods: { fun(){ this.$store.dispatch('fun',this.checkedNames); },
mounted(){ document.getElementById('list').addEventListener("DOMSubtreeModified", function(){ var he=document.getElementById('list').offsetHeight; document.getElementById('list2').style.height=he+'px'; console.log(he); }, false) }