方案:通过轮询对比script的hash信息,不一致就触发更新操作 新建utils/updateApp.js文件
script
hash
utils/updateApp.js
import { ElMessageBox } from 'element-plus' const getHtml = async () => { return await fetch('/').then(res => res.text())//读取index html } const parserScript = (html) => { const reg = new RegExp(/