Yuns

Results 199 comments of Yuns
trafficstars

> @theprimone 我觉得可以把按钮放到popup或option页面中,导入导出的内容就是SyncDataInfo这个对象,你可以试试。 可以,就用 JSON 保存咯?

当前已知在 firefox 下 keyCode 有如下对应关系: equalsign: 61 dash: 173 又 `event.keyCode` 字段已被标记为 deprecated: ![image](https://user-images.githubusercontent.com/18096089/154610197-19300dcf-145f-43b2-bce5-e8b81e52fb55.png) 测试发现直接使用 `event.key` (直接对应键盘上的符号)不用考虑浏览器兼容问题了,更不用自己去定义别名了。综上,使用 `event.key.toLowerCase()` 来作为判断依据应该更直观和有效。 不过如果直接这样做的话,算是破坏性更新了,还需要考虑现有别名的兼容处理,如下: equalsign: "=" dash: "-" 最后,思路都有了,可以的话我应该能 PR 一下 😂

另外现在 useKeyPress 看起来没考虑严格模式?意思是 ctrl + shift [+ alt] + A 也能触发 ctrl + A 的回调,或许也可以加个 strict 配置。

有考虑兼容处理啊,修改对应关系为 `别名: key`,而不是 `别名: keyCode`,代码中使用 event.key 来判断就好了。这样就支持别名加 key 来定义快捷键了,例如: `ctrl.equalsign` 和 `ctrl.=` 都是可行的。

> > 另外现在 useKeyPress 看起来没考虑严格模式?意思是 ctrl + shift [+ alt] + A 也能触发 ctrl + A 的回调,或许也可以加个 strict 配置。 > > 这个已经修复了 看了一下代码,这是不是也可能是 break changes 呢,如果有人真期望不用严格匹配呢?:joy:

看了下代码,好像还不是三两下能改好的……

Is there any progress about sourcemap utilities?

Unplugin `resolveId` with virtual modules seem still not work in webpack on Windows OS.

> Unplugin `resolveId` with virtual modules seem still not work in webpack on Windows OS. It works today, but i don't konw what happens 😦

https://github.com/sysgears/webpack-virtual-modules/pull/164 It looks like fixed with [email protected] but I still got the error with vercel build: ![image](https://github.com/unjs/unplugin/assets/18096089/1b321eea-a7f8-4be3-802a-02dc569089d4)