go-captcha-vue 2.0.0-beta.1 → 2.0.0
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/LICENSE +21 -0
- package/README.md +106 -22
- package/dist/assets/icons/arrows-icon.vue.d.ts +3 -1
- package/dist/assets/icons/btn-default-icon.vue.d.ts +3 -1
- package/dist/assets/icons/btn-error-icon.vue.d.ts +3 -1
- package/dist/assets/icons/btn-success-icon.vue.d.ts +3 -1
- package/dist/assets/icons/btn-warn-icon.vue.d.ts +3 -1
- package/dist/assets/icons/close-icon.vue.d.ts +3 -1
- package/dist/assets/icons/loading-icon.vue.d.ts +3 -1
- package/dist/assets/icons/refresh-icon.vue.d.ts +3 -1
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/button/index.vue.d.ts +27 -24
- package/dist/components/button/meta/config.d.ts +2 -2
- package/dist/components/click/hooks/handler.d.ts +3 -3
- package/dist/components/click/index.vue.d.ts +32 -31
- package/dist/components/click/meta/config.d.ts +4 -2
- package/dist/components/click/meta/data.d.ts +2 -2
- package/dist/components/click/meta/event.d.ts +3 -3
- package/dist/components/rotate/hooks/handler.d.ts +4 -4
- package/dist/components/rotate/index.vue.d.ts +31 -31
- package/dist/components/rotate/meta/config.d.ts +3 -2
- package/dist/components/rotate/meta/data.d.ts +1 -1
- package/dist/components/rotate/meta/event.d.ts +1 -1
- package/dist/components/slide/hooks/handler.d.ts +4 -4
- package/dist/components/slide/index.vue.d.ts +31 -31
- package/dist/components/slide/meta/config.d.ts +3 -2
- package/dist/components/slide/meta/data.d.ts +2 -2
- package/dist/components/slide/meta/event.d.ts +3 -3
- package/dist/components/slide-region/hooks/handler.d.ts +4 -4
- package/dist/components/slide-region/index.vue.d.ts +31 -31
- package/dist/components/slide-region/meta/config.d.ts +3 -2
- package/dist/components/slide-region/meta/data.d.ts +2 -2
- package/dist/components/slide-region/meta/event.d.ts +3 -3
- package/dist/go-captcha-vue.es.js +815 -1248
- package/dist/go-captcha-vue.umd.js +8 -8
- package/dist/index.d.ts +8 -2
- package/dist/style.css +1 -1
- package/package.json +14 -13
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Awen <wengaolng@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,38 @@
|
|
|
1
1
|
# Go Captcha Vue Package
|
|
2
2
|
|
|
3
|
+
<br/>
|
|
4
|
+
|
|
5
|
+
| Vue Version | Go Captcha Version |
|
|
6
|
+
|:-----------------------|:------------------:|
|
|
7
|
+
| vue >= 2.7.14 && < 3.0 | go-captcha-vue@^1 |
|
|
8
|
+
| vue >= 3.0 | go-captcha-vue@^2 |
|
|
9
|
+
|
|
10
|
+
## Install
|
|
3
11
|
```shell
|
|
4
|
-
|
|
12
|
+
# Greater than or equal to vue2.7.14 and less than vue3.0
|
|
13
|
+
yarn add go-captcha-vue@^1
|
|
5
14
|
# or
|
|
6
|
-
npm install go-captcha-vue
|
|
15
|
+
npm install go-captcha-vue@^1
|
|
7
16
|
# or
|
|
8
|
-
pnpm install go-captcha-vue
|
|
9
|
-
```
|
|
17
|
+
pnpm install go-captcha-vue@^1
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
19
|
+
############################################
|
|
20
|
+
# Greater than vue3.0
|
|
21
|
+
yarn add go-captcha-vue@^2
|
|
22
|
+
# or
|
|
23
|
+
npm install go-captcha-vue@^2
|
|
24
|
+
# or
|
|
25
|
+
pnpm install go-captcha-vue@^2
|
|
26
|
+
```
|
|
13
27
|
|
|
28
|
+
Use Go Captcha
|
|
29
|
+
```ts
|
|
14
30
|
import "go-captcha-vue/dist/style.css"
|
|
15
31
|
import GoCaptcha from "go-captcha-vue"
|
|
16
32
|
|
|
17
33
|
Vue.use(GoCaptcha)
|
|
18
34
|
```
|
|
19
35
|
|
|
20
|
-
|
|
21
36
|
## 🖖 Click Mode Captcha
|
|
22
37
|
```vue
|
|
23
38
|
<gocaptcha-click
|
|
@@ -27,10 +42,10 @@ Vue.use(GoCaptcha)
|
|
|
27
42
|
/>
|
|
28
43
|
```
|
|
29
44
|
|
|
30
|
-
###
|
|
45
|
+
### Parameter Reference
|
|
31
46
|
```ts
|
|
32
47
|
// config = {}
|
|
33
|
-
interface
|
|
48
|
+
interface ClickConfig {
|
|
34
49
|
width?: number;
|
|
35
50
|
height?: number;
|
|
36
51
|
thumbWidth?: number;
|
|
@@ -38,20 +53,22 @@ interface Config {
|
|
|
38
53
|
verticalPadding?: number;
|
|
39
54
|
horizontalPadding?: number;
|
|
40
55
|
showTheme?: boolean;
|
|
56
|
+
title?: string;
|
|
57
|
+
buttonText?: string;
|
|
41
58
|
}
|
|
42
59
|
|
|
43
60
|
// data = {}
|
|
44
|
-
interface
|
|
61
|
+
interface ClickData {
|
|
45
62
|
image: string;
|
|
46
63
|
thumb: string;
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
// events = {}
|
|
50
|
-
interface
|
|
67
|
+
interface ClickEvents {
|
|
51
68
|
click?: (x: number, y: number) => void;
|
|
52
69
|
refresh?: () => void;
|
|
53
70
|
close?: () => void;
|
|
54
|
-
confirm?: (dots: Array<
|
|
71
|
+
confirm?: (dots: Array<ClickDot>) => boolean;
|
|
55
72
|
}
|
|
56
73
|
```
|
|
57
74
|
|
|
@@ -69,10 +86,10 @@ interface Events {
|
|
|
69
86
|
:events="{}"
|
|
70
87
|
/>
|
|
71
88
|
```
|
|
72
|
-
###
|
|
89
|
+
### Parameter Reference
|
|
73
90
|
```ts
|
|
74
91
|
// config = {}
|
|
75
|
-
interface
|
|
92
|
+
interface SlideConfig {
|
|
76
93
|
width?: number;
|
|
77
94
|
height?: number;
|
|
78
95
|
thumbWidth?: number;
|
|
@@ -80,10 +97,11 @@ interface Config {
|
|
|
80
97
|
verticalPadding?: number;
|
|
81
98
|
horizontalPadding?: number;
|
|
82
99
|
showTheme?: boolean;
|
|
100
|
+
title?: string;
|
|
83
101
|
}
|
|
84
102
|
|
|
85
103
|
// data = {}
|
|
86
|
-
interface
|
|
104
|
+
interface SlideData {
|
|
87
105
|
thumbX: number;
|
|
88
106
|
thumbY: number;
|
|
89
107
|
thumbWidth: number;
|
|
@@ -93,14 +111,44 @@ interface Data {
|
|
|
93
111
|
}
|
|
94
112
|
|
|
95
113
|
// events = {}
|
|
96
|
-
interface
|
|
114
|
+
interface SlideEvents {
|
|
97
115
|
move?: (x: number, y: number) => void;
|
|
98
116
|
refresh?: () => void;
|
|
99
117
|
close?: () => void;
|
|
100
|
-
confirm?: (point:
|
|
118
|
+
confirm?: (point: SlidePoint) => boolean;
|
|
101
119
|
}
|
|
102
120
|
```
|
|
121
|
+
```ts
|
|
122
|
+
// config = {}
|
|
123
|
+
interface SlideRegionConfig {
|
|
124
|
+
width?: number;
|
|
125
|
+
height?: number;
|
|
126
|
+
thumbWidth?: number;
|
|
127
|
+
thumbHeight?: number;
|
|
128
|
+
verticalPadding?: number;
|
|
129
|
+
horizontalPadding?: number;
|
|
130
|
+
showTheme?: boolean;
|
|
131
|
+
title?: string;
|
|
132
|
+
}
|
|
103
133
|
|
|
134
|
+
// data = {}
|
|
135
|
+
interface SlideRegionData {
|
|
136
|
+
thumbX: number;
|
|
137
|
+
thumbY: number;
|
|
138
|
+
thumbWidth: number;
|
|
139
|
+
thumbHeight: number;
|
|
140
|
+
image: string;
|
|
141
|
+
thumb: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// events = {}
|
|
145
|
+
interface SlideRegionEvents {
|
|
146
|
+
move?: (x: number, y: number) => void;
|
|
147
|
+
refresh?: () => void;
|
|
148
|
+
close?: () => void;
|
|
149
|
+
confirm?: (point: SlideRegionPoint) => boolean;
|
|
150
|
+
}
|
|
151
|
+
```
|
|
104
152
|
|
|
105
153
|
## 🖖 Rotate Mode Captcha
|
|
106
154
|
```vue
|
|
@@ -111,10 +159,10 @@ interface Events {
|
|
|
111
159
|
/>
|
|
112
160
|
```
|
|
113
161
|
|
|
114
|
-
###
|
|
162
|
+
### Parameter Reference
|
|
115
163
|
```ts
|
|
116
164
|
// config = {}
|
|
117
|
-
interface
|
|
165
|
+
interface RotateConfig {
|
|
118
166
|
width?: number;
|
|
119
167
|
height?: number;
|
|
120
168
|
thumbWidth?: number;
|
|
@@ -122,20 +170,56 @@ interface Config {
|
|
|
122
170
|
verticalPadding?: number;
|
|
123
171
|
horizontalPadding?: number;
|
|
124
172
|
showTheme?: boolean;
|
|
173
|
+
title?: string;
|
|
125
174
|
}
|
|
126
175
|
|
|
127
176
|
// data = {}
|
|
128
|
-
interface
|
|
177
|
+
interface RotateData {
|
|
129
178
|
angle: number;
|
|
130
179
|
image: string;
|
|
131
180
|
thumb: string;
|
|
132
181
|
}
|
|
133
182
|
|
|
134
183
|
// events = {}
|
|
135
|
-
interface
|
|
184
|
+
interface RotateEvents {
|
|
136
185
|
rotate?: (angle: number) => void;
|
|
137
186
|
refresh?: () => void;
|
|
138
187
|
close?: () => void;
|
|
139
188
|
confirm?: (angle: number) => boolean;
|
|
140
189
|
}
|
|
141
|
-
```
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
## Button
|
|
194
|
+
```vue
|
|
195
|
+
<gocaptcha-button />
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### params
|
|
199
|
+
```ts
|
|
200
|
+
interface _ {
|
|
201
|
+
config?: ButtonConfig;
|
|
202
|
+
clickEvent?: () => void;
|
|
203
|
+
disabled?: boolean;
|
|
204
|
+
type?: "default" | "warn" | "error" | "success";
|
|
205
|
+
title?: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface ButtonConfig {
|
|
209
|
+
width?: number;
|
|
210
|
+
height?: number;
|
|
211
|
+
verticalPadding?: number;
|
|
212
|
+
horizontalPadding?: number;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
<br/>
|
|
218
|
+
|
|
219
|
+
## 🍹 Buy me a coffee
|
|
220
|
+
<div>
|
|
221
|
+
<a href="http://witkeycode.com/sponsor" target="_blank"><img src="http://47.104.180.148/payment-code/wxpay.png" alt="Buy Me A Coffee" style="width: 217px !important;" ></a>
|
|
222
|
+
<a href="http://witkeycode.com/sponsor" target="_blank"><img src="http://47.104.180.148/payment-code/alipay.png" alt="Buy Me A Coffee" style="width: 217px !important;" ></a>
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
<br/>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
2
|
click: (...args: any[]) => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<{}
|
|
3
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
4
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
5
|
+
}, {}, {}>;
|
|
4
6
|
export default _default;
|
|
@@ -1,37 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ButtonConfig } from "./meta/config";
|
|
2
|
+
import { ButtonType } from "@/components/button/meta/types";
|
|
3
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
4
|
+
config?: ButtonConfig | undefined;
|
|
4
5
|
clickEvent?: (() => void) | undefined;
|
|
5
6
|
disabled?: boolean | undefined;
|
|
6
|
-
type?:
|
|
7
|
+
type?: ButtonType | undefined;
|
|
7
8
|
title?: string | undefined;
|
|
8
9
|
}>, {
|
|
9
|
-
config: () =>
|
|
10
|
+
config: () => ButtonConfig;
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
type: string;
|
|
12
13
|
title: string;
|
|
13
|
-
}>, {},
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
15
|
"click-event": (...args: any[]) => void;
|
|
15
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<
|
|
16
|
-
config?:
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
17
|
+
config?: ButtonConfig | undefined;
|
|
17
18
|
clickEvent?: (() => void) | undefined;
|
|
18
19
|
disabled?: boolean | undefined;
|
|
19
|
-
type?:
|
|
20
|
+
type?: ButtonType | undefined;
|
|
20
21
|
title?: string | undefined;
|
|
21
22
|
}>, {
|
|
22
|
-
config: () =>
|
|
23
|
+
config: () => ButtonConfig;
|
|
23
24
|
disabled: boolean;
|
|
24
25
|
type: string;
|
|
25
26
|
title: string;
|
|
26
|
-
}
|
|
27
|
+
}>>> & {
|
|
28
|
+
"onClick-event"?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
}, {
|
|
27
30
|
title: string;
|
|
28
|
-
config:
|
|
29
|
-
type:
|
|
31
|
+
config: ButtonConfig;
|
|
32
|
+
type: ButtonType;
|
|
30
33
|
disabled: boolean;
|
|
31
|
-
}>;
|
|
34
|
+
}, {}>;
|
|
32
35
|
export default _default;
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
type __VLS_WithDefaults<P, D> = {
|
|
37
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
38
|
+
default: D[K];
|
|
39
|
+
}> : P[K];
|
|
40
|
+
};
|
|
41
|
+
type __VLS_Prettify<T> = {
|
|
42
|
+
[K in keyof T]: T[K];
|
|
43
|
+
} & {};
|
|
44
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
45
|
+
type __VLS_TypePropsToOption<T> = {
|
|
35
46
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
36
47
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
37
48
|
} : {
|
|
@@ -39,11 +50,3 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
39
50
|
required: true;
|
|
40
51
|
};
|
|
41
52
|
};
|
|
42
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
43
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
44
|
-
default: D[K];
|
|
45
|
-
}> : P[K];
|
|
46
|
-
};
|
|
47
|
-
declare type __VLS_Prettify<T> = {
|
|
48
|
-
[K in keyof T]: T[K];
|
|
49
|
-
} & {};
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* @Date 2024/06/01
|
|
4
4
|
* @Email wengaolng@gmail.com
|
|
5
5
|
**/
|
|
6
|
-
export interface
|
|
6
|
+
export interface ButtonConfig {
|
|
7
7
|
width?: number;
|
|
8
8
|
height?: number;
|
|
9
9
|
verticalPadding?: number;
|
|
10
10
|
horizontalPadding?: number;
|
|
11
11
|
}
|
|
12
|
-
export declare const defaultConfig: () =>
|
|
12
|
+
export declare const defaultConfig: () => ButtonConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare function useHandler(_data:
|
|
1
|
+
import { ClickData } from "../meta/data";
|
|
2
|
+
import { ClickEvent } from "../meta/event";
|
|
3
|
+
export declare function useHandler(_data: ClickData, event: ClickEvent): {
|
|
4
4
|
dots: {
|
|
5
5
|
list: {
|
|
6
6
|
key: number;
|
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
5
|
-
config?:
|
|
6
|
-
events?:
|
|
7
|
-
data:
|
|
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_TypePropsToOption<{
|
|
5
|
+
config?: ClickConfig | undefined;
|
|
6
|
+
events?: ClickEvent | undefined;
|
|
7
|
+
data: ClickData;
|
|
8
8
|
}>, {
|
|
9
|
-
config: () =>
|
|
10
|
-
events: () =>
|
|
11
|
-
data: () =>
|
|
12
|
-
}>, {},
|
|
13
|
-
config?:
|
|
14
|
-
events?:
|
|
15
|
-
data:
|
|
9
|
+
config: () => ClickConfig;
|
|
10
|
+
events: () => ClickEvent;
|
|
11
|
+
data: () => ClickData;
|
|
12
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
|
+
config?: ClickConfig | undefined;
|
|
14
|
+
events?: ClickEvent | undefined;
|
|
15
|
+
data: ClickData;
|
|
16
16
|
}>, {
|
|
17
|
-
config: () =>
|
|
18
|
-
events: () =>
|
|
19
|
-
data: () =>
|
|
17
|
+
config: () => ClickConfig;
|
|
18
|
+
events: () => ClickEvent;
|
|
19
|
+
data: () => ClickData;
|
|
20
20
|
}>>>, {
|
|
21
|
-
data:
|
|
22
|
-
config:
|
|
23
|
-
events:
|
|
24
|
-
}>;
|
|
21
|
+
data: ClickData;
|
|
22
|
+
config: ClickConfig;
|
|
23
|
+
events: ClickEvent;
|
|
24
|
+
}, {}>;
|
|
25
25
|
export default _default;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
35
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
36
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
37
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
38
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
39
|
} : {
|
|
@@ -32,11 +41,3 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
32
41
|
required: true;
|
|
33
42
|
};
|
|
34
43
|
};
|
|
35
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
36
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
37
|
-
default: D[K];
|
|
38
|
-
}> : P[K];
|
|
39
|
-
};
|
|
40
|
-
declare type __VLS_Prettify<T> = {
|
|
41
|
-
[K in keyof T]: T[K];
|
|
42
|
-
} & {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @Date 2024/06/01
|
|
4
4
|
* @Email wengaolng@gmail.com
|
|
5
5
|
**/
|
|
6
|
-
export interface
|
|
6
|
+
export interface ClickConfig {
|
|
7
7
|
width?: number;
|
|
8
8
|
height?: number;
|
|
9
9
|
thumbWidth?: number;
|
|
@@ -11,5 +11,7 @@ export interface CaptchaConfig {
|
|
|
11
11
|
verticalPadding?: number;
|
|
12
12
|
horizontalPadding?: number;
|
|
13
13
|
showTheme?: boolean;
|
|
14
|
+
title?: string;
|
|
15
|
+
buttonText?: string;
|
|
14
16
|
}
|
|
15
|
-
export declare const defaultConfig: () =>
|
|
17
|
+
export declare const defaultConfig: () => ClickConfig;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @Date 2024/05/25
|
|
4
4
|
* @Email wengaolng@gmail.com
|
|
5
5
|
**/
|
|
6
|
-
export interface
|
|
6
|
+
export interface ClickData {
|
|
7
7
|
image: string;
|
|
8
8
|
thumb: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ClickDot {
|
|
11
11
|
key: number;
|
|
12
12
|
index: number;
|
|
13
13
|
x: number;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @Date 2024/05/25
|
|
4
4
|
* @Email wengaolng@gmail.com
|
|
5
5
|
**/
|
|
6
|
-
import {
|
|
7
|
-
export interface
|
|
6
|
+
import type { ClickDot } from "./data";
|
|
7
|
+
export interface ClickEvent {
|
|
8
8
|
click?: (x: number, y: number) => void;
|
|
9
9
|
callback?: () => void;
|
|
10
10
|
refresh?: () => void;
|
|
11
11
|
close?: () => void;
|
|
12
|
-
confirm?: (dots: Array<
|
|
12
|
+
confirm?: (dots: Array<ClickDot>, clear: (fn: Function) => void) => void;
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Ref } from "vue
|
|
4
|
-
export declare function useHandler(data:
|
|
1
|
+
import { RotateData } from "../meta/data";
|
|
2
|
+
import { RotateEvent } from "../meta/event";
|
|
3
|
+
import { Ref } from "vue";
|
|
4
|
+
export declare function useHandler(data: RotateData, event: RotateEvent, dragBlockRef: Ref, dragBarRef: Ref): {
|
|
5
5
|
state: {
|
|
6
6
|
dragLeft: number;
|
|
7
7
|
thumbAngle: number;
|
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
5
|
-
config?:
|
|
6
|
-
events?:
|
|
7
|
-
data:
|
|
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_TypePropsToOption<{
|
|
5
|
+
config?: RotateConfig | undefined;
|
|
6
|
+
events?: RotateEvent | undefined;
|
|
7
|
+
data: RotateData;
|
|
8
8
|
}>, {
|
|
9
|
-
config: () =>
|
|
10
|
-
events: () =>
|
|
11
|
-
data: () =>
|
|
12
|
-
}>, {},
|
|
13
|
-
config?:
|
|
14
|
-
events?:
|
|
15
|
-
data:
|
|
9
|
+
config: () => RotateConfig;
|
|
10
|
+
events: () => RotateEvent;
|
|
11
|
+
data: () => RotateData;
|
|
12
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
13
|
+
config?: RotateConfig | undefined;
|
|
14
|
+
events?: RotateEvent | undefined;
|
|
15
|
+
data: RotateData;
|
|
16
16
|
}>, {
|
|
17
|
-
config: () =>
|
|
18
|
-
events: () =>
|
|
19
|
-
data: () =>
|
|
17
|
+
config: () => RotateConfig;
|
|
18
|
+
events: () => RotateEvent;
|
|
19
|
+
data: () => RotateData;
|
|
20
20
|
}>>>, {
|
|
21
|
-
data:
|
|
22
|
-
config:
|
|
23
|
-
events:
|
|
24
|
-
}>;
|
|
21
|
+
data: RotateData;
|
|
22
|
+
config: RotateConfig;
|
|
23
|
+
events: RotateEvent;
|
|
24
|
+
}, {}>;
|
|
25
25
|
export default _default;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
type __VLS_WithDefaults<P, D> = {
|
|
27
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
28
|
+
default: D[K];
|
|
29
|
+
}> : P[K];
|
|
30
|
+
};
|
|
31
|
+
type __VLS_Prettify<T> = {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} & {};
|
|
34
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
35
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
36
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
37
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
38
|
} : {
|
|
@@ -32,11 +40,3 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
32
40
|
required: true;
|
|
33
41
|
};
|
|
34
42
|
};
|
|
35
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
36
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
37
|
-
default: D[K];
|
|
38
|
-
}> : P[K];
|
|
39
|
-
};
|
|
40
|
-
declare type __VLS_Prettify<T> = {
|
|
41
|
-
[K in keyof T]: T[K];
|
|
42
|
-
} & {};
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* @Date 2024/06/01
|
|
4
4
|
* @Email wengaolng@gmail.com
|
|
5
5
|
**/
|
|
6
|
-
export interface
|
|
6
|
+
export interface RotateConfig {
|
|
7
7
|
width?: number;
|
|
8
8
|
height?: number;
|
|
9
9
|
size?: number;
|
|
10
10
|
verticalPadding?: number;
|
|
11
11
|
horizontalPadding?: number;
|
|
12
12
|
showTheme?: boolean;
|
|
13
|
+
title?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const defaultConfig: () =>
|
|
15
|
+
export declare const defaultConfig: () => RotateConfig;
|