geekin-devtoys 0.2.12 → 0.2.14-t1
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/GPie3D/index.js +1 -1
- package/lib/GPie3D/index.mjs +215 -159
- package/lib/GPie3D/style.css +1 -0
- package/lib/components/GPie3D/index.d.ts +16 -0
- package/lib/components/GProgress/index.d.ts +5 -4
- package/lib/components/GScreen/index.d.ts +4 -4
- package/lib/components/GTable/index.d.ts +4 -3
- package/lib/index/index.js +1 -1
- package/lib/index/index.mjs +22 -19
- package/lib/index.d.ts +2 -1
- package/package.json +1 -1
- package/lib/assets/GPie3D.css +0 -1
package/lib/GPie3D/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("vue"),ut=require("../_plugin-vue_export-helper-BHFhmbuH.js"),pt={class:"g-pie3d-tooltip__default"},vt={class:"g-pie3d-tooltip__name"},gt={class:"g-pie3d-tooltip__value"},yt=260,mt=h.defineComponent({__name:"index",props:{data:{default:()=>[]},config:{default:()=>({})},animation:{type:Boolean,default:!0}},emits:["slice-click"],setup(z,{emit:nt}){const P=z,at=nt,V={alpha:55,depth:26,startAngle:0,colors:["#22d3ee","#3b82f6","#8b5cf6","#06b6d4","#0ea5e9","#a855f7","#14b8a6"],textColor:"#cbd5e1",radiusRatio:.55,hoverDistance:14,showLabel:!0,showPercent:!0,labelFontSize:12,opacity:.7,showAura:!0,glowColor:"",labelLineColor:"auto",labelLineWidth:1},a={...V,...P.config},R=h.ref(null),T=h.ref(null);let E=null,C=0,_=0,L=1,p=0,u=0,v=0,x=0,M=[],$=P.animation?0:1,Y=null,N=P.animation,k=null,X=0;const B=h.ref(-1),D=h.ref(!1),U=h.ref(0),J=h.ref(0),I=h.ref(null),q=h.ref(0),K=t=>t*Math.PI/180,O=(t,l=0,n=0)=>({x:p+l+v*Math.cos(t),y:u+n+x*Math.sin(t)}),j=(t,l=0,n=0)=>({x:p+l+v*Math.cos(t),y:u+n+x*Math.sin(t)+a.depth}),F=()=>{if(!T.value||!R.value)return;const t=R.value,l=T.value;L=window.devicePixelRatio||1,C=t.clientWidth,_=t.clientHeight,l.width=C*L,l.height=_*L,l.style.width=C+"px",l.style.height=_+"px",E=l.getContext("2d"),E&&E.setTransform(L,0,0,L,0,0),p=C/2,u=_/2-a.depth/2;const n=a.showLabel?60:10,s=Math.min(C,_-a.depth-n)/2*a.radiusRatio*1.6;v=Math.max(20,s),x=v*Math.cos(K(a.alpha)),lt(),N?st():G()},lt=()=>{M=[];const t=P.data.reduce((n,s)=>n+(s.value||0),0);if(t<=0)return;let l=-Math.PI/2+K(a.startAngle);P.data.forEach((n,s)=>{const i=n.value/t,d=i*Math.PI*2;M.push({data:n,index:s,color:n.color||a.colors[s%a.colors.length],startA:l,endA:l+d,midA:l+d/2,percent:i,hover:!1,hoverProgress:0}),l+=d})},st=()=>{$=0;const t=800,l=performance.now(),n=s=>{const i=Math.min(1,(s-l)/t);$=1-Math.pow(1-i,3),G(),i<1?Y=requestAnimationFrame(n):(N=!1,Y=null)};Y=requestAnimationFrame(n)},it=t=>1-Math.pow(1-t,3),Q=t=>{const l=X===0?16:t-X;X=t;const n=l/yt;let s=!1;for(const i of M){const d=i.hover?1:0;if(i.hoverProgress===d)continue;const e=d>i.hoverProgress?1:-1;i.hoverProgress+=e*n,(e>0&&i.hoverProgress>=d||e<0&&i.hoverProgress<=d)&&(i.hoverProgress=d),i.hoverProgress!==d&&(s=!0)}G(),s?k=requestAnimationFrame(Q):(k=null,X=0)},Z=()=>{k==null&&(X=0,k=requestAnimationFrame(Q))},S=(t,l)=>{let n=t.replace("#","");n.length===3&&(n=n.split("").map(e=>e+e).join(""));const s=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),d=parseInt(n.slice(4,6),16);return`rgba(${s},${i},${d},${l})`},G=()=>{if(!E)return;const t=E;if(t.clearRect(0,0,C,_),!M.length)return;const l=M[0]?.startA??0,n=Math.PI*2*$,s=l+n,i=M.map(e=>{const r=e.startA,f=Math.min(e.endA,s),y=f>r,g=it(Math.max(0,Math.min(1,e.hoverProgress))),w=Math.cos(e.midA)*a.hoverDistance*g,b=Math.sin(e.midA)*a.hoverDistance*g;return{...e,startA:r,endA:f,valid:y,ox:w,oy:b,hp:g}});if(a.showAura){const e=t.createRadialGradient(p,u+a.depth,v*.1,p,u+a.depth,v*1.5);e.addColorStop(0,"rgba(6,182,212,0.15)"),e.addColorStop(.4,"rgba(59,130,246,0.08)"),e.addColorStop(.8,"rgba(139,92,246,0.03)"),e.addColorStop(1,"rgba(0,0,0,0)"),t.beginPath(),t.ellipse(p,u+a.depth,v*1.5,x*.9,0,0,Math.PI*2),t.fillStyle=e,t.fill(),t.strokeStyle="rgba(56,189,248,0.08)",t.lineWidth=1;for(let r=3;r>=1;r--){const f=v*(.3+r*.25);t.beginPath(),t.ellipse(p,u+a.depth,f,f*(x/v),0,0,Math.PI*2),t.stroke()}}const d=Math.PI/120;for(const e of i){if(!e.valid)continue;let r=e.startA;const f=a.glowColor||e.color;for(;r<e.endA;){const y=Math.min(r+d,e.endA),g=(r+y)/2;if(Math.sin(g)>0){const w=O(r,e.ox,e.oy),b=O(y,e.ox,e.oy),o=j(y,e.ox,e.oy),m=j(r,e.ox,e.oy);t.fillStyle=S(f,a.opacity*.4),t.beginPath(),t.moveTo(w.x,w.y),t.lineTo(b.x,b.y),t.lineTo(o.x,o.y),t.lineTo(m.x,m.y),t.closePath(),t.fill(),t.strokeStyle=S(f,.7),t.lineWidth=.8,t.beginPath(),t.moveTo(m.x,m.y),t.lineTo(o.x,o.y),t.stroke()}r=y}}for(const e of i){if(!e.valid)continue;const r=[];Math.sin(e.startA)>.001&&r.push({a:e.startA}),Math.sin(e.endA)>.001&&r.push({a:e.endA});const f=a.glowColor||e.color;for(const y of r){const g={x:p+e.ox,y:u+e.oy},w={x:g.x,y:g.y+a.depth},b=O(y.a,e.ox,e.oy),o=j(y.a,e.ox,e.oy);t.fillStyle=S(f,a.opacity*.5),t.beginPath(),t.moveTo(g.x,g.y),t.lineTo(b.x,b.y),t.lineTo(o.x,o.y),t.lineTo(w.x,w.y),t.closePath(),t.fill(),t.strokeStyle=S(f,.8),t.lineWidth=.8,t.beginPath(),t.moveTo(b.x,b.y),t.lineTo(o.x,o.y),t.stroke()}}for(const e of i){if(!e.valid)continue;const r=a.glowColor||e.color;e.hp>.01&&(t.save(),t.shadowColor=r,t.shadowBlur=12*e.hp,t.beginPath(),t.moveTo(p+e.ox,u+e.oy),t.ellipse(p+e.ox,u+e.oy,v,x,0,e.startA,e.endA),t.closePath(),t.fillStyle=S(r,.08*e.hp),t.fill(),t.restore()),t.beginPath(),t.moveTo(p+e.ox,u+e.oy),t.ellipse(p+e.ox,u+e.oy,v,x,0,e.startA,e.endA),t.closePath();const f=t.createRadialGradient(p+e.ox-v*.2,u+e.oy-x*.2,0,p+e.ox,u+e.oy,v*1.05);f.addColorStop(0,S(r,a.opacity*.95)),f.addColorStop(.6,S(r,a.opacity*.8)),f.addColorStop(1,S(r,a.opacity*.6)),t.fillStyle=f,t.fill(),t.strokeStyle=S(r,.95),t.lineWidth=.8+.6*e.hp,t.stroke()}if(a.showLabel&&$>=.999){t.font=`${a.labelFontSize}px Arial, sans-serif`,t.textBaseline="middle";const e=[],r=[],f=a.labelFontSize+6,y=14,g=4;for(const o of i){if(!o.valid)continue;const m=Math.cos(o.midA)>=0,A=p+o.ox+v*1.02*Math.cos(o.midA),c=u+o.oy+x*1.02*Math.sin(o.midA),H=u+o.oy+x*1.18*Math.sin(o.midA),ht=a.showPercent?`${o.data.name} ${(o.percent*100).toFixed(1)}%`:`${o.data.name}`,dt=!a.labelLineColor||a.labelLineColor==="auto"?a.glowColor||o.color:a.labelLineColor,ft={slice:o,text:ht,isRight:m,anchorX:A,anchorY:c,targetY:H,y:H,color:dt};(m?r:e).push(ft)}const w=o=>{if(!o.length)return;o.sort((c,H)=>c.targetY-H.targetY);const m=g+a.labelFontSize/2,A=_-g-a.labelFontSize/2;for(let c=0;c<o.length;c++)c===0?o[c].y=Math.max(m,o[c].targetY):o[c].y=Math.max(o[c].targetY,o[c-1].y+f);if(o[o.length-1].y>A){o[o.length-1].y=A;for(let c=o.length-2;c>=0;c--)o[c].y>o[c+1].y-f&&(o[c].y=o[c+1].y-f)}for(let c=0;c<o.length;c++)o[c].y<m&&(o[c].y=m)};w(e),w(r),t.lineWidth=a.labelLineWidth;const b=[...e,...r];for(const o of b){const m=t.measureText(o.text).width;let A;if(o.isRight){const c=Math.min(Math.max(o.anchorX+6,o.anchorX+Math.abs(o.targetY-o.y)*.2+6),C-g-m-y);A=c+y,t.strokeStyle=o.color,t.beginPath(),t.moveTo(o.anchorX,o.anchorY),t.lineTo(c,o.y),t.lineTo(A,o.y),t.stroke(),t.fillStyle=a.textColor,t.textAlign="left",t.fillText(o.text,A+2,o.y)}else{const c=Math.max(Math.min(o.anchorX-6,o.anchorX-Math.abs(o.targetY-o.y)*.2-6),g+m+y);A=c-y,t.strokeStyle=o.color,t.beginPath(),t.moveTo(o.anchorX,o.anchorY),t.lineTo(c,o.y),t.lineTo(A,o.y),t.stroke(),t.fillStyle=a.textColor,t.textAlign="right",t.fillText(o.text,A-2,o.y)}}}},tt=(t,l)=>{for(let n=0;n<M.length;n++){const s=M[n],i=(t-p)/v,d=(l-u)/x;if(i*i+d*d>1)continue;let e=Math.atan2((l-u)/x,(t-p)/v);for(;e<s.startA;)e+=Math.PI*2;for(;e>s.startA+Math.PI*2;)e-=Math.PI*2;if(e>=s.startA&&e<=s.endA)return n}return-1},et=t=>{const l=T.value,n=l.getBoundingClientRect(),s=n.width/(l.clientWidth||n.width)||1,i=n.height/(l.clientHeight||n.height)||1;return{mx:(t.clientX-n.left)/s,my:(t.clientY-n.top)/i}},rt=t=>{if(!T.value)return;const{mx:l,my:n}=et(t),s=tt(l,n);if(s!==B.value&&(B.value=s,M.forEach((i,d)=>i.hover=d===s),Z()),s>=0){const i=M[s];D.value=!0,I.value=i.data,q.value=i.percent;const d=R.value?.clientWidth||0,e=R.value?.clientHeight||0,r=Math.min(l+12,d-140),f=Math.min(n+12,e-60);U.value=Math.max(0,r),J.value=Math.max(0,f)}else D.value=!1,I.value=null},ct=()=>{B.value!==-1&&(B.value=-1,M.forEach(t=>t.hover=!1),Z()),D.value=!1,I.value=null},ot=t=>{if(!T.value)return;const{mx:l,my:n}=et(t),s=tt(l,n);s>=0&&at("slice-click",M[s].data,s)};return h.watch(()=>P.data,()=>{Object.assign(a,V,P.config),N=P.animation,F()},{deep:!0}),h.watch(()=>P.config,()=>{Object.assign(a,V,P.config),F()},{deep:!0}),h.onMounted(()=>{F(),window.addEventListener("resize",F),T.value?.addEventListener("click",ot)}),h.onUnmounted(()=>{window.removeEventListener("resize",F),T.value?.removeEventListener("click",ot),Y&&cancelAnimationFrame(Y),k&&cancelAnimationFrame(k)}),(t,l)=>(h.openBlock(),h.createElementBlock("div",{class:"g-pie3d-container",ref_key:"containerRef",ref:R},[h.createElementVNode("canvas",{ref_key:"canvasRef",ref:T,onMousemove:rt,onMouseleave:ct},null,544),D.value?(h.openBlock(),h.createElementBlock("div",{key:0,class:"g-pie3d-tooltip",style:h.normalizeStyle({left:`${U.value}px`,top:`${J.value}px`})},[h.renderSlot(t.$slots,"tooltip",{data:I.value,percent:q.value},()=>[h.createElementVNode("div",pt,[h.createElementVNode("p",vt,h.toDisplayString(I.value?.name),1),h.createElementVNode("p",gt,h.toDisplayString(I.value?.value)+" ("+h.toDisplayString((q.value*100).toFixed(1))+"%) ",1)])],!0)],4)):h.createCommentVNode("",!0)],512))}}),W=ut._export_sfc(mt,[["__scopeId","data-v-16239a65"]]);W.install=z=>{z.component(W.name,W)};exports.GPie3D=W;exports.default=W;
|
package/lib/GPie3D/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as mt, ref as T, watch as lt, onMounted as xt, onUnmounted as Mt, createElementBlock as st, openBlock as it, createElementVNode as H, createCommentVNode as bt, normalizeStyle as At, renderSlot as Pt, toDisplayString as U } from "vue";
|
|
2
|
+
import { _ as wt } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const St = { class: "g-pie3d-tooltip__default" }, Tt = { class: "g-pie3d-tooltip__name" }, Ct = { class: "g-pie3d-tooltip__value" }, _t = 260, kt = /* @__PURE__ */ mt({
|
|
4
4
|
__name: "index",
|
|
5
5
|
props: {
|
|
6
6
|
data: { default: () => [] },
|
|
@@ -8,8 +8,8 @@ const pt = { class: "g-pie3d-tooltip__default" }, ft = { class: "g-pie3d-tooltip
|
|
|
8
8
|
animation: { type: Boolean, default: !0 }
|
|
9
9
|
},
|
|
10
10
|
emits: ["slice-click"],
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(D, { emit: rt }) {
|
|
12
|
+
const A = D, ct = rt, O = {
|
|
13
13
|
alpha: 55,
|
|
14
14
|
depth: 26,
|
|
15
15
|
startAngle: 0,
|
|
@@ -22,206 +22,262 @@ const pt = { class: "g-pie3d-tooltip__default" }, ft = { class: "g-pie3d-tooltip
|
|
|
22
22
|
labelFontSize: 12,
|
|
23
23
|
opacity: 0.7,
|
|
24
24
|
showAura: !0,
|
|
25
|
-
glowColor: ""
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
glowColor: "",
|
|
26
|
+
labelLineColor: "auto",
|
|
27
|
+
labelLineWidth: 1
|
|
28
|
+
}, a = { ...O, ...A.config }, R = T(null), S = T(null);
|
|
29
|
+
let L = null, C = 0, _ = 0, Y = 1, u = 0, f = 0, p = 0, m = 0, x = [], W = A.animation ? 0 : 1, X = null, q = A.animation, k = null, F = 0;
|
|
30
|
+
const $ = T(-1), z = T(!1), K = T(0), Q = T(0), I = T(null), N = T(0), Z = (t) => t * Math.PI / 180, V = (t, l = 0, n = 0) => ({
|
|
31
|
+
x: u + l + p * Math.cos(t),
|
|
32
|
+
y: f + n + m * Math.sin(t)
|
|
33
|
+
}), j = (t, l = 0, n = 0) => ({
|
|
34
|
+
x: u + l + p * Math.cos(t),
|
|
35
|
+
y: f + n + m * Math.sin(t) + a.depth
|
|
36
|
+
}), E = () => {
|
|
37
|
+
if (!S.value || !R.value) return;
|
|
38
|
+
const t = R.value, l = S.value;
|
|
39
|
+
Y = window.devicePixelRatio || 1, C = t.clientWidth, _ = t.clientHeight, l.width = C * Y, l.height = _ * Y, l.style.width = C + "px", l.style.height = _ + "px", L = l.getContext("2d"), L && L.setTransform(Y, 0, 0, Y, 0, 0), u = C / 2, f = _ / 2 - a.depth / 2;
|
|
40
|
+
const n = a.showLabel ? 60 : 10, s = Math.min(C, _ - a.depth - n) / 2 * a.radiusRatio * 1.6;
|
|
41
|
+
p = Math.max(20, s), m = p * Math.cos(Z(a.alpha)), ht(), q ? dt() : G();
|
|
42
|
+
}, ht = () => {
|
|
43
|
+
x = [];
|
|
44
|
+
const t = A.data.reduce((n, s) => n + (s.value || 0), 0);
|
|
43
45
|
if (t <= 0) return;
|
|
44
|
-
let
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
data:
|
|
46
|
+
let l = -Math.PI / 2 + Z(a.startAngle);
|
|
47
|
+
A.data.forEach((n, s) => {
|
|
48
|
+
const i = n.value / t, h = i * Math.PI * 2;
|
|
49
|
+
x.push({
|
|
50
|
+
data: n,
|
|
49
51
|
index: s,
|
|
50
|
-
color:
|
|
51
|
-
startA:
|
|
52
|
-
endA:
|
|
53
|
-
midA:
|
|
54
|
-
percent:
|
|
55
|
-
hover: !1
|
|
56
|
-
|
|
52
|
+
color: n.color || a.colors[s % a.colors.length],
|
|
53
|
+
startA: l,
|
|
54
|
+
endA: l + h,
|
|
55
|
+
midA: l + h / 2,
|
|
56
|
+
percent: i,
|
|
57
|
+
hover: !1,
|
|
58
|
+
hoverProgress: 0
|
|
59
|
+
}), l += h;
|
|
57
60
|
});
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
const t = 800,
|
|
61
|
-
const
|
|
62
|
-
|
|
61
|
+
}, dt = () => {
|
|
62
|
+
W = 0;
|
|
63
|
+
const t = 800, l = performance.now(), n = (s) => {
|
|
64
|
+
const i = Math.min(1, (s - l) / t);
|
|
65
|
+
W = 1 - Math.pow(1 - i, 3), G(), i < 1 ? X = requestAnimationFrame(n) : (q = !1, X = null);
|
|
63
66
|
};
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
X = requestAnimationFrame(n);
|
|
68
|
+
}, ft = (t) => 1 - Math.pow(1 - t, 3), tt = (t) => {
|
|
69
|
+
const l = F === 0 ? 16 : t - F;
|
|
70
|
+
F = t;
|
|
71
|
+
const n = l / _t;
|
|
72
|
+
let s = !1;
|
|
73
|
+
for (const i of x) {
|
|
74
|
+
const h = i.hover ? 1 : 0;
|
|
75
|
+
if (i.hoverProgress === h) continue;
|
|
76
|
+
const e = h > i.hoverProgress ? 1 : -1;
|
|
77
|
+
i.hoverProgress += e * n, (e > 0 && i.hoverProgress >= h || e < 0 && i.hoverProgress <= h) && (i.hoverProgress = h), i.hoverProgress !== h && (s = !0);
|
|
78
|
+
}
|
|
79
|
+
G(), s ? k = requestAnimationFrame(tt) : (k = null, F = 0);
|
|
80
|
+
}, et = () => {
|
|
81
|
+
k == null && (F = 0, k = requestAnimationFrame(tt));
|
|
82
|
+
}, w = (t, l) => {
|
|
83
|
+
let n = t.replace("#", "");
|
|
84
|
+
n.length === 3 && (n = n.split("").map((e) => e + e).join(""));
|
|
85
|
+
const s = parseInt(n.slice(0, 2), 16), i = parseInt(n.slice(2, 4), 16), h = parseInt(n.slice(4, 6), 16);
|
|
86
|
+
return `rgba(${s},${i},${h},${l})`;
|
|
87
|
+
}, G = () => {
|
|
88
|
+
if (!L) return;
|
|
89
|
+
const t = L;
|
|
90
|
+
if (t.clearRect(0, 0, C, _), !x.length) return;
|
|
91
|
+
const l = x[0]?.startA ?? 0, n = Math.PI * 2 * W, s = l + n, i = x.map((e) => {
|
|
92
|
+
const r = e.startA, d = Math.min(e.endA, s), g = d > r, v = ft(Math.max(0, Math.min(1, e.hoverProgress))), P = Math.cos(e.midA) * a.hoverDistance * v, M = Math.sin(e.midA) * a.hoverDistance * v;
|
|
93
|
+
return { ...e, startA: r, endA: d, valid: g, ox: P, oy: M, hp: v };
|
|
77
94
|
});
|
|
78
|
-
if (
|
|
95
|
+
if (a.showAura) {
|
|
79
96
|
const e = t.createRadialGradient(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
u,
|
|
98
|
+
f + a.depth,
|
|
99
|
+
p * 0.1,
|
|
100
|
+
u,
|
|
101
|
+
f + a.depth,
|
|
102
|
+
p * 1.5
|
|
86
103
|
);
|
|
87
|
-
e.addColorStop(0, "rgba(6,182,212,0.15)"), e.addColorStop(0.4, "rgba(59,130,246,0.08)"), e.addColorStop(0.8, "rgba(139,92,246,0.03)"), e.addColorStop(1, "rgba(0,0,0,0)"), t.beginPath(), t.ellipse(
|
|
88
|
-
for (let
|
|
89
|
-
const
|
|
90
|
-
t.beginPath(), t.ellipse(
|
|
104
|
+
e.addColorStop(0, "rgba(6,182,212,0.15)"), e.addColorStop(0.4, "rgba(59,130,246,0.08)"), e.addColorStop(0.8, "rgba(139,92,246,0.03)"), e.addColorStop(1, "rgba(0,0,0,0)"), t.beginPath(), t.ellipse(u, f + a.depth, p * 1.5, m * 0.9, 0, 0, Math.PI * 2), t.fillStyle = e, t.fill(), t.strokeStyle = "rgba(56,189,248,0.08)", t.lineWidth = 1;
|
|
105
|
+
for (let r = 3; r >= 1; r--) {
|
|
106
|
+
const d = p * (0.3 + r * 0.25);
|
|
107
|
+
t.beginPath(), t.ellipse(u, f + a.depth, d, d * (m / p), 0, 0, Math.PI * 2), t.stroke();
|
|
91
108
|
}
|
|
92
109
|
}
|
|
93
|
-
const
|
|
94
|
-
for (const e of
|
|
110
|
+
const h = Math.PI / 120;
|
|
111
|
+
for (const e of i) {
|
|
95
112
|
if (!e.valid) continue;
|
|
96
|
-
let
|
|
97
|
-
const
|
|
98
|
-
for (;
|
|
99
|
-
const
|
|
100
|
-
if (Math.sin(
|
|
101
|
-
const
|
|
102
|
-
t.fillStyle =
|
|
113
|
+
let r = e.startA;
|
|
114
|
+
const d = a.glowColor || e.color;
|
|
115
|
+
for (; r < e.endA; ) {
|
|
116
|
+
const g = Math.min(r + h, e.endA), v = (r + g) / 2;
|
|
117
|
+
if (Math.sin(v) > 0) {
|
|
118
|
+
const P = V(r, e.ox, e.oy), M = V(g, e.ox, e.oy), o = j(g, e.ox, e.oy), y = j(r, e.ox, e.oy);
|
|
119
|
+
t.fillStyle = w(d, a.opacity * 0.4), t.beginPath(), t.moveTo(P.x, P.y), t.lineTo(M.x, M.y), t.lineTo(o.x, o.y), t.lineTo(y.x, y.y), t.closePath(), t.fill(), t.strokeStyle = w(d, 0.7), t.lineWidth = 0.8, t.beginPath(), t.moveTo(y.x, y.y), t.lineTo(o.x, o.y), t.stroke();
|
|
103
120
|
}
|
|
104
|
-
|
|
121
|
+
r = g;
|
|
105
122
|
}
|
|
106
123
|
}
|
|
107
|
-
for (const e of
|
|
124
|
+
for (const e of i) {
|
|
108
125
|
if (!e.valid) continue;
|
|
109
|
-
const
|
|
110
|
-
Math.sin(e.startA) > 1e-3 &&
|
|
111
|
-
const
|
|
112
|
-
for (const
|
|
113
|
-
const
|
|
114
|
-
t.fillStyle =
|
|
126
|
+
const r = [];
|
|
127
|
+
Math.sin(e.startA) > 1e-3 && r.push({ a: e.startA }), Math.sin(e.endA) > 1e-3 && r.push({ a: e.endA });
|
|
128
|
+
const d = a.glowColor || e.color;
|
|
129
|
+
for (const g of r) {
|
|
130
|
+
const v = { x: u + e.ox, y: f + e.oy }, P = { x: v.x, y: v.y + a.depth }, M = V(g.a, e.ox, e.oy), o = j(g.a, e.ox, e.oy);
|
|
131
|
+
t.fillStyle = w(d, a.opacity * 0.5), t.beginPath(), t.moveTo(v.x, v.y), t.lineTo(M.x, M.y), t.lineTo(o.x, o.y), t.lineTo(P.x, P.y), t.closePath(), t.fill(), t.strokeStyle = w(d, 0.8), t.lineWidth = 0.8, t.beginPath(), t.moveTo(M.x, M.y), t.lineTo(o.x, o.y), t.stroke();
|
|
115
132
|
}
|
|
116
133
|
}
|
|
117
|
-
for (const e of
|
|
134
|
+
for (const e of i) {
|
|
118
135
|
if (!e.valid) continue;
|
|
119
|
-
const
|
|
120
|
-
e.
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
136
|
+
const r = a.glowColor || e.color;
|
|
137
|
+
e.hp > 0.01 && (t.save(), t.shadowColor = r, t.shadowBlur = 12 * e.hp, t.beginPath(), t.moveTo(u + e.ox, f + e.oy), t.ellipse(u + e.ox, f + e.oy, p, m, 0, e.startA, e.endA), t.closePath(), t.fillStyle = w(r, 0.08 * e.hp), t.fill(), t.restore()), t.beginPath(), t.moveTo(u + e.ox, f + e.oy), t.ellipse(u + e.ox, f + e.oy, p, m, 0, e.startA, e.endA), t.closePath();
|
|
138
|
+
const d = t.createRadialGradient(
|
|
139
|
+
u + e.ox - p * 0.2,
|
|
140
|
+
f + e.oy - m * 0.2,
|
|
124
141
|
0,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
142
|
+
u + e.ox,
|
|
143
|
+
f + e.oy,
|
|
144
|
+
p * 1.05
|
|
128
145
|
);
|
|
129
|
-
|
|
146
|
+
d.addColorStop(0, w(r, a.opacity * 0.95)), d.addColorStop(0.6, w(r, a.opacity * 0.8)), d.addColorStop(1, w(r, a.opacity * 0.6)), t.fillStyle = d, t.fill(), t.strokeStyle = w(r, 0.95), t.lineWidth = 0.8 + 0.6 * e.hp, t.stroke();
|
|
130
147
|
}
|
|
131
|
-
if (
|
|
132
|
-
t.font = `${
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
148
|
+
if (a.showLabel && W >= 0.999) {
|
|
149
|
+
t.font = `${a.labelFontSize}px Arial, sans-serif`, t.textBaseline = "middle";
|
|
150
|
+
const e = [], r = [], d = a.labelFontSize + 6, g = 14, v = 4;
|
|
151
|
+
for (const o of i) {
|
|
152
|
+
if (!o.valid) continue;
|
|
153
|
+
const y = Math.cos(o.midA) >= 0, b = u + o.ox + p * 1.02 * Math.cos(o.midA), c = f + o.oy + m * 1.02 * Math.sin(o.midA), B = f + o.oy + m * 1.18 * Math.sin(o.midA), vt = a.showPercent ? `${o.data.name} ${(o.percent * 100).toFixed(1)}%` : `${o.data.name}`, gt = !a.labelLineColor || a.labelLineColor === "auto" ? a.glowColor || o.color : a.labelLineColor, yt = {
|
|
154
|
+
slice: o,
|
|
155
|
+
text: vt,
|
|
156
|
+
isRight: y,
|
|
157
|
+
anchorX: b,
|
|
158
|
+
anchorY: c,
|
|
159
|
+
targetY: B,
|
|
160
|
+
y: B,
|
|
161
|
+
color: gt
|
|
143
162
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
(y ? r : e).push(yt);
|
|
164
|
+
}
|
|
165
|
+
const P = (o) => {
|
|
166
|
+
if (!o.length) return;
|
|
167
|
+
o.sort((c, B) => c.targetY - B.targetY);
|
|
168
|
+
const y = v + a.labelFontSize / 2, b = _ - v - a.labelFontSize / 2;
|
|
169
|
+
for (let c = 0; c < o.length; c++)
|
|
170
|
+
c === 0 ? o[c].y = Math.max(y, o[c].targetY) : o[c].y = Math.max(o[c].targetY, o[c - 1].y + d);
|
|
171
|
+
if (o[o.length - 1].y > b) {
|
|
172
|
+
o[o.length - 1].y = b;
|
|
173
|
+
for (let c = o.length - 2; c >= 0; c--)
|
|
174
|
+
o[c].y > o[c + 1].y - d && (o[c].y = o[c + 1].y - d);
|
|
175
|
+
}
|
|
176
|
+
for (let c = 0; c < o.length; c++)
|
|
177
|
+
o[c].y < y && (o[c].y = y);
|
|
178
|
+
};
|
|
179
|
+
P(e), P(r), t.lineWidth = a.labelLineWidth;
|
|
180
|
+
const M = [...e, ...r];
|
|
181
|
+
for (const o of M) {
|
|
182
|
+
const y = t.measureText(o.text).width;
|
|
183
|
+
let b;
|
|
184
|
+
if (o.isRight) {
|
|
185
|
+
const c = Math.min(
|
|
186
|
+
Math.max(o.anchorX + 6, o.anchorX + Math.abs(o.targetY - o.y) * 0.2 + 6),
|
|
187
|
+
C - v - y - g
|
|
188
|
+
);
|
|
189
|
+
b = c + g, t.strokeStyle = o.color, t.beginPath(), t.moveTo(o.anchorX, o.anchorY), t.lineTo(c, o.y), t.lineTo(b, o.y), t.stroke(), t.fillStyle = a.textColor, t.textAlign = "left", t.fillText(o.text, b + 2, o.y);
|
|
190
|
+
} else {
|
|
191
|
+
const c = Math.max(
|
|
192
|
+
Math.min(o.anchorX - 6, o.anchorX - Math.abs(o.targetY - o.y) * 0.2 - 6),
|
|
193
|
+
v + y + g
|
|
194
|
+
);
|
|
195
|
+
b = c - g, t.strokeStyle = o.color, t.beginPath(), t.moveTo(o.anchorX, o.anchorY), t.lineTo(c, o.y), t.lineTo(b, o.y), t.stroke(), t.fillStyle = a.textColor, t.textAlign = "right", t.fillText(o.text, b - 2, o.y);
|
|
196
|
+
}
|
|
147
197
|
}
|
|
148
198
|
}
|
|
149
|
-
},
|
|
150
|
-
for (let
|
|
151
|
-
const s =
|
|
152
|
-
if (
|
|
153
|
-
let
|
|
154
|
-
for (;
|
|
155
|
-
for (;
|
|
156
|
-
if (
|
|
199
|
+
}, ot = (t, l) => {
|
|
200
|
+
for (let n = 0; n < x.length; n++) {
|
|
201
|
+
const s = x[n], i = (t - u) / p, h = (l - f) / m;
|
|
202
|
+
if (i * i + h * h > 1) continue;
|
|
203
|
+
let e = Math.atan2((l - f) / m, (t - u) / p);
|
|
204
|
+
for (; e < s.startA; ) e += Math.PI * 2;
|
|
205
|
+
for (; e > s.startA + Math.PI * 2; ) e -= Math.PI * 2;
|
|
206
|
+
if (e >= s.startA && e <= s.endA) return n;
|
|
157
207
|
}
|
|
158
208
|
return -1;
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
209
|
+
}, nt = (t) => {
|
|
210
|
+
const l = S.value, n = l.getBoundingClientRect(), s = n.width / (l.clientWidth || n.width) || 1, i = n.height / (l.clientHeight || n.height) || 1;
|
|
211
|
+
return {
|
|
212
|
+
mx: (t.clientX - n.left) / s,
|
|
213
|
+
my: (t.clientY - n.top) / i
|
|
214
|
+
};
|
|
215
|
+
}, ut = (t) => {
|
|
216
|
+
if (!S.value) return;
|
|
217
|
+
const { mx: l, my: n } = nt(t), s = ot(l, n);
|
|
218
|
+
if (s !== $.value && ($.value = s, x.forEach((i, h) => i.hover = h === s), et()), s >= 0) {
|
|
219
|
+
const i = x[s];
|
|
220
|
+
z.value = !0, I.value = i.data, N.value = i.percent;
|
|
221
|
+
const h = R.value?.clientWidth || 0, e = R.value?.clientHeight || 0, r = Math.min(l + 12, h - 140), d = Math.min(n + 12, e - 60);
|
|
222
|
+
K.value = Math.max(0, r), Q.value = Math.max(0, d);
|
|
167
223
|
} else
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
$.value !== -1 && ($.value = -1,
|
|
171
|
-
},
|
|
172
|
-
if (!
|
|
173
|
-
const
|
|
174
|
-
|
|
224
|
+
z.value = !1, I.value = null;
|
|
225
|
+
}, pt = () => {
|
|
226
|
+
$.value !== -1 && ($.value = -1, x.forEach((t) => t.hover = !1), et()), z.value = !1, I.value = null;
|
|
227
|
+
}, at = (t) => {
|
|
228
|
+
if (!S.value) return;
|
|
229
|
+
const { mx: l, my: n } = nt(t), s = ot(l, n);
|
|
230
|
+
s >= 0 && ct("slice-click", x[s].data, s);
|
|
175
231
|
};
|
|
176
|
-
return
|
|
177
|
-
() =>
|
|
232
|
+
return lt(
|
|
233
|
+
() => A.data,
|
|
178
234
|
() => {
|
|
179
|
-
Object.assign(
|
|
235
|
+
Object.assign(a, O, A.config), q = A.animation, E();
|
|
180
236
|
},
|
|
181
237
|
{ deep: !0 }
|
|
182
|
-
),
|
|
183
|
-
() =>
|
|
238
|
+
), lt(
|
|
239
|
+
() => A.config,
|
|
184
240
|
() => {
|
|
185
|
-
Object.assign(
|
|
241
|
+
Object.assign(a, O, A.config), E();
|
|
186
242
|
},
|
|
187
243
|
{ deep: !0 }
|
|
188
|
-
),
|
|
189
|
-
|
|
190
|
-
}),
|
|
191
|
-
window.removeEventListener("resize",
|
|
192
|
-
}), (t,
|
|
244
|
+
), xt(() => {
|
|
245
|
+
E(), window.addEventListener("resize", E), S.value?.addEventListener("click", at);
|
|
246
|
+
}), Mt(() => {
|
|
247
|
+
window.removeEventListener("resize", E), S.value?.removeEventListener("click", at), X && cancelAnimationFrame(X), k && cancelAnimationFrame(k);
|
|
248
|
+
}), (t, l) => (it(), st("div", {
|
|
193
249
|
class: "g-pie3d-container",
|
|
194
250
|
ref_key: "containerRef",
|
|
195
|
-
ref:
|
|
251
|
+
ref: R
|
|
196
252
|
}, [
|
|
197
|
-
|
|
253
|
+
H("canvas", {
|
|
198
254
|
ref_key: "canvasRef",
|
|
199
|
-
ref:
|
|
200
|
-
onMousemove:
|
|
201
|
-
onMouseleave:
|
|
255
|
+
ref: S,
|
|
256
|
+
onMousemove: ut,
|
|
257
|
+
onMouseleave: pt
|
|
202
258
|
}, null, 544),
|
|
203
|
-
|
|
259
|
+
z.value ? (it(), st("div", {
|
|
204
260
|
key: 0,
|
|
205
261
|
class: "g-pie3d-tooltip",
|
|
206
|
-
style:
|
|
262
|
+
style: At({ left: `${K.value}px`, top: `${Q.value}px` })
|
|
207
263
|
}, [
|
|
208
|
-
|
|
209
|
-
data:
|
|
210
|
-
percent:
|
|
264
|
+
Pt(t.$slots, "tooltip", {
|
|
265
|
+
data: I.value,
|
|
266
|
+
percent: N.value
|
|
211
267
|
}, () => [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
268
|
+
H("div", St, [
|
|
269
|
+
H("p", Tt, U(I.value?.name), 1),
|
|
270
|
+
H("p", Ct, U(I.value?.value) + " (" + U((N.value * 100).toFixed(1)) + "%) ", 1)
|
|
215
271
|
])
|
|
216
272
|
], !0)
|
|
217
|
-
], 4)) :
|
|
273
|
+
], 4)) : bt("", !0)
|
|
218
274
|
], 512));
|
|
219
275
|
}
|
|
220
|
-
}),
|
|
221
|
-
|
|
222
|
-
|
|
276
|
+
}), J = /* @__PURE__ */ wt(kt, [["__scopeId", "data-v-16239a65"]]);
|
|
277
|
+
J.install = (D) => {
|
|
278
|
+
D.component(J.name, J);
|
|
223
279
|
};
|
|
224
280
|
export {
|
|
225
|
-
|
|
226
|
-
|
|
281
|
+
J as GPie3D,
|
|
282
|
+
J as default
|
|
227
283
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.g-pie3d-container[data-v-16239a65]{position:relative;width:100%;height:100%;overflow:hidden}canvas[data-v-16239a65]{display:block;width:100%;height:100%}.g-pie3d-tooltip[data-v-16239a65]{position:absolute;pointer-events:none;z-index:10;background:#0a121ed9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#e2e8f0;padding:8px 12px;border-radius:4px;font-size:12px;min-width:100px;box-shadow:0 4px 20px #22d3ee40;border:1px solid rgba(34,211,238,.5)}.g-pie3d-tooltip__default p[data-v-16239a65]{margin:0;line-height:1.5}.g-pie3d-tooltip__name[data-v-16239a65]{font-weight:600}
|
|
@@ -42,6 +42,14 @@ interface Props {
|
|
|
42
42
|
showAura?: boolean;
|
|
43
43
|
/** 描边/发光主色 (默认与扇区色一致, 留空则用扇区色高亮) */
|
|
44
44
|
glowColor?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 标签折线颜色
|
|
47
|
+
* - 留空 / 'auto': 使用扇区颜色
|
|
48
|
+
* - 字符串: 统一颜色, 例如 '#94a3b8' / 'rgba(0,0,0,0.4)'
|
|
49
|
+
*/
|
|
50
|
+
labelLineColor?: string;
|
|
51
|
+
/** 标签折线宽度 (px), 默认 1 */
|
|
52
|
+
labelLineWidth?: number;
|
|
45
53
|
};
|
|
46
54
|
/**
|
|
47
55
|
* @description 是否启用进入动画
|
|
@@ -103,6 +111,14 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
|
|
|
103
111
|
showAura?: boolean;
|
|
104
112
|
/** 描边/发光主色 (默认与扇区色一致, 留空则用扇区色高亮) */
|
|
105
113
|
glowColor?: string;
|
|
114
|
+
/**
|
|
115
|
+
* 标签折线颜色
|
|
116
|
+
* - 留空 / 'auto': 使用扇区颜色
|
|
117
|
+
* - 字符串: 统一颜色, 例如 '#94a3b8' / 'rgba(0,0,0,0.4)'
|
|
118
|
+
*/
|
|
119
|
+
labelLineColor?: string;
|
|
120
|
+
/** 标签折线宽度 (px), 默认 1 */
|
|
121
|
+
labelLineWidth?: number;
|
|
106
122
|
};
|
|
107
123
|
animation: boolean;
|
|
108
124
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
package/lib/index/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../GCount/index.js"),o=require("../GDialog/index.js"),l=require("../GTable/index.js"),n=require("../GVideo/index.js"),r=require("../GBubble/index.js"),a=require("../GProgress/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("../GCount/index.js"),o=require("../GDialog/index.js"),l=require("../GTable/index.js"),n=require("../GVideo/index.js"),r=require("../GBubble/index.js"),a=require("../GProgress/index.js"),i=require("../GScreen/index.js"),d=require("../GPluginVideo/index.js"),G=require("../GPie3D/index.js"),t={GCount:u.default,GDialog:o.default,GTable:l.default,GVideo:n.default,GBubble:r.default,GProgress:a.default,GScreen:i.default,GPluginVideo:d.default,GPie3D:G.default},f=s=>{Object.keys(t).forEach(c=>{const e=t[c];s.component(e.name,e)})},b={install:f};exports.GCount=u.default;exports.GDialog=o.default;exports.GTable=l.default;exports.GVideo=n.default;exports.GBubble=r.default;exports.GProgress=a.default;exports.GScreen=i.default;exports.GPluginVideo=d.default;exports.GPie3D=G.default;exports.default=b;
|
package/lib/index/index.mjs
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import t from "../GCount/index.mjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import i from "../GDialog/index.mjs";
|
|
3
|
+
import e from "../GTable/index.mjs";
|
|
4
4
|
import s from "../GVideo/index.mjs";
|
|
5
5
|
import c from "../GBubble/index.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import f from "../GProgress/index.mjs";
|
|
7
|
+
import a from "../GScreen/index.mjs";
|
|
8
8
|
import p from "../GPluginVideo/index.mjs";
|
|
9
|
+
import G from "../GPie3D/index.mjs";
|
|
9
10
|
const m = {
|
|
10
11
|
GCount: t,
|
|
11
|
-
GDialog:
|
|
12
|
-
GTable:
|
|
12
|
+
GDialog: i,
|
|
13
|
+
GTable: e,
|
|
13
14
|
GVideo: s,
|
|
14
15
|
GBubble: c,
|
|
15
|
-
GProgress:
|
|
16
|
-
GScreen:
|
|
17
|
-
GPluginVideo: p
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
GProgress: f,
|
|
17
|
+
GScreen: a,
|
|
18
|
+
GPluginVideo: p,
|
|
19
|
+
GPie3D: G
|
|
20
|
+
}, l = (r) => {
|
|
21
|
+
Object.keys(m).forEach((n) => {
|
|
22
|
+
const o = m[n];
|
|
23
|
+
r.component(o.name, o);
|
|
22
24
|
});
|
|
23
|
-
},
|
|
25
|
+
}, D = { install: l };
|
|
24
26
|
export {
|
|
25
27
|
c as GBubble,
|
|
26
28
|
t as GCount,
|
|
27
|
-
|
|
29
|
+
i as GDialog,
|
|
30
|
+
G as GPie3D,
|
|
28
31
|
p as GPluginVideo,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
f as GProgress,
|
|
33
|
+
a as GScreen,
|
|
34
|
+
e as GTable,
|
|
32
35
|
s as GVideo,
|
|
33
|
-
|
|
36
|
+
D as default
|
|
34
37
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -6,8 +6,9 @@ import { GBubble } from './components/GBubble';
|
|
|
6
6
|
import { GProgress } from './components/GProgress';
|
|
7
7
|
import { GScreen } from './components/GScreen';
|
|
8
8
|
import { GPluginVideo } from './components/GPluginVideo';
|
|
9
|
+
import { GPie3D } from './components/GPie3D';
|
|
9
10
|
declare const _default: {
|
|
10
11
|
install: (app: any) => void;
|
|
11
12
|
};
|
|
12
13
|
export default _default;
|
|
13
|
-
export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo };
|
|
14
|
+
export { GCount, GDialog, GTable, GVideo, GBubble, GProgress, GScreen, GPluginVideo, GPie3D };
|
package/package.json
CHANGED
package/lib/assets/GPie3D.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.g-pie3d-container[data-v-f18ddc7e]{position:relative;width:100%;height:100%;overflow:hidden}canvas[data-v-f18ddc7e]{display:block;width:100%;height:100%}.g-pie3d-tooltip[data-v-f18ddc7e]{position:absolute;pointer-events:none;z-index:10;background:#0a121ed9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#e2e8f0;padding:8px 12px;border-radius:4px;font-size:12px;min-width:100px;box-shadow:0 4px 20px #22d3ee40;border:1px solid rgba(34,211,238,.5)}.g-pie3d-tooltip__default p[data-v-f18ddc7e]{margin:0;line-height:1.5}.g-pie3d-tooltip__name[data-v-f18ddc7e]{font-weight:600}
|