1.引入
<template>
<div class="cod-policy" ref="codPolicyBox">
<script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js"></script>
</div>
</template>
2.再mounted 使用
mounted () {
setTimeout(() => {
const a = new window.VConsole()
console.log(a)
}, 1000)
}
3.出现绿色标识,说明成功