@lingshugroup/web-plus 2.6.1 → 2.6.3
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/lib/index/index.cjs +1 -1
- package/lib/index/index.js +20 -18
- package/lib/index/index.js.br +0 -0
- package/lib/index/index.js.gz +0 -0
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js +196 -183
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/captchaVerify/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/index/index.cjs +1 -1
- package/lib/packages/ls-components/components/index/index.js +11 -9
- package/lib/packages/ls-components/components/index/index.js.br +0 -0
- package/lib/packages/ls-components/components/index/index.js.gz +0 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index.js +7 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js +181 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/sliceUpload/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.cjs +1 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js +57 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/sliceUpload/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +209 -204
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/sliceUpload/index.cjs +1 -0
- package/lib/sliceUpload/index.js +12 -0
- package/package.json +23 -15
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-2943f7be"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2943f7be"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Z=Object.defineProperty;var l=(b,N)=>Z(b,"name",{value:N,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),J=require("../../../../../dialog/index.cjs"),K=require("../types/index.cjs"),Q={key:0,class:"captcha-loading-mask","aria-live":"polite"},Y={key:0,class:"captcha-overlay"},ee={class:"captcha-overlay-icon"},te={class:"captcha-overlay-text"},ae={class:"captcha-prompt"},ne=["aria-valuenow","aria-disabled"],oe={key:0,class:"captcha-slider-hint"},le={class:"captcha-actions"},re=["disabled"],se={class:"captcha-serial-text"},ie=e.defineComponent({name:"LSCaptchaVerify"}),ce=e.defineComponent({...ie,name:"LSCaptchaVerify",inheritAttrs:!1,props:e.mergeModels(K.lsCaptchaVerifyProps,{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:e.mergeModels(["refresh","select"],["update:modelValue"]),setup(b,{emit:N}){const r=b,P=N,E=e.useModel(b,"modelValue"),c=60,_=.95,W=c*(1-_),S=e.ref(),d=e.ref(),B=e.ref(),s=e.ref(!1),i=e.ref(0),v=e.ref(0),k=e.ref(0),w=e.ref(0),u=e.ref([]),y=e.ref(!1);let n=null;const V=e.computed(()=>r.sceneSeed||Date.now()),C=[{bg:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",piece:"rgba(102,126,234,0.7)"},{bg:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",piece:"rgba(245,87,108,0.7)"},{bg:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",piece:"rgba(79,172,254,0.7)"},{bg:"linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)",piece:"rgba(67,233,123,0.7)"},{bg:"linear-gradient(135deg, #fa709a 0%, #fee140 100%)",piece:"rgba(250,112,154,0.7)"},{bg:"linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)",piece:"rgba(161,140,209,0.7)"},{bg:"linear-gradient(135deg, #fccb90 0%, #d57eeb 100%)",piece:"rgba(213,126,235,0.7)"},{bg:"linear-gradient(135deg, #96fbc4 0%, #f9f586 100%)",piece:"rgba(150,251,196,0.7)"}],R=["6px","50%","12px 4px","20px 6px 20px 6px","4px 16px","50% 4px 50% 4px","16px 4px 4px 16px","30% 70% 70% 30% / 30% 30% 70% 70%"],$=e.computed(()=>V.value%C.length),L=e.computed(()=>Math.floor(V.value/7)%R.length),D=e.computed(()=>V.value%4*90),T=e.computed(()=>30+V.value%40),A=e.computed(()=>({background:C[$.value].bg})),x=e.computed(()=>Math.max(.15,Math.min(.85,r.targetPercent))),p=e.computed(()=>v.value?Math.min(1,Math.max(0,i.value/v.value)):0),X=e.computed(()=>({left:`${x.value*100}%`,top:`${T.value}%`,width:`${c}px`,height:`${c}px`,borderRadius:R[L.value],transform:`translate(-50%, -50%) rotate(${D.value}deg)`})),F=e.computed(()=>({left:`${p.value*100}%`,top:`${T.value}%`,width:`${c}px`,height:`${c}px`,borderRadius:R[L.value],background:C[$.value].piece,transform:`translate(-50%, -50%) rotate(${D.value}deg)`})),q=e.computed(()=>({transform:`translateX(${i.value}px)`})),H=e.computed(()=>({width:`${i.value+40}px`}));function m(){var a;const t=d.value;t&&(v.value=Math.max(0,t.clientWidth-40),k.value=((a=S.value)==null?void 0:a.clientWidth)||t.clientWidth)}l(m,"updateMaxDrag");function O(){var o;const t=k.value||((o=d.value)==null?void 0:o.clientWidth)||0;if(!t)return 0;const a=Math.abs(p.value-x.value)*t;return Math.max(0,(c-a)/c)}l(O,"getPositionOverlapRatio");function I(){window.removeEventListener("pointermove",z),window.removeEventListener("pointerup",M),window.removeEventListener("pointercancel",M)}l(I,"detachWindowPointerListeners");function U(t){const a=B.value;if(a!=null&&a.hasPointerCapture(t.pointerId))try{a.releasePointerCapture(t.pointerId)}catch{}}l(U,"releaseThumbCapture");function f(){I(),s.value=!1,y.value=!1,i.value=0,w.value=0,u.value=[]}l(f,"resetDrag");function j(t){if(r.loading||r.status==="success"||t.button!==0)return;m(),s.value=!0,y.value=!1,i.value=0,w.value=performance.now(),u.value=[{x:0,t:0}],t.currentTarget.setPointerCapture(t.pointerId),window.addEventListener("pointermove",z),window.addEventListener("pointerup",M),window.addEventListener("pointercancel",M)}l(j,"onPointerDown");function z(t){if(!s.value||!d.value)return;const a=d.value.getBoundingClientRect(),o=t.clientX-a.left-20;i.value=Math.min(Math.max(0,o),v.value);const h=Math.round(performance.now()-w.value),g=u.value[u.value.length-1];(!g||h-g.t>=16)&&u.value.push({x:Number(p.value.toFixed(4)),t:h})}l(z,"onPointerMove");function M(t){var g;if(I(),U(t),!s.value)return;s.value=!1;const a=Math.abs(p.value-x.value)*(k.value||((g=d.value)==null?void 0:g.clientWidth)||0);if(O()<_||a>W){y.value=!0,setTimeout(f,300);return}i.value=x.value*v.value;const h=Math.max(1,Math.round(performance.now()-w.value));u.value.push({x:Number(p.value.toFixed(4)),t:h}),P("select",{dragPercent:Number(p.value.toFixed(4)),durationMs:h,trace:u.value.slice(-300)})}l(M,"onPointerEnd");function G(){f(),P("refresh")}return l(G,"onRefresh"),e.watch(()=>[r.status,r.loading],([t,a])=>{(t==="error"||t==="idle"&&!a)&&f()}),e.watch(()=>[r.serialNo,r.sceneSeed],()=>{E.value&&f()}),e.watch(E,t=>{t?e.nextTick(()=>{m();const a=d.value,o=S.value;(a||o)&&typeof ResizeObserver<"u"&&(n==null||n.disconnect(),n=new ResizeObserver(()=>m()),a&&n.observe(a),o&&n.observe(o))}):(n==null||n.disconnect(),n=null,f())}),e.onMounted(()=>{window.addEventListener("resize",m)}),e.onBeforeUnmount(()=>{n==null||n.disconnect(),n=null,window.removeEventListener("resize",m),f()}),(t,a)=>(e.openBlock(),e.createBlock(e.unref(J.default),e.mergeProps({modelValue:E.value,"onUpdate:modelValue":a[0]||(a[0]=o=>E.value=o),title:"安全验证",width:"420px","has-footer":!1,"destroy-on-close":""},t.$attrs),{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["captcha-wrap",{"is-slider-dragging":e.unref(s)}])},[t.loading?(e.openBlock(),e.createElementBlock("div",Q,a[1]||(a[1]=[e.createElementVNode("span",{class:"captcha-loading-dot"},null,-1),e.createElementVNode("span",null,"验证中…",-1)]))):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"sceneRef",ref:S,class:e.normalizeClass(["captcha-scene",`is-${t.status}`]),style:e.normalizeStyle(e.unref(A))},[e.createElementVNode("div",{class:"captcha-hole",style:e.normalizeStyle(e.unref(X))},null,4),e.createElementVNode("div",{class:"captcha-piece",style:e.normalizeStyle(e.unref(F))},null,4),t.status!=="idle"?(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("span",ee,e.toDisplayString(t.status==="success"?"✓":"✗"),1),e.createElementVNode("span",te,e.toDisplayString(t.status==="success"?"验证通过":t.status==="error"?"不通过":"验证失败,请重试"),1)])):e.createCommentVNode("",!0)],6),e.createElementVNode("div",ae,e.toDisplayString(r.prompt),1),e.createElementVNode("div",{ref_key:"sliderRef",ref:d,class:e.normalizeClass(["captcha-slider",{"is-dragging":e.unref(s),"is-fail":e.unref(y),"is-loading":t.loading,"is-success":t.status==="success","is-error":t.status==="error"}]),role:"slider","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e.unref(p)*100),"aria-disabled":t.loading||t.status==="success"},[e.createElementVNode("div",{class:"captcha-slider-fill",style:e.normalizeStyle(e.unref(H))},null,4),e.createElementVNode("div",{ref_key:"thumbRef",ref:B,class:"captcha-slider-thumb",style:e.normalizeStyle(e.unref(q)),onPointerdown:e.withModifiers(j,["prevent"])},a[2]||(a[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[e.createElementVNode("path",{d:"M9 18l6-6-6-6"}),e.createElementVNode("path",{d:"M4 18l6-6-6-6"})],-1)]),36),!e.unref(s)&&t.status==="idle"&&e.unref(i)===0?(e.openBlock(),e.createElementBlock("span",oe," 向右拖动滑块完成拼图 ")):e.createCommentVNode("",!0)],10,ne),e.createElementVNode("div",le,[e.createElementVNode("button",{type:"button",class:"captcha-action-btn",disabled:t.loading,onClick:G},a[3]||(a[3]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M1 4v6h6"}),e.createElementVNode("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})],-1),e.createTextVNode(" 换一张 ",-1)]),8,re),e.createElementVNode("span",se,e.toDisplayString(t.serialNo),1)])],2)]),_:1},16,["modelValue"]))}});exports.default=ce;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (
|
|
3
|
-
import { defineComponent as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
var ie = Object.defineProperty;
|
|
2
|
+
var i = (y, V) => ie(y, "name", { value: V, configurable: !0 });
|
|
3
|
+
import { defineComponent as J, mergeModels as q, useModel as re, ref as r, computed as s, watch as I, nextTick as ce, onMounted as ue, onBeforeUnmount as de, createBlock as pe, openBlock as L, unref as l, mergeProps as ve, withCtx as fe, createElementVNode as a, normalizeClass as B, createElementBlock as W, createCommentVNode as A, normalizeStyle as M, toDisplayString as $, withModifiers as he, createTextVNode as ge } from "vue";
|
|
4
|
+
import me from "../../../../../dialog/index.js";
|
|
5
|
+
import { lsCaptchaVerifyProps as be } from "../types/index.js";
|
|
6
|
+
const we = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "captcha-loading-mask",
|
|
8
9
|
"aria-live": "polite"
|
|
9
|
-
},
|
|
10
|
+
}, xe = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "captcha-overlay"
|
|
12
|
-
},
|
|
13
|
+
}, Me = { class: "captcha-overlay-icon" }, ye = { class: "captcha-overlay-text" }, Ee = { class: "captcha-prompt" }, Re = ["aria-valuenow", "aria-disabled"], ke = {
|
|
13
14
|
key: 0,
|
|
14
15
|
class: "captcha-slider-hint"
|
|
15
|
-
},
|
|
16
|
+
}, Ce = { class: "captcha-actions" }, Pe = ["disabled"], Se = { class: "captcha-serial-text" }, Le = J({
|
|
16
17
|
name: "LSCaptchaVerify"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
18
|
+
}), Te = /* @__PURE__ */ J({
|
|
19
|
+
...Le,
|
|
19
20
|
name: "LSCaptchaVerify",
|
|
20
21
|
inheritAttrs: !1,
|
|
21
|
-
props: /* @__PURE__ */
|
|
22
|
+
props: /* @__PURE__ */ q(be, {
|
|
22
23
|
modelValue: { type: Boolean, default: !1 },
|
|
23
24
|
modelModifiers: {}
|
|
24
25
|
}),
|
|
25
|
-
emits: /* @__PURE__ */
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
26
|
+
emits: /* @__PURE__ */ q(["refresh", "select"], ["update:modelValue"]),
|
|
27
|
+
setup(y, { emit: V }) {
|
|
28
|
+
const c = y, X = V, E = re(y, "modelValue"), p = 60, F = 0.95, K = p * (1 - F), _ = r(), v = r(), H = r(), u = r(!1), d = r(0), m = r(0), N = r(0), R = r(0), f = r([]), k = r(!1);
|
|
28
29
|
let n = null;
|
|
29
|
-
const C = s(() =>
|
|
30
|
+
const C = s(() => c.sceneSeed || Date.now()), T = [
|
|
30
31
|
{ bg: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)", piece: "rgba(102,126,234,0.7)" },
|
|
31
32
|
{ bg: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)", piece: "rgba(245,87,108,0.7)" },
|
|
32
33
|
{ bg: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)", piece: "rgba(79,172,254,0.7)" },
|
|
@@ -35,7 +36,7 @@ const fe = {
|
|
|
35
36
|
{ bg: "linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%)", piece: "rgba(161,140,209,0.7)" },
|
|
36
37
|
{ bg: "linear-gradient(135deg, #fccb90 0%, #d57eeb 100%)", piece: "rgba(213,126,235,0.7)" },
|
|
37
38
|
{ bg: "linear-gradient(135deg, #96fbc4 0%, #f9f586 100%)", piece: "rgba(150,251,196,0.7)" }
|
|
38
|
-
],
|
|
39
|
+
], D = [
|
|
39
40
|
"6px",
|
|
40
41
|
"50%",
|
|
41
42
|
"12px 4px",
|
|
@@ -44,198 +45,210 @@ const fe = {
|
|
|
44
45
|
"50% 4px 50% 4px",
|
|
45
46
|
"16px 4px 4px 16px",
|
|
46
47
|
"30% 70% 70% 30% / 30% 30% 70% 70%"
|
|
47
|
-
],
|
|
48
|
-
background:
|
|
49
|
-
})),
|
|
50
|
-
left: `${
|
|
51
|
-
top: `${
|
|
52
|
-
width: `${
|
|
53
|
-
height: `${
|
|
54
|
-
borderRadius:
|
|
55
|
-
transform: `translate(-50%, -50%) rotate(${
|
|
56
|
-
})),
|
|
57
|
-
left: `${
|
|
58
|
-
top: `${
|
|
59
|
-
width: `${
|
|
60
|
-
height: `${
|
|
61
|
-
borderRadius:
|
|
62
|
-
background:
|
|
63
|
-
transform: `translate(-50%, -50%) rotate(${
|
|
64
|
-
})),
|
|
65
|
-
transform: `translateX(${
|
|
66
|
-
})),
|
|
67
|
-
width: `${
|
|
48
|
+
], U = s(() => C.value % T.length), z = s(() => Math.floor(C.value / 7) % D.length), G = s(() => C.value % 4 * 90), O = s(() => 30 + C.value % 40), Q = s(() => ({
|
|
49
|
+
background: T[U.value].bg
|
|
50
|
+
})), P = s(() => Math.max(0.15, Math.min(0.85, c.targetPercent))), h = s(() => m.value ? Math.min(1, Math.max(0, d.value / m.value)) : 0), Y = s(() => ({
|
|
51
|
+
left: `${P.value * 100}%`,
|
|
52
|
+
top: `${O.value}%`,
|
|
53
|
+
width: `${p}px`,
|
|
54
|
+
height: `${p}px`,
|
|
55
|
+
borderRadius: D[z.value],
|
|
56
|
+
transform: `translate(-50%, -50%) rotate(${G.value}deg)`
|
|
57
|
+
})), ee = s(() => ({
|
|
58
|
+
left: `${h.value * 100}%`,
|
|
59
|
+
top: `${O.value}%`,
|
|
60
|
+
width: `${p}px`,
|
|
61
|
+
height: `${p}px`,
|
|
62
|
+
borderRadius: D[z.value],
|
|
63
|
+
background: T[U.value].piece,
|
|
64
|
+
transform: `translate(-50%, -50%) rotate(${G.value}deg)`
|
|
65
|
+
})), te = s(() => ({
|
|
66
|
+
transform: `translateX(${d.value}px)`
|
|
67
|
+
})), ae = s(() => ({
|
|
68
|
+
width: `${d.value + 40}px`
|
|
68
69
|
}));
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
e
|
|
70
|
+
function b() {
|
|
71
|
+
var t;
|
|
72
|
+
const e = v.value;
|
|
73
|
+
e && (m.value = Math.max(0, e.clientWidth - 40), N.value = ((t = _.value) == null ? void 0 : t.clientWidth) || e.clientWidth);
|
|
72
74
|
}
|
|
73
|
-
i(
|
|
74
|
-
function
|
|
75
|
-
|
|
75
|
+
i(b, "updateMaxDrag");
|
|
76
|
+
function ne() {
|
|
77
|
+
var o;
|
|
78
|
+
const e = N.value || ((o = v.value) == null ? void 0 : o.clientWidth) || 0;
|
|
79
|
+
if (!e)
|
|
80
|
+
return 0;
|
|
81
|
+
const t = Math.abs(h.value - P.value) * e;
|
|
82
|
+
return Math.max(0, (p - t) / p);
|
|
76
83
|
}
|
|
77
|
-
i(
|
|
78
|
-
function
|
|
79
|
-
|
|
84
|
+
i(ne, "getPositionOverlapRatio");
|
|
85
|
+
function Z() {
|
|
86
|
+
window.removeEventListener("pointermove", j), window.removeEventListener("pointerup", S), window.removeEventListener("pointercancel", S);
|
|
87
|
+
}
|
|
88
|
+
i(Z, "detachWindowPointerListeners");
|
|
89
|
+
function se(e) {
|
|
90
|
+
const t = H.value;
|
|
80
91
|
if (t != null && t.hasPointerCapture(e.pointerId))
|
|
81
92
|
try {
|
|
82
93
|
t.releasePointerCapture(e.pointerId);
|
|
83
94
|
} catch {
|
|
84
95
|
}
|
|
85
96
|
}
|
|
86
|
-
i(
|
|
87
|
-
function
|
|
88
|
-
|
|
97
|
+
i(se, "releaseThumbCapture");
|
|
98
|
+
function g() {
|
|
99
|
+
Z(), u.value = !1, k.value = !1, d.value = 0, R.value = 0, f.value = [];
|
|
89
100
|
}
|
|
90
|
-
i(
|
|
91
|
-
function
|
|
92
|
-
if (
|
|
101
|
+
i(g, "resetDrag");
|
|
102
|
+
function le(e) {
|
|
103
|
+
if (c.loading || c.status === "success" || e.button !== 0)
|
|
93
104
|
return;
|
|
94
|
-
|
|
105
|
+
b(), u.value = !0, k.value = !1, d.value = 0, R.value = performance.now(), f.value = [{ x: 0, t: 0 }], e.currentTarget.setPointerCapture(e.pointerId), window.addEventListener("pointermove", j), window.addEventListener("pointerup", S), window.addEventListener("pointercancel", S);
|
|
95
106
|
}
|
|
96
|
-
i(
|
|
97
|
-
function
|
|
98
|
-
if (!
|
|
107
|
+
i(le, "onPointerDown");
|
|
108
|
+
function j(e) {
|
|
109
|
+
if (!u.value || !v.value)
|
|
99
110
|
return;
|
|
100
|
-
const t =
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
(!
|
|
111
|
+
const t = v.value.getBoundingClientRect(), o = e.clientX - t.left - 20;
|
|
112
|
+
d.value = Math.min(Math.max(0, o), m.value);
|
|
113
|
+
const w = Math.round(performance.now() - R.value), x = f.value[f.value.length - 1];
|
|
114
|
+
(!x || w - x.t >= 16) && f.value.push({ x: Number(h.value.toFixed(4)), t: w });
|
|
104
115
|
}
|
|
105
|
-
i(
|
|
106
|
-
function
|
|
107
|
-
|
|
116
|
+
i(j, "onPointerMove");
|
|
117
|
+
function S(e) {
|
|
118
|
+
var x;
|
|
119
|
+
if (Z(), se(e), !u.value)
|
|
108
120
|
return;
|
|
109
|
-
|
|
110
|
-
|
|
121
|
+
u.value = !1;
|
|
122
|
+
const t = Math.abs(h.value - P.value) * (N.value || ((x = v.value) == null ? void 0 : x.clientWidth) || 0);
|
|
123
|
+
if (ne() < F || t > K) {
|
|
124
|
+
k.value = !0, setTimeout(g, 300);
|
|
111
125
|
return;
|
|
112
126
|
}
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
dragPercent: Number(
|
|
117
|
-
durationMs:
|
|
118
|
-
trace:
|
|
127
|
+
d.value = P.value * m.value;
|
|
128
|
+
const w = Math.max(1, Math.round(performance.now() - R.value));
|
|
129
|
+
f.value.push({ x: Number(h.value.toFixed(4)), t: w }), X("select", {
|
|
130
|
+
dragPercent: Number(h.value.toFixed(4)),
|
|
131
|
+
durationMs: w,
|
|
132
|
+
trace: f.value.slice(-300)
|
|
119
133
|
});
|
|
120
134
|
}
|
|
121
|
-
i(
|
|
122
|
-
function
|
|
123
|
-
|
|
135
|
+
i(S, "onPointerEnd");
|
|
136
|
+
function oe() {
|
|
137
|
+
g(), X("refresh");
|
|
124
138
|
}
|
|
125
|
-
return i(
|
|
126
|
-
(e === "error" || e === "idle" && !t) &&
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
}),
|
|
130
|
-
e ?
|
|
131
|
-
|
|
132
|
-
const t =
|
|
133
|
-
t && typeof ResizeObserver < "u" && (n == null || n.disconnect(), n = new ResizeObserver(() =>
|
|
134
|
-
}) : (n == null || n.disconnect(), n = null,
|
|
135
|
-
}),
|
|
136
|
-
window.addEventListener("resize",
|
|
137
|
-
}),
|
|
138
|
-
n == null || n.disconnect(), n = null, window.removeEventListener("resize",
|
|
139
|
-
}), (e, t) => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
return i(oe, "onRefresh"), I(() => [c.status, c.loading], ([e, t]) => {
|
|
140
|
+
(e === "error" || e === "idle" && !t) && g();
|
|
141
|
+
}), I(() => [c.serialNo, c.sceneSeed], () => {
|
|
142
|
+
E.value && g();
|
|
143
|
+
}), I(E, (e) => {
|
|
144
|
+
e ? ce(() => {
|
|
145
|
+
b();
|
|
146
|
+
const t = v.value, o = _.value;
|
|
147
|
+
(t || o) && typeof ResizeObserver < "u" && (n == null || n.disconnect(), n = new ResizeObserver(() => b()), t && n.observe(t), o && n.observe(o));
|
|
148
|
+
}) : (n == null || n.disconnect(), n = null, g());
|
|
149
|
+
}), ue(() => {
|
|
150
|
+
window.addEventListener("resize", b);
|
|
151
|
+
}), de(() => {
|
|
152
|
+
n == null || n.disconnect(), n = null, window.removeEventListener("resize", b), g();
|
|
153
|
+
}), (e, t) => (L(), pe(l(me), ve({
|
|
154
|
+
modelValue: E.value,
|
|
155
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => E.value = o),
|
|
156
|
+
title: "安全验证",
|
|
157
|
+
width: "420px",
|
|
158
|
+
"has-footer": !1,
|
|
159
|
+
"destroy-on-close": ""
|
|
160
|
+
}, e.$attrs), {
|
|
161
|
+
default: fe(() => [
|
|
162
|
+
a("div", {
|
|
163
|
+
class: B(["captcha-wrap", { "is-slider-dragging": l(u) }])
|
|
164
|
+
}, [
|
|
165
|
+
e.loading ? (L(), W("div", we, t[1] || (t[1] = [
|
|
166
|
+
a("span", { class: "captcha-loading-dot" }, null, -1),
|
|
167
|
+
a("span", null, "验证中…", -1)
|
|
168
|
+
]))) : A("", !0),
|
|
169
|
+
a("div", {
|
|
170
|
+
ref_key: "sceneRef",
|
|
171
|
+
ref: _,
|
|
172
|
+
class: B(["captcha-scene", `is-${e.status}`]),
|
|
173
|
+
style: M(l(Q))
|
|
174
|
+
}, [
|
|
175
|
+
a("div", {
|
|
176
|
+
class: "captcha-hole",
|
|
177
|
+
style: M(l(Y))
|
|
178
|
+
}, null, 4),
|
|
179
|
+
a("div", {
|
|
180
|
+
class: "captcha-piece",
|
|
181
|
+
style: M(l(ee))
|
|
182
|
+
}, null, 4),
|
|
183
|
+
e.status !== "idle" ? (L(), W("div", xe, [
|
|
184
|
+
a("span", Me, $(e.status === "success" ? "✓" : "✗"), 1),
|
|
185
|
+
a("span", ye, $(e.status === "success" ? "验证通过" : e.status === "error" ? "不通过" : "验证失败,请重试"), 1)
|
|
186
|
+
])) : A("", !0)
|
|
187
|
+
], 6),
|
|
188
|
+
a("div", Ee, $(c.prompt), 1),
|
|
150
189
|
a("div", {
|
|
151
|
-
|
|
190
|
+
ref_key: "sliderRef",
|
|
191
|
+
ref: v,
|
|
192
|
+
class: B(["captcha-slider", { "is-dragging": l(u), "is-fail": l(k), "is-loading": e.loading, "is-success": e.status === "success", "is-error": e.status === "error" }]),
|
|
193
|
+
role: "slider",
|
|
194
|
+
"aria-valuemin": 0,
|
|
195
|
+
"aria-valuemax": 100,
|
|
196
|
+
"aria-valuenow": Math.round(l(h) * 100),
|
|
197
|
+
"aria-disabled": e.loading || e.status === "success"
|
|
152
198
|
}, [
|
|
153
|
-
e.loading ? (L(), T("div", fe, t[1] || (t[1] = [
|
|
154
|
-
a("span", { class: "captcha-loading-dot" }, null, -1),
|
|
155
|
-
a("span", null, "验证中…", -1)
|
|
156
|
-
]))) : D("", !0),
|
|
157
199
|
a("div", {
|
|
158
|
-
class:
|
|
159
|
-
style:
|
|
160
|
-
},
|
|
161
|
-
a("div", {
|
|
162
|
-
class: "captcha-hole",
|
|
163
|
-
style: b(o(K))
|
|
164
|
-
}, null, 4),
|
|
165
|
-
a("div", {
|
|
166
|
-
class: "captcha-piece",
|
|
167
|
-
style: b(o(Q))
|
|
168
|
-
}, null, 4),
|
|
169
|
-
e.status !== "idle" ? (L(), T("div", he, [
|
|
170
|
-
a("span", ge, P(e.status === "success" ? "✓" : "✗"), 1),
|
|
171
|
-
a("span", me, P(e.status === "success" ? "验证通过" : "验证失败,请重试"), 1)
|
|
172
|
-
])) : D("", !0)
|
|
173
|
-
], 6),
|
|
174
|
-
a("div", be, P(l.prompt), 1),
|
|
200
|
+
class: "captcha-slider-fill",
|
|
201
|
+
style: M(l(ae))
|
|
202
|
+
}, null, 4),
|
|
175
203
|
a("div", {
|
|
176
|
-
ref_key: "
|
|
177
|
-
ref:
|
|
178
|
-
class:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
stroke: "currentColor",
|
|
223
|
-
"stroke-width": "2"
|
|
224
|
-
}, [
|
|
225
|
-
a("path", { d: "M1 4v6h6" }),
|
|
226
|
-
a("path", { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" })
|
|
227
|
-
], -1),
|
|
228
|
-
pe(" 换一张 ", -1)
|
|
229
|
-
]), 8, Me),
|
|
230
|
-
a("span", Ee, P(e.serialNo), 1)
|
|
231
|
-
])
|
|
232
|
-
], 2)
|
|
233
|
-
]),
|
|
234
|
-
_: 1
|
|
235
|
-
}, 8, ["modelValue"]);
|
|
236
|
-
};
|
|
204
|
+
ref_key: "thumbRef",
|
|
205
|
+
ref: H,
|
|
206
|
+
class: "captcha-slider-thumb",
|
|
207
|
+
style: M(l(te)),
|
|
208
|
+
onPointerdown: he(le, ["prevent"])
|
|
209
|
+
}, t[2] || (t[2] = [
|
|
210
|
+
a("svg", {
|
|
211
|
+
viewBox: "0 0 24 24",
|
|
212
|
+
width: "20",
|
|
213
|
+
height: "20",
|
|
214
|
+
fill: "none",
|
|
215
|
+
stroke: "currentColor",
|
|
216
|
+
"stroke-width": "2.5"
|
|
217
|
+
}, [
|
|
218
|
+
a("path", { d: "M9 18l6-6-6-6" }),
|
|
219
|
+
a("path", { d: "M4 18l6-6-6-6" })
|
|
220
|
+
], -1)
|
|
221
|
+
]), 36),
|
|
222
|
+
!l(u) && e.status === "idle" && l(d) === 0 ? (L(), W("span", ke, " 向右拖动滑块完成拼图 ")) : A("", !0)
|
|
223
|
+
], 10, Re),
|
|
224
|
+
a("div", Ce, [
|
|
225
|
+
a("button", {
|
|
226
|
+
type: "button",
|
|
227
|
+
class: "captcha-action-btn",
|
|
228
|
+
disabled: e.loading,
|
|
229
|
+
onClick: oe
|
|
230
|
+
}, t[3] || (t[3] = [
|
|
231
|
+
a("svg", {
|
|
232
|
+
viewBox: "0 0 24 24",
|
|
233
|
+
width: "16",
|
|
234
|
+
height: "16",
|
|
235
|
+
fill: "none",
|
|
236
|
+
stroke: "currentColor",
|
|
237
|
+
"stroke-width": "2"
|
|
238
|
+
}, [
|
|
239
|
+
a("path", { d: "M1 4v6h6" }),
|
|
240
|
+
a("path", { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" })
|
|
241
|
+
], -1),
|
|
242
|
+
ge(" 换一张 ", -1)
|
|
243
|
+
]), 8, Pe),
|
|
244
|
+
a("span", Se, $(e.serialNo), 1)
|
|
245
|
+
])
|
|
246
|
+
], 2)
|
|
247
|
+
]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 16, ["modelValue"]));
|
|
237
250
|
}
|
|
238
251
|
});
|
|
239
252
|
export {
|
|
240
|
-
|
|
253
|
+
Te as default
|
|
241
254
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var l=Object.defineProperty;var o=(t,r)=>l(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@element-plus/icons-vue"),s=require("../../../../backTop/index.cjs"),d=require("../../../../bellMessage/index.cjs"),f=require("../../../../breadcrumb/index.cjs"),i=require("../../../../button/index.cjs"),S=require("../../../../captchaVerify/index.cjs"),L=require("../../../../chart/index.cjs"),p=require("../../../../confirm/index.cjs"),q=require("../../../../containerBox/index.cjs"),m=require("../../../../cropper/index.cjs"),b=require("../../../../descriptions/index.cjs"),g=require("../../../../dialog/index.cjs"),v=require("../../../../downloadFile/index.cjs"),P=require("../../../../editor/index.cjs"),c=require("../../../../form/index.cjs"),w=require("../../../../icon/index.cjs"),y=require("../../../../layout/index.cjs"),B=require("../../../../list/index.cjs"),_=require("../../../../live/index.cjs"),O=require("../../../../map/index.cjs"),j=require("../../../../menu/index.cjs"),x=require("../../../../preview_docx/index.cjs"),M=require("../../../../preview_image/index.cjs"),T=require("../../../../preview_pdf/index.cjs"),k=require("../../../../preview_xlsx/index.cjs"),D=require("../../../../print/index.cjs"),F=require("../../../../sliceUpload/index.cjs"),I=require("../../../../table/index.cjs"),C=require("../../../../tooltip/index.cjs"),h=require("../../../../tree/index.cjs"),V=require("../../../../upload/index.cjs");function E(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:o(()=>t[e],"get")})}}return r.default=t,Object.freeze(r)}o(E,"_interopNamespaceDefault");const U=E(a),u={LSButtonGroup:i.LSButtonGroup,LSButton:i.LSButton,LSDescriptions:b.default,LSUpload:V.default,LSForm:c.LSForm,LSFormItem:c.LSFormItem,LSTable:I.default,LSMenu:j.default,LSIcon:w.default,LSConfirm:p.default,LSChart:L.default,LSBreadcrumb:f.default,LSBellMessage:d.default,LSLive:_.default,LSTree:h.default,LSPrint:D.default,LSContainerBox:q.default,LSBackTop:s.default,LSMap:O.default,LSEditor:P.default,LSDialog:g.default,LSLayout:y.default,LSList:B.default,LSPreviewImage:M.default,LSPreviewDocx:x.default,LSPreviewPdf:T.default,LSPreviewXlsx:k.default,LSDownloadFile:v.default,LSSliceUpload:F.default,LSTooltip:C.default,LSCropper:m.default,LSCaptchaVerify:S.default};function G(t){for(const[r,e]of Object.entries(U))t.component(r,e);for(const r of Object.keys(u)){const e=u[r];t.component(e==null?void 0:e.name,e)}}o(G,"install");const z={...u,install:G};exports.default=z;
|
|
@@ -26,8 +26,9 @@ import F from "../../../../preview_image/index.js";
|
|
|
26
26
|
import M from "../../../../preview_pdf/index.js";
|
|
27
27
|
import h from "../../../../preview_xlsx/index.js";
|
|
28
28
|
import j from "../../../../print/index.js";
|
|
29
|
-
import E from "../../../../
|
|
30
|
-
import O from "../../../../
|
|
29
|
+
import E from "../../../../sliceUpload/index.js";
|
|
30
|
+
import O from "../../../../table/index.js";
|
|
31
|
+
import U from "../../../../tooltip/index.js";
|
|
31
32
|
import V from "../../../../tree/index.js";
|
|
32
33
|
import G from "../../../../upload/index.js";
|
|
33
34
|
const t = {
|
|
@@ -37,7 +38,7 @@ const t = {
|
|
|
37
38
|
LSUpload: G,
|
|
38
39
|
LSForm: y,
|
|
39
40
|
LSFormItem: w,
|
|
40
|
-
LSTable:
|
|
41
|
+
LSTable: O,
|
|
41
42
|
LSMenu: T,
|
|
42
43
|
LSIcon: C,
|
|
43
44
|
LSConfirm: l,
|
|
@@ -59,11 +60,12 @@ const t = {
|
|
|
59
60
|
LSPreviewPdf: M,
|
|
60
61
|
LSPreviewXlsx: h,
|
|
61
62
|
LSDownloadFile: b,
|
|
62
|
-
|
|
63
|
+
LSSliceUpload: E,
|
|
64
|
+
LSTooltip: U,
|
|
63
65
|
LSCropper: P,
|
|
64
66
|
LSCaptchaVerify: a
|
|
65
67
|
};
|
|
66
|
-
function
|
|
68
|
+
function W(m) {
|
|
67
69
|
for (const [r, o] of Object.entries(p))
|
|
68
70
|
m.component(r, o);
|
|
69
71
|
for (const r of Object.keys(t)) {
|
|
@@ -71,11 +73,11 @@ function U(m) {
|
|
|
71
73
|
m.component(o == null ? void 0 : o.name, o);
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
|
-
i(
|
|
75
|
-
const
|
|
76
|
+
i(W, "install");
|
|
77
|
+
const Bo = {
|
|
76
78
|
...t,
|
|
77
|
-
install:
|
|
79
|
+
install: W
|
|
78
80
|
};
|
|
79
81
|
export {
|
|
80
|
-
|
|
82
|
+
Bo as default
|
|
81
83
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=/* empty css */u=t.default(e.default,[["__scopeId","data-v-d0c4aaaa"]]);exports.default=u;
|