@jzg223/design-runtime 0.1.0-rc.1 → 0.1.0-rc.2

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.
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./board-chart2.vue.js";
2
2
  /* empty css */
3
3
  import _export_sfc from "../_virtual/_plugin-vue_export-helper.js";
4
- const BoardChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ed46ca8c"]]);
4
+ const BoardChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab9edc2c"]]);
5
5
  export {
6
6
  BoardChart as default
7
7
  };
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  let observer = null;
19
19
  let disposed = false;
20
20
  async function loadEcharts() {
21
- return import("echarts");
21
+ return import("./echarts.js");
22
22
  }
23
23
  function render() {
24
24
  if (!chart) return;
@@ -0,0 +1,40 @@
1
+ import { BarChart, LineChart, PieChart, FunnelChart, RadarChart, ScatterChart, GaugeChart } from "echarts/charts";
2
+ import { GridComponent, LegendComponent, RadarComponent, TitleComponent, TooltipComponent } from "echarts/components";
3
+ import * as echartsCore from "echarts/core";
4
+ import { CanvasRenderer } from "echarts/renderers";
5
+ const CHART_TYPE_MODULES = {
6
+ bar: "BarChart",
7
+ hbar: "BarChart",
8
+ line: "LineChart",
9
+ area: "LineChart",
10
+ pie: "PieChart",
11
+ donut: "PieChart",
12
+ rose: "PieChart",
13
+ funnel: "FunnelChart",
14
+ pyramid: "FunnelChart",
15
+ radar: "RadarChart",
16
+ scatter: "ScatterChart",
17
+ gauge: "GaugeChart",
18
+ ring: "GaugeChart"
19
+ };
20
+ echartsCore.use([
21
+ BarChart,
22
+ LineChart,
23
+ PieChart,
24
+ FunnelChart,
25
+ RadarChart,
26
+ ScatterChart,
27
+ GaugeChart,
28
+ GridComponent,
29
+ LegendComponent,
30
+ RadarComponent,
31
+ TitleComponent,
32
+ TooltipComponent,
33
+ CanvasRenderer
34
+ ]);
35
+ const echarts = echartsCore;
36
+ export {
37
+ CHART_TYPE_MODULES,
38
+ echartsCore as default,
39
+ echarts
40
+ };
package/dist/style.css CHANGED
@@ -285,13 +285,13 @@
285
285
  color: rgba(0, 0, 0, 0.45);
286
286
  }
287
287
 
288
- .drb-chart[data-v-ed46ca8c] {
288
+ .drb-chart[data-v-ab9edc2c] {
289
289
  position: relative;
290
290
  width: 100%;
291
291
  height: 100%;
292
292
  min-height: 0;
293
293
  }
294
- .drb-chart__error[data-v-ed46ca8c] {
294
+ .drb-chart__error[data-v-ab9edc2c] {
295
295
  display: flex;
296
296
  align-items: center;
297
297
  justify-content: center;
@@ -0,0 +1,25 @@
1
+ import * as echartsCore from 'echarts/core';
2
+ /**
3
+ * 图型 ↔ 引擎 `CHART_TYPES` 的对照(改任何一边都要同步另一边,护栏会比对)
4
+ *
5
+ * bar/hbar → BarChart;line/area → LineChart;pie/donut/rose → PieChart;
6
+ * funnel/pyramid → FunnelChart;radar → RadarChart;scatter → ScatterChart;gauge/ring → GaugeChart
7
+ */
8
+ export declare const CHART_TYPE_MODULES: {
9
+ readonly bar: "BarChart";
10
+ readonly hbar: "BarChart";
11
+ readonly line: "LineChart";
12
+ readonly area: "LineChart";
13
+ readonly pie: "PieChart";
14
+ readonly donut: "PieChart";
15
+ readonly rose: "PieChart";
16
+ readonly funnel: "FunnelChart";
17
+ readonly pyramid: "FunnelChart";
18
+ readonly radar: "RadarChart";
19
+ readonly scatter: "ScatterChart";
20
+ readonly gauge: "GaugeChart";
21
+ readonly ring: "GaugeChart";
22
+ };
23
+ /** 已注册(引入即生效)的 echarts 核心实例 */
24
+ export declare const echarts: typeof echartsCore;
25
+ export default echartsCore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jzg223/design-runtime",
3
- "version": "0.1.0-rc.1",
3
+ "version": "0.1.0-rc.2",
4
4
  "description": "低代码设计平台运行端组件库:把设计端(design-ui)产出的配置,在 vben 基座上渲染成表格 / 表单 / 树 / 组合视图 / 数据看板。位于「基座」与「业务项目」之间,版本化、可复用、不拷贝。",
5
5
  "keywords": [
6
6
  "lowcode",
@@ -34,8 +34,9 @@
34
34
  "build:js": "vite build",
35
35
  "build:types": "vue-tsc -p tsconfig.build.json --emitDeclarationOnly",
36
36
  "verify": "node scripts/assert-bundle.mjs && node scripts/assert-board-engine.mjs",
37
- "test": "npm run test:table && npm run test:host && npm run test:shared && npm run test:search && npm run test:form && npm run test:component && npm run test:board && npm run test:board-render && npm run test:board-fingerprint",
37
+ "test": "npm run test:table && npm run test:host && npm run test:shared && npm run test:search && npm run test:form && npm run test:component && npm run test:board && npm run test:board-render && npm run test:board-fingerprint && npm run test:board-chart",
38
38
  "test:board": "node scripts/test-board-engine.mjs",
39
+ "test:board-chart": "node scripts/test-board-chart-registry.mjs",
39
40
  "test:board-render": "node scripts/test-board-render.mjs",
40
41
  "test:board-fingerprint": "node scripts/test-board-fingerprint.mjs",
41
42
  "test:component": "node scripts/test-components.mjs",