当判断条件不支持时候动态生成一张背景图来实现(可以解决只显示一张图片,其它内容不会显示)
在main.js里面操作
if (! window.applicationCache ) {
document.write(`<img src="./static/img/tishi.jpg" style="position:absolute;top:0;width:100%;height:100%;"/>`)
}else {
/* eslint-disable no-new */
vm = new Vue({
el: '#app',
router,
store,
components: { App },
template: '<App/>',
})
}