JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/[email protected]/lib/index.js"></script>
<div id="app">
<el-button @click="alertNodeLength">Alert node length</el-button>
<el-popover placement="right" title="Title" width="200" trigger="hover" content="Content">
</el-popover>
<el-button slot="reference">Hover to trigger popover</el-button>
</div>
Babel + JSX
new Vue({
mounted() {
this.alertNodeLength();
},
methods: {
alertNodeLength() {
alert(document.querySelectorAll('body > *').length)
}
}
}).$mount('#app')