更新记录
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
平台兼容性
@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

收藏人数:
购买普通授权版(
试用
赞赏(0)
下载 0
赞赏 0
下载 12097876
赞赏 1918
赞赏
京公网安备:11010802035340号