iter(g271): 新增手写签名板组件

This commit is contained in:
HIsheR
2026-10-26 22:56:38 +08:00
parent 6e048c1cd3
commit 1680c4ef8d
12 changed files with 339 additions and 10 deletions
+11
View File
@@ -72,6 +72,7 @@ import {
segmented,
select,
showToast,
signaturePad,
skeleton,
splitter,
slider,
@@ -1784,6 +1785,16 @@ const content = h(
].join('\n'),
}),
),
section(
'sec-sign',
'手写签名',
'signaturePad:指针手写、位图按 DPR 放大不糊,收笔即把 PNG dataURL 写回信号;底部清空在未落笔时自动禁用。',
(() => {
const sign = signal('');
const pad = signaturePad({ value: sign, height: 140 });
return h('div', null, pad.el, h('div', { class: 'out' }, () => (sign() ? '已签字(dataURL 长度 ' + sign().length + ')' : '尚未签字')));
})(),
),
);
// 悬浮按钮:fixed 定位,挂 body 不参与页面布局