go-captcha-vue 1.0.3 → 1.0.5-pre
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/README.md +95 -42
- package/package.json +3 -5
- package/dist/assets/icons/arrows-icon.vue.d.ts +0 -4
- package/dist/assets/icons/btn-default-icon.vue.d.ts +0 -4
- package/dist/assets/icons/btn-error-icon.vue.d.ts +0 -4
- package/dist/assets/icons/btn-success-icon.vue.d.ts +0 -4
- package/dist/assets/icons/btn-warn-icon.vue.d.ts +0 -4
- package/dist/assets/icons/close-icon.vue.d.ts +0 -4
- package/dist/assets/icons/loading-icon.vue.d.ts +0 -4
- package/dist/assets/icons/refresh-icon.vue.d.ts +0 -4
- package/dist/components/button/index.d.ts +0 -7
- package/dist/components/button/index.vue.d.ts +0 -47
- package/dist/components/button/meta/config.d.ts +0 -12
- package/dist/components/click/hooks/handler.d.ts +0 -20
- package/dist/components/click/index.d.ts +0 -2
- package/dist/components/click/index.vue.d.ts +0 -45
- package/dist/components/click/meta/config.d.ts +0 -19
- package/dist/components/click/meta/data.d.ts +0 -15
- package/dist/components/click/meta/event.d.ts +0 -12
- package/dist/components/click/meta/expose.d.ts +0 -11
- package/dist/components/rotate/hooks/handler.d.ts +0 -18
- package/dist/components/rotate/index.d.ts +0 -2
- package/dist/components/rotate/index.vue.d.ts +0 -45
- package/dist/components/rotate/meta/config.d.ts +0 -17
- package/dist/components/rotate/meta/data.d.ts +0 -11
- package/dist/components/rotate/meta/event.d.ts +0 -11
- package/dist/components/rotate/meta/expose.d.ts +0 -11
- package/dist/components/slide/hooks/handler.d.ts +0 -18
- package/dist/components/slide/index.d.ts +0 -2
- package/dist/components/slide/index.vue.d.ts +0 -45
- package/dist/components/slide/meta/config.d.ts +0 -18
- package/dist/components/slide/meta/data.d.ts +0 -18
- package/dist/components/slide/meta/event.d.ts +0 -12
- package/dist/components/slide/meta/expose.d.ts +0 -11
- package/dist/components/slide-region/hooks/handler.d.ts +0 -18
- package/dist/components/slide-region/index.d.ts +0 -2
- package/dist/components/slide-region/index.vue.d.ts +0 -45
- package/dist/components/slide-region/meta/config.d.ts +0 -16
- package/dist/components/slide-region/meta/data.d.ts +0 -18
- package/dist/components/slide-region/meta/event.d.ts +0 -12
- package/dist/components/slide-region/meta/expose.d.ts +0 -11
- package/dist/go-captcha-vue.es.js +0 -1735
- package/dist/go-captcha-vue.umd.js +0 -39
- package/dist/helper/helper.d.ts +0 -10
- package/dist/index.d.ts +0 -11
- package/dist/style.css +0 -1
package/README.md
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img width="120" style="padding-top: 50px; margin: 0;" src="http://47.104.180.148/go-captcha/gocaptcha_logo.svg?v=1"/>
|
|
3
|
+
<h1 style="margin: 0; padding: 0">Go Captcha</h1>
|
|
4
|
+
<p>Behavior Captcha For Vue</p>
|
|
5
|
+
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<br/>
|
|
9
|
+
|
|
10
|
+
> English | [中文](README_zh.md)
|
|
2
11
|
|
|
3
12
|
<br/>
|
|
4
13
|
|
|
14
|
+
<p> ⭐️ If it helps you, please give a star.</p>
|
|
15
|
+
|
|
16
|
+
<img src="http://47.104.180.148/go-captcha/go-captcha-v2.jpg" alt="Poster">
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
| Vue Version | Go Captcha Version |
|
|
6
20
|
|:-----------------------|:------------------:|
|
|
7
21
|
| vue >= 2.7.14 && < 3.0 | go-captcha-vue@^1 |
|
|
8
22
|
| vue >= 3.0 | go-captcha-vue@^2 |
|
|
9
23
|
|
|
10
24
|
## Install
|
|
25
|
+
Greater than or equal to vue2.7.14 and less than vue3.0
|
|
11
26
|
```shell
|
|
12
|
-
# Greater than or equal to vue2.7.14 and less than vue3.0
|
|
13
27
|
yarn add go-captcha-vue@^1
|
|
14
28
|
# or
|
|
15
29
|
npm install go-captcha-vue@^1
|
|
16
30
|
# or
|
|
17
31
|
pnpm install go-captcha-vue@^1
|
|
32
|
+
```
|
|
18
33
|
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
Greater than vue3.0
|
|
35
|
+
```shell
|
|
21
36
|
yarn add go-captcha-vue@^2
|
|
22
37
|
# or
|
|
23
38
|
npm install go-captcha-vue@^2
|
|
@@ -25,27 +40,44 @@ npm install go-captcha-vue@^2
|
|
|
25
40
|
pnpm install go-captcha-vue@^2
|
|
26
41
|
```
|
|
27
42
|
|
|
28
|
-
Use Go Captcha
|
|
43
|
+
## Use Go Captcha
|
|
29
44
|
```ts
|
|
30
45
|
import "go-captcha-vue/dist/style.css"
|
|
31
46
|
import GoCaptcha from "go-captcha-vue"
|
|
32
47
|
|
|
33
48
|
Vue.use(GoCaptcha)
|
|
49
|
+
|
|
50
|
+
// OR
|
|
51
|
+
import {Click, Rotate, Slide, SlideRegion, Button} from "go-captcha-vue";
|
|
52
|
+
Vue.component('gocaptcha-click', Click)
|
|
53
|
+
Vue.component('gocaptcha-rotate', Rotate)
|
|
54
|
+
Vue.component('gocaptcha-slide', Slide)
|
|
55
|
+
Vue.component('gocaptcha-slide-region', SlideRegion)
|
|
56
|
+
Vue.component('gocaptcha-button', Button)
|
|
34
57
|
```
|
|
35
58
|
|
|
36
|
-
|
|
59
|
+
|
|
60
|
+
## Click Mode
|
|
37
61
|
```vue
|
|
38
62
|
<gocaptcha-click
|
|
39
63
|
:config="{}"
|
|
40
64
|
:data="{}"
|
|
41
65
|
:events="{}"
|
|
66
|
+
ref="domRef"
|
|
42
67
|
/>
|
|
68
|
+
|
|
69
|
+
<script>
|
|
70
|
+
// call methods
|
|
71
|
+
const domRef = ref(null)
|
|
72
|
+
domRef.value.clear()
|
|
73
|
+
domRef.value.refresh()
|
|
74
|
+
</script>
|
|
43
75
|
```
|
|
44
76
|
|
|
45
|
-
|
|
77
|
+
|
|
46
78
|
```ts
|
|
47
79
|
// config = {}
|
|
48
|
-
interface
|
|
80
|
+
interface Config {
|
|
49
81
|
width?: number;
|
|
50
82
|
height?: number;
|
|
51
83
|
thumbWidth?: number;
|
|
@@ -60,21 +92,21 @@ interface ClickConfig {
|
|
|
60
92
|
}
|
|
61
93
|
|
|
62
94
|
// data = {}
|
|
63
|
-
interface
|
|
95
|
+
interface Data {
|
|
64
96
|
image: string;
|
|
65
97
|
thumb: string;
|
|
66
98
|
}
|
|
67
99
|
|
|
68
100
|
// events = {}
|
|
69
|
-
interface
|
|
101
|
+
interface Events {
|
|
70
102
|
click?: (x: number, y: number) => void;
|
|
71
103
|
refresh?: () => void;
|
|
72
104
|
close?: () => void;
|
|
73
105
|
confirm?: (dots: Array<ClickDot>, reset:() => void) => boolean;
|
|
74
106
|
}
|
|
75
107
|
|
|
76
|
-
// component method
|
|
77
|
-
interface
|
|
108
|
+
// export component method
|
|
109
|
+
interface ExportMethods {
|
|
78
110
|
reset: () => void,
|
|
79
111
|
clear: () => void,
|
|
80
112
|
refresh: () => void,
|
|
@@ -82,21 +114,24 @@ interface ClickExpose {
|
|
|
82
114
|
}
|
|
83
115
|
```
|
|
84
116
|
|
|
85
|
-
##
|
|
117
|
+
## Slide Mode
|
|
86
118
|
```vue
|
|
87
119
|
<gocaptcha-slide
|
|
88
120
|
:config="{}"
|
|
89
121
|
:data="{}"
|
|
90
122
|
:events="{}"
|
|
123
|
+
ref="domRef"
|
|
91
124
|
/>
|
|
92
125
|
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
126
|
+
<script>
|
|
127
|
+
// call methods
|
|
128
|
+
const domRef = ref(null)
|
|
129
|
+
domRef.value.clear()
|
|
130
|
+
domRef.value.refresh()
|
|
131
|
+
</script>
|
|
98
132
|
```
|
|
99
|
-
|
|
133
|
+
|
|
134
|
+
|
|
100
135
|
```ts
|
|
101
136
|
// config = {}
|
|
102
137
|
interface SlideConfig {
|
|
@@ -130,14 +165,33 @@ interface SlideEvents {
|
|
|
130
165
|
confirm?: (point: SlidePoint, reset:() => void) => boolean;
|
|
131
166
|
}
|
|
132
167
|
|
|
133
|
-
// component method
|
|
134
|
-
interface
|
|
168
|
+
// export component method
|
|
169
|
+
interface ExportMethods {
|
|
135
170
|
reset: () => void,
|
|
136
171
|
clear: () => void,
|
|
137
172
|
refresh: () => void,
|
|
138
173
|
close: () => void,
|
|
139
174
|
}
|
|
140
175
|
```
|
|
176
|
+
|
|
177
|
+
## Drag-And-Drop Mode
|
|
178
|
+
```vue
|
|
179
|
+
<gocaptcha-slide-region
|
|
180
|
+
:config="{}"
|
|
181
|
+
:data="{}"
|
|
182
|
+
:events="{}"
|
|
183
|
+
ref="domRef"
|
|
184
|
+
/>
|
|
185
|
+
|
|
186
|
+
<script>
|
|
187
|
+
// call methods
|
|
188
|
+
const domRef = ref(null)
|
|
189
|
+
domRef.value.clear()
|
|
190
|
+
domRef.value.refresh()
|
|
191
|
+
</script>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
|
|
141
195
|
```ts
|
|
142
196
|
// config = {}
|
|
143
197
|
interface SlideRegionConfig {
|
|
@@ -171,9 +225,8 @@ interface SlideRegionEvents {
|
|
|
171
225
|
confirm?: (point: SlideRegionPoint, reset:() => void) => boolean;
|
|
172
226
|
}
|
|
173
227
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
interface SlideRegionExpose {
|
|
228
|
+
// export component method
|
|
229
|
+
interface ExportMethods {
|
|
177
230
|
reset: () => void,
|
|
178
231
|
clear: () => void,
|
|
179
232
|
refresh: () => void,
|
|
@@ -181,19 +234,27 @@ interface SlideRegionExpose {
|
|
|
181
234
|
}
|
|
182
235
|
```
|
|
183
236
|
|
|
184
|
-
##
|
|
237
|
+
## Rotation Mode
|
|
185
238
|
```vue
|
|
186
239
|
<gocaptcha-rotate
|
|
187
240
|
:config="{}"
|
|
188
241
|
:data="{}"
|
|
189
242
|
:events="{}"
|
|
243
|
+
ref="domRef"
|
|
190
244
|
/>
|
|
245
|
+
|
|
246
|
+
<script>
|
|
247
|
+
// call methods
|
|
248
|
+
const domRef = ref(null)
|
|
249
|
+
domRef.value.clear()
|
|
250
|
+
domRef.value.refresh()
|
|
251
|
+
</script>
|
|
191
252
|
```
|
|
192
253
|
|
|
193
|
-
|
|
254
|
+
|
|
194
255
|
```ts
|
|
195
256
|
// config = {}
|
|
196
|
-
interface
|
|
257
|
+
interface Config {
|
|
197
258
|
width?: number;
|
|
198
259
|
height?: number;
|
|
199
260
|
thumbWidth?: number;
|
|
@@ -207,22 +268,22 @@ interface RotateConfig {
|
|
|
207
268
|
}
|
|
208
269
|
|
|
209
270
|
// data = {}
|
|
210
|
-
interface
|
|
271
|
+
interface Data {
|
|
211
272
|
angle: number;
|
|
212
273
|
image: string;
|
|
213
274
|
thumb: string;
|
|
214
275
|
}
|
|
215
276
|
|
|
216
277
|
// events = {}
|
|
217
|
-
interface
|
|
278
|
+
interface Events {
|
|
218
279
|
rotate?: (angle: number) => void;
|
|
219
280
|
refresh?: () => void;
|
|
220
281
|
close?: () => void;
|
|
221
282
|
confirm?: (angle: number, reset:() => void) => boolean;
|
|
222
283
|
}
|
|
223
284
|
|
|
224
|
-
// component method
|
|
225
|
-
interface
|
|
285
|
+
// export component method
|
|
286
|
+
interface ExportMethods {
|
|
226
287
|
reset: () => void,
|
|
227
288
|
clear: () => void,
|
|
228
289
|
refresh: () => void,
|
|
@@ -231,12 +292,13 @@ interface RotateExpose {
|
|
|
231
292
|
```
|
|
232
293
|
|
|
233
294
|
|
|
295
|
+
|
|
234
296
|
## Button
|
|
235
297
|
```vue
|
|
236
298
|
<gocaptcha-button @clickEvent="() => console.log('hello')"/>
|
|
237
299
|
```
|
|
238
300
|
|
|
239
|
-
|
|
301
|
+
|
|
240
302
|
```ts
|
|
241
303
|
interface $Attr {
|
|
242
304
|
config?: CaptchaConfig;
|
|
@@ -249,19 +311,10 @@ interface $Event {
|
|
|
249
311
|
clickEvent?: ()=>void; // event -> @clickEvent=""
|
|
250
312
|
}
|
|
251
313
|
|
|
252
|
-
export interface
|
|
314
|
+
export interface CaptchaConfig {
|
|
253
315
|
width?: number;
|
|
254
316
|
height?: number;
|
|
255
317
|
verticalPadding?: number;
|
|
256
318
|
horizontalPadding?: number;
|
|
257
319
|
}
|
|
258
|
-
|
|
259
320
|
```
|
|
260
|
-
|
|
261
|
-
<br/>
|
|
262
|
-
|
|
263
|
-
## 👍 Sponsor
|
|
264
|
-
<div>
|
|
265
|
-
<a href="http://gocaptcha.wencodes.com/sponsor/" target="_blank">http://gocaptcha.wencodes.com/sponsor/</a>
|
|
266
|
-
</div>
|
|
267
|
-
<br/>
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "go-captcha-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-pre",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "GoCaptcha for Vue, which implements click mode, slider mode, drag-drop mode and rotation mode.",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"go-captcha-vue",
|
|
10
10
|
"go-captcha",
|
|
@@ -50,9 +50,6 @@
|
|
|
50
50
|
"preview": "vite preview --port 5050",
|
|
51
51
|
"type-check": "vue-tsc --noEmit -p tsconfig.json"
|
|
52
52
|
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"vue": "^2.7.14"
|
|
55
|
-
},
|
|
56
53
|
"peerDependencies": {
|
|
57
54
|
"vue": "<3"
|
|
58
55
|
},
|
|
@@ -70,6 +67,7 @@
|
|
|
70
67
|
"unplugin-vue2-script-setup": "^0.7.1",
|
|
71
68
|
"vite": "^2.6.14",
|
|
72
69
|
"vite-plugin-vue2": "^1.9.0",
|
|
70
|
+
"vue": "<3",
|
|
73
71
|
"vue-demi": "^0.13.11",
|
|
74
72
|
"vue-template-compiler": "^2.7.14",
|
|
75
73
|
"vue-tsc": "^1.8.27"
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
-
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export default _default;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ButtonConfig } from "./meta/config";
|
|
2
|
-
import { ButtonType } from "@/components/button/meta/types";
|
|
3
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
config?: ButtonConfig | undefined;
|
|
6
|
-
clickEvent?: (() => void) | undefined;
|
|
7
|
-
disabled?: boolean | undefined;
|
|
8
|
-
type?: ButtonType | undefined;
|
|
9
|
-
title?: string | undefined;
|
|
10
|
-
}>, {
|
|
11
|
-
config: () => ButtonConfig;
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
type: string;
|
|
14
|
-
title: string;
|
|
15
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
-
"click-event": (...args: any[]) => void;
|
|
17
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
config?: ButtonConfig | undefined;
|
|
20
|
-
clickEvent?: (() => void) | undefined;
|
|
21
|
-
disabled?: boolean | undefined;
|
|
22
|
-
type?: ButtonType | undefined;
|
|
23
|
-
title?: string | undefined;
|
|
24
|
-
}>, {
|
|
25
|
-
config: () => ButtonConfig;
|
|
26
|
-
disabled: boolean;
|
|
27
|
-
type: string;
|
|
28
|
-
title: string;
|
|
29
|
-
}>>>, {}>;
|
|
30
|
-
export default _default;
|
|
31
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
33
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
34
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
35
|
-
} : {
|
|
36
|
-
type: import('vue').PropType<T[K]>;
|
|
37
|
-
required: true;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
41
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
42
|
-
default: D[K];
|
|
43
|
-
}> : P[K];
|
|
44
|
-
};
|
|
45
|
-
declare type __VLS_Prettify<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
47
|
-
} & {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author Awen
|
|
3
|
-
* @Date 2024/06/01
|
|
4
|
-
* @Email wengaolng@gmail.com
|
|
5
|
-
**/
|
|
6
|
-
export interface ButtonConfig {
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
verticalPadding?: number;
|
|
10
|
-
horizontalPadding?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const defaultConfig: () => ButtonConfig;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ClickData } from "../meta/data";
|
|
2
|
-
import { ClickEvent } from "../meta/event";
|
|
3
|
-
export declare function useHandler(_: ClickData, event: ClickEvent, clearCbs: () => void): {
|
|
4
|
-
dots: {
|
|
5
|
-
list: {
|
|
6
|
-
key: number;
|
|
7
|
-
index: number;
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
}[];
|
|
11
|
-
};
|
|
12
|
-
clickEvent: (e: Event | any) => boolean;
|
|
13
|
-
confirmEvent: (e: Event | any) => boolean;
|
|
14
|
-
closeEvent: (e: Event | any) => boolean;
|
|
15
|
-
refreshEvent: (e: Event | any) => boolean;
|
|
16
|
-
resetData: () => void;
|
|
17
|
-
clearData: () => void;
|
|
18
|
-
refresh: () => void;
|
|
19
|
-
close: () => void;
|
|
20
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ClickConfig } from "./meta/config";
|
|
2
|
-
import { ClickData } from "./meta/data";
|
|
3
|
-
import { ClickEvent } from "./meta/event";
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
config?: ClickConfig | undefined;
|
|
7
|
-
events?: ClickEvent | undefined;
|
|
8
|
-
data: ClickData;
|
|
9
|
-
}>, {
|
|
10
|
-
config: () => ClickConfig;
|
|
11
|
-
events: () => ClickEvent;
|
|
12
|
-
data: () => ClickData;
|
|
13
|
-
}>, {
|
|
14
|
-
reset: () => void;
|
|
15
|
-
clear: () => void;
|
|
16
|
-
refresh: () => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
config?: ClickConfig | undefined;
|
|
21
|
-
events?: ClickEvent | undefined;
|
|
22
|
-
data: ClickData;
|
|
23
|
-
}>, {
|
|
24
|
-
config: () => ClickConfig;
|
|
25
|
-
events: () => ClickEvent;
|
|
26
|
-
data: () => ClickData;
|
|
27
|
-
}>>>, {}>;
|
|
28
|
-
export default _default;
|
|
29
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
-
} : {
|
|
34
|
-
type: import('vue').PropType<T[K]>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
39
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
|
-
default: D[K];
|
|
41
|
-
}> : P[K];
|
|
42
|
-
};
|
|
43
|
-
declare type __VLS_Prettify<T> = {
|
|
44
|
-
[K in keyof T]: T[K];
|
|
45
|
-
} & {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author Awen
|
|
3
|
-
* @Date 2024/06/01
|
|
4
|
-
* @Email wengaolng@gmail.com
|
|
5
|
-
**/
|
|
6
|
-
export interface ClickConfig {
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
thumbWidth?: number;
|
|
10
|
-
thumbHeight?: number;
|
|
11
|
-
verticalPadding?: number;
|
|
12
|
-
horizontalPadding?: number;
|
|
13
|
-
showTheme?: boolean;
|
|
14
|
-
title?: string;
|
|
15
|
-
buttonText?: string;
|
|
16
|
-
iconSize?: number;
|
|
17
|
-
dotSize?: number;
|
|
18
|
-
}
|
|
19
|
-
export declare const defaultConfig: () => ClickConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author Awen
|
|
3
|
-
* @Date 2024/06/01
|
|
4
|
-
* @Email wengaolng@gmail.com
|
|
5
|
-
**/
|
|
6
|
-
import type { ClickDot } from "./data";
|
|
7
|
-
export interface ClickEvent {
|
|
8
|
-
click?: (x: number, y: number) => void;
|
|
9
|
-
refresh?: () => void;
|
|
10
|
-
close?: () => void;
|
|
11
|
-
confirm?: (dots: Array<ClickDot>, reset: () => void) => void;
|
|
12
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { RotateData } from "../meta/data";
|
|
2
|
-
import { RotateEvent } from "../meta/event";
|
|
3
|
-
import { Ref } from "vue";
|
|
4
|
-
import { SlideConfig } from "@/components/slide/meta/config";
|
|
5
|
-
export declare function useHandler(data: RotateData, event: RotateEvent, config: SlideConfig, rootRef: Ref, dragBlockRef: Ref, dragBarRef: Ref, clearCbs: () => void): {
|
|
6
|
-
state: {
|
|
7
|
-
dragLeft: number;
|
|
8
|
-
thumbAngle: number;
|
|
9
|
-
isFreeze: boolean;
|
|
10
|
-
};
|
|
11
|
-
dragEvent: (e: Event | any) => void;
|
|
12
|
-
closeEvent: (e: Event | any) => boolean;
|
|
13
|
-
refreshEvent: (e: Event | any) => boolean;
|
|
14
|
-
resetData: () => void;
|
|
15
|
-
clearData: () => void;
|
|
16
|
-
refresh: () => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { RotateConfig } from "./meta/config";
|
|
2
|
-
import { RotateData } from "./meta/data";
|
|
3
|
-
import { RotateEvent } from "./meta/event";
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
config?: RotateConfig | undefined;
|
|
7
|
-
events?: RotateEvent | undefined;
|
|
8
|
-
data: RotateData;
|
|
9
|
-
}>, {
|
|
10
|
-
config: () => RotateConfig;
|
|
11
|
-
events: () => RotateEvent;
|
|
12
|
-
data: () => RotateData;
|
|
13
|
-
}>, {
|
|
14
|
-
reset: () => void;
|
|
15
|
-
clear: () => void;
|
|
16
|
-
refresh: () => void;
|
|
17
|
-
close: () => void;
|
|
18
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
config?: RotateConfig | undefined;
|
|
21
|
-
events?: RotateEvent | undefined;
|
|
22
|
-
data: RotateData;
|
|
23
|
-
}>, {
|
|
24
|
-
config: () => RotateConfig;
|
|
25
|
-
events: () => RotateEvent;
|
|
26
|
-
data: () => RotateData;
|
|
27
|
-
}>>>, {}>;
|
|
28
|
-
export default _default;
|
|
29
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
-
} : {
|
|
34
|
-
type: import('vue').PropType<T[K]>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
39
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
|
-
default: D[K];
|
|
41
|
-
}> : P[K];
|
|
42
|
-
};
|
|
43
|
-
declare type __VLS_Prettify<T> = {
|
|
44
|
-
[K in keyof T]: T[K];
|
|
45
|
-
} & {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Author Awen
|
|
3
|
-
* @Date 2024/06/01
|
|
4
|
-
* @Email wengaolng@gmail.com
|
|
5
|
-
**/
|
|
6
|
-
export interface RotateConfig {
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
size?: number;
|
|
10
|
-
verticalPadding?: number;
|
|
11
|
-
horizontalPadding?: number;
|
|
12
|
-
showTheme?: boolean;
|
|
13
|
-
title?: string;
|
|
14
|
-
iconSize?: number;
|
|
15
|
-
scope?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const defaultConfig: () => RotateConfig;
|