1.Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.
出现这个警告是因为你没有给他父级的宽高,而导致的页面报错
解决办法:
<template>
<div class="father">
<div id="main"></div>
</div>
</template>
<style scoped lang="less">
.father {
width: 100%;
height: 570px;
}
#main {
width: 100%;
height: 570px;
}
</style>