Skip to content

Commit f19c0d1

Browse files
committed
update README.md
1 parent c7d3224 commit f19c0d1

File tree

7 files changed

+24
-20
lines changed

7 files changed

+24
-20
lines changed

package.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "go-captcha-vue",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"private": false,
55
"type": "module",
66
"license": "MIT",
@@ -28,6 +28,19 @@
2828
"module": "dist/go-captcha-vue.es.js",
2929
"types": "./dist/index.d.ts",
3030
"typings": "./dist/index.d.ts",
31+
"exports": {
32+
".": {
33+
"import": {
34+
"node": "./dist/go-captcha-vue.es.js",
35+
"default": "./dist/go-captcha-vue.es.js"
36+
},
37+
"require": "./dist/go-captcha-vue.es.js",
38+
"types": "./dist/index.d.ts"
39+
},
40+
"./dist/*": "./dist/*",
41+
"./env.d.ts": "./env.d.ts",
42+
"./package.json": "./package.json"
43+
},
3144
"files": [
3245
"dist/*",
3346
"env.d.ts"

packages/components/button/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import capt from './index.vue'
88

99
// @ts-ignore
10-
capt.name = 'goCaptchaButton'
10+
capt.name = 'gocaptcha-button'
1111

1212
// @ts-ignore
1313
capt.install = function(Vue: any) {

packages/components/click/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import capt from './index.vue'
22

33
// @ts-ignore
4-
capt.name = 'goCaptchaClick'
4+
capt.name = 'gocaptcha-click'
55

66
// @ts-ignore
77
capt.install = function(Vue: any) {

packages/components/rotate/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import capt from './index.vue'
22

33
// @ts-ignore
4-
capt.name = 'goCaptchaRotate'
4+
capt.name = 'gocaptcha-rotate'
55

66
// @ts-ignore
77
capt.install = function(Vue: any) {

packages/components/slide-region/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import capt from './index.vue'
22

33
// @ts-ignore
4-
capt.name = 'goCaptchaSlideRegion'
4+
capt.name = 'gocaptcha-slide-region'
55

66
// @ts-ignore
77
capt.install = function(Vue: any) {

packages/components/slide/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import capt from './index.vue'
22

33
// @ts-ignore
4-
capt.name = 'goCaptchaSlide'
4+
capt.name = 'gocaptcha-slide'
55

66
// @ts-ignore
77
capt.install = function(Vue: any) {

packages/index.ts

+5-14
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,10 @@ import Button from "./components/button/index"
77

88
export { Click, Slide, SlideRegion, Rotate, Button };
99

10-
const installed = {
11-
install(vue: any) {
12-
// @ts-ignore
13-
Click.install(vue)
14-
// @ts-ignore
15-
Slide.install(vue)
16-
// @ts-ignore
17-
SlideRegion.install(vue)
18-
// @ts-ignore
19-
Rotate.install(vue)
20-
// @ts-ignore
21-
Button.install(vue)
22-
}
10+
const install = (app: any) => {
11+
if (app['installed']) return
12+
app['installed'] = true
13+
;[Click, Slide, SlideRegion, Rotate, Button].map(c => app.use(c))
2314
}
2415

25-
export default installed
16+
export default install

0 commit comments

Comments
 (0)