获得徽章 15
- Chrome新的API锁屏与解锁
//Idle Detection API
const detector = new IdleDetector();
detector.addEventListener('change', () => {
const { userState, screenState } = detector;
if(screenState == 'locked') {
//do something
}
if(userState == 'idle') {
// do something
}
})展开赞过评论1 - 昨天vue的vs code插件vetur插件更新的0.31.0,大家不要升级很坑的,升级完一致在报Vetur find `tsconfig.json`/`jsconfig.json`, but they aren't in the project root而且格式化插件也用不了,大家如果升级了,首先下载0.30.0版本:
marketplace.visualstudio.com,然后在vs code里面按快捷键:win:shift+ctrl+p、Mac: shift+cmd+p,输入:extensions,找到vsix导入拓展,选到你下载的文件,既可以回滚版本,重启vs code,一切恢复正常
展开赞过102