Skip to content

Commit

Permalink
fix: 过时的screensEval
Browse files Browse the repository at this point in the history
  • Loading branch information
sj817 committed Nov 4, 2024
1 parent f09e978 commit 117d323
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/puppeteer/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ import puppeteer, { Browser, GoToOptions, HTTPRequest, Page, PuppeteerLaunchOpti
export interface screenshot extends ScreenshotOptions {
/** http地址或本地文件路径 */
file: string
/** 获取指定元素 默认body */
/**
* 选择的元素截图
* fullPage为false时生效
* 如果未找到指定元素则使用body
* @default 'body'
*/
selector?: string
/** 截图类型 默认'jpeg' */
type?: 'png' | 'jpeg' | 'webp'
Expand Down Expand Up @@ -59,13 +64,6 @@ export interface screenshot extends ScreenshotOptions {
*/
deviceScaleFactor?: number
}
/**
* 选择的元素截图
* fullPage为false时生效
* 如果未找到指定元素则使用body
* @default 'body'
*/
screensEval?: string
/** 分页截图 传递数字则视为视窗高度 返回数组 */
multiPage?: number | boolean
/** 页面goto时的参数 */
Expand Down

0 comments on commit 117d323

Please sign in to comment.