更新记录
0.1.1(2026-08-03) 下载此版本
兼容安卓10及一下系统问题;
0.1.0(2026-06-01) 下载此版本
- 初始 uni_modules 发布:SignPad、PdfSignViewer、ContractSign
- 内置 sdk/core、sdk/platform
1.0(2026-05-29) 下载此版本
@smartwork/contract-sign-ui
uni-app 签署 UI 组件(P1–P3 逐步迁入)。
当前状态
| 组件 | 状态 |
|---|---|
utils/signLandscapeTouch.js |
✅ 已迁移 |
SignPad |
✅ P1 已完成(renderjs 画板) |
PdfSignViewer |
✅ P2 已完成(pdf.js 预览 + 锚点) |
ContractSign |
✅ P3 已完成(PdfSignViewer + SignPad + 提交) |
安装(团队内)
将本目录复制到目标项目的 uni_modules/contract-sign-ui,或在 pages 中相对路径引用 packages/contract-sign-ui。
组件 API
- 使用手册(场景 + 示例 + API 大全):
docs/contract-sign-user-guide.md - 抽取方案定稿:
docs/contract-sign-component-library.md第 3 节
PdfSignViewer 快速示例
<PdfSignViewer
:pdf-url="contract.filePath"
:sign-position="contract.signPosition"
:signed-map="signedMap"
view-only
@load="({ pageCount, anchors }) => {}"
@anchor-click="({ anchorId, anchor }) => {}"
/>
<SignPad
:visible.sync="visible"
title="请签名"
:landscape="true"
pen-color="#000"
:pen-width="2"
@export="({ base64, pngBytes, hasStroke }) => { /* ... */ }"
/>
// ref 调用
this.$refs.signPad.open()
this.$refs.signPad.clear()
const { base64, bytes } = await this.$refs.signPad.exportPng()
this.$refs.signPad.close()
renderjs 注意
- pdf.js worker 版本须与
pdfjs-dist一致(当前3.11.174) - 画板继续用 renderjs + 指令,勿改回 Vue 层 canvas
平台兼容性
uni-app(4.0)
| Vue2 | Vue2插件版本 | Vue3 | Vue3插件版本 | Chrome | Safari | app-vue | app-vue插件版本 | app-nvue | app-nvue插件版本 | Android | Android插件版本 | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | 0.1.0 | √ | 0.1.0 | √ | √ | √ | 0.1.0 | √ | 0.1.0 | 6.0 | 0.1.0 | - | - |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - | - | - | - | - |
uni-app x(4.0)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| - | - | - | - | - | - |
@smartwork/contract-sign-ui
uni-app 签署 UI 组件(P1–P3 逐步迁入)。
当前状态
| 组件 | 状态 |
|---|---|
utils/signLandscapeTouch.js |
✅ 已迁移 |
SignPad |
✅ P1 已完成(renderjs 画板) |
PdfSignViewer |
✅ P2 已完成(pdf.js 预览 + 锚点) |
ContractSign |
✅ P3 已完成(PdfSignViewer + SignPad + 提交) |
安装(团队内)
将本目录复制到目标项目的 uni_modules/contract-sign-ui,或在 pages 中相对路径引用 packages/contract-sign-ui。
组件 API
- 使用手册(场景 + 示例 + API 大全):
docs/contract-sign-user-guide.md - 抽取方案定稿:
docs/contract-sign-component-library.md第 3 节
PdfSignViewer 快速示例
<PdfSignViewer
:pdf-url="contract.filePath"
:sign-position="contract.signPosition"
:signed-map="signedMap"
view-only
@load="({ pageCount, anchors }) => {}"
@anchor-click="({ anchorId, anchor }) => {}"
/>
<SignPad
:visible.sync="visible"
title="请签名"
:landscape="true"
pen-color="#000"
:pen-width="2"
@export="({ base64, pngBytes, hasStroke }) => { /* ... */ }"
/>
// ref 调用
this.$refs.signPad.open()
this.$refs.signPad.clear()
const { base64, bytes } = await this.$refs.signPad.exportPng()
this.$refs.signPad.close()
renderjs 注意
- pdf.js worker 版本须与
pdfjs-dist一致(当前3.11.174) - 画板继续用 renderjs + 指令,勿改回 Vue 层 canvas

收藏人数:
下载插件并导入HBuilderX
赞赏(1)
下载 17
赞赏 1
下载 12542846
赞赏 1947
赞赏
京公网安备:11010802035340号