The native scroll bar in vue does not work, and the scroll bar does not work until the dom change is triggered. Is there any good solution?

problem description:
generate a html, using showdown.js in vue where the code of the code tag exceeds the screen width, as shown in the following figure

clipboard.png

overflow:auto...

domtab

clipboard.png

Why doesn"t the scroll bar take effect initially, but only after the dom change is triggered? Thinking hard to no avail, I can only ask you all.

the temporary solution is to bind an event @ touchstart.once= "makeScrollSuccess"
in
vue and then perform a dom operation:

makeScrollSuccess () {
        $(".home").css("opacity","0.99")
    },

although the scroll bar works properly, this method is really miserable. I hope to find a more fundamental solution ~

Mar.30,2021

is your overflow:auto not working, the first time

Menu