- 简介
- 目录大纲
- 最新文档
植入获取当前python脚本所用到的依赖
```python 获取包含子项的导入表 import sys import atexit def log_imports(): with open("imported_modules.log", "w") as f: for name, module in sorted(sys.modules.items()): if hasattr(mod...……
别卷了 - 2025年4月17日 14:15
Electron 项目解析
项目文件 一个常规的 Electron 项目所包含的文件: 主进程main.js:创建窗口,处理IPC事件(打开文件对话框、读取文件、执行命令)。 preload.js:暴露IPC方法给渲染进程。 index.html:界面布局,包含各个元素和按钮。 renderer.js:渲染进程中的js。处理DOM事件,调用electronAPI发送IPC消息,处理返回结果。 package.json...……
别卷了 - 2025年3月31日 16:12
electron 常用模块介绍
常用模块介绍 const { ipcRenderer } = require('electron'); // 渲染进程的 IPC const { shell } = require('electron'); // 调用系统默认应用 const { Menu } = require('electron'); // 创建应用菜单 const {...……
别卷了 - 2025年3月26日 21:29
const { app, BrowserWindow, ipcMain, dialog } = require('electron') 的解析
代码解析 在 Electron 中,const { app, BrowserWindow, ipcMain, dialog } = require('electron'),是一种解构赋值(Destructuring Assignment)的写法,用于从 Electron 模块中按需导入所需的子模块。它的作用是将 Electron 的核心 API 拆解成独立的变量,方便在代码中直接调用。 j...……
别卷了 - 2025年3月26日 14:47