as detailed in the title:
encounter such a weird problem (really weird), I am also drunk!
the problem lies in:
Local debugging before the project is packaged: everything is normal, the switch between the two routing pages, different background images can follow the switch
after the project is packaged: opens the project with the local server, and the two routing pages are switched (because the text of the two different pages is switched during the switch), but a background image of the two pages is not switched (both pages have a different background image) * *. Open the developer tool, switch between the two pages, and find that the text has changed in element
, but the url of the background image remains the same. so I deeply suspect that webpack typed the code wrong when packing, and it was a partial error. I am completely drunk
just found the difference: because the rendering of both pages introduces the same HTML component, but different view pages render data dynamically. But what does this have to do with? How to solve it?
do you think it"s so weird that you don"t even give a rule of finding a problem?
when I encounter such a problem, there is nothing I can do. I look forward to seeing a lot of advice from you and waiting to hear from you.