fix(linux): 修复linux中,require的路径错误

This commit is contained in:
H3CoF6
2026-03-19 00:26:03 +08:00
parent db4cf015c2
commit 0816fafc02

View File

@@ -95,8 +95,13 @@ let keyService: any
if (process.platform === 'darwin') {
keyService = new KeyServiceMac()
} else if (process.platform === 'linux') {
const { KeyServiceLinux } = require('./services/keyServiceLinux')
keyService = new KeyServiceLinux()
// const { KeyServiceLinux } = require('./services/keyServiceLinux')
// keyService = new KeyServiceLinux()
import('./services/keyServiceLinux').then(({ KeyServiceLinux }) => {
keyService = new KeyServiceLinux();
});
} else {
keyService = new KeyService()
}