The very first Vue.js example
by rigor789
HTML
<script src="https://unpkg.com/[email protected]"></script>
<div id="demo">
<test>
<template scope="item">
<label>{{item.value}}</label>
</template>
<template name="test" scope="item">
<label>{{item.value}}</label>
</template>
</test>
</div>
<pre>
0 - oldVnode
1 - vnode
2 - hydrating
3 - removeOnly
4 - parentElm
5 - refElm
</pre>
JavaScript
Vue.config.silent = true
setTimeout(() => {
new Vue({
components: {
test: {
name: 'test',
template: '<div></div>',
mounted() {
window.$this = this
console.log(this.$scopedSlots)
}
}
}
}).$mount('#demo')
})