rtcpts 0.0.39 → 0.0.42
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/LICENSE +22 -22
- package/README.md +91 -91
- package/dist/{charts-DR-a8_4o.cjs → charts-DJRnfFOn.cjs} +1 -1
- package/dist/{charts-BVD7yH1K.js → charts-fA1hE3y8.js} +2 -2
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +1 -1
- package/dist/components/j-c-copy/types.d.ts +39 -0
- package/dist/components/j-c-duo-list-editor/types.d.ts +109 -0
- package/dist/components/j-c-editable-proxy/types.d.ts +106 -0
- package/dist/components/j-c-fallback/types.d.ts +57 -0
- package/dist/components/j-c-foldable-list/types.d.ts +55 -0
- package/dist/components/j-c-format-lookup/types.d.ts +67 -0
- package/dist/components/j-c-list-editor/types.d.ts +77 -0
- package/dist/components/j-c-more-menu/types.d.ts +147 -0
- package/dist/components/j-c-nested-select/types.d.ts +1 -0
- package/dist/components/j-c-permission/types.d.ts +62 -0
- package/dist/components/j-c-table/types.d.ts +67 -9
- package/dist/components/j-c-tabs/types.d.ts +112 -0
- package/dist/components/j-c-title-line/types.d.ts +33 -0
- package/dist/components/j-c-tooltip/types.d.ts +7 -0
- package/dist/components/j-c-tooltip-ellipsis/types.d.ts +1 -0
- package/dist/components/j-c-tree/types.d.ts +75 -0
- package/dist/components/j-c-tree-select/types.d.ts +132 -0
- package/dist/components/j-ch-bar/types.d.ts +13 -1
- package/dist/components/j-ch-bar-line/types.d.ts +1 -0
- package/dist/components/j-ch-bubble/types.d.ts +1 -0
- package/dist/components/j-ch-line/types.d.ts +1 -0
- package/dist/components/j-ch-pie-doughnut/types.d.ts +1 -0
- package/dist/components/j-ch-radar/types.d.ts +1 -0
- package/dist/components/j-q-autocomplete/types.d.ts +85 -0
- package/dist/components/j-q-button/types.d.ts +2 -0
- package/dist/components/j-q-button-dropdown/types.d.ts +2 -0
- package/dist/components/j-q-confirm/types.d.ts +2 -0
- package/dist/components/j-q-confirm-dialog/index.d.ts +16 -11
- package/dist/components/j-q-date/types.d.ts +145 -0
- package/dist/components/j-q-date-month/types.d.ts +94 -0
- package/dist/components/j-q-date-year/types.d.ts +76 -0
- package/dist/components/j-q-datetime/types.d.ts +145 -0
- package/dist/components/j-q-detail-list/types.d.ts +101 -0
- package/dist/components/j-q-dialog/types.d.ts +138 -0
- package/dist/components/j-q-file/types.d.ts +72 -0
- package/dist/components/j-q-form-label/types.d.ts +66 -0
- package/dist/components/j-q-input/types.d.ts +139 -0
- package/dist/components/j-q-input-recognize/types.d.ts +133 -0
- package/dist/components/j-q-new-value/types.d.ts +107 -0
- package/dist/components/j-q-option-group/types.d.ts +109 -0
- package/dist/components/j-q-pagination/types.d.ts +85 -0
- package/dist/components/j-q-popover/types.d.ts +50 -0
- package/dist/components/j-q-search-form/types.d.ts +80 -0
- package/dist/components/j-q-select/types.d.ts +196 -0
- package/dist/components/j-q-table/types.d.ts +215 -0
- package/dist/components/j-q-tooltip/types.d.ts +41 -0
- package/dist/global.d.ts +319 -9
- package/dist/index.css +1 -1
- package/dist/rtcpt.cjs.js +1 -1
- package/dist/rtcpt.es.js +966 -958
- package/package.json +87 -87
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
package/README.md
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
# RTCPT - Vue 3 + Quasar 组件库
|
|
2
|
-
|
|
3
|
-
RTCPT 是一个基于 Vue 3、TypeScript 和 Quasar 构建的现代企业级组件库。
|
|
4
|
-
|
|
5
|
-
[在线文档](https://ngiot-frontend-cpt.redteatest.com/zh-cn/)
|
|
6
|
-
|
|
7
|
-
### 分支管理
|
|
8
|
-
|
|
9
|
-
1. **创建开发分支**: 开发新功能或修复问题时,应基于 `dev` 分支创建对应的功能分支。分支命名格式为 `feat/`、`fix/`、
|
|
10
|
-
`refactor/`、`docs/`、`perf/` 或 `chore/` 前缀,后跟具体描述。
|
|
11
|
-
|
|
12
|
-
2. **提交代码审查**: 完成开发后,通过 Pull Request (PR) 或 Merge Request (MR) 提交至 `dev` 分支进行代码审查。提交后可保留自建分支,无需删除。
|
|
13
|
-
|
|
14
|
-
3. **版本发布流程**: 在 `dev` 分支完成构建后(执行 `npm run build-all`),需先执行 `npm login` 进行身份验证,随后执行
|
|
15
|
-
`npm run patch` 发布新版本。
|
|
16
|
-
|
|
17
|
-
## 项目特点
|
|
18
|
-
|
|
19
|
-
- 基于 Quasar 的现代化 UI 组件
|
|
20
|
-
- 全面的 TypeScript 类型支持
|
|
21
|
-
- 开箱即用的企业级业务组件
|
|
22
|
-
- 内置国际化支持 (i18n)
|
|
23
|
-
- 权限控制系统
|
|
24
|
-
- 基于 Chart.js 的数据可视化
|
|
25
|
-
- 高度可定制的主题配置
|
|
26
|
-
|
|
27
|
-
## 分支命名规范 (Branching Guidelines)
|
|
28
|
-
|
|
29
|
-
为了保持组件库开发的条理性以及 CI/CD 流程的自动化,本项目采用语义化分支命名规范。
|
|
30
|
-
|
|
31
|
-
### 1. 核心分支 (Core Branches)
|
|
32
|
-
|
|
33
|
-
| 分支名 | 说明 |
|
|
34
|
-
|:------|:-------------------------------|
|
|
35
|
-
| `dev` | 开发分支。日常功能集成的基准分支,所有 PR 默认合并至此。 |
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
### 2. 短期协作分支 (Supporting Branches)
|
|
40
|
-
|
|
41
|
-
所有短期分支应遵循 `类别/描述` 的格式,使用小写字母并以中划线分隔。
|
|
42
|
-
|
|
43
|
-
#### 功能开发 (Feature)
|
|
44
|
-
|
|
45
|
-
用于开发新组件或新特性。
|
|
46
|
-
|
|
47
|
-
- 格式: `feat/description`
|
|
48
|
-
- 示例: `git checkout -b feat/button-component`
|
|
49
|
-
|
|
50
|
-
#### 缺陷修复 (Bugfix)
|
|
51
|
-
|
|
52
|
-
用于修复组件 Bug。
|
|
53
|
-
|
|
54
|
-
- 格式: `fix/description`
|
|
55
|
-
- 示例: `git checkout -b fix/select-dropdown-overflow`
|
|
56
|
-
|
|
57
|
-
#### 代码重构 (Refactor)
|
|
58
|
-
|
|
59
|
-
不影响功能逻辑的代码结构调整。
|
|
60
|
-
|
|
61
|
-
- 格式: `refactor/description`
|
|
62
|
-
- 示例: `git checkout -b refactor/use-callback-optimization`
|
|
63
|
-
|
|
64
|
-
#### 文档更新 (Docs)
|
|
65
|
-
|
|
66
|
-
仅涉及文档、注释、Storybook 示例的修改。
|
|
67
|
-
|
|
68
|
-
- 格式: `docs/description`
|
|
69
|
-
- 示例: `git checkout -b docs/add-api-tables`
|
|
70
|
-
|
|
71
|
-
#### 性能优化 (Perf)
|
|
72
|
-
|
|
73
|
-
专门针对组件渲染性能或包体积的优化。
|
|
74
|
-
|
|
75
|
-
- 格式: `perf/description`
|
|
76
|
-
- 示例: `git checkout -b perf/reduce-bundle-size`
|
|
77
|
-
|
|
78
|
-
#### 辅助任务 (Chore)
|
|
79
|
-
|
|
80
|
-
构建流程、依赖库更新、CI 配置等非业务逻辑修改。
|
|
81
|
-
|
|
82
|
-
- 格式: `chore/description`
|
|
83
|
-
- 示例: `git checkout -b chore/upgrade-react-18`
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
### 3. 工作流建议 (Workflow)
|
|
88
|
-
|
|
89
|
-
1. **同步主分支**: 开发前确保 `develop` 分支是最新的。
|
|
90
|
-
2. **创建分支**: 从 `develop` 拉取新分支。
|
|
91
|
-
```bash
|
|
1
|
+
# RTCPT - Vue 3 + Quasar 组件库
|
|
2
|
+
|
|
3
|
+
RTCPT 是一个基于 Vue 3、TypeScript 和 Quasar 构建的现代企业级组件库。
|
|
4
|
+
|
|
5
|
+
[在线文档](https://ngiot-frontend-cpt.redteatest.com/zh-cn/)
|
|
6
|
+
|
|
7
|
+
### 分支管理
|
|
8
|
+
|
|
9
|
+
1. **创建开发分支**: 开发新功能或修复问题时,应基于 `dev` 分支创建对应的功能分支。分支命名格式为 `feat/`、`fix/`、
|
|
10
|
+
`refactor/`、`docs/`、`perf/` 或 `chore/` 前缀,后跟具体描述。
|
|
11
|
+
|
|
12
|
+
2. **提交代码审查**: 完成开发后,通过 Pull Request (PR) 或 Merge Request (MR) 提交至 `dev` 分支进行代码审查。提交后可保留自建分支,无需删除。
|
|
13
|
+
|
|
14
|
+
3. **版本发布流程**: 在 `dev` 分支完成构建后(执行 `npm run build-all`),需先执行 `npm login` 进行身份验证,随后执行
|
|
15
|
+
`npm run patch` 发布新版本。
|
|
16
|
+
|
|
17
|
+
## 项目特点
|
|
18
|
+
|
|
19
|
+
- 基于 Quasar 的现代化 UI 组件
|
|
20
|
+
- 全面的 TypeScript 类型支持
|
|
21
|
+
- 开箱即用的企业级业务组件
|
|
22
|
+
- 内置国际化支持 (i18n)
|
|
23
|
+
- 权限控制系统
|
|
24
|
+
- 基于 Chart.js 的数据可视化
|
|
25
|
+
- 高度可定制的主题配置
|
|
26
|
+
|
|
27
|
+
## 分支命名规范 (Branching Guidelines)
|
|
28
|
+
|
|
29
|
+
为了保持组件库开发的条理性以及 CI/CD 流程的自动化,本项目采用语义化分支命名规范。
|
|
30
|
+
|
|
31
|
+
### 1. 核心分支 (Core Branches)
|
|
32
|
+
|
|
33
|
+
| 分支名 | 说明 |
|
|
34
|
+
|:------|:-------------------------------|
|
|
35
|
+
| `dev` | 开发分支。日常功能集成的基准分支,所有 PR 默认合并至此。 |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### 2. 短期协作分支 (Supporting Branches)
|
|
40
|
+
|
|
41
|
+
所有短期分支应遵循 `类别/描述` 的格式,使用小写字母并以中划线分隔。
|
|
42
|
+
|
|
43
|
+
#### 功能开发 (Feature)
|
|
44
|
+
|
|
45
|
+
用于开发新组件或新特性。
|
|
46
|
+
|
|
47
|
+
- 格式: `feat/description`
|
|
48
|
+
- 示例: `git checkout -b feat/button-component`
|
|
49
|
+
|
|
50
|
+
#### 缺陷修复 (Bugfix)
|
|
51
|
+
|
|
52
|
+
用于修复组件 Bug。
|
|
53
|
+
|
|
54
|
+
- 格式: `fix/description`
|
|
55
|
+
- 示例: `git checkout -b fix/select-dropdown-overflow`
|
|
56
|
+
|
|
57
|
+
#### 代码重构 (Refactor)
|
|
58
|
+
|
|
59
|
+
不影响功能逻辑的代码结构调整。
|
|
60
|
+
|
|
61
|
+
- 格式: `refactor/description`
|
|
62
|
+
- 示例: `git checkout -b refactor/use-callback-optimization`
|
|
63
|
+
|
|
64
|
+
#### 文档更新 (Docs)
|
|
65
|
+
|
|
66
|
+
仅涉及文档、注释、Storybook 示例的修改。
|
|
67
|
+
|
|
68
|
+
- 格式: `docs/description`
|
|
69
|
+
- 示例: `git checkout -b docs/add-api-tables`
|
|
70
|
+
|
|
71
|
+
#### 性能优化 (Perf)
|
|
72
|
+
|
|
73
|
+
专门针对组件渲染性能或包体积的优化。
|
|
74
|
+
|
|
75
|
+
- 格式: `perf/description`
|
|
76
|
+
- 示例: `git checkout -b perf/reduce-bundle-size`
|
|
77
|
+
|
|
78
|
+
#### 辅助任务 (Chore)
|
|
79
|
+
|
|
80
|
+
构建流程、依赖库更新、CI 配置等非业务逻辑修改。
|
|
81
|
+
|
|
82
|
+
- 格式: `chore/description`
|
|
83
|
+
- 示例: `git checkout -b chore/upgrade-react-18`
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 3. 工作流建议 (Workflow)
|
|
88
|
+
|
|
89
|
+
1. **同步主分支**: 开发前确保 `develop` 分支是最新的。
|
|
90
|
+
2. **创建分支**: 从 `develop` 拉取新分支。
|
|
91
|
+
```bash
|
|
92
92
|
git checkout -b feat/your-feature-name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),g=require("chart.js/auto"),y=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n};function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function h(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]=h(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:h(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer: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=y($,[["render",S],["__scopeId","data-v-69a44652"]]),_=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:h(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=y(_,[["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:h(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=y(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:h(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=y(H,[["render",z],["__scopeId","data-v-72672f5f"]]),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:h(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=y(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:h(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=y(P,[["render",D]]);exports._export_sfc=y;exports.index=w;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|
|
1
|
+
"use strict";const a=require("vue"),g=require("chart.js/auto"),y=(e,i)=>{const n=e.__vccOpts||e;for(const[o,s]of i)n[o]=s;return n};function k(e){return Object.prototype.toString.call(e)==="[object Object]"}function h(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]=h(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:h(l,e.options)})};return a.onMounted(()=>{f()}),a.watch([()=>e.labels,()=>e.datasets,()=>e.height],()=>{f()},{deep:!0}),{barChartCanvas:i,chartContainer: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=y($,[["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:h(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=y(_,[["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:h(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=y(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:h(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=y(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:h(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=y(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:h(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=y(P,[["render",D]]);exports._export_sfc=y;exports.index=w;exports.index$1=E;exports.index$2=B;exports.index$3=N;exports.index$4=L;exports.index$5=I;
|
|
@@ -181,7 +181,7 @@ function j(e, i, a, l, o, c) {
|
|
|
181
181
|
])
|
|
182
182
|
], 512);
|
|
183
183
|
}
|
|
184
|
-
const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-
|
|
184
|
+
const Z = /* @__PURE__ */ O(q, [["render", j], ["__scopeId", "data-v-e2691574"]]), E = g({
|
|
185
185
|
name: "JChBarLine",
|
|
186
186
|
props: {
|
|
187
187
|
labels: {
|
|
@@ -617,7 +617,7 @@ function N(e, i, a, l, o, c) {
|
|
|
617
617
|
}, null, 4)
|
|
618
618
|
], 512);
|
|
619
619
|
}
|
|
620
|
-
const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-
|
|
620
|
+
const G = /* @__PURE__ */ O(L, [["render", N], ["__scopeId", "data-v-1a079ae0"]]), P = g({
|
|
621
621
|
name: "JChPieDoughnut",
|
|
622
622
|
props: {
|
|
623
623
|
type: {
|
package/dist/charts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts-DJRnfFOn.cjs");exports.JChBar=e.index;exports.JChBarLine=e.index$1;exports.JChBubble=e.index$2;exports.JChLine=e.index$3;exports.JChPieDoughnut=e.index$4;exports.JChRadar=e.index$5;
|
package/dist/charts.es.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** JCCopy Props 接口 */
|
|
3
|
+
export interface JCCopyProps {
|
|
4
|
+
/**
|
|
5
|
+
* 要复制的文本内容
|
|
6
|
+
* @default null
|
|
7
|
+
* @required true
|
|
8
|
+
*/
|
|
9
|
+
text: string | number | object;
|
|
10
|
+
/**
|
|
11
|
+
* 复制成功后图标恢复延迟时间(毫秒)
|
|
12
|
+
* @default 2000
|
|
13
|
+
*/
|
|
14
|
+
revertDelay?: number;
|
|
15
|
+
}
|
|
16
|
+
/** JCCopy Emits 接口 */
|
|
17
|
+
export interface JCCopyEmits {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
/** 组件没有定义事件 */
|
|
20
|
+
(e: 'never', never: never): never;
|
|
21
|
+
}
|
|
22
|
+
/** JCCopy Slots 接口 */
|
|
23
|
+
export interface JCCopySlots {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
/** 组件没有定义插槽 */
|
|
26
|
+
never?: never;
|
|
27
|
+
}
|
|
28
|
+
/** JCCopy 暴露的方法和属性 */
|
|
29
|
+
export interface JCCopyExpose {
|
|
30
|
+
}
|
|
31
|
+
/** JCCopy 组件类型定义 */
|
|
32
|
+
export type JCCopyComponent = DefineComponent<JCCopyProps, JCCopyExpose, {}, JCCopySlots, JCCopyEmits, {}, {}, {}>;
|
|
33
|
+
/** JCCopy 实例类型 - 用于 ref 类型定义 */
|
|
34
|
+
export type JCCopyInstance = InstanceType<JCCopyComponent> & JCCopyExpose;
|
|
35
|
+
/**
|
|
36
|
+
* 用于模板中的 Props 类型定义
|
|
37
|
+
*/
|
|
38
|
+
export interface JCCopyTemplateProps extends JCCopyProps {
|
|
39
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
export declare const JCDuoListEditorActionMode: {
|
|
3
|
+
readonly INLINE: "inline";
|
|
4
|
+
readonly COMPACT: "compact";
|
|
5
|
+
};
|
|
6
|
+
/** 操作模式类型 */
|
|
7
|
+
export type JCDuoListEditorActionModeType = (typeof JCDuoListEditorActionMode)[keyof typeof JCDuoListEditorActionMode];
|
|
8
|
+
/** 列表项类型 */
|
|
9
|
+
export type TModelItem = any;
|
|
10
|
+
/** 列表值类型 */
|
|
11
|
+
export type TModelValue = TModelItem[];
|
|
12
|
+
/** JCDuoListEditor Props 接口 */
|
|
13
|
+
export interface JCDuoListEditorProps {
|
|
14
|
+
/**
|
|
15
|
+
* 双向绑定的列表数据
|
|
16
|
+
* @default [{}]
|
|
17
|
+
*/
|
|
18
|
+
modelValue?: TModelValue;
|
|
19
|
+
/**
|
|
20
|
+
* 新项的默认值
|
|
21
|
+
* @default {}
|
|
22
|
+
*/
|
|
23
|
+
defaultNewItem?: TModelItem;
|
|
24
|
+
/**
|
|
25
|
+
* 最小项数
|
|
26
|
+
* @default 1
|
|
27
|
+
*/
|
|
28
|
+
minItems?: number;
|
|
29
|
+
/**
|
|
30
|
+
* 最大项数
|
|
31
|
+
* @default 5
|
|
32
|
+
*/
|
|
33
|
+
maxItems?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 操作按钮显示模式
|
|
36
|
+
* @default 'inline'
|
|
37
|
+
* @values 'inline' | 'compact'
|
|
38
|
+
*/
|
|
39
|
+
actionMode?: JCDuoListEditorActionModeType;
|
|
40
|
+
/**
|
|
41
|
+
* 是否显示添加按钮
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showAddButton?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示删除按钮
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showRemoveButton?: boolean;
|
|
50
|
+
}
|
|
51
|
+
/** JCDuoListEditor Emits 接口 */
|
|
52
|
+
export interface JCDuoListEditorEmits {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
/**
|
|
55
|
+
* 数据更新事件
|
|
56
|
+
* @param value 更新后的值数组
|
|
57
|
+
*/
|
|
58
|
+
(e: 'update:modelValue', value: TModelValue[]): void;
|
|
59
|
+
}
|
|
60
|
+
/** JCDuoListEditor Slots 接口 */
|
|
61
|
+
export interface JCDuoListEditorSlots {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
/**
|
|
64
|
+
* 列表项内容插槽
|
|
65
|
+
* @param item 当前列表项
|
|
66
|
+
* @param index 当前索引
|
|
67
|
+
* @param updateItem 更新项的函数
|
|
68
|
+
* @param isLast 是否最后一项
|
|
69
|
+
* @param addItem 添加项的函数
|
|
70
|
+
* @param removeItem 移除项的函数
|
|
71
|
+
* @param canAdd 是否可以添加
|
|
72
|
+
* @param canRemove 是否可以移除
|
|
73
|
+
* @param mode 操作模式
|
|
74
|
+
*/
|
|
75
|
+
'item-content'?: (props: {
|
|
76
|
+
item: TModelItem;
|
|
77
|
+
index: number;
|
|
78
|
+
updateItem: (index: number, newItem: TModelItem) => void;
|
|
79
|
+
isLast: boolean;
|
|
80
|
+
addItem: (index: number) => void;
|
|
81
|
+
removeItem: (index: number) => void;
|
|
82
|
+
canAdd: boolean;
|
|
83
|
+
canRemove: boolean;
|
|
84
|
+
mode: JCDuoListEditorActionModeType;
|
|
85
|
+
}) => any;
|
|
86
|
+
/**
|
|
87
|
+
* 列表底部操作插槽
|
|
88
|
+
* @param addItem 添加项的函数
|
|
89
|
+
* @param canAdd 是否可以添加
|
|
90
|
+
* @param nextIndex 下一项的索引
|
|
91
|
+
*/
|
|
92
|
+
'list-footer-actions'?: (props: {
|
|
93
|
+
addItem: (index: number) => void;
|
|
94
|
+
canAdd: boolean;
|
|
95
|
+
nextIndex: number;
|
|
96
|
+
}) => any;
|
|
97
|
+
}
|
|
98
|
+
/** JCDuoListEditor 暴露的方法和属性 */
|
|
99
|
+
export interface JCDuoListEditorExpose {
|
|
100
|
+
}
|
|
101
|
+
/** JCDuoListEditor 组件类型定义 */
|
|
102
|
+
export type JCDuoListEditorComponent = DefineComponent<JCDuoListEditorProps, JCDuoListEditorExpose, {}, JCDuoListEditorSlots, JCDuoListEditorEmits, {}, {}, {}>;
|
|
103
|
+
/** JCDuoListEditor 实例类型 - 用于 ref 类型定义 */
|
|
104
|
+
export type JCDuoListEditorInstance = InstanceType<JCDuoListEditorComponent> & JCDuoListEditorExpose;
|
|
105
|
+
/**
|
|
106
|
+
* 用于模板中的 Props 类型定义
|
|
107
|
+
*/
|
|
108
|
+
export interface JCDuoListEditorTemplateProps extends JCDuoListEditorProps {
|
|
109
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 模型值类型 */
|
|
3
|
+
export type ModelValueType = any;
|
|
4
|
+
/** QInputRef 接口 */
|
|
5
|
+
export interface QInputRef {
|
|
6
|
+
validate: () => boolean;
|
|
7
|
+
resetValidation: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** JCEditableProxy Props 接口 */
|
|
10
|
+
export interface JCEditableProxyProps {
|
|
11
|
+
/**
|
|
12
|
+
* 双向绑定的值
|
|
13
|
+
* @default null
|
|
14
|
+
*/
|
|
15
|
+
modelValue?: ModelValueType;
|
|
16
|
+
/**
|
|
17
|
+
* 编辑图标大小
|
|
18
|
+
* @default '18px'
|
|
19
|
+
*/
|
|
20
|
+
iconSize?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 弹窗宽度
|
|
23
|
+
* @default '300px'
|
|
24
|
+
*/
|
|
25
|
+
popupWidth?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 权限码
|
|
28
|
+
* @default ''
|
|
29
|
+
*/
|
|
30
|
+
code?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 是否必填
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 移除确认按钮上边距
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
noSpacing?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* 自动检测是否有验证规则
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
autoDetect?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 编辑图标样式
|
|
48
|
+
* @default ''
|
|
49
|
+
*/
|
|
50
|
+
iconStyle?: string;
|
|
51
|
+
}
|
|
52
|
+
/** JCEditableProxy Emits 接口 */
|
|
53
|
+
export interface JCEditableProxyEmits {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
/**
|
|
56
|
+
* 数据更新事件
|
|
57
|
+
* @param value 更新后的值
|
|
58
|
+
*/
|
|
59
|
+
(e: 'update:modelValue', value: ModelValueType): void;
|
|
60
|
+
/**
|
|
61
|
+
* 保存成功事件
|
|
62
|
+
* @param value 保存的值
|
|
63
|
+
*/
|
|
64
|
+
(e: 'saved', value: ModelValueType): void;
|
|
65
|
+
/**
|
|
66
|
+
* 确认事件
|
|
67
|
+
* @param value 当前值
|
|
68
|
+
* @param done 完成回调函数
|
|
69
|
+
*/
|
|
70
|
+
(e: 'confirm', value: ModelValueType, done: (options?: {
|
|
71
|
+
success?: boolean;
|
|
72
|
+
close?: boolean;
|
|
73
|
+
resetValue?: boolean;
|
|
74
|
+
}) => void): void;
|
|
75
|
+
}
|
|
76
|
+
/** JCEditableProxy Slots 接口 */
|
|
77
|
+
export interface JCEditableProxySlots {
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
/**
|
|
80
|
+
* 显示内容插槽
|
|
81
|
+
*/
|
|
82
|
+
display?: () => any;
|
|
83
|
+
/**
|
|
84
|
+
* 编辑器插槽
|
|
85
|
+
* @param tempValue 临时值
|
|
86
|
+
* @param updateTempValue 更新临时值的函数
|
|
87
|
+
* @param setEditorRef 设置编辑器引用的函数
|
|
88
|
+
*/
|
|
89
|
+
editor?: (props: {
|
|
90
|
+
tempValue: ModelValueType;
|
|
91
|
+
updateTempValue: (val: ModelValueType) => void;
|
|
92
|
+
setEditorRef: (ref: QInputRef | null) => void;
|
|
93
|
+
}) => any;
|
|
94
|
+
}
|
|
95
|
+
/** JCEditableProxy 暴露的方法和属性 */
|
|
96
|
+
export interface JCEditableProxyExpose {
|
|
97
|
+
}
|
|
98
|
+
/** JCEditableProxy 组件类型定义 */
|
|
99
|
+
export type JCEditableProxyComponent = DefineComponent<JCEditableProxyProps, JCEditableProxyExpose, {}, JCEditableProxySlots, JCEditableProxyEmits, {}, {}, {}>;
|
|
100
|
+
/** JCEditableProxy 实例类型 - 用于 ref 类型定义 */
|
|
101
|
+
export type JCEditableProxyInstance = InstanceType<JCEditableProxyComponent> & JCEditableProxyExpose;
|
|
102
|
+
/**
|
|
103
|
+
* 用于模板中的 Props 类型定义
|
|
104
|
+
*/
|
|
105
|
+
export interface JCEditableProxyTemplateProps extends JCEditableProxyProps {
|
|
106
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
/** 回退值类型 */
|
|
3
|
+
export type FallbackValue = any;
|
|
4
|
+
/** JCFallback Props 接口 */
|
|
5
|
+
export interface JCFallbackProps {
|
|
6
|
+
/**
|
|
7
|
+
* 需要判断是否存在的值
|
|
8
|
+
* @default null
|
|
9
|
+
*/
|
|
10
|
+
value?: FallbackValue;
|
|
11
|
+
/**
|
|
12
|
+
* 无值时显示的内容
|
|
13
|
+
* @default '-'
|
|
14
|
+
*/
|
|
15
|
+
defaultContent?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 无值时是否移除DOM
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
rmDom?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 是否把 0 或 '0' 视为有效值
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
zeroIsValid?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 是否把 false 视为有效值
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
falseIsValid?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** JCFallback Emits 接口 */
|
|
33
|
+
export interface JCFallbackEmits {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
/** 组件没有定义事件 */
|
|
36
|
+
(e: 'never', never: never): never;
|
|
37
|
+
}
|
|
38
|
+
/** JCFallback Slots 接口 */
|
|
39
|
+
export interface JCFallbackSlots {
|
|
40
|
+
[key: string]: any;
|
|
41
|
+
/**
|
|
42
|
+
* 默认插槽,有值时显示的内容
|
|
43
|
+
*/
|
|
44
|
+
default?: () => any;
|
|
45
|
+
}
|
|
46
|
+
/** JCFallback 暴露的方法和属性 */
|
|
47
|
+
export interface JCFallbackExpose {
|
|
48
|
+
}
|
|
49
|
+
/** JCFallback 组件类型定义 */
|
|
50
|
+
export type JCFallbackComponent = DefineComponent<JCFallbackProps, JCFallbackExpose, {}, JCFallbackSlots, JCFallbackEmits, {}, {}, {}>;
|
|
51
|
+
/** JCFallback 实例类型 - 用于 ref 类型定义 */
|
|
52
|
+
export type JCFallbackInstance = InstanceType<JCFallbackComponent> & JCFallbackExpose;
|
|
53
|
+
/**
|
|
54
|
+
* 用于模板中的 Props 类型定义
|
|
55
|
+
*/
|
|
56
|
+
export interface JCFallbackTemplateProps extends JCFallbackProps {
|
|
57
|
+
}
|