1.File——Settings——Build
2.Build,Execution,Deplyment——Compiler
3.選中打勾 “Build project automatically“
4.按OK
5. 按住 Shift+Ctrl+Alt+/ ,然后選中 Registry
6.勾選compiler.automake.allow.when.app.running
7.最后在需要刷新時點擊下圖所示的箭頭,再在html頁面刷新即可
具體見:https://blog.csdn.net/weixin_43234960/article/details/101368542