You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor documentation for storage, string, theme, and utility functions
- Updated `storage.md` to improve clarity and consistency in API descriptions for dbStorage, jsSession, jsCookie, and jsLocal.
- Enhanced `string.md` with detailed descriptions for string manipulation functions including camelize, hyphenate, and trim.
- Added new documentation for theme-related functions in `theme.md`, including useSystemColor.
- Introduced new utility functions in `to.md` for converting data formats, including arrayToExcel, base64ToBlob, and fileToBase64.
- Created new type definitions in `types.md` to enhance type safety and documentation.
- Added Vite plugin documentation in `vite.md` for various Vite plugins.
- Improved waterfall layout documentation in `waterfall.md` for better understanding of parameters and usage.
- Established foundational documentation for Web Components in `webComponent.md`, detailing shadow DOM management.
import { CreateSignatureCanvas } from './lazy-js-utils'
74
-
75
-
const signature = new CreateSignatureCanvas(400, 400)
76
-
document.body.appendChild(signature.canvas)
77
-
const base64 = signature.save()
78
-
signature.clear() // 清除签名
79
-
signature.undo() // 撤销上一步
80
-
signature.redo() // 恢复上一步
17
+
* 创建签名画布工具类
18
+
* @description EN: Utility class to create and manage a signature canvas with drawing, undo/redo, and export features.
81
19
*/
82
20
```
83
21
84
22
## DotImageCanvas
85
23
86
-
🧿 将图片的像素转为点阵图片
24
+
DotImageCanvas 将图片转换为点阵图形式展示,并提供动画绘制效果
25
+
EN: Convert an image to a dot-matrix representation and provide animated drawing controls with various directions, colors, background and animation options.
87
26
88
-
```typescript
27
+
```ts
89
28
/**
90
-
* @Class DotImageCanvas
91
-
* @param{ string }src 图片路径
92
-
* @param{ string }color 点阵的颜色 为空则取原像素颜色
93
-
* @param{ number }fontWeight 点阵的粗细
94
-
* @param{ string }bgColor 图片背景色 默认为白色
95
-
* @desc 📝 将图片的像素转为点阵图片
96
-
* @return{ dotImage }
97
-
* @example
98
-
import { DotImageCanvas } from './lazy-js-utils'
99
-
100
-
const dotImage = new DotImageCanvas('./img/1.jpg','red', 1, '#000')
* @description EN: Convert an image to a dot-matrix representation and provide animated drawing controls with various directions, colors, background and animation options.
106
34
*/
107
35
```
108
36
109
37
## DotTextCanvas
110
38
111
-
🧿 根据文字返回一个点阵的 canvas
39
+
DotTextCanvas 将文字转换为点阵形式展示,并提供动画绘制效果
40
+
EN: Convert text into a dot-matrix representation and animate the drawing with configurable direction, color and spacing options.
0 commit comments