twcpt 0.0.3 → 0.0.5
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/dist/charts.cjs.js +1 -1
- package/dist/charts.d.ts +0 -7
- package/dist/charts.es.js +1 -9
- package/dist/components/j-tw-btn/index.d.ts +10 -10
- package/dist/components/j-tw-checkbox/index.d.ts +230 -0
- package/dist/components/j-tw-checkbox/types.d.ts +35 -0
- package/dist/components/j-tw-checkbox-group/index.d.ts +309 -0
- package/dist/components/j-tw-checkbox-group/types.d.ts +38 -0
- package/dist/components/j-tw-confirm-dialog/index.d.ts +704 -0
- package/dist/components/j-tw-confirm-dialog/jwConfirmDialog.d.ts +2 -0
- package/dist/components/j-tw-confirm-dialog/types.d.ts +79 -0
- package/dist/components/j-tw-date-picker/index.d.ts +64 -9
- package/dist/components/j-tw-date-picker/types.d.ts +15 -0
- package/dist/components/j-tw-dialog/index.d.ts +793 -0
- package/dist/components/j-tw-dialog/jwDialog.d.ts +38 -0
- package/dist/components/j-tw-dialog/types.d.ts +122 -0
- package/dist/components/j-tw-form/index.d.ts +368 -0
- package/dist/components/j-tw-form/types.d.ts +18 -0
- package/dist/components/j-tw-form-item/index.d.ts +248 -0
- package/dist/components/j-tw-form-item/types.d.ts +21 -0
- package/dist/components/j-tw-form-label/index.d.ts +66 -0
- package/dist/components/j-tw-input/index.d.ts +549 -0
- package/dist/components/j-tw-input/types.d.ts +77 -0
- package/dist/components/j-tw-messages/MessageItem.d.ts +84 -0
- package/dist/components/j-tw-messages/index.d.ts +110 -0
- package/dist/components/j-tw-messages/jwMessages.d.ts +2 -0
- package/dist/components/j-tw-messages/state.d.ts +23 -0
- package/dist/components/j-tw-messages/types.d.ts +31 -0
- package/dist/components/j-tw-radio/index.d.ts +168 -0
- package/dist/components/j-tw-radio/types.d.ts +29 -0
- package/dist/components/j-tw-radio-group/index.d.ts +244 -0
- package/dist/components/j-tw-radio-group/types.d.ts +37 -0
- package/dist/components/j-tw-select/index.d.ts +4451 -0
- package/dist/components/j-tw-select/types.d.ts +87 -0
- package/dist/components/j-tw-status-img/index.d.ts +36 -0
- package/dist/components/j-tw-status-img/types.d.ts +3 -0
- package/dist/components/j-tw-table/index.d.ts +480 -0
- package/dist/components/j-tw-table/types.d.ts +157 -0
- package/dist/components/j-tw-tree-select/TreeNode.d.ts +124 -0
- package/dist/components/j-tw-tree-select/index.d.ts +292 -0
- package/dist/components/j-tw-tree-select/types.d.ts +110 -0
- package/dist/components/j-tw-tree-select-btn/TreeNode.d.ts +107 -0
- package/dist/components/j-tw-tree-select-btn/index.d.ts +171 -22
- package/dist/components/j-tw-tree-select-btn/types.d.ts +5 -0
- package/dist/components/j-tw-tree-select-input/index.d.ts +5384 -0
- package/dist/components/j-tw-tree-select-input/types.d.ts +65 -0
- package/dist/global.d.ts +129 -49
- package/dist/index.css +1 -1
- package/dist/index.d.ts +41 -4
- package/dist/shims-svg.d.ts +4 -0
- package/dist/twcpt-styles.css +1 -1
- package/dist/twcpt.cjs.js +9 -5
- package/dist/twcpt.es.js +4057 -1653
- package/dist/types.d.ts +1 -1
- package/dist/utils/useBizRequest.d.ts +12 -0
- package/package.json +1 -3
- package/dist/charts-BRqaKjiE.js +0 -879
- package/dist/charts-lTMiYKQB.cjs +0 -1
- package/dist/components/j-ch-bar/index.d.ts +0 -50
- package/dist/components/j-ch-bar/types.d.ts +0 -42
- package/dist/components/j-ch-bar-line/index.d.ts +0 -49
- package/dist/components/j-ch-bar-line/types.d.ts +0 -42
- package/dist/components/j-ch-bubble/index.d.ts +0 -54
- package/dist/components/j-ch-bubble/types.d.ts +0 -51
- package/dist/components/j-ch-line/index.d.ts +0 -57
- package/dist/components/j-ch-line/types.d.ts +0 -42
- package/dist/components/j-ch-pie-doughnut/index.d.ts +0 -60
- package/dist/components/j-ch-pie-doughnut/types.d.ts +0 -55
- package/dist/components/j-ch-radar/index.d.ts +0 -49
- package/dist/components/j-ch-radar/types.d.ts +0 -42
- package/dist/utils/chart.d.ts +0 -28
package/dist/charts-lTMiYKQB.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),g=require("chart.js/auto");function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function y(e,i){if(!i)return{...e};const n={...e};for(const o of Object.keys(i)){const s=i[o],u=e[o];if(s!==void 0){if(s===null){n[o]=null;continue}k(u)&&k(s)?n[o]=y(u,s):n[o]=s}}return n}const $=a.defineComponent({name:"JChBar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var c;o&&o.destroy();const d=(c=i.value)==null?void 0:c.getContext("2d");if(!d)return;const t={labels:e.labels,datasets:e.datasets.map(r=>({...r,type:"bar",borderWidth:r.borderWidth??0,borderRadius:r.borderRadius??4,maxBarThickness:r.maxBarThickness??34,backgroundColor:r.backgroundColor||"#3A416F"}))},l={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},scales:{y:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799"}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10}}}};o=new g.Chart(d,{type:"bar",data:t,options:y(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer:n}}}),h=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n},O={ref:"chartContainer",style:{position:"relative"}};function S(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",null,[a.createElementVNode("canvas",{ref:"barChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])],512)}const w=h($,[["render",S],["__scopeId","data-v-e2691574"]]),_=a.defineComponent({name:"JChBarLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var t;n&&n.destroy();const s=(t=i.value)==null?void 0:t.getContext("2d");if(!s)return;const u=e.datasets.map(l=>{let c={};const r=l.type==="line"?"line":"bar";return l.type==="line"?c={type:"line",tension:.4,pointRadius:0,borderWidth:3,fill:!1,backgroundColor:"transparent",maxBarThickness:void 0}:l.type==="bar"&&(c={type:"bar",borderWidth:0,borderRadius:4,borderSkipped:!1,fill:void 0,maxBarThickness:34,backgroundColor:l.backgroundColor}),{type:r,...l,...c}}),f={labels:e.labels,datasets:u},d={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:l=>`${l.dataset.label||""}: ${l.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!1,drawOnChartArea:!0,drawTicks:!0},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(l,c)=>{const r=e.labels[c];return r&&r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{data:f,options:y(d,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{mixedChartCanvas:i}}});function A(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"mixedChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const E=h(_,[["render",A]]),q=a.defineComponent({name:"JChBubble",props:{labels:{type:Array,default:()=>[],required:!1},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,backgroundColor:t.backgroundColor||"rgba(54, 162, 235, 0.6)"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!0,color:"#f5f6fa"},ticks:{display:!0,color:"#969799",padding:10,font:{size:11,family:"Open Sans",style:"normal",lineHeight:2},callback:(t,l)=>{const c=e.labels[l];return c?typeof c=="string"&&c.length>13?`${c.slice(0,13)}...`:c:t}}}}};n=new g.Chart(s,{type:"bubble",data:u,options:y(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{bubbleChartCanvas:i}}});function T(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"bubbleChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const B=h(q,[["render",T]]),H=a.defineComponent({name:"JChLine",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300},unitName:{type:String,default:""}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,tension:.4,pointRadius:2,borderWidth:3,fill:!1,backgroundColor:"transparent",type:"line"}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"line",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue} ${e.unitName}`}}},interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,border:{display:!1},grid:{display:!0,drawOnChartArea:!0,drawTicks:!1,color:"#f5f6fa"},ticks:{display:!0,padding:10,color:"#969799",font:{size:11,family:"Open Sans",style:"normal",lineHeight:2}}},x:{border:{display:!1,dash:[5,5]},grid:{display:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{display:!0,color:"#969799",padding:20,font:{size:10,family:"Open Sans",style:"normal"},callback:(t,l,c)=>{const r=e.labels[l];return r.length>13?`${r.slice(0,13)}...`:r}}}}};n=new g.Chart(s,{type:"line",data:u,options:y(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets],()=>{o()},{deep:!0}),{lineChartCanvas:i}}}),j={ref:"chartContainer"};function z(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",j,[a.createElementVNode("canvas",{ref:"lineChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const N=h(H,[["render",z],["__scopeId","data-v-1a079ae0"]]),W=a.defineComponent({name:"JChPieDoughnut",props:{type:{type:String,required:!0,validator:e=>["pie","doughnut"].includes(e)},labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null),n=a.ref(null);let o=null;const s=d=>{let t=d.querySelector("div.chartjs-tooltip");return t||(t=document.createElement("div"),t.className="chartjs-tooltip",t.style.background="#ffffff",t.style.borderRadius="8px",t.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)",t.style.color="#323232",t.style.opacity="0",t.style.pointerEvents="none",t.style.position="absolute",t.style.transform="translate(-50%, 0)",t.style.transition="all .1s ease",t.style.padding="8px 10px",t.style.font="12px Open Sans, sans-serif",d.appendChild(t)),t},u=d=>{const{chart:t,tooltip:l}=d,c=n.value;if(!c)return;const r=s(c);if(l.opacity===0){r.style.opacity="0";return}if(l.body){const m=l.title||[],v=l.body.map(p=>p.lines);if(r.innerHTML="",m.length){const p=document.createElement("div");p.style.fontWeight="600",p.style.marginBottom="4px",p.textContent=m.join(" "),r.appendChild(p)}v.forEach(p=>{const C=document.createElement("div");C.textContent=p.join(" "),r.appendChild(C)})}const{offsetLeft:b,offsetTop:x}=t.canvas;r.style.opacity="1",r.style.left=`${b+l.caretX}px`,r.style.top=`${x+l.caretY}px`},f=()=>{var r;o&&o.destroy();const d=(r=i.value)==null?void 0:r.getContext("2d");if(!d)return;const t=e.type,l={labels:e.labels,datasets:e.datasets.map(b=>({...b,type:t,borderWidth:b.borderWidth??2}))},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{enabled:!1,external:u}},interaction:{intersect:!0,mode:"index"}};o=new g.Chart(d,{type:t,data:l,options:y(c,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.type],()=>{f()},{deep:!0}),{chartCanvas:i,chartContainer:n}}}),R={ref:"chartContainer",style:{position:"relative"}};function V(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",R,[a.createElementVNode("canvas",{ref:"chartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)],512)}const L=h(W,[["render",V]]),P=a.defineComponent({name:"JChRadar",props:{labels:{type:Array,default:()=>[],required:!0},datasets:{type:Array,required:!0},options:{type:Object,default:()=>({}),required:!1},height:{type:Number,default:300}},setup(e){const i=a.ref(null);let n=null;const o=()=>{var d;n&&n.destroy();const s=(d=i.value)==null?void 0:d.getContext("2d");if(!s)return;const u={labels:e.labels,datasets:e.datasets.map(t=>({...t,type:"radar",fill:t.fill??!0,backgroundColor:t.backgroundColor||"rgba(58,65,111,0.2)",borderColor:t.borderColor||"rgba(58,65,111,1)",borderWidth:t.borderWidth??2}))},f={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0,position:"bottom",labels:{color:"#969799",pointStyle:"rect",padding:20,usePointStyle:!0,font:{size:11,family:"Open Sans",style:"normal",lineHeight:1}}},tooltip:{borderWidth:1,backgroundColor:"white",titleColor:"black",bodyColor:"black",borderColor:"#eeeeee",padding:12,callbacks:{label:t=>`${t.dataset.label||""}: ${t.formattedValue}`}}},interaction:{intersect:!1,mode:"index"},scales:{r:{beginAtZero:!0,angleLines:{color:"#f5f6fa"},grid:{color:"#f5f6fa"},pointLabels:{color:"#969799",font:{size:11,family:"Open Sans"}},ticks:{display:!1}}}};n=new g.Chart(s,{type:"radar",data:u,options:y(f,e.options)})};return a.onMounted(()=>{o()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{o()},{deep:!0}),{radarChartCanvas:i}}});function D(e,i,n,o,s,u){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("canvas",{ref:"radarChartCanvas",style:a.normalizeStyle([{width:"100%"},{height:e.height+"px",maxHeight:e.height+"px"}])},null,4)])}const I=h(P,[["render",D]]);exports._export_sfc=h;exports.index=w;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
type BarDataset = ChartDataset<'bar'>;
|
|
4
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
5
|
-
labels: {
|
|
6
|
-
type: ArrayConstructor;
|
|
7
|
-
default: () => never[];
|
|
8
|
-
required: true;
|
|
9
|
-
};
|
|
10
|
-
datasets: {
|
|
11
|
-
type: () => BarDataset[];
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
options: {
|
|
15
|
-
type: () => {};
|
|
16
|
-
default: () => {};
|
|
17
|
-
required: false;
|
|
18
|
-
};
|
|
19
|
-
height: {
|
|
20
|
-
type: NumberConstructor;
|
|
21
|
-
default: number;
|
|
22
|
-
};
|
|
23
|
-
}>, {
|
|
24
|
-
barChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
25
|
-
chartContainer: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
26
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
27
|
-
labels: {
|
|
28
|
-
type: ArrayConstructor;
|
|
29
|
-
default: () => never[];
|
|
30
|
-
required: true;
|
|
31
|
-
};
|
|
32
|
-
datasets: {
|
|
33
|
-
type: () => BarDataset[];
|
|
34
|
-
required: true;
|
|
35
|
-
};
|
|
36
|
-
options: {
|
|
37
|
-
type: () => {};
|
|
38
|
-
default: () => {};
|
|
39
|
-
required: false;
|
|
40
|
-
};
|
|
41
|
-
height: {
|
|
42
|
-
type: NumberConstructor;
|
|
43
|
-
default: number;
|
|
44
|
-
};
|
|
45
|
-
}>> & Readonly<{}>, {
|
|
46
|
-
labels: unknown[];
|
|
47
|
-
options: {};
|
|
48
|
-
height: number;
|
|
49
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
50
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 柱状图数据集类型 */
|
|
4
|
-
export type JChBarDataset = ChartDataset<'bar'>;
|
|
5
|
-
/** JChBar Props 接口 */
|
|
6
|
-
export interface JChBarProps {
|
|
7
|
-
/**
|
|
8
|
-
* X 轴标签数组
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
labels: string[];
|
|
12
|
-
/**
|
|
13
|
-
* 数据集数组
|
|
14
|
-
* @required
|
|
15
|
-
* @description Chart.js 柱状图数据集配置
|
|
16
|
-
*/
|
|
17
|
-
datasets: JChBarDataset[];
|
|
18
|
-
/**
|
|
19
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
20
|
-
* @default {}
|
|
21
|
-
*/
|
|
22
|
-
options?: Partial<ChartOptions<'bar'>>;
|
|
23
|
-
/**
|
|
24
|
-
* 图表高度 (px)
|
|
25
|
-
* @default 300
|
|
26
|
-
*/
|
|
27
|
-
height?: number;
|
|
28
|
-
}
|
|
29
|
-
/** JChBar Slots 接口 */
|
|
30
|
-
export interface JChBarSlots {
|
|
31
|
-
/** 默认插槽 */
|
|
32
|
-
default?: () => any;
|
|
33
|
-
}
|
|
34
|
-
/** JChBar 暴露的方法和属性 */
|
|
35
|
-
export interface JChBarExpose {
|
|
36
|
-
/** 获取图表容器 DOM 元素 */
|
|
37
|
-
$el: HTMLDivElement | undefined;
|
|
38
|
-
}
|
|
39
|
-
/** JChBar 组件类型定义 */
|
|
40
|
-
export type JChBarComponent = DefineComponent<JChBarProps, JChBarExpose, {}, {}, {}, {}, {}, {}>;
|
|
41
|
-
/** JChBar 实例类型 - 用于 ref 类型定义 */
|
|
42
|
-
export type JChBarInstance = InstanceType<JChBarComponent> & JChBarExpose;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
type MixedDataset = ChartDataset<any>;
|
|
4
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
5
|
-
labels: {
|
|
6
|
-
type: ArrayConstructor;
|
|
7
|
-
default: () => never[];
|
|
8
|
-
required: true;
|
|
9
|
-
};
|
|
10
|
-
datasets: {
|
|
11
|
-
type: () => MixedDataset[];
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
options: {
|
|
15
|
-
type: () => {};
|
|
16
|
-
default: () => {};
|
|
17
|
-
required: false;
|
|
18
|
-
};
|
|
19
|
-
height: {
|
|
20
|
-
type: NumberConstructor;
|
|
21
|
-
default: number;
|
|
22
|
-
};
|
|
23
|
-
}>, {
|
|
24
|
-
mixedChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
25
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
26
|
-
labels: {
|
|
27
|
-
type: ArrayConstructor;
|
|
28
|
-
default: () => never[];
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
datasets: {
|
|
32
|
-
type: () => MixedDataset[];
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
options: {
|
|
36
|
-
type: () => {};
|
|
37
|
-
default: () => {};
|
|
38
|
-
required: false;
|
|
39
|
-
};
|
|
40
|
-
height: {
|
|
41
|
-
type: NumberConstructor;
|
|
42
|
-
default: number;
|
|
43
|
-
};
|
|
44
|
-
}>> & Readonly<{}>, {
|
|
45
|
-
labels: unknown[];
|
|
46
|
-
options: {};
|
|
47
|
-
height: number;
|
|
48
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
49
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 混合图数据集类型(支持 bar 和 line) */
|
|
4
|
-
export type JChBarLineDataset = ChartDataset<'bar'> | ChartDataset<'line'>;
|
|
5
|
-
/** JChBarLine Props 接口 */
|
|
6
|
-
export interface JChBarLineProps {
|
|
7
|
-
/**
|
|
8
|
-
* X 轴标签数组
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
labels: string[];
|
|
12
|
-
/**
|
|
13
|
-
* 数据集数组
|
|
14
|
-
* @required
|
|
15
|
-
* @description Chart.js 混合图数据集配置,支持 bar 和 line 类型
|
|
16
|
-
*/
|
|
17
|
-
datasets: JChBarLineDataset[];
|
|
18
|
-
/**
|
|
19
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
20
|
-
* @default {}
|
|
21
|
-
*/
|
|
22
|
-
options?: Partial<ChartOptions<'bar' | 'line'>>;
|
|
23
|
-
/**
|
|
24
|
-
* 图表高度 (px)
|
|
25
|
-
* @default 300
|
|
26
|
-
*/
|
|
27
|
-
height?: number;
|
|
28
|
-
}
|
|
29
|
-
/** JChBarLine Slots 接口 */
|
|
30
|
-
export interface JChBarLineSlots {
|
|
31
|
-
/** 默认插槽 */
|
|
32
|
-
default?: () => any;
|
|
33
|
-
}
|
|
34
|
-
/** JChBarLine 暴露的方法和属性 */
|
|
35
|
-
export interface JChBarLineExpose {
|
|
36
|
-
/** 获取图表容器 DOM 元素 */
|
|
37
|
-
$el: HTMLDivElement | undefined;
|
|
38
|
-
}
|
|
39
|
-
/** JChBarLine 组件类型定义 */
|
|
40
|
-
export type JChBarLineComponent = DefineComponent<JChBarLineProps, JChBarLineExpose, {}, {}, {}, {}, {}, {}>;
|
|
41
|
-
/** JChBarLine 实例类型 - 用于 ref 类型定义 */
|
|
42
|
-
export type JChBarLineInstance = InstanceType<JChBarLineComponent> & JChBarLineExpose;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
type BubbleDataPoint = {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
r: number;
|
|
7
|
-
};
|
|
8
|
-
type BubbleDataset = ChartDataset<'bubble', BubbleDataPoint[]>;
|
|
9
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
10
|
-
labels: {
|
|
11
|
-
type: ArrayConstructor;
|
|
12
|
-
default: () => never[];
|
|
13
|
-
required: false;
|
|
14
|
-
};
|
|
15
|
-
datasets: {
|
|
16
|
-
type: () => BubbleDataset[];
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
options: {
|
|
20
|
-
type: () => {};
|
|
21
|
-
default: () => {};
|
|
22
|
-
required: false;
|
|
23
|
-
};
|
|
24
|
-
height: {
|
|
25
|
-
type: NumberConstructor;
|
|
26
|
-
default: number;
|
|
27
|
-
};
|
|
28
|
-
}>, {
|
|
29
|
-
bubbleChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
30
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
31
|
-
labels: {
|
|
32
|
-
type: ArrayConstructor;
|
|
33
|
-
default: () => never[];
|
|
34
|
-
required: false;
|
|
35
|
-
};
|
|
36
|
-
datasets: {
|
|
37
|
-
type: () => BubbleDataset[];
|
|
38
|
-
required: true;
|
|
39
|
-
};
|
|
40
|
-
options: {
|
|
41
|
-
type: () => {};
|
|
42
|
-
default: () => {};
|
|
43
|
-
required: false;
|
|
44
|
-
};
|
|
45
|
-
height: {
|
|
46
|
-
type: NumberConstructor;
|
|
47
|
-
default: number;
|
|
48
|
-
};
|
|
49
|
-
}>> & Readonly<{}>, {
|
|
50
|
-
labels: unknown[];
|
|
51
|
-
options: {};
|
|
52
|
-
height: number;
|
|
53
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
54
|
-
export default _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 气泡图数据点类型 */
|
|
4
|
-
export interface JChBubbleDataPoint {
|
|
5
|
-
/** X 轴坐标值 */
|
|
6
|
-
x: number;
|
|
7
|
-
/** Y 轴坐标值 */
|
|
8
|
-
y: number;
|
|
9
|
-
/** 气泡半径 */
|
|
10
|
-
r: number;
|
|
11
|
-
}
|
|
12
|
-
/** 气泡图数据集类型 */
|
|
13
|
-
export type JChBubbleDataset = ChartDataset<'bubble', JChBubbleDataPoint[]>;
|
|
14
|
-
/** JChBubble Props 接口 */
|
|
15
|
-
export interface JChBubbleProps {
|
|
16
|
-
/**
|
|
17
|
-
* X 轴标签数组
|
|
18
|
-
* @default []
|
|
19
|
-
*/
|
|
20
|
-
labels?: string[];
|
|
21
|
-
/**
|
|
22
|
-
* 数据集数组
|
|
23
|
-
* @required
|
|
24
|
-
* @description Chart.js 气泡图数据集配置
|
|
25
|
-
*/
|
|
26
|
-
datasets: JChBubbleDataset[];
|
|
27
|
-
/**
|
|
28
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
29
|
-
* @default {}
|
|
30
|
-
*/
|
|
31
|
-
options?: Partial<ChartOptions<'bubble'>>;
|
|
32
|
-
/**
|
|
33
|
-
* 图表高度 (px)
|
|
34
|
-
* @default 300
|
|
35
|
-
*/
|
|
36
|
-
height?: number;
|
|
37
|
-
}
|
|
38
|
-
/** JChBubble Slots 接口 */
|
|
39
|
-
export interface JChBubbleSlots {
|
|
40
|
-
/** 默认插槽 */
|
|
41
|
-
default?: () => any;
|
|
42
|
-
}
|
|
43
|
-
/** JChBubble 暴露的方法和属性 */
|
|
44
|
-
export interface JChBubbleExpose {
|
|
45
|
-
/** 获取图表容器 DOM 元素 */
|
|
46
|
-
$el: HTMLDivElement | undefined;
|
|
47
|
-
}
|
|
48
|
-
/** JChBubble 组件类型定义 */
|
|
49
|
-
export type JChBubbleComponent = DefineComponent<JChBubbleProps, JChBubbleExpose, {}, {}, {}, {}, {}, {}>;
|
|
50
|
-
/** JChBubble 实例类型 - 用于 ref 类型定义 */
|
|
51
|
-
export type JChBubbleInstance = InstanceType<JChBubbleComponent> & JChBubbleExpose;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
-
labels: {
|
|
5
|
-
type: ArrayConstructor;
|
|
6
|
-
default: () => never[];
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
datasets: {
|
|
10
|
-
type: () => ChartDataset<"line">[];
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
options: {
|
|
14
|
-
type: () => {};
|
|
15
|
-
default: () => {};
|
|
16
|
-
required: false;
|
|
17
|
-
};
|
|
18
|
-
height: {
|
|
19
|
-
type: NumberConstructor;
|
|
20
|
-
default: number;
|
|
21
|
-
};
|
|
22
|
-
unitName: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
}>, {
|
|
27
|
-
lineChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
28
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
29
|
-
labels: {
|
|
30
|
-
type: ArrayConstructor;
|
|
31
|
-
default: () => never[];
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
datasets: {
|
|
35
|
-
type: () => ChartDataset<"line">[];
|
|
36
|
-
required: true;
|
|
37
|
-
};
|
|
38
|
-
options: {
|
|
39
|
-
type: () => {};
|
|
40
|
-
default: () => {};
|
|
41
|
-
required: false;
|
|
42
|
-
};
|
|
43
|
-
height: {
|
|
44
|
-
type: NumberConstructor;
|
|
45
|
-
default: number;
|
|
46
|
-
};
|
|
47
|
-
unitName: {
|
|
48
|
-
type: StringConstructor;
|
|
49
|
-
default: string;
|
|
50
|
-
};
|
|
51
|
-
}>> & Readonly<{}>, {
|
|
52
|
-
labels: unknown[];
|
|
53
|
-
options: {};
|
|
54
|
-
height: number;
|
|
55
|
-
unitName: string;
|
|
56
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
57
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 折线图数据集类型 */
|
|
4
|
-
export type JChLineDataset = ChartDataset<'line'>;
|
|
5
|
-
/** JChLine Props 接口 */
|
|
6
|
-
export interface JChLineProps {
|
|
7
|
-
/**
|
|
8
|
-
* X 轴标签数组
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
labels: string[];
|
|
12
|
-
/**
|
|
13
|
-
* 数据集数组
|
|
14
|
-
* @required
|
|
15
|
-
* @description Chart.js 折线图数据集配置
|
|
16
|
-
*/
|
|
17
|
-
datasets: JChLineDataset[];
|
|
18
|
-
/**
|
|
19
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
20
|
-
* @default {}
|
|
21
|
-
*/
|
|
22
|
-
options?: Partial<ChartOptions<'line'>>;
|
|
23
|
-
/**
|
|
24
|
-
* 图表高度 (px)
|
|
25
|
-
* @default 300
|
|
26
|
-
*/
|
|
27
|
-
height?: number;
|
|
28
|
-
}
|
|
29
|
-
/** JChLine Slots 接口 */
|
|
30
|
-
export interface JChLineSlots {
|
|
31
|
-
/** 默认插槽 */
|
|
32
|
-
default?: () => any;
|
|
33
|
-
}
|
|
34
|
-
/** JChLine 暴露的方法和属性 */
|
|
35
|
-
export interface JChLineExpose {
|
|
36
|
-
/** 获取图表容器 DOM 元素 */
|
|
37
|
-
$el: HTMLDivElement | undefined;
|
|
38
|
-
}
|
|
39
|
-
/** JChLine 组件类型定义 */
|
|
40
|
-
export type JChLineComponent = DefineComponent<JChLineProps, JChLineExpose, {}, {}, {}, {}, {}, {}>;
|
|
41
|
-
/** JChLine 实例类型 - 用于 ref 类型定义 */
|
|
42
|
-
export type JChLineInstance = InstanceType<JChLineComponent> & JChLineExpose;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
type ChartType = 'pie' | 'doughnut';
|
|
4
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
5
|
-
type: {
|
|
6
|
-
type: () => ChartType;
|
|
7
|
-
required: true;
|
|
8
|
-
validator: (value: string) => boolean;
|
|
9
|
-
};
|
|
10
|
-
labels: {
|
|
11
|
-
type: ArrayConstructor;
|
|
12
|
-
default: () => never[];
|
|
13
|
-
required: true;
|
|
14
|
-
};
|
|
15
|
-
datasets: {
|
|
16
|
-
type: () => ChartDataset<ChartType>[];
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
options: {
|
|
20
|
-
type: () => {};
|
|
21
|
-
default: () => {};
|
|
22
|
-
required: false;
|
|
23
|
-
};
|
|
24
|
-
height: {
|
|
25
|
-
type: NumberConstructor;
|
|
26
|
-
default: number;
|
|
27
|
-
};
|
|
28
|
-
}>, {
|
|
29
|
-
chartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
30
|
-
chartContainer: Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
31
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
32
|
-
type: {
|
|
33
|
-
type: () => ChartType;
|
|
34
|
-
required: true;
|
|
35
|
-
validator: (value: string) => boolean;
|
|
36
|
-
};
|
|
37
|
-
labels: {
|
|
38
|
-
type: ArrayConstructor;
|
|
39
|
-
default: () => never[];
|
|
40
|
-
required: true;
|
|
41
|
-
};
|
|
42
|
-
datasets: {
|
|
43
|
-
type: () => ChartDataset<ChartType>[];
|
|
44
|
-
required: true;
|
|
45
|
-
};
|
|
46
|
-
options: {
|
|
47
|
-
type: () => {};
|
|
48
|
-
default: () => {};
|
|
49
|
-
required: false;
|
|
50
|
-
};
|
|
51
|
-
height: {
|
|
52
|
-
type: NumberConstructor;
|
|
53
|
-
default: number;
|
|
54
|
-
};
|
|
55
|
-
}>> & Readonly<{}>, {
|
|
56
|
-
labels: unknown[];
|
|
57
|
-
options: {};
|
|
58
|
-
height: number;
|
|
59
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
60
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 饼图/环形图类型常量 */
|
|
4
|
-
export declare const JChPieDoughnutType: {
|
|
5
|
-
readonly PIE: "pie";
|
|
6
|
-
readonly DOUGHNUT: "doughnut";
|
|
7
|
-
};
|
|
8
|
-
/** 图表类型 */
|
|
9
|
-
export type JChPieDoughnutTypeType = (typeof JChPieDoughnutType)[keyof typeof JChPieDoughnutType];
|
|
10
|
-
/** 饼图/环形图数据集类型 */
|
|
11
|
-
export type JChPieDoughnutDataset = ChartDataset<'pie'> | ChartDataset<'doughnut'>;
|
|
12
|
-
/** JChPieDoughnut Props 接口 */
|
|
13
|
-
export interface JChPieDoughnutProps {
|
|
14
|
-
/**
|
|
15
|
-
* 图表类型
|
|
16
|
-
* @required
|
|
17
|
-
* @values 'pie' | 'doughnut'
|
|
18
|
-
*/
|
|
19
|
-
type: JChPieDoughnutTypeType;
|
|
20
|
-
/**
|
|
21
|
-
* 数据标签数组
|
|
22
|
-
* @required
|
|
23
|
-
*/
|
|
24
|
-
labels: string[];
|
|
25
|
-
/**
|
|
26
|
-
* 数据集数组
|
|
27
|
-
* @required
|
|
28
|
-
* @description Chart.js 饼图/环形图数据集配置
|
|
29
|
-
*/
|
|
30
|
-
datasets: JChPieDoughnutDataset[];
|
|
31
|
-
/**
|
|
32
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
33
|
-
* @default {}
|
|
34
|
-
*/
|
|
35
|
-
options?: Partial<ChartOptions<'pie' | 'doughnut'>>;
|
|
36
|
-
/**
|
|
37
|
-
* 图表高度 (px)
|
|
38
|
-
* @default 300
|
|
39
|
-
*/
|
|
40
|
-
height?: number;
|
|
41
|
-
}
|
|
42
|
-
/** JChPieDoughnut Slots 接口 */
|
|
43
|
-
export interface JChPieDoughnutSlots {
|
|
44
|
-
/** 默认插槽 */
|
|
45
|
-
default?: () => any;
|
|
46
|
-
}
|
|
47
|
-
/** JChPieDoughnut 暴露的方法和属性 */
|
|
48
|
-
export interface JChPieDoughnutExpose {
|
|
49
|
-
/** 获取图表容器 DOM 元素 */
|
|
50
|
-
$el: HTMLDivElement | undefined;
|
|
51
|
-
}
|
|
52
|
-
/** JChPieDoughnut 组件类型定义 */
|
|
53
|
-
export type JChPieDoughnutComponent = DefineComponent<JChPieDoughnutProps, JChPieDoughnutExpose, {}, {}, {}, {}, {}, {}>;
|
|
54
|
-
/** JChPieDoughnut 实例类型 - 用于 ref 类型定义 */
|
|
55
|
-
export type JChPieDoughnutInstance = InstanceType<JChPieDoughnutComponent> & JChPieDoughnutExpose;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Ref, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
import { ChartDataset } from 'chart.js/auto';
|
|
3
|
-
type RadarDataset = ChartDataset<'radar'>;
|
|
4
|
-
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
5
|
-
labels: {
|
|
6
|
-
type: ArrayConstructor;
|
|
7
|
-
default: () => never[];
|
|
8
|
-
required: true;
|
|
9
|
-
};
|
|
10
|
-
datasets: {
|
|
11
|
-
type: () => RadarDataset[];
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
options: {
|
|
15
|
-
type: () => {};
|
|
16
|
-
default: () => {};
|
|
17
|
-
required: false;
|
|
18
|
-
};
|
|
19
|
-
height: {
|
|
20
|
-
type: NumberConstructor;
|
|
21
|
-
default: number;
|
|
22
|
-
};
|
|
23
|
-
}>, {
|
|
24
|
-
radarChartCanvas: Ref<HTMLCanvasElement | null, HTMLCanvasElement | null>;
|
|
25
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
26
|
-
labels: {
|
|
27
|
-
type: ArrayConstructor;
|
|
28
|
-
default: () => never[];
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
datasets: {
|
|
32
|
-
type: () => RadarDataset[];
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
options: {
|
|
36
|
-
type: () => {};
|
|
37
|
-
default: () => {};
|
|
38
|
-
required: false;
|
|
39
|
-
};
|
|
40
|
-
height: {
|
|
41
|
-
type: NumberConstructor;
|
|
42
|
-
default: number;
|
|
43
|
-
};
|
|
44
|
-
}>> & Readonly<{}>, {
|
|
45
|
-
labels: unknown[];
|
|
46
|
-
options: {};
|
|
47
|
-
height: number;
|
|
48
|
-
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
49
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ChartDataset, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import { DefineComponent } from 'vue';
|
|
3
|
-
/** 雷达图数据集类型 */
|
|
4
|
-
export type JChRadarDataset = ChartDataset<'radar'>;
|
|
5
|
-
/** JChRadar Props 接口 */
|
|
6
|
-
export interface JChRadarProps {
|
|
7
|
-
/**
|
|
8
|
-
* 轴标签数组
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
labels: string[];
|
|
12
|
-
/**
|
|
13
|
-
* 数据集数组
|
|
14
|
-
* @required
|
|
15
|
-
* @description Chart.js 雷达图数据集配置
|
|
16
|
-
*/
|
|
17
|
-
datasets: JChRadarDataset[];
|
|
18
|
-
/**
|
|
19
|
-
* Chart.js 配置选项(用于覆写默认配置)
|
|
20
|
-
* @default {}
|
|
21
|
-
*/
|
|
22
|
-
options?: Partial<ChartOptions<'radar'>>;
|
|
23
|
-
/**
|
|
24
|
-
* 图表高度 (px)
|
|
25
|
-
* @default 300
|
|
26
|
-
*/
|
|
27
|
-
height?: number;
|
|
28
|
-
}
|
|
29
|
-
/** JChRadar Slots 接口 */
|
|
30
|
-
export interface JChRadarSlots {
|
|
31
|
-
/** 默认插槽 */
|
|
32
|
-
default?: () => any;
|
|
33
|
-
}
|
|
34
|
-
/** JChRadar 暴露的方法和属性 */
|
|
35
|
-
export interface JChRadarExpose {
|
|
36
|
-
/** 获取图表容器 DOM 元素 */
|
|
37
|
-
$el: HTMLDivElement | undefined;
|
|
38
|
-
}
|
|
39
|
-
/** JChRadar 组件类型定义 */
|
|
40
|
-
export type JChRadarComponent = DefineComponent<JChRadarProps, JChRadarExpose, {}, {}, {}, {}, {}, {}>;
|
|
41
|
-
/** JChRadar 实例类型 - 用于 ref 类型定义 */
|
|
42
|
-
export type JChRadarInstance = InstanceType<JChRadarComponent> & JChRadarExpose;
|
package/dist/utils/chart.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图表相关工具函数
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* 深度合并图表配置
|
|
6
|
-
* 用于将用户自定义配置与默认配置进行深度合并
|
|
7
|
-
*
|
|
8
|
-
* @param target 默认配置(基础配置)
|
|
9
|
-
* @param source 用户配置(覆盖配置)
|
|
10
|
-
* @returns 合并后的配置
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* const defaultOptions = {
|
|
14
|
-
* plugins: { legend: { display: true, position: 'bottom' } },
|
|
15
|
-
* scales: { y: { beginAtZero: true } }
|
|
16
|
-
* };
|
|
17
|
-
* const userOptions = {
|
|
18
|
-
* plugins: { legend: { position: 'top' } },
|
|
19
|
-
* scales: { y: { max: 100 } }
|
|
20
|
-
* };
|
|
21
|
-
* const merged = mergeChartOptions(defaultOptions, userOptions);
|
|
22
|
-
* // 结果:
|
|
23
|
-
* // {
|
|
24
|
-
* // plugins: { legend: { display: true, position: 'top' } },
|
|
25
|
-
* // scales: { y: { beginAtZero: true, max: 100 } }
|
|
26
|
-
* // }
|
|
27
|
-
*/
|
|
28
|
-
export declare function mergeChartOptions<T extends Record<string, any>>(target: T, source: Partial<T> | undefined | null): T;
|