حقل توقيع Angular | ng-hub-ui-signature
حقل توقيع Angular متاح يحفظ إدخال الماوس واللمس والقلم كقيم SVG قابلة للتوسيع، مع التراجع والإعادة وتصدير PNG.
مرجع API
إليك العقد الكامل لـ signature: كل ما يمكنك ربطه والاستماع إليه وإسقاطه وتنسيقه، مجموعاً في مكان واحد. اربط ما تحتاجه ونسّق ما تريده — إنه standalone وملائم للـ Signals.
المدخلات
اضبط signature عبر 9 مدخلات. اربطها مثل أي @Input في Angular.
| الاسم | النوع | الافتراضي | الوصف |
|---|---|---|---|
label | string | '' | Visible field label. |
formText | string | '' | Helper text shown below the drawing surface. |
height | number | 160 | Logical canvas height in CSS pixels. |
strokeColor | string | 'currentColor' | Colour recorded in new SVG strokes. |
strokeWidth | number | 2 | Base width recorded in new SVG strokes. |
readonly | boolean | false | Prevents drawing while preserving the signature. |
controls | boolean | true | Shows clear, undo and redo actions. |
labels | Partial<HubSignatureLabels> | {} | Overrides the application-wide translated action labels for this field only. |
ariaLabel | string | 'Signature' | Accessible name for the drawing surface. |
المخرجات
تفاعل مع ما يفعله signature — 1 أحداث لربط منطقك بها.
| الاسم | النوع | الوصف |
|---|---|---|
valueChange | EventEmitter<string> | Emits the SVG value after a user-originated change. |
الطرائق
تحكّم في signature من الكود — 5 طرائق في واجهته البرمجية.
| الاسم | التوقيع | القيمة المُرجَعة | الوصف |
|---|---|---|---|
clear | clear(): void | — | Removes every stroke and emits the empty value. |
undo | undo(): void | — | Removes the most recently committed stroke. |
redo | redo(): void | — | Restores the most recently undone stroke. |
toSvg | toSvg(): string | — | Returns the scalable SVG form value. |
toDataUrl | toDataUrl(type?: string): string | — | Exports the rendered signature, PNG by default. |
القوالب
لم يتم توثيق أي قوالب بعد.