Replies: 2 comments 1 reply
-
我重新优化了一下,不用每次新加小模块冗余代码 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
参考了其他编辑器快捷键的功能,很多都是如下图的实现,会有一个中间层的Core,比如居中工具,然后把功能提供给快捷键与UI组件调用,这样的好处是可以把功能代码与UI、框架解耦,各个模块也会更独立。
![](https://camo.githubusercontent.com/9bc97544b979492ead3ce9fb142187f36bd2e829a5676b889eb5a4e43c21512d/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f6a7065672f3434333633382f313636393730343036363430362d30663332636465382d386164622d343431612d613865622d6230353535336265646163642e6a706567)
目前的现状是下图所示,功能代码都包含在UI组件中,我们下一步的计划就是建立Core模块,先将与快捷键相关的功能逐步改造,把功能代码迁移到Core中,并管理上快捷键模块与UI组件。
![](https://camo.githubusercontent.com/e8794191cb947bcec76c5f5b2177e62f96401850475e9d37d1f628d098e25e43/68747470733a2f2f63646e2e6e6c61726b2e636f6d2f79757175652f302f323032322f706e672f3434333633382f313636393730343037303339332d32616234333430322d333837322d343965382d613565652d3334343932343436373661382e706e67)
Beta Was this translation helpful? Give feedback.
All reactions