feat(index): 首页标题连击5次显示构建版本信息\nfix(scripts): explorer使用spawn避免GUI进程阻塞\nfix(index): version.json运行时读取,不依赖构建时require
This commit is contained in:
@@ -55,10 +55,13 @@ async function openDirectoryWindows(directoryPath) {
|
||||
|
||||
console.log(`📁 在文件资源管理器中打开: ${normalizedPath}`);
|
||||
|
||||
// 方法1: 使用 explorer 命令
|
||||
// 方法1: 使用 explorer 命令(spawn + detached,不等待 GUI 进程)
|
||||
try {
|
||||
const command = `explorer "${normalizedPath}"`;
|
||||
await execAsync(command);
|
||||
const child = spawn('explorer', [normalizedPath], {
|
||||
stdio: 'ignore',
|
||||
detached: true
|
||||
});
|
||||
child.unref();
|
||||
console.log('✅ 已启动文件资源管理器');
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user