🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 常用工具函数 ``` const { Util } = require('leanpro.common'); ``` 函数 ``` class Util { static delay(milliseconds: number): Promise<void>; static launchProcess(exePath: string, ...args: string[]): ChildProcess; static launchProcess(exePaths: string, args: string[], options: SpawnOptions): ChildProcess; static stopProcess(proc: ChildProcess): boolean; static takeScreenshot(filePath: string = null, monitor: number = 0): string | void; static loadCsvFile(filePath: string): Promise<RowCsv[]>; static saveToCsvFile(rows: RowCsv[], filePath: string): boolean; static getClipboard(): Promise<string>; static setClipboard(text: string): Promise<void>; static copyDir(sourceDir, destDir): Promise<void>; } ```