@vela-studio/ui 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -0
- package/dist/index.d.ts +696 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11786 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +10 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/index.ts +150 -0
- package/package.json +73 -0
- package/src/components/advanced/scripting/Scripting.vue +189 -0
- package/src/components/advanced/state/State.vue +231 -0
- package/src/components/advanced/trigger/Trigger.vue +256 -0
- package/src/components/basic/button/Button.vue +120 -0
- package/src/components/basic/container/Container.vue +22 -0
- package/src/components/chart/barChart/barChart.vue +176 -0
- package/src/components/chart/doughnutChart/doughnutChart.vue +128 -0
- package/src/components/chart/funnelChart/funnelChart.vue +128 -0
- package/src/components/chart/gaugeChart/gaugeChart.vue +144 -0
- package/src/components/chart/lineChart/lineChart.vue +188 -0
- package/src/components/chart/pieChart/pieChart.vue +114 -0
- package/src/components/chart/radarChart/radarChart.vue +115 -0
- package/src/components/chart/sankeyChart/sankeyChart.vue +144 -0
- package/src/components/chart/scatterChart/scatterChart.vue +162 -0
- package/src/components/chart/stackedBarChart/stackedBarChart.vue +184 -0
- package/src/components/content/html/Html.vue +104 -0
- package/src/components/content/iframe/Iframe.vue +111 -0
- package/src/components/content/markdown/Markdown.vue +174 -0
- package/src/components/controls/breadcrumb/Breadcrumb.vue +79 -0
- package/src/components/controls/buttonGroup/ButtonGroup.vue +93 -0
- package/src/components/controls/checkboxGroup/CheckboxGroup.vue +147 -0
- package/src/components/controls/dateRange/DateRange.vue +174 -0
- package/src/components/controls/multiSelect/MultiSelect.vue +155 -0
- package/src/components/controls/navButton/NavButton.vue +97 -0
- package/src/components/controls/pagination/Pagination.vue +94 -0
- package/src/components/controls/searchBox/SearchBox.vue +170 -0
- package/src/components/controls/select/Select.vue +134 -0
- package/src/components/controls/slider/Slider.vue +167 -0
- package/src/components/controls/switch/Switch.vue +107 -0
- package/src/components/data/cardGrid/CardGrid.vue +318 -0
- package/src/components/data/list/List.vue +282 -0
- package/src/components/data/pivot/Pivot.vue +270 -0
- package/src/components/data/table/Table.vue +150 -0
- package/src/components/data/timeline/Timeline.vue +315 -0
- package/src/components/group/Group.vue +75 -0
- package/src/components/kpi/box/Box.vue +98 -0
- package/src/components/kpi/countUp/CountUp.vue +193 -0
- package/src/components/kpi/progress/Progress.vue +159 -0
- package/src/components/kpi/stat/Stat.vue +205 -0
- package/src/components/kpi/text/Text.vue +74 -0
- package/src/components/layout/badge/Badge.vue +105 -0
- package/src/components/layout/col/Col.vue +114 -0
- package/src/components/layout/flex/Flex.vue +105 -0
- package/src/components/layout/grid/Grid.vue +89 -0
- package/src/components/layout/modal/Modal.vue +118 -0
- package/src/components/layout/panel/Panel.vue +162 -0
- package/src/components/layout/row/Row.vue +99 -0
- package/src/components/layout/tabs/Tabs.vue +117 -0
- package/src/components/media/image/Image.vue +132 -0
- package/src/components/media/video/Video.vue +115 -0
- package/src/components/v2/basic/BaseButton.vue +179 -0
- package/src/components/v2/kpi/KpiCard.vue +215 -0
- package/src/components/v2/layout/GridBox.vue +55 -0
- package/src/hooks/useDataSource.ts +123 -0
- package/src/types/gis.ts +251 -0
- package/src/utils/chartUtils.ts +349 -0
- package/src/utils/dataUtils.ts +403 -0
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# @vela/ui
|
|
2
|
+
|
|
3
|
+
Vela LowCode UI Component Library - 数据可视化组件库 for Vue 3
|
|
4
|
+
|
|
5
|
+
基于 Vue 3 + TypeScript + ECharts 的数据可视化大屏组件库,提供开箱即用的图表、KPI、布局等50+组件。
|
|
6
|
+
|
|
7
|
+
## ✨ 特性
|
|
8
|
+
|
|
9
|
+
- 🎨 **50+ 组件** - 图表、KPI、布局、表单控件等开箱即用
|
|
10
|
+
- 📊 **ECharts 集成** - 深度封装 ECharts,支持所有图表类型
|
|
11
|
+
- 🎯 **TypeScript** - 完整的类型定义
|
|
12
|
+
- 🌳 **Tree-shaking** - 按需引入,减小打包体积
|
|
13
|
+
- 🔧 **灵活配置** - 扁平化属性接口,易于低代码平台集成
|
|
14
|
+
|
|
15
|
+
## 📦 安装
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @vela/ui
|
|
19
|
+
# 或
|
|
20
|
+
pnpm add @vela/ui
|
|
21
|
+
# 或
|
|
22
|
+
yarn add @vela/ui
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 🔧 使用
|
|
26
|
+
|
|
27
|
+
### 完整引入
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { createApp } from 'vue'
|
|
31
|
+
import VelaUI from '@vela/ui'
|
|
32
|
+
import '@vela/ui/dist/style.css'
|
|
33
|
+
|
|
34
|
+
const app = createApp(App)
|
|
35
|
+
app.use(VelaUI)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 按需引入
|
|
39
|
+
|
|
40
|
+
```vue
|
|
41
|
+
<template>
|
|
42
|
+
<lineChart :data="chartData" :x-axis="xAxis" />
|
|
43
|
+
<vText text="Hello World" :font-size="24" />
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup>
|
|
47
|
+
import { lineChart, vText } from '@vela/ui'
|
|
48
|
+
import '@vela/ui/dist/style.css'
|
|
49
|
+
|
|
50
|
+
const chartData = [120, 200, 150, 80, 70, 110]
|
|
51
|
+
const xAxis = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
|
52
|
+
</script>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 📚 组件分类
|
|
56
|
+
|
|
57
|
+
### 图表组件 (Chart)
|
|
58
|
+
|
|
59
|
+
- `lineChart` - 折线图
|
|
60
|
+
- `barChart` - 柱状图
|
|
61
|
+
- `pieChart` - 饼图
|
|
62
|
+
- `doughnutChart` - 环形图
|
|
63
|
+
- `radarChart` - 雷达图
|
|
64
|
+
- `gaugeChart` - 仪表盘
|
|
65
|
+
- `funnelChart` - 漏斗图
|
|
66
|
+
- `scatterChart` - 散点图
|
|
67
|
+
- `sankeyChart` - 桑基图
|
|
68
|
+
- `stackedBarChart` - 堆叠柱状图
|
|
69
|
+
|
|
70
|
+
### KPI 组件
|
|
71
|
+
|
|
72
|
+
- `vText` - 文本
|
|
73
|
+
- `vStat` - 统计卡片
|
|
74
|
+
- `vCountUp` - 数字滚动
|
|
75
|
+
- `vProgress` - 进度条
|
|
76
|
+
- `vBox` - 信息盒子
|
|
77
|
+
|
|
78
|
+
### 布局组件
|
|
79
|
+
|
|
80
|
+
- `vRow` / `vCol` - 栅格布局
|
|
81
|
+
- `vFlex` - Flex 布局
|
|
82
|
+
- `vGrid` - Grid 布局
|
|
83
|
+
- `vPanel` - 面板
|
|
84
|
+
- `vTabs` - 标签页
|
|
85
|
+
- `vModal` - 弹窗
|
|
86
|
+
- `vGroup` - 组件组合
|
|
87
|
+
|
|
88
|
+
### 数据展示
|
|
89
|
+
|
|
90
|
+
- `vTable` - 表格
|
|
91
|
+
- `vList` - 列表
|
|
92
|
+
- `vTimeline` - 时间线
|
|
93
|
+
- `vCardGrid` - 卡片网格
|
|
94
|
+
- `vPivot` - 透视表
|
|
95
|
+
|
|
96
|
+
### 表单控件
|
|
97
|
+
|
|
98
|
+
- `vSelect` - 下拉选择
|
|
99
|
+
- `vDateRange` - 日期范围
|
|
100
|
+
- `vSlider` - 滑块
|
|
101
|
+
- `vSwitch` - 开关
|
|
102
|
+
- `vSearchBox` - 搜索框
|
|
103
|
+
- `vButtonGroup` - 按钮组
|
|
104
|
+
- `vCheckboxGroup` - 复选框组
|
|
105
|
+
- `vPagination` - 分页
|
|
106
|
+
- `vBreadcrumb` - 面包屑
|
|
107
|
+
- `vNavButton` - 导航按钮
|
|
108
|
+
|
|
109
|
+
### 内容媒体
|
|
110
|
+
|
|
111
|
+
- `vImage` - 图片
|
|
112
|
+
- `vVideo` - 视频
|
|
113
|
+
- `vHtml` - HTML 内容
|
|
114
|
+
- `vMarkdown` - Markdown
|
|
115
|
+
- `vIframe` - 内嵌页面
|
|
116
|
+
|
|
117
|
+
### 高级组件
|
|
118
|
+
|
|
119
|
+
- `vScripting` - 脚本执行
|
|
120
|
+
- `vState` - 状态管理
|
|
121
|
+
- `vTrigger` - 事件触发器
|
|
122
|
+
|
|
123
|
+
## 🎯 低代码平台集成
|
|
124
|
+
|
|
125
|
+
本组件库专为低代码平台设计,所有组件支持 JSON Schema 配置:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
// 组件可以通过 JSON 配置驱动
|
|
129
|
+
const componentConfig = {
|
|
130
|
+
componentName: 'lineChart',
|
|
131
|
+
props: {
|
|
132
|
+
data: [120, 200, 150],
|
|
133
|
+
color: '#409EFF',
|
|
134
|
+
},
|
|
135
|
+
style: {
|
|
136
|
+
width: 400,
|
|
137
|
+
height: 300,
|
|
138
|
+
},
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 📖 文档
|
|
143
|
+
|
|
144
|
+
完整文档请访问:[https://visual-lib-docs.vercel.app/](https://visual-lib-docs.vercel.app/)
|
|
145
|
+
|
|
146
|
+
## 🔗 相关项目
|
|
147
|
+
|
|
148
|
+
- [Vela LowCode Editor](https://github.com/TWILIGHT-wyf/vela-lowcode-editor) - 基于本组件库的低代码平台
|
|
149
|
+
|
|
150
|
+
## 📄 License
|
|
151
|
+
|
|
152
|
+
MIT
|