浏览器的PWA模式是一种可安装(Installable), 可以出现在设备的主屏幕。
关于开发如何识别PWA模式
const isInStandaloneMode = () => (window.matchMedia('(display-mode: standalone)').matches)
|| (window.navigator.standalone)
|| document.referrer.includes('android-app://');
//切换到pwa模式的时候可以用来识别
window.matchMedia('(display-mode: standalone)').addEventListener('change', ({ matches }) => {
setTitle(matches)
});

浙公网安备 33010602011771号