go-captcha-vue 2.0.0-beta.1
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 +141 -0
- package/dist/assets/icons/arrows-icon.vue.d.ts +4 -0
- package/dist/assets/icons/btn-default-icon.vue.d.ts +4 -0
- package/dist/assets/icons/btn-error-icon.vue.d.ts +4 -0
- package/dist/assets/icons/btn-success-icon.vue.d.ts +4 -0
- package/dist/assets/icons/btn-warn-icon.vue.d.ts +4 -0
- package/dist/assets/icons/close-icon.vue.d.ts +4 -0
- package/dist/assets/icons/loading-icon.vue.d.ts +4 -0
- package/dist/assets/icons/refresh-icon.vue.d.ts +4 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.vue.d.ts +49 -0
- package/dist/components/button/meta/config.d.ts +12 -0
- package/dist/components/click/hooks/handler.d.ts +16 -0
- package/dist/components/click/index.d.ts +2 -0
- package/dist/components/click/index.vue.d.ts +42 -0
- package/dist/components/click/meta/config.d.ts +15 -0
- package/dist/components/click/meta/data.d.ts +15 -0
- package/dist/components/click/meta/event.d.ts +13 -0
- package/dist/components/rotate/hooks/handler.d.ts +12 -0
- package/dist/components/rotate/index.d.ts +2 -0
- package/dist/components/rotate/index.vue.d.ts +42 -0
- package/dist/components/rotate/meta/config.d.ts +14 -0
- package/dist/components/rotate/meta/data.d.ts +10 -0
- package/dist/components/rotate/meta/event.d.ts +11 -0
- package/dist/components/slide/hooks/handler.d.ts +12 -0
- package/dist/components/slide/index.d.ts +2 -0
- package/dist/components/slide/index.vue.d.ts +42 -0
- package/dist/components/slide/meta/config.d.ts +15 -0
- package/dist/components/slide/meta/data.d.ts +17 -0
- package/dist/components/slide/meta/event.d.ts +12 -0
- package/dist/components/slide-region/hooks/handler.d.ts +12 -0
- package/dist/components/slide-region/index.d.ts +2 -0
- package/dist/components/slide-region/index.vue.d.ts +42 -0
- package/dist/components/slide-region/meta/config.d.ts +13 -0
- package/dist/components/slide-region/meta/data.d.ts +17 -0
- package/dist/components/slide-region/meta/event.d.ts +12 -0
- package/dist/go-captcha-vue.es.js +1312 -0
- package/dist/go-captcha-vue.umd.js +39 -0
- package/dist/helper/helper.d.ts +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/style.css +1 -0
- package/env.d.ts +16 -0
- package/package.json +62 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(function(r,W){typeof exports=="object"&&typeof module!="undefined"?module.exports=W(require("vue")):typeof define=="function"&&define.amd?define(["vue"],W):(r=typeof globalThis!="undefined"?globalThis:r||self,r["go-captcha-vue"]=W(r.Vue))})(this,function(r){"use strict";var W="";const ht=()=>({width:300,height:240,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0}),N={};N.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var pt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{d:`M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
|
|
2
|
+
c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9
|
|
3
|
+
c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1
|
|
4
|
+
c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9
|
|
5
|
+
C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3
|
|
6
|
+
L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0
|
|
7
|
+
c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3
|
|
8
|
+
c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z`}})])},mt=[],Se="";function b(t,n,e,s,c,l,v,o){var i=typeof t=="function"?t.options:t;n&&(i.render=n,i.staticRenderFns=e,i._compiled=!0),s&&(i.functional=!0),l&&(i._scopeId="data-v-"+l);var a;if(v?(a=function(d){d=d||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!d&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(d=__VUE_SSR_CONTEXT__),c&&c.call(this,d),d&&d._registeredComponents&&d._registeredComponents.add(v)},i._ssrRegister=a):c&&(a=o?function(){c.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:c),a)if(i.functional){i._injectStyles=a;var f=i.render;i.render=function(_,m){return a.call(m),f(_,m)}}else{var u=i.beforeCreate;i.beforeCreate=u?[].concat(u,a):[a]}return{exports:t,options:i}}const U={};var gt=b(N,pt,mt,!1,yt,"3972774c",null,null);function yt(t){for(let n in U)this[n]=U[n]}var I=function(){return gt.exports}();const G={};G.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var xt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{d:`M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
|
|
9
|
+
c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4
|
|
10
|
+
c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1
|
|
11
|
+
c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9
|
|
12
|
+
c-0.2-0.3-0.5-0.5-0.9-0.5c-0.4,0-0.7,0.2-0.9,0.5L3.8,97.3c-0.2,0.3-0.2,0.7,0,1.1c0.2,0.3,0.5,0.5,0.9,0.5h14.3
|
|
13
|
+
c0,17.2,5.3,33.2,14.3,46.4c0.1,0.2,0.2,0.4,0.3,0.6c0.9,1.4,2,2.6,3,3.9c0.4,0.5,0.7,1,1.1,1.5c1.5,1.8,3,3.5,4.6,5.2
|
|
14
|
+
c0.2,0.2,0.3,0.3,0.5,0.5c5.4,5.5,11.5,10.1,18.2,13.8c0.2,0.1,0.3,0.2,0.5,0.3c1.9,1,3.9,2,5.9,2.9c0.5,0.2,1,0.5,1.5,0.7
|
|
15
|
+
c1.7,0.7,3.5,1.3,5.2,1.9c0.8,0.3,1.7,0.6,2.5,0.8c1.5,0.5,3.1,0.8,4.7,1.2c1.1,0.2,2.1,0.5,3.2,0.7c0.4,0.1,0.9,0.2,1.3,0.3
|
|
16
|
+
c1.5,0.3,3,0.4,4.5,0.6c0.5,0.1,1.1,0.2,1.6,0.2c2.7,0.3,5.4,0.4,8.1,0.4c16.4,0,32.5-5.1,46.2-14.8c4.4-3.1,5.5-9.2,2.4-13.7
|
|
17
|
+
C145.5,147.8,139.4,146.7,135,149.9 M180.6,98.9c0-17.2-5.3-33.1-14.2-46.3c-0.1-0.2-0.2-0.5-0.4-0.7c-1.1-1.6-2.3-3.1-3.5-4.6
|
|
18
|
+
c-0.1-0.2-0.3-0.4-0.4-0.6c-8.2-10.1-18.5-17.9-30.2-23c-0.3-0.1-0.6-0.3-1-0.4c-1.9-0.8-3.8-1.5-5.7-2.1c-0.7-0.2-1.4-0.5-2.1-0.7
|
|
19
|
+
c-1.7-0.5-3.4-0.9-5.1-1.3c-0.9-0.2-1.9-0.5-2.8-0.7c-0.5-0.1-0.9-0.2-1.4-0.3c-1.3-0.2-2.6-0.3-3.8-0.5c-0.9-0.1-1.8-0.3-2.6-0.3
|
|
20
|
+
c-2.1-0.2-4.3-0.3-6.4-0.3c-0.4,0-0.8-0.1-1.2-0.1c-0.1,0-0.1,0-0.2,0c-16.4,0-32.4,5-46.2,14.8C49,35,48,41.1,51,45.6
|
|
21
|
+
c3.1,4.4,9.1,5.5,13.5,2.4c10.6-7.5,23-11.3,35.7-11.2c1.8,0,3.6,0.1,5.4,0.3c0.6,0.1,1.1,0.1,1.6,0.2c1.5,0.2,2.9,0.4,4.3,0.7
|
|
22
|
+
c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2
|
|
23
|
+
c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4
|
|
24
|
+
c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9
|
|
25
|
+
L180.6,98.9z`}})])},bt=[],Be="";const J={};var wt=b(G,xt,bt,!1,Et,"1120f0d2",null,null);function Et(t){for(let n in J)this[n]=J[n]}var q=function(){return wt.exports}();const K={};K.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var $t=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"84",height:"84"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{cx:"50",cy:"36.8101",r:"10",fill:"#3e7cff"}},[e("animate",{attrs:{attributeName:"cy",dur:"1s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.45 0 0.9 0.55;0 0.45 0.55 0.9",keyTimes:"0;0.5;1",values:"23;77;23"}})])])},Ct=[],Me="";const Q={};var kt=b(K,$t,Ct,!1,Lt,"93a01640",null,null);function Lt(t){for(let n in Q)this[n]=Q[n]}var Y=function(){return kt.exports}();function St(t){let n=0,e=0;if(t.getBoundingClientRect){const s=t.getBoundingClientRect(),c=document.documentElement;n=s.left+Math.max(c.scrollLeft,document.body.scrollLeft)-c.clientLeft,e=s.top+Math.max(c.scrollTop,document.body.scrollTop)-c.clientTop}else for(;t!==document.body;)n+=t.offsetLeft,e+=t.offsetTop,t=t.offsetParent;return{domX:n,domY:e}}function V(t,n){let e=n.relatedTarget;try{for(;e&&e!==t;)e=e.parentNode}catch(s){console.warn(s)}return e!==t}function Bt(t,n){const e=r.reactive({list:[]});return{dots:e,clickEvent:o=>{const i=o.currentTarget,a=St(i),f=o.pageX||o.clientX,u=o.pageY||o.clientY,d=a.domX,_=a.domY,m=f-d,$=u-_,g=parseInt(m.toString()),C=parseInt($.toString()),L=new Date,k=e.list.length;return e.list.push({key:L.getTime(),index:k+1,x:g,y:C}),n.click&&n.click(g,C),o.cancelBubble=!0,o.preventDefault(),!1},confirmEvent:o=>(n.confirm&&n.confirm(e.list,()=>{e.list=[]}),o.cancelBubble=!0,o.preventDefault(),!1),closeEvent:o=>(n.close&&n.close(),e.list=[],o.cancelBubble=!0,o.preventDefault(),!1),refreshEvent:o=>(n.refresh&&n.refresh(),e.list=[],o.cancelBubble=!0,o.preventDefault(),!1)}}const P={};P.props={config:{key:"config",required:!1,type:null,default:ht},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},P.setup=(t,n)=>{const e=t,{config:s,data:c,events:l}=e,v=Bt(c,l),o=s.horizontalPadding||0,i=s.verticalPadding||0,a=(s.width||0)+i*2,f=v.dots,u=r.computed(()=>({width:a+"px",paddingLeft:i+"px",paddingRight:i+"px",paddingTop:o+"px",paddingBottom:o+"px"})),d=r.computed(()=>({width:s.thumbWidth+"px",height:s.thumbHeight+"px"})),_=r.computed(()=>({width:s.width+"px",height:s.height+"px"}));return{config:s,data:c,handler:v,dots:f,wrapperStyles:u,thumbStyles:d,imageStyles:_}},P.components=Object.assign({LoadingIcon:Y,CloseIcon:I,RefreshIcon:q},P.components);var Mt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"wrapper "+(t.config.showTheme&&"theme"),style:t.wrapperStyles},[e("div",{staticClass:"header"},[t._m(0),e("img",{style:t.thumbStyles,attrs:{src:t.data.thumb,alt:"..."}})]),e("div",{staticClass:"body"},[e("div",{staticClass:"loading"},[e("loading-icon")],1),e("img",{staticClass:"picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."},on:{click:t.handler.clickEvent}}),e("div",{staticClass:"dots"},t._l(t.dots.list,function(s){return e("div",{key:s.key+"-"+s.index,staticClass:"dot",style:{top:s.y-11+"px",left:s.x-11+"px"}},[t._v(t._s(s.index))])}),0)]),e("div",{staticClass:"footer"},[e("div",{staticClass:"iconBlock iconBlock2"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1),e("div",{staticClass:"buttonBlock"},[e("button",{on:{click:t.handler.confirmEvent}},[t._v("\u786E\u8BA4")])])])])},Tt=[function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("span",[t._v("\u8BF7\u5728\u4E0B\u56FE"),e("em",[t._v("\u4F9D\u6B21")]),t._v("\u70B9\u51FB\uFF1A")])}],Te="";const Z={};var Pt=b(P,Mt,Tt,!1,Xt,"bbb869ee",null,null);function Xt(t){for(let n in Z)this[n]=Z[n]}var j=function(){return Pt.exports}();j.name="goCaptchaClick",j.install=function(t){t.component("gocaptcha-click",j)};const Ft=()=>({width:300,height:240,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0}),tt={};tt.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var zt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{d:`M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
|
|
26
|
+
s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9
|
|
27
|
+
c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z`}})])},Dt=[],Pe="";const et={};var Wt=b(tt,zt,Dt,!1,It,"30853052",null,null);function It(t){for(let n in et)this[n]=et[n]}var nt=function(){return Wt.exports}();function qt(t,n,e,s,c,l){const v=r.reactive({dragLeft:0,thumbLeft:t.thumbX||0}),o=()=>{v.dragLeft=0,v.thumbLeft=0};return{state:v,dragEvent:u=>{const d=u.touches&&u.touches[0],_=c.value.offsetLeft,m=e.value.offsetWidth,$=c.value.offsetWidth,g=m-$,C=t.thumbX||0,L=s.value.offsetWidth,k=$-L,w=(g-C+k)/g;let p=!1,S=0,x=0;d?S=d.pageX-_:S=u.clientX-_;const B=h=>{p=!0;const T=h.touches&&h.touches[0];let y=0;if(T?y=T.pageX-S:y=h.clientX-S,y>=g){v.dragLeft=g;return}if(y<=0){v.dragLeft=0;return}v.dragLeft=y,x=C+y*w,v.thumbLeft=x,n.move&&n.move(x,t.thumbY||0),h.cancelBubble=!0,h.preventDefault()},E=h=>{!V(l.value,h)||!p||(l.value.removeEventListener("mousemove",B,!1),l.value.removeEventListener("touchmove",B,{passive:!1}),l.value.removeEventListener("mouseup",E,!1),l.value.removeEventListener("mouseout",E,!1),l.value.removeEventListener("touchend",E,!1),p=!1,n.confirm&&n.confirm({x:parseInt(x.toString()),y:t.thumbY||0},()=>{o()}),h.cancelBubble=!0,h.preventDefault())};l.value.addEventListener("mousemove",B,!1),l.value.addEventListener("touchmove",B,{passive:!1}),l.value.addEventListener("mouseup",E,!1),l.value.addEventListener("mouseout",E,!1),l.value.addEventListener("touchend",E,!1)},closeEvent:u=>(n&&n.close&&n.close(),o(),u.cancelBubble=!0,u.preventDefault(),!1),refreshEvent:u=>(n&&n.refresh&&n.refresh(),o(),u.cancelBubble=!0,u.preventDefault(),!1)}}const X={};X.props={config:{key:"config",required:!1,type:null,default:Ft},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},X.setup=(t,n)=>{const e=t,{config:s,data:c,events:l}=e,v=r.ref(null),o=r.ref(null),i=r.ref(null),a=r.ref(null),f=qt(c,l,o,a,i,v),u=s.horizontalPadding||0,d=s.verticalPadding||0,_=(s.width||0)+d*2,m=r.computed(()=>({width:_+"px",paddingLeft:d+"px",paddingRight:d+"px",paddingTop:u+"px",paddingBottom:u+"px"})),$=r.computed(()=>({width:c.thumbWidth+"px",height:c.thumbHeight+"px",top:c.thumbY+"px",left:f.state.thumbLeft+"px"})),g=r.computed(()=>({width:s.width+"px",height:s.height+"px"}));return{config:s,data:c,dragBarRef:v,containerRef:o,dragBlockRef:i,tileRef:a,handler:f,wrapperStyles:m,thumbStyles:$,imageStyles:g}},X.components=Object.assign({CloseIcon:I,RefreshIcon:q,LoadingIcon:Y,ArrowsIcon:nt},X.components);var Yt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"wrapper "+(t.config.showTheme&&"theme"),style:t.wrapperStyles},[e("div",{staticClass:"header"},[e("span",[t._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")]),e("div",{staticClass:"iconBlock"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"body"},[e("div",{staticClass:"loading"},[e("loading-icon")],1),e("img",{staticClass:"picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"tile",style:t.thumbStyles},[e("img",{attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"footer"},[e("div",{ref:"dragBarRef",staticClass:"dragSlideBar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"dragLine"}),e("div",{ref:"dragBlockRef",staticClass:"dragBlock",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},jt=[],Xe="";const st={};var Ht=b(X,Yt,jt,!1,At,"22e2084a",null,null);function At(t){for(let n in st)this[n]=st[n]}var H=function(){return Ht.exports}();H.name="goCaptchaSlide",H.install=function(t){t.component("gocaptcha-slide",H)};const Rt=()=>({width:300,height:240,verticalPadding:16,horizontalPadding:12,showTheme:!0});function Ot(t,n,e,s){const c=r.reactive({x:t.thumbX||0,y:t.thumbY||0}),l=()=>{c.x=t.thumbX||0,c.y=t.thumbY||0};return{state:c,dragEvent:a=>{const f=a.touches&&a.touches[0],u=s.value.offsetLeft,d=s.value.offsetTop,_=e.value.offsetWidth,m=e.value.offsetHeight,$=s.value.offsetWidth,g=s.value.offsetHeight,C=_-$,L=m-g;let k=!1,w=0,p=0,S=0,x=0;f?(w=f.pageX-u,p=f.pageY-d):(w=a.clientX-u,p=a.clientY-d);const B=h=>{k=!0;const T=h.touches&&h.touches[0];let y=0,M=0;T?(y=T.pageX-w,M=T.pageY-p):(y=h.clientX-w,M=h.clientY-p),y<=0&&(y=0),M<=0&&(M=0),y>=C&&(y=C),M>=L&&(M=L),c.x=y,c.y=M,S=y,x=M,n.move&&n.move(y,M),h.cancelBubble=!0,h.preventDefault()},E=h=>{!V(e.value,h)||!k||(k=!1,e.value.removeEventListener("mousemove",B,!1),e.value.removeEventListener("touchmove",B,{passive:!1}),e.value.removeEventListener("mouseup",E,!1),e.value.removeEventListener("mouseout",E,!1),e.value.removeEventListener("touchend",E,!1),n.confirm&&n.confirm({x:S,y:x},()=>{l()}),h.cancelBubble=!0,h.preventDefault())};e.value.addEventListener("mousemove",B,!1),e.value.addEventListener("touchmove",B,{passive:!1}),e.value.addEventListener("mouseup",E,!1),e.value.addEventListener("mouseout",E,!1),e.value.addEventListener("touchend",E,!1)},closeEvent:a=>(n&&n.close&&n.close(),l(),a.cancelBubble=!0,a.preventDefault(),!1),refreshEvent:a=>(n&&n.refresh&&n.refresh(),l(),a.cancelBubble=!0,a.preventDefault(),!1)}}const F={};F.props={config:{key:"config",required:!1,type:null,default:Rt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},F.setup=(t,n)=>{const e=t,{config:s,data:c,events:l}=e,v=r.ref(null),o=r.ref(null),i=Ot(c,l,v,o),a=s.horizontalPadding||0,f=s.verticalPadding||0,u=(s.width||0)+f*2;r.onMounted(()=>{o.value.addEventListener("dragstart",$=>$.preventDefault())});const d=r.computed(()=>({width:u+"px",paddingLeft:f+"px",paddingRight:f+"px",paddingTop:a+"px",paddingBottom:a+"px"})),_=r.computed(()=>({width:c.thumbWidth+"px",height:c.thumbHeight+"px",top:i.state.y+"px",left:i.state.x+"px"})),m=r.computed(()=>({width:s.width+"px",height:s.height+"px"}));return{config:s,data:c,containerRef:v,tileRef:o,handler:i,wrapperStyles:d,thumbStyles:_,imageStyles:m}},F.components=Object.assign({LoadingIcon:Y,CloseIcon:I,RefreshIcon:q},F.components);var Vt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"wrapper "+(t.config.showTheme&&"theme"),style:t.wrapperStyles},[t._m(0),e("div",{ref:"containerRef",staticClass:"body"},[e("div",{staticClass:"loading"},[e("loading-icon")],1),e("img",{staticClass:"picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"tile",style:t.thumbStyles,on:{mousedown:t.handler.dragEvent,touchstart:t.handler.dragEvent}},[e("img",{attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"footer"},[e("div",{staticClass:"iconBlock"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)])])},Nt=[function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"header"},[e("span",[t._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")])])}],Fe="";const ct={};var Ut=b(F,Vt,Nt,!1,Gt,"ae8e1660",null,null);function Gt(t){for(let n in ct)this[n]=ct[n]}var A=function(){return Ut.exports}();A.name="goCaptchaSlideRegion",A.install=function(t){t.component("gocaptcha-slide-region",A)};const Jt=()=>({width:300,height:240,size:240,verticalPadding:16,horizontalPadding:12,showTheme:!0});function Kt(t,n,e,s){const c=r.reactive({dragLeft:0,thumbAngle:t.angle||0}),l=()=>{c.dragLeft=0,c.thumbAngle=0};return{state:c,dragEvent:a=>{const f=a.touches&&a.touches[0],u=e.value.offsetLeft,d=s.value.offsetWidth,_=e.value.offsetWidth,m=d-_,$=360/m;let g=0,C=!1,L=0;f?L=f.pageX-u:L=a.clientX-u;const k=p=>{C=!0;const S=p.touches&&p.touches[0];let x=0;if(S?x=S.pageX-L:x=p.clientX-L,x>=m){c.dragLeft=m;return}if(x<=0){c.dragLeft=0;return}c.dragLeft=x,g=x*$,c.thumbAngle=g,n.rotate&&n.rotate(g),p.cancelBubble=!0,p.preventDefault()},w=p=>{!V(s.value,p)||!C||(s.value.removeEventListener("mousemove",k,!1),s.value.removeEventListener("touchmove",k,{passive:!1}),s.value.removeEventListener("mouseup",w,!1),s.value.removeEventListener("mouseout",w,!1),s.value.removeEventListener("touchend",w,!1),C=!1,n.confirm&&n.confirm(parseInt(g.toString()),()=>{l()}),p.cancelBubble=!0,p.preventDefault())};s.value.addEventListener("mousemove",k,!1),s.value.addEventListener("touchmove",k,{passive:!1}),s.value.addEventListener("mouseup",w,!1),s.value.addEventListener("mouseout",w,!1),s.value.addEventListener("touchend",w,!1)},closeEvent:a=>(n&&n.close&&n.close(),l(),a.cancelBubble=!0,a.preventDefault(),!1),refreshEvent:a=>(n&&n.refresh&&n.refresh(),l(),a.cancelBubble=!0,a.preventDefault(),!1)}}const z={};z.props={config:{key:"config",required:!1,type:null,default:Jt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},z.setup=(t,n)=>{const e=t,{config:s,data:c,events:l}=e;console.log(e);const v=r.ref(null),o=r.ref(null),i=Kt(c,l,o,v),a=r.computed(()=>{const d=s.horizontalPadding||0,_=s.verticalPadding||0;return{width:(s.width||0)+_*2+"px",paddingLeft:_+"px",paddingRight:_+"px",paddingTop:d+"px",paddingBottom:d+"px"}}),f=r.computed(()=>({transform:`rotate(${i.state.thumbAngle}deg)`})),u=r.computed(()=>({width:s.size+"px",height:s.size+"px"}));return{config:s,data:c,dragBarRef:v,dragBlockRef:o,handler:i,wrapperStyles:a,thumbStyles:f,imageStyles:u}},z.components=Object.assign({CloseIcon:I,RefreshIcon:q,LoadingIcon:Y,ArrowsIcon:nt},z.components);var Qt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"wrapper "+(t.config.showTheme&&"theme"),style:t.wrapperStyles},[e("div",{staticClass:"header"},[e("span",[t._v("\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE")]),e("div",{staticClass:"iconBlock"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"body body2"},[e("div",{staticClass:"loading"},[e("loading-icon")],1),e("div",{staticClass:"picture",style:t.imageStyles},[e("img",{attrs:{src:t.data.image,alt:"..."}}),e("div",{staticClass:"round"})]),e("div",{staticClass:"thumb"},[e("div",{staticClass:"thumbBlock",style:t.thumbStyles},[e("img",{attrs:{src:t.data.thumb,alt:"..."}})])])]),e("div",{staticClass:"footer"},[e("div",{ref:"dragBarRef",staticClass:"dragSlideBar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"dragLine"}),e("div",{ref:"dragBlockRef",staticClass:"dragBlock",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},Zt=[],ze="";const at={};var te=b(z,Qt,Zt,!1,ee,"25e72324",null,null);function ee(t){for(let n in at)this[n]=at[n]}var R=function(){return te.exports}();R.name="goCaptchaRotate",R.install=function(t){t.component("gocaptcha-rotate",R)};const ot={};ot.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var ne=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{fill:"#3E7CFF",cx:"100",cy:"100",r:"96.3"}}),e("path",{attrs:{fill:"#FFFFFF",d:`M140.8,64.4l-39.6-11.9h-2.4L59.2,64.4c-1.6,0.8-2.8,2.4-2.8,4v24.1c0,25.3,15.8,45.9,42.3,54.6
|
|
28
|
+
c0.4,0,0.8,0.4,1.2,0.4c0.4,0,0.8,0,1.2-0.4c26.5-8.7,42.3-28.9,42.3-54.6V68.3C143.5,66.8,142.3,65.2,140.8,64.4z`}})])},se=[],De="";const it={};var ce=b(ot,ne,se,!1,ae,"5511614f",null,null);function ae(t){for(let n in it)this[n]=it[n]}var oe=function(){return ce.exports}();const rt={};rt.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var ie=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{fill:"#FFA000",d:`M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
29
|
+
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M107.3,109.1
|
|
30
|
+
c-0.5,5.4-3.9,7.9-7.3,7.9c-2.5,0,0,0,0,0c-3.2-0.6-5.7-2-6.8-7.4l-4.4-50.9c0-5.1,6.2-9.7,11.5-9.7c5.3,0,11,4.7,11,9.9
|
|
31
|
+
L107.3,109.1z M109.3,133.3c0,5.1-4.2,9.3-9.3,9.3c-5.1,0-9.3-4.2-9.3-9.3c0-5.1,4.2-9.3,9.3-9.3C105.1,124,109.3,128.1,109.3,133.3
|
|
32
|
+
z`}})])},re=[],We="";const lt={};var le=b(rt,ie,re,!1,ue,"3fd7b394",null,null);function ue(t){for(let n in lt)this[n]=lt[n]}var de=function(){return le.exports}();const ut={};ut.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var ve=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{fill:"#ED4630",d:`M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
|
|
33
|
+
c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M134.5,123.1
|
|
34
|
+
c3.1,3.1,3.1,8.2,0,11.3c-1.6,1.6-3.6,2.3-5.7,2.3s-4.1-0.8-5.7-2.3L100,111.3l-23.1,23.1c-1.6,1.6-3.6,2.3-5.7,2.3
|
|
35
|
+
c-2,0-4.1-0.8-5.7-2.3c-3.1-3.1-3.1-8.2,0-11.3L88.7,100L65.5,76.9c-3.1-3.1-3.1-8.2,0-11.3c3.1-3.1,8.2-3.1,11.3,0L100,88.7
|
|
36
|
+
l23.1-23.1c3.1-3.1,8.2-3.1,11.3,0c3.1,3.1,3.1,8.2,0,11.3L111.3,100L134.5,123.1z`}})])},fe=[],Ie="";const dt={};var _e=b(ut,ve,fe,!1,he,"6c20e1c2",null,null);function he(t){for(let n in dt)this[n]=dt[n]}var pe=function(){return _e.exports}();const vt={};vt.setup=(t,n)=>{const e=n.emit;function s(c){e("click",c)}return{emitClickEvent:s}};var me=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{fill:"#5EAA2F",d:`M183.3,27.2L102.4,2.9h-4.9L16.7,27.2C13.4,28.8,11,32,11,35.3v49.4c0,51.8,32.4,93.9,86.6,111.7
|
|
37
|
+
c0.8,0,1.6,0.8,2.4,0.8c0.8,0,1.6,0,2.4-0.8c54.2-17.8,86.6-59.1,86.6-111.7V35.3C189,32,186.6,28.8,183.3,27.2z M146.1,81.4
|
|
38
|
+
l-48.5,48.5c-1.6,1.6-3.2,2.4-5.7,2.4c-2.4,0-4-0.8-5.7-2.4L62,105.7c-3.2-3.2-3.2-8.1,0-11.3c3.2-3.2,8.1-3.2,11.3,0l18.6,18.6
|
|
39
|
+
l42.9-42.9c3.2-3.2,8.1-3.2,11.3,0C149.4,73.3,149.4,78.2,146.1,81.4L146.1,81.4z`}})])},ge=[],qe="";const ft={};var ye=b(vt,me,ge,!1,xe,"5a795cd4",null,null);function xe(t){for(let n in ft)this[n]=ft[n]}var be=function(){return ye.exports}();const we=()=>({width:330,height:44,verticalPadding:12,horizontalPadding:16}),D={};D.props={config:{key:"config",required:!1,type:null,default:we},clickEvent:{key:"clickEvent",required:!1,type:Function},disabled:{key:"disabled",required:!1,type:Boolean,default:!1},type:{key:"type",required:!1,type:String,default:"default"},title:{key:"title",required:!1,type:String,default:"\u70B9\u51FB\u6309\u952E\u8FDB\u884C\u9A8C\u8BC1"}},D.setup=(t,n)=>{const e=t,{config:s}=e,{type:c,title:l,disabled:v}=r.toRefs(e),o=r.computed(()=>["btnBlock",c.value,v.value&&"disabled"]),i=r.computed(()=>({width:s.width+"px",height:s.height+"px",paddingLeft:s.verticalPadding+"px",paddingRight:s.verticalPadding+"px",paddingTop:s.verticalPadding+"px",paddingBottom:s.verticalPadding+"px"})),a=n.emit;function f(u){a("click-event",u)}return{type:c,title:l,btnClass:o,btnStyle:i,emitClickEvent:f}},D.components=Object.assign({BtnDefaultIcon:oe,BtnWarnIcon:de,BtnErrorIcon:pe,BtnSuccessIcon:be},D.components);var Ee=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:t.btnClass,style:t.btnStyle,on:{click:t.emitClickEvent}},[e("div",{class:t.type==="default"&&"ripple"},[t.type==="default"?e("btn-default-icon"):t.type==="warn"?e("btn-warn-icon"):t.type==="error"?e("btn-error-icon"):t.type==="success"?e("btn-success-icon"):t._e()],1),e("span",[t._v(t._s(t.title))])])},$e=[],Ye="";const _t={};var Ce=b(D,Ee,$e,!1,ke,"2878e23a",null,null);function ke(t){for(let n in _t)this[n]=_t[n]}var O=function(){return Ce.exports}();O.name="goCaptchaButton",O.install=function(t){t.component("gocaptcha-button",O)};var Le={install(t){j.install(t),H.install(t),A.install(t),R.install(t),O.install(t)}};return Le});
|
package/dist/index.d.ts
ADDED
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.wrapper{padding:12px 16px;background:#ffffff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.theme{border:1px solid rgba(206,223,254,.5);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;box-shadow:0 0 20px #6464641a;-webkit-box-shadow:0 0 20px rgba(100,100,100,.1);-moz-box-shadow:0 0 20px rgba(100,100,100,.1)}.header{height:36px;width:100%;font-size:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header span{flex:1;padding-right:5px}.header em{padding:0 3px;font-weight:700;color:#3e7cff;font-style:normal}.body{position:relative;width:100%;margin-top:10px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;background:#34383e;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;overflow:hidden}.picture{position:relative;z-index:10;width:100%}.loading{position:absolute;z-index:9;top:50%;left:50%;width:68px;height:68px;margin-left:-34px;margin-top:-34px;line-height:68px;text-align:center}.footer{width:100%;height:60px;color:#34383e;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;padding-top:15px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.iconBlock{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center}.iconBlock svg{color:#3c3c3c;fill:#3c3c3c;margin:0 5px;cursor:pointer}.buttonBlock{width:120px;height:40px}.buttonBlock button{width:100%;height:40px;letter-spacing:2px;text-align:center;padding:9px 15px;font-size:15px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;color:#fff;background-color:#4e87ff;border:1px solid #4e87ff;-webkit-appearance:none;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none}.dragSlideBar{width:100%;height:100%;position:relative;touch-action:none}.dragLine{position:absolute;height:14px;background:#e0e0e0;left:0;right:0;top:50%;margin-top:-7px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.dragBlock{position:absolute;left:0;top:50%;margin-top:-22px;width:82px;height:44px;z-index:10;background:#3e7cff;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:24px;-moz-border-radius:24px;border-radius:24px;box-shadow:0 0 20px #64646459;-webkit-box-shadow:0 0 20px rgba(100,100,100,.35);-moz-box-shadow:0 0 20px rgba(100,100,100,.35);color:#fff;fill:#fff}.wrapper[data-v-bbb869ee]{padding:12px 16px;background:#ffffff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.theme[data-v-bbb869ee]{border:1px solid rgba(206,223,254,.5);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;box-shadow:0 0 20px #6464641a;-webkit-box-shadow:0 0 20px rgba(100,100,100,.1);-moz-box-shadow:0 0 20px rgba(100,100,100,.1)}.header[data-v-bbb869ee]{height:36px;width:100%;font-size:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header span[data-v-bbb869ee]{flex:1;padding-right:5px}.header em[data-v-bbb869ee]{padding:0 3px;font-weight:700;color:#3e7cff;font-style:normal}.body[data-v-bbb869ee]{position:relative;width:100%;margin-top:10px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;background:#34383e;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;overflow:hidden}.picture[data-v-bbb869ee]{position:relative;z-index:10;width:100%}.loading[data-v-bbb869ee]{position:absolute;z-index:9;top:50%;left:50%;width:68px;height:68px;margin-left:-34px;margin-top:-34px;line-height:68px;text-align:center}.footer[data-v-bbb869ee]{width:100%;height:60px;color:#34383e;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;padding-top:15px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.iconBlock[data-v-bbb869ee]{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center}.iconBlock svg[data-v-bbb869ee]{color:#3c3c3c;fill:#3c3c3c;margin:0 5px;cursor:pointer}.buttonBlock[data-v-bbb869ee]{width:120px;height:40px}.buttonBlock button[data-v-bbb869ee]{width:100%;height:40px;letter-spacing:2px;text-align:center;padding:9px 15px;font-size:15px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;color:#fff;background-color:#4e87ff;border:1px solid #4e87ff;-webkit-appearance:none;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none}.dragSlideBar[data-v-bbb869ee]{width:100%;height:100%;position:relative;touch-action:none}.dragLine[data-v-bbb869ee]{position:absolute;height:14px;background:#e0e0e0;left:0;right:0;top:50%;margin-top:-7px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.dragBlock[data-v-bbb869ee]{position:absolute;left:0;top:50%;margin-top:-22px;width:82px;height:44px;z-index:10;background:#3e7cff;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:24px;-moz-border-radius:24px;border-radius:24px;box-shadow:0 0 20px #64646459;-webkit-box-shadow:0 0 20px rgba(100,100,100,.35);-moz-box-shadow:0 0 20px rgba(100,100,100,.35);color:#fff;fill:#fff}.iconBlock2[data-v-bbb869ee]{flex:1}.dots[data-v-bbb869ee]{position:absolute;top:0;right:0;left:0;bottom:0}.dots .dot[data-v-bbb869ee]{position:absolute;z-index:10;width:20px;height:20px;color:#cedffe;background:#3e7cff;border:2px solid #f7f9fb;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;justify-content:center;border-radius:20px;cursor:default;font-weight:600}.wrapper[data-v-22e2084a]{padding:12px 16px;background:#ffffff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.theme[data-v-22e2084a]{border:1px solid rgba(206,223,254,.5);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;box-shadow:0 0 20px #6464641a;-webkit-box-shadow:0 0 20px rgba(100,100,100,.1);-moz-box-shadow:0 0 20px rgba(100,100,100,.1)}.header[data-v-22e2084a]{height:36px;width:100%;font-size:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header span[data-v-22e2084a]{flex:1;padding-right:5px}.header em[data-v-22e2084a]{padding:0 3px;font-weight:700;color:#3e7cff;font-style:normal}.body[data-v-22e2084a]{position:relative;width:100%;margin-top:10px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;background:#34383e;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;overflow:hidden}.picture[data-v-22e2084a]{position:relative;z-index:10;width:100%}.loading[data-v-22e2084a]{position:absolute;z-index:9;top:50%;left:50%;width:68px;height:68px;margin-left:-34px;margin-top:-34px;line-height:68px;text-align:center}.footer[data-v-22e2084a]{width:100%;height:60px;color:#34383e;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;padding-top:15px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.iconBlock[data-v-22e2084a]{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center}.iconBlock svg[data-v-22e2084a]{color:#3c3c3c;fill:#3c3c3c;margin:0 5px;cursor:pointer}.buttonBlock[data-v-22e2084a]{width:120px;height:40px}.buttonBlock button[data-v-22e2084a]{width:100%;height:40px;letter-spacing:2px;text-align:center;padding:9px 15px;font-size:15px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;color:#fff;background-color:#4e87ff;border:1px solid #4e87ff;-webkit-appearance:none;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none}.dragSlideBar[data-v-22e2084a]{width:100%;height:100%;position:relative;touch-action:none}.dragLine[data-v-22e2084a]{position:absolute;height:14px;background:#e0e0e0;left:0;right:0;top:50%;margin-top:-7px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.dragBlock[data-v-22e2084a]{position:absolute;left:0;top:50%;margin-top:-22px;width:82px;height:44px;z-index:10;background:#3e7cff;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:24px;-moz-border-radius:24px;border-radius:24px;box-shadow:0 0 20px #64646459;-webkit-box-shadow:0 0 20px rgba(100,100,100,.35);-moz-box-shadow:0 0 20px rgba(100,100,100,.35);color:#fff;fill:#fff}.tile[data-v-22e2084a]{position:absolute;z-index:30;cursor:pointer}.tile :global img[data-v-22e2084a]{display:block;cursor:pointer;width:100%;height:100%}.wrapper[data-v-ae8e1660]{padding:12px 16px;background:#ffffff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.theme[data-v-ae8e1660]{border:1px solid rgba(206,223,254,.5);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;box-shadow:0 0 20px #6464641a;-webkit-box-shadow:0 0 20px rgba(100,100,100,.1);-moz-box-shadow:0 0 20px rgba(100,100,100,.1)}.header[data-v-ae8e1660]{height:36px;width:100%;font-size:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header span[data-v-ae8e1660]{flex:1;padding-right:5px}.header em[data-v-ae8e1660]{padding:0 3px;font-weight:700;color:#3e7cff;font-style:normal}.body[data-v-ae8e1660]{position:relative;width:100%;margin-top:10px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;background:#34383e;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;overflow:hidden}.picture[data-v-ae8e1660]{position:relative;z-index:10;width:100%}.loading[data-v-ae8e1660]{position:absolute;z-index:9;top:50%;left:50%;width:68px;height:68px;margin-left:-34px;margin-top:-34px;line-height:68px;text-align:center}.footer[data-v-ae8e1660]{width:100%;height:60px;color:#34383e;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;padding-top:15px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.iconBlock[data-v-ae8e1660]{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center}.iconBlock svg[data-v-ae8e1660]{color:#3c3c3c;fill:#3c3c3c;margin:0 5px;cursor:pointer}.buttonBlock[data-v-ae8e1660]{width:120px;height:40px}.buttonBlock button[data-v-ae8e1660]{width:100%;height:40px;letter-spacing:2px;text-align:center;padding:9px 15px;font-size:15px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;color:#fff;background-color:#4e87ff;border:1px solid #4e87ff;-webkit-appearance:none;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none}.dragSlideBar[data-v-ae8e1660]{width:100%;height:100%;position:relative;touch-action:none}.dragLine[data-v-ae8e1660]{position:absolute;height:14px;background:#e0e0e0;left:0;right:0;top:50%;margin-top:-7px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.dragBlock[data-v-ae8e1660]{position:absolute;left:0;top:50%;margin-top:-22px;width:82px;height:44px;z-index:10;background:#3e7cff;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:24px;-moz-border-radius:24px;border-radius:24px;box-shadow:0 0 20px #64646459;-webkit-box-shadow:0 0 20px rgba(100,100,100,.35);-moz-box-shadow:0 0 20px rgba(100,100,100,.35);color:#fff;fill:#fff}.tile[data-v-ae8e1660]{position:absolute;z-index:30;cursor:pointer}.tile :global img[data-v-ae8e1660]{display:block;cursor:pointer;width:100%;height:100%}.wrapper[data-v-25e72324]{padding:12px 16px;background:#ffffff;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box}.theme[data-v-25e72324]{border:1px solid rgba(206,223,254,.5);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;box-shadow:0 0 20px #6464641a;-webkit-box-shadow:0 0 20px rgba(100,100,100,.1);-moz-box-shadow:0 0 20px rgba(100,100,100,.1)}.header[data-v-25e72324]{height:36px;width:100%;font-size:15px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header span[data-v-25e72324]{flex:1;padding-right:5px}.header em[data-v-25e72324]{padding:0 3px;font-weight:700;color:#3e7cff;font-style:normal}.body[data-v-25e72324]{position:relative;width:100%;margin-top:10px;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;background:#34383e;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;overflow:hidden}.picture[data-v-25e72324]{position:relative;z-index:10;width:100%}.loading[data-v-25e72324]{position:absolute;z-index:9;top:50%;left:50%;width:68px;height:68px;margin-left:-34px;margin-top:-34px;line-height:68px;text-align:center}.footer[data-v-25e72324]{width:100%;height:60px;color:#34383e;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;padding-top:15px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.iconBlock[data-v-25e72324]{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center}.iconBlock svg[data-v-25e72324]{color:#3c3c3c;fill:#3c3c3c;margin:0 5px;cursor:pointer}.buttonBlock[data-v-25e72324]{width:120px;height:40px}.buttonBlock button[data-v-25e72324]{width:100%;height:40px;letter-spacing:2px;text-align:center;padding:9px 15px;font-size:15px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;color:#fff;background-color:#4e87ff;border:1px solid #4e87ff;-webkit-appearance:none;box-sizing:border-box;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none}.dragSlideBar[data-v-25e72324]{width:100%;height:100%;position:relative;touch-action:none}.dragLine[data-v-25e72324]{position:absolute;height:14px;background:#e0e0e0;left:0;right:0;top:50%;margin-top:-7px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.dragBlock[data-v-25e72324]{position:absolute;left:0;top:50%;margin-top:-22px;width:82px;height:44px;z-index:10;background:#3e7cff;cursor:pointer;display:flex;align-items:center;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-border-radius:24px;-moz-border-radius:24px;border-radius:24px;box-shadow:0 0 20px #64646459;-webkit-box-shadow:0 0 20px rgba(100,100,100,.35);-moz-box-shadow:0 0 20px rgba(100,100,100,.35);color:#fff;fill:#fff}.body2[data-v-25e72324]{background:transparent!important;display:flex;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;justify-content:center;align-items:center}.picture[data-v-25e72324]{position:relative;max-width:100%;max-height:100%;z-index:10;border-radius:100%;overflow:hidden;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;justify-content:center;align-items:center}.picture img[data-v-25e72324]{max-width:100%;max-height:100%}.round[data-v-25e72324]{position:absolute;top:0;left:0;right:0;bottom:0;border-radius:100%;z-index:20;border:6px solid #e0e0e0}.thumb[data-v-25e72324]{position:absolute;z-index:30;top:0;left:0;right:0;bottom:0}.thumb img[data-v-25e72324]{max-width:100%;max-height:100%}.thumbBlock[data-v-25e72324]{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;justify-content:center;align-items:center}.btnBlock[data-v-2878e23a]{position:relative;box-sizing:border-box;display:block;font-size:13px;-webkit-border-radius:5px;-moz-border-radius:5px;letter-spacing:1px;border-radius:5px;line-height:1;white-space:nowrap;-webkit-appearance:none;outline:none;margin:0;transition:.1s;font-weight:500;-moz-user-select:none;-webkit-user-select:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;justify-content:center;justify-items:center;box-shadow:0 0 20px #3e7cff1a;-webkit-box-shadow:0 0 20px rgba(62,124,255,.1);-moz-box-shadow:0 0 20px rgba(62,124,255,.1)}.btnBlock span[data-v-2878e23a]{padding-left:8px}.disabled[data-v-2878e23a]{pointer-events:none}.default[data-v-2878e23a]{color:#3e7cff;border:1px solid #50a1ff;background:#ecf5ff;cursor:pointer}.default[data-v-2878e23a]:hover{background:#e0efff!important}.error[data-v-2878e23a]{cursor:pointer;color:#ed4630;background:#fef0f0;border:1px solid #ff5a34}.warn[data-v-2878e23a]{cursor:pointer;color:#ffa000;background:#fdf6ec;border:1px solid #ffbe09}.success[data-v-2878e23a]{color:#5eaa2f;background:#f0f9eb;border:1px solid #8bc640;pointer-events:none}.ripple[data-v-2878e23a]{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;justify-content:center;justify-items:center}.ripple[data-v-2878e23a]:after{background:#409eff;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;content:"";display:block;width:20px;height:20px;opacity:0;position:absolute;top:0;left:0;z-index:9;animation:ripple-data-v-2878e23a 1.3s infinite;-moz-animation:ripple-data-v-2878e23a 1.3s infinite;-webkit-animation:ripple-data-v-2878e23a 1.3s infinite;animation-delay:2s;-moz-animation-delay:2s;-webkit-animation-delay:2s}@keyframes ripple-data-v-2878e23a{0%{opacity:0}5%{opacity:.05}20%{opacity:.35}65%{opacity:.01}to{transform:scaleX(2) scaleY(2);opacity:0}}@-webkit-keyframes ripple-data-v-2878e23a{0%{opacity:0}5%{opacity:.05}20%{opacity:.35}65%{opacity:.01}to{transform:scaleX(2) scaleY(2);opacity:0}}
|
package/env.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import Vue from 'vue'
|
|
5
|
+
export default Vue
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare global {
|
|
9
|
+
namespace JSX {
|
|
10
|
+
interface Element extends VNode {}
|
|
11
|
+
interface ElementClass extends Vue {}
|
|
12
|
+
interface IntrinsicElements {
|
|
13
|
+
[elem: string]: any
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "go-captcha-vue",
|
|
3
|
+
"version": "v2.0.0-beta.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "This is the vue package for go-captcha",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"go-captcha-vue",
|
|
10
|
+
"go-captcha",
|
|
11
|
+
"gocaptcha",
|
|
12
|
+
"captcha-vue",
|
|
13
|
+
"vue-captcha",
|
|
14
|
+
"capts",
|
|
15
|
+
"gocapts"
|
|
16
|
+
],
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/wenlng/go-captcha-vue/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/wenlng/go-captcha-vue.git"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/go-captcha-vue.umd.js",
|
|
25
|
+
"module": "dist/go-captcha-vue.es.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"typings": "./dist/index.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/*",
|
|
30
|
+
"env.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"dev": "vite",
|
|
34
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
35
|
+
"build2": "run-p type-check \"build-only {@}\" --",
|
|
36
|
+
"build-only": "vite build && run-p tsd",
|
|
37
|
+
"tsd": "vue-tsc --rootDir ./packages --declaration --emitDeclarationOnly --noEmit false --outDir ./dist",
|
|
38
|
+
"preview": "vite preview --port 5050",
|
|
39
|
+
"type-check": "vue-tsc --noEmit -p tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"vue": "^2.7.14"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^16.11.10",
|
|
46
|
+
"@vitejs/plugin-legacy": "^1.6.3",
|
|
47
|
+
"@vue/compiler-sfc": "^3.4.27",
|
|
48
|
+
"@vue/runtime-dom": "^3.2.22",
|
|
49
|
+
"fast-glob": "^3.3.2",
|
|
50
|
+
"less": "^4.2.0",
|
|
51
|
+
"less-loader": "^12.2.0",
|
|
52
|
+
"npm-run-all2": "^6.2.0",
|
|
53
|
+
"ts-morph": "^22.0.0",
|
|
54
|
+
"typescript": "~4.4.4",
|
|
55
|
+
"unplugin-vue2-script-setup": "^0.7.1",
|
|
56
|
+
"vite": "^2.6.14",
|
|
57
|
+
"vite-plugin-vue2": "^1.9.0",
|
|
58
|
+
"vue-demi": "^0.13.11",
|
|
59
|
+
"vue-template-compiler": "^2.7.14",
|
|
60
|
+
"vue-tsc": "^1.8.27"
|
|
61
|
+
}
|
|
62
|
+
}
|