I've seen many times Vue instance is bind on body
tag.
Other times this is bind on a div id
I'm asking when i should use body
tag or an id
tag (that limit the scope of the Vue instance).
Two examples:
new Vue({
el: 'body'
});
OR
new Vue({
el: '#a-div'
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…