@tplc/wot 0.1.31 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "@tplc/wot",
3
3
  "name": "@tplc/wot",
4
- "version": "0.1.31",
4
+ "version": "0.1.37",
5
5
  "keywords": [
6
6
  "wot-design-uni",
7
7
  "国际化",
@@ -9,18 +9,18 @@
9
9
  "vue3",
10
10
  "暗黑模式"
11
11
  ],
12
- "main": "index.ts",
13
- "peerDependencies": {
14
- "vue": ">=3.2.47"
15
- },
16
- "dependencies": {
17
- "mp-html": "^2.5.0"
18
- },
19
12
  "scripts": {
20
13
  "pub": "pnpm dts && pnpm publish --no-git-checks",
21
14
  "dts": "rm -rf types && vue-tsc --project ./tsconfig.dts.json && pnpm prettier --write types",
22
15
  "release-major": "standard-version --release-as major ",
23
16
  "release-minor": "standard-version --release-as minor",
24
17
  "release-patch": "standard-version --release-as patch "
18
+ },
19
+ "main": "index.ts",
20
+ "peerDependencies": {
21
+ "vue": ">=3.2.47"
22
+ },
23
+ "dependencies": {
24
+ "mp-html": "^2.5.0"
25
25
  }
26
- }
26
+ }
@@ -1,8 +1,8 @@
1
1
  export declare const qrCodeProps: {
2
2
  /** canvas组件id */
3
3
  canvasId: {
4
- type: import('vue').PropType<string>
5
- default: string
4
+ type: StringConstructor
5
+ required: true
6
6
  }
7
7
  /** 二维码内容 */
8
8
  value: {
@@ -76,8 +76,4 @@ export declare const qrCodeProps: {
76
76
  type: import('vue').PropType<string>
77
77
  default: string
78
78
  }
79
- customStyle: {
80
- type: import('vue').PropType<string>
81
- default: string
82
- }
83
79
  }
@@ -0,0 +1,327 @@
1
+ declare const _default: import('vue').DefineComponent<
2
+ {
3
+ /**
4
+ * canvas组件id
5
+ */
6
+ canvasId: {
7
+ type: StringConstructor
8
+ required: true
9
+ }
10
+ /**
11
+ * 二维码内容
12
+ */
13
+ value: {
14
+ type: (NumberConstructor | StringConstructor)[]
15
+ }
16
+ /**
17
+ * 选项
18
+ */
19
+ options: {
20
+ type: ObjectConstructor
21
+ default: () => {}
22
+ }
23
+ /**
24
+ * 二维码大小
25
+ */
26
+ size: {
27
+ type: (NumberConstructor | StringConstructor)[]
28
+ default: number
29
+ }
30
+ /**
31
+ * 二维码尺寸单位
32
+ */
33
+ sizeUnit: {
34
+ type: StringConstructor
35
+ default: string
36
+ }
37
+ /**
38
+ * 导出的文件类型
39
+ */
40
+ fileType: {
41
+ type: StringConstructor
42
+ default: string
43
+ }
44
+ /**
45
+ * 是否初始化组件后就开始生成
46
+ */
47
+ start: {
48
+ type: BooleanConstructor
49
+ default: boolean
50
+ }
51
+ /**
52
+ * 是否数据发生改变自动重绘
53
+ */
54
+ auto: {
55
+ type: BooleanConstructor
56
+ default: boolean
57
+ }
58
+ /**
59
+ * 隐藏组件
60
+ */
61
+ hide: {
62
+ type: BooleanConstructor
63
+ default: boolean
64
+ }
65
+ /**
66
+ * canvas 类型,微信小程序默认使用2d,非2d微信官方已放弃维护,问题比较多
67
+ * 注意:微信小程序type2d手机上正常,PC上微信内打开小程序toDataURL报错,看后期微信官方团队会不会做兼容,不兼容的话只能在自行判断在PC使用非2d,或者直接提示用户请在手机上操作,微信团队的海报中心小程序就是这么做的
68
+ */
69
+ type: {
70
+ type: StringConstructor
71
+ default: () => '2d' | 'normal'
72
+ }
73
+ /**
74
+ * 队列绘制,主要针对NVue端
75
+ */
76
+ queue: {
77
+ type: BooleanConstructor
78
+ default: boolean
79
+ }
80
+ /**
81
+ * 是否队列加载图片,可减少canvas发起的网络资源请求,节省服务器资源
82
+ */
83
+ isQueueLoadImage: {
84
+ type: BooleanConstructor
85
+ default: boolean
86
+ }
87
+ /**
88
+ * loading态
89
+ */
90
+ loading: {
91
+ type: BooleanConstructor
92
+ default: undefined
93
+ }
94
+ /**
95
+ * H5保存即自动下载(在支持的环境下),默认false为仅弹层提示用户需要长按图片保存,不会自动下载
96
+ */
97
+ h5SaveIsDownload: {
98
+ type: BooleanConstructor
99
+ default: boolean
100
+ }
101
+ /**
102
+ * H5下载名称
103
+ */
104
+ h5DownloadName: {
105
+ type: StringConstructor
106
+ default: string
107
+ }
108
+ },
109
+ any,
110
+ {
111
+ canvas: undefined
112
+ canvasType: undefined
113
+ canvasContext: undefined
114
+ makeDelegate: undefined
115
+ drawDelegate: undefined
116
+ toTempFilePathDelegate: undefined
117
+ makeExecuted: boolean
118
+ makeing: boolean
119
+ drawing: boolean
120
+ isError: boolean
121
+ error: undefined
122
+ isH5Save: boolean
123
+ tempFilePath: string
124
+ templateOptions: {
125
+ size: number
126
+ width: number
127
+ height: number
128
+ canvasWidth: number
129
+ canvasHeight: number
130
+ canvasTransform: string
131
+ canvasDisplay: boolean
132
+ }
133
+ uqrcodeOptions: {
134
+ data: string
135
+ }
136
+ plugins: never[]
137
+ makeingPattern: boolean[][][]
138
+ },
139
+ {},
140
+ {
141
+ /**
142
+ * 获取模板选项
143
+ */
144
+ getTemplateOptions(): any
145
+ /**
146
+ * 获取插件选项
147
+ */
148
+ getUqrcodeOptions(): any
149
+ /**
150
+ * 重置画布
151
+ */
152
+ resetCanvas(callback: any): void
153
+ /**
154
+ * 绘制二维码
155
+ */
156
+ draw(callback?: {}, isDrawDelegate?: boolean): Promise<void>
157
+ /**
158
+ * 生成二维码
159
+ */
160
+ make(callback?: {}): void
161
+ /**
162
+ * 重新生成
163
+ */
164
+ remake(callback: any): void
165
+ /**
166
+ * 生成完成
167
+ */
168
+ complete(success?: boolean, errMsg?: string): void
169
+ /**
170
+ * 导出临时路径
171
+ */
172
+ toTempFilePath(callback?: {}): void
173
+ /**
174
+ * 保存
175
+ */
176
+ save(callback?: {}): void
177
+ /**
178
+ * 注册click事件
179
+ */
180
+ onClick(e: any): void
181
+ /**
182
+ * 获取实例
183
+ */
184
+ getInstance(): any
185
+ /**
186
+ * 注册扩展,组件仅支持注册type为style的drawCanvas扩展
187
+ * @param {Object} plugin
188
+ */
189
+ registerStyle(plugin: any):
190
+ | {
191
+ errMsg: string
192
+ }
193
+ | undefined
194
+ getLoadImage(loadImage: any): (src: any) => any
195
+ },
196
+ import('vue').ComponentOptionsMixin,
197
+ import('vue').ComponentOptionsMixin,
198
+ {},
199
+ string,
200
+ import('vue').PublicProps,
201
+ Readonly<
202
+ import('vue').ExtractPropTypes<{
203
+ /**
204
+ * canvas组件id
205
+ */
206
+ canvasId: {
207
+ type: StringConstructor
208
+ required: true
209
+ }
210
+ /**
211
+ * 二维码内容
212
+ */
213
+ value: {
214
+ type: (NumberConstructor | StringConstructor)[]
215
+ }
216
+ /**
217
+ * 选项
218
+ */
219
+ options: {
220
+ type: ObjectConstructor
221
+ default: () => {}
222
+ }
223
+ /**
224
+ * 二维码大小
225
+ */
226
+ size: {
227
+ type: (NumberConstructor | StringConstructor)[]
228
+ default: number
229
+ }
230
+ /**
231
+ * 二维码尺寸单位
232
+ */
233
+ sizeUnit: {
234
+ type: StringConstructor
235
+ default: string
236
+ }
237
+ /**
238
+ * 导出的文件类型
239
+ */
240
+ fileType: {
241
+ type: StringConstructor
242
+ default: string
243
+ }
244
+ /**
245
+ * 是否初始化组件后就开始生成
246
+ */
247
+ start: {
248
+ type: BooleanConstructor
249
+ default: boolean
250
+ }
251
+ /**
252
+ * 是否数据发生改变自动重绘
253
+ */
254
+ auto: {
255
+ type: BooleanConstructor
256
+ default: boolean
257
+ }
258
+ /**
259
+ * 隐藏组件
260
+ */
261
+ hide: {
262
+ type: BooleanConstructor
263
+ default: boolean
264
+ }
265
+ /**
266
+ * canvas 类型,微信小程序默认使用2d,非2d微信官方已放弃维护,问题比较多
267
+ * 注意:微信小程序type2d手机上正常,PC上微信内打开小程序toDataURL报错,看后期微信官方团队会不会做兼容,不兼容的话只能在自行判断在PC使用非2d,或者直接提示用户请在手机上操作,微信团队的海报中心小程序就是这么做的
268
+ */
269
+ type: {
270
+ type: StringConstructor
271
+ default: () => '2d' | 'normal'
272
+ }
273
+ /**
274
+ * 队列绘制,主要针对NVue端
275
+ */
276
+ queue: {
277
+ type: BooleanConstructor
278
+ default: boolean
279
+ }
280
+ /**
281
+ * 是否队列加载图片,可减少canvas发起的网络资源请求,节省服务器资源
282
+ */
283
+ isQueueLoadImage: {
284
+ type: BooleanConstructor
285
+ default: boolean
286
+ }
287
+ /**
288
+ * loading态
289
+ */
290
+ loading: {
291
+ type: BooleanConstructor
292
+ default: undefined
293
+ }
294
+ /**
295
+ * H5保存即自动下载(在支持的环境下),默认false为仅弹层提示用户需要长按图片保存,不会自动下载
296
+ */
297
+ h5SaveIsDownload: {
298
+ type: BooleanConstructor
299
+ default: boolean
300
+ }
301
+ /**
302
+ * H5下载名称
303
+ */
304
+ h5DownloadName: {
305
+ type: StringConstructor
306
+ default: string
307
+ }
308
+ }>
309
+ >,
310
+ {
311
+ options: Record<string, any>
312
+ type: string
313
+ size: string | number
314
+ loading: boolean
315
+ start: boolean
316
+ auto: boolean
317
+ fileType: string
318
+ sizeUnit: string
319
+ hide: boolean
320
+ queue: boolean
321
+ isQueueLoadImage: boolean
322
+ h5SaveIsDownload: boolean
323
+ h5DownloadName: string
324
+ },
325
+ {}
326
+ >
327
+ export default _default
@@ -1,9 +1,83 @@
1
- declare const _default: __VLS_WithTemplateSlots<
2
- import('vue').DefineComponent<
3
- {
1
+ declare const _default: import('vue').DefineComponent<
2
+ {
3
+ canvasId: {
4
+ type: StringConstructor
5
+ required: true
6
+ }
7
+ value: {
8
+ type: import('vue').PropType<string>
9
+ default: string
10
+ }
11
+ options: {
12
+ type: ObjectConstructor
13
+ }
14
+ size: {
15
+ type: NumberConstructor
16
+ default: number
17
+ }
18
+ sizeUnit: {
19
+ type: import('vue').PropType<string>
20
+ default: string
21
+ }
22
+ fileType: {
23
+ type: import('vue').PropType<string>
24
+ default: string
25
+ }
26
+ start: {
27
+ type: BooleanConstructor
28
+ default: boolean
29
+ }
30
+ auto: {
31
+ type: BooleanConstructor
32
+ default: boolean
33
+ }
34
+ hide: {
35
+ type: BooleanConstructor
36
+ default: boolean
37
+ }
38
+ type: {
39
+ type: import('vue').PropType<string>
40
+ default: string
41
+ }
42
+ queue: {
43
+ type: BooleanConstructor
44
+ default: boolean
45
+ }
46
+ isQueueLoadImage: {
47
+ type: BooleanConstructor
48
+ default: boolean
49
+ }
50
+ loading: {
51
+ type: BooleanConstructor
52
+ default: undefined
53
+ }
54
+ h5SaveIsDownload: {
55
+ type: BooleanConstructor
56
+ default: boolean
57
+ }
58
+ h5DownloadName: {
59
+ type: import('vue').PropType<string>
60
+ default: string
61
+ }
62
+ customClass: {
63
+ type: import('vue').PropType<string>
64
+ default: string
65
+ }
66
+ },
67
+ {},
68
+ unknown,
69
+ {},
70
+ {},
71
+ import('vue').ComponentOptionsMixin,
72
+ import('vue').ComponentOptionsMixin,
73
+ {},
74
+ string,
75
+ import('vue').PublicProps,
76
+ Readonly<
77
+ import('vue').ExtractPropTypes<{
4
78
  canvasId: {
5
- type: import('vue').PropType<string>
6
- default: string
79
+ type: StringConstructor
80
+ required: true
7
81
  }
8
82
  value: {
9
83
  type: import('vue').PropType<string>
@@ -64,136 +138,24 @@ declare const _default: __VLS_WithTemplateSlots<
64
138
  type: import('vue').PropType<string>
65
139
  default: string
66
140
  }
67
- customStyle: {
68
- type: import('vue').PropType<string>
69
- default: string
70
- }
71
- },
72
- {},
73
- unknown,
74
- {},
75
- {},
76
- import('vue').ComponentOptionsMixin,
77
- import('vue').ComponentOptionsMixin,
78
- {
79
- click: (...args: any[]) => void
80
- error: (...args: any[]) => void
81
- change: (...args: any[]) => void
82
- save: (...args: any[]) => void
83
- draw: (...args: any[]) => void
84
- make: (...args: any[]) => void
85
- complete: (...args: any[]) => void
86
- },
87
- string,
88
- import('vue').PublicProps,
89
- Readonly<
90
- import('vue').ExtractPropTypes<{
91
- canvasId: {
92
- type: import('vue').PropType<string>
93
- default: string
94
- }
95
- value: {
96
- type: import('vue').PropType<string>
97
- default: string
98
- }
99
- options: {
100
- type: ObjectConstructor
101
- }
102
- size: {
103
- type: NumberConstructor
104
- default: number
105
- }
106
- sizeUnit: {
107
- type: import('vue').PropType<string>
108
- default: string
109
- }
110
- fileType: {
111
- type: import('vue').PropType<string>
112
- default: string
113
- }
114
- start: {
115
- type: BooleanConstructor
116
- default: boolean
117
- }
118
- auto: {
119
- type: BooleanConstructor
120
- default: boolean
121
- }
122
- hide: {
123
- type: BooleanConstructor
124
- default: boolean
125
- }
126
- type: {
127
- type: import('vue').PropType<string>
128
- default: string
129
- }
130
- queue: {
131
- type: BooleanConstructor
132
- default: boolean
133
- }
134
- isQueueLoadImage: {
135
- type: BooleanConstructor
136
- default: boolean
137
- }
138
- loading: {
139
- type: BooleanConstructor
140
- default: undefined
141
- }
142
- h5SaveIsDownload: {
143
- type: BooleanConstructor
144
- default: boolean
145
- }
146
- h5DownloadName: {
147
- type: import('vue').PropType<string>
148
- default: string
149
- }
150
- customClass: {
151
- type: import('vue').PropType<string>
152
- default: string
153
- }
154
- customStyle: {
155
- type: import('vue').PropType<string>
156
- default: string
157
- }
158
- }>
159
- > & {
160
- onChange?: ((...args: any[]) => any) | undefined
161
- onError?: ((...args: any[]) => any) | undefined
162
- onClick?: ((...args: any[]) => any) | undefined
163
- onSave?: ((...args: any[]) => any) | undefined
164
- onDraw?: ((...args: any[]) => any) | undefined
165
- onMake?: ((...args: any[]) => any) | undefined
166
- onComplete?: ((...args: any[]) => any) | undefined
167
- },
168
- {
169
- customStyle: string
170
- customClass: string
171
- value: string
172
- type: string
173
- size: number
174
- loading: boolean
175
- start: boolean
176
- canvasId: string
177
- auto: boolean
178
- fileType: string
179
- sizeUnit: string
180
- hide: boolean
181
- queue: boolean
182
- isQueueLoadImage: boolean
183
- h5SaveIsDownload: boolean
184
- h5DownloadName: string
185
- },
186
- {}
141
+ }>
187
142
  >,
188
143
  {
189
- loading?(_: {}): any
190
- error?(_: { error: any }): any
191
- h5save?(_: { tempFilePath: string }): any
192
- }
144
+ customClass: string
145
+ value: string
146
+ type: string
147
+ size: number
148
+ loading: boolean
149
+ start: boolean
150
+ auto: boolean
151
+ fileType: string
152
+ sizeUnit: string
153
+ hide: boolean
154
+ queue: boolean
155
+ isQueueLoadImage: boolean
156
+ h5SaveIsDownload: boolean
157
+ h5DownloadName: string
158
+ },
159
+ {}
193
160
  >
194
161
  export default _default
195
- type __VLS_WithTemplateSlots<T, S> = T & {
196
- new (): {
197
- $slots: S
198
- }
199
- }
@@ -132,8 +132,8 @@ declare const _default: __VLS_WithTemplateSlots<
132
132
  lineHeight: string
133
133
  format: boolean
134
134
  mode: string
135
- decoration: string
136
135
  call: boolean
136
+ decoration: string
137
137
  },
138
138
  {}
139
139
  >,