Skip to content
文档目录

Class: UKeySDKConfig

Implements

Table of contents

Constructors

Properties

Constructors

constructor

• new UKeySDKConfig(params)

Parameters

NameType
paramsPartial<QysUKeySdkConfig>

Properties

autoAddAnnotation

• autoAddAnnotation: boolean = false

盖章时自动添加批注

Implementation of

QysUKeySdkConfig.autoAddAnnotation


autoAddTimestampFormat

• autoAddTimestampFormat: TimestampFormatType = TimestampFormatType.NONE

自动带出时间戳

Implementation of

QysUKeySdkConfig.autoAddTimestampFormat


cMapUrl

• cMapUrl: undefined = undefined

pdfjs 中文字体包地址

Implementation of

QysUKeySdkConfig.cMapUrl


canSign

• canSign: boolean = true

控制是否可以签署

Implementation of

QysUKeySdkConfig.canSign


enablePasswordFree

• enablePasswordFree: boolean = false

允许免密签署

Implementation of

QysUKeySdkConfig.enablePasswordFree


errorCb

• errorCb: undefined | (error: string, type: "error" | "warn") => unknown = undefined

确保合并运行时配置后,仍可调用可选的失败回调。

Implementation of

QysUKeySdkConfig.errorCb


file

• Optional file: CustomFileData | File | FileList | CustomFileData[]

初始渲染需要添加到文件列表中的文件,初始渲染后会将其从 config 中移除

Implementation of

QysUKeySdkConfig.file


fontMaps

• fontMaps: { fontName: string = 'FangSong_GB2312' }[]

字体设置

Implementation of

QysUKeySdkConfig.fontMaps


hideDocThumbnail

• hideDocThumbnail: boolean = false

页面渲染后是否隐藏缩略图: 默认不隐藏

Implementation of

QysUKeySdkConfig.hideDocThumbnail


hideThirdBtnFn

• hideThirdBtnFn: (...args: any[]) => void = noop

Type declaration

▸ (...args): void

A no-operation function that returns undefined regardless of the arguments it receives.

Parameters
NameType
...argsany[]
Returns

void

undefined

Implementation of

QysUKeySdkConfig.hideThirdBtnFn


showAddBtn

• showAddBtn: boolean = true

配置页面是否展示添加签章按钮

Implementation of

QysUKeySdkConfig.showAddBtn


showSaveBtn

• showSaveBtn: boolean = true

配置页面是否展示保存按钮

Implementation of

QysUKeySdkConfig.showSaveBtn


showThirdBtnFn

• showThirdBtnFn: (...args: any[]) => void = noop

Type declaration

▸ (...args): void

A no-operation function that returns undefined regardless of the arguments it receives.

Parameters
NameType
...argsany[]
Returns

void

undefined

Implementation of

QysUKeySdkConfig.showThirdBtnFn


signCb

• signCb: (...args: any[]) => void = noop

Type declaration

▸ (...args): void

A no-operation function that returns undefined regardless of the arguments it receives.

Parameters
NameType
...argsany[]
Returns

void

undefined

Implementation of

QysUKeySdkConfig.signCb


signDevice

• Optional signDevice: SignDeviceConfig

指定用于签署的设备信息,可选参数。

属性类型说明
deviceIdstringUkey 设备号,只能使用指定的 Ukey 进行签署。
sealNamesstring[]仅支持 PC;按章面名称指定该设备可用于签署的章面,未配置时允许使用该设备的所有章面。

Implementation of

QysUKeySdkConfig.signDevice


signFileMaxSize

• signFileMaxSize: number

签署文件的最大值,默认为 50MB (50 * 1024 * 1024),设置过大可能会导致浏览器崩溃

Implementation of

QysUKeySdkConfig.signFileMaxSize


wsOptions

• wsOptions: undefined = undefined

UKey 连接的 websocket 地址,默认不需要改动

Implementation of

QysUKeySdkConfig.wsOptions