This blog records the App.vue display problem that I encountered when I wrote the project again.
Question : When viewing the page, I found that there is a margin of 8px, which is very uncomfortable. I want to remove this margin.
Before modification: directly above
The solution is to set the style of the body in App.vue through the beforeCreate function
export default {
beforeCreate() {
document.querySelector('body').setAttribute('style', 'margin:0;')
},
}
It can be clearly seen that the margins are gone, over.