in vue, this is a window departure event. I want to change the style of body through this, but it seems to have misreported
.how can I change its style?
in vue, this is a window departure event. I want to change the style of body through this, but it seems to have misreported
.how can I change its style?
wants to use the DOM operation, document.querySelector ('body'). Style.overflow =' hidden'
what body is never defined maybe you mean window.document.body but your editor doesn't know.
in addition, direct dom operation is not recommended. You can use eventBus or vuex to notify the root component or any node you want to change the color of the specified dom by className
italic text this is the js code for a page of article details. I would like to ask how to define a function that will be executed as soon as I jump to this page? ...