cnhis-design-vue 3.1.25 → 3.1.26-beta.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.
Files changed (38) hide show
  1. package/README.md +123 -123
  2. package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +3 -3
  3. package/es/components/fabric-chart/src/FabricChart.js +2 -1
  4. package/es/components/fabric-chart/src/hooks/useCenter.js +175 -135
  5. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  6. package/es/components/form-render/src/components/renderer/searchCascade.js +18 -4
  7. package/es/components/iho-table/src/plugins/index.js +6 -6
  8. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.js +80 -78
  9. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +96 -0
  10. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +4 -1
  11. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{timeRendererPlugin/index.d.ts → timeRendererPlugin.d.ts} +1 -1
  12. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +56 -0
  13. package/es/shared/assets/img/failure.js +1 -1
  14. package/es/shared/assets/img/icon-asc.js +1 -1
  15. package/es/shared/assets/img/icon-desc.js +1 -1
  16. package/es/shared/assets/img/no-permission.js +1 -1
  17. package/es/shared/assets/img/nodata.js +1 -1
  18. package/es/shared/assets/img/notfound.js +1 -1
  19. package/es/shared/assets/img/qr.js +1 -1
  20. package/es/shared/assets/img/success.js +1 -1
  21. package/es/shared/assets/img/video.js +1 -1
  22. package/es/shared/assets/img/video_default_cover.js +1 -1
  23. package/es/shared/assets/img/video_hover.js +1 -1
  24. package/es/shared/assets/img/video_play_hover.js +1 -1
  25. package/es/shared/assets/img/xb_big.js +1 -1
  26. package/es/shared/assets/img/xb_small.js +1 -1
  27. package/package.json +2 -2
  28. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  29. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  30. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  31. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  32. package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
  33. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.d.ts +0 -31
  34. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.d.ts +0 -31
  35. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.js +0 -60
  36. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +0 -39
  37. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  38. package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md CHANGED
@@ -1,123 +1,123 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式 1(按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式 2(全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3. 注意
65
-
66
- 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
-
68
- ```typescript
69
- // main.ts
70
- import { createApp } from 'vue';
71
- import App from './App.vue';
72
-
73
- import { CGrid } from 'cnhis-design-vue';
74
- // 或者
75
- import { CBigTable } from 'cnhis-design-vue';
76
-
77
- const app = createApp(App);
78
- app.use(CGrid);
79
- // 或者
80
- app.use(CBigTable);
81
- app.mount('#app');
82
- ```
83
-
84
- ## 4.FAQ
85
-
86
- ### 4.1 项目打包后样式丢失
87
-
88
- > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
-
90
- ```typescript
91
- // vite.config.ts
92
- import { defineConfig } from 'vite';
93
-
94
- export default defineConfig({
95
- rollupOptions: {
96
- // ..otherOptions
97
- output: {
98
- dir: './dist',
99
- manualChunks(id: string) {
100
- if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
- return 'vendor';
102
- }
103
- }
104
- }
105
- }
106
- });
107
- ```
108
-
109
- ### 4.2 找不到文件
110
-
111
- > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
-
113
- ```javascript
114
- // vite.config.ts
115
- const config = {
116
- // ...otherOptions
117
- resolve: {
118
- // ...otherOptions
119
- // 如果没有配置, 则不用考虑
120
- extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
- }
122
- };
123
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式 1(按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式 2(全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3. 注意
65
+
66
+ 由于 vxe-table 目前的引入方式是由组件 install 触发的,所以如果需要使用 c-grid/c-big-table 组件,需要全局注册二者任意一个
67
+
68
+ ```typescript
69
+ // main.ts
70
+ import { createApp } from 'vue';
71
+ import App from './App.vue';
72
+
73
+ import { CGrid } from 'cnhis-design-vue';
74
+ // 或者
75
+ import { CBigTable } from 'cnhis-design-vue';
76
+
77
+ const app = createApp(App);
78
+ app.use(CGrid);
79
+ // 或者
80
+ app.use(CBigTable);
81
+ app.mount('#app');
82
+ ```
83
+
84
+ ## 4.FAQ
85
+
86
+ ### 4.1 项目打包后样式丢失
87
+
88
+ > 处理方法, 将 cnhis-design-vue 从 vendor 包中移除
89
+
90
+ ```typescript
91
+ // vite.config.ts
92
+ import { defineConfig } from 'vite';
93
+
94
+ export default defineConfig({
95
+ rollupOptions: {
96
+ // ..otherOptions
97
+ output: {
98
+ dir: './dist',
99
+ manualChunks(id: string) {
100
+ if (id.includes('node_modules') && !id.includes('cnhis-design-vue')) {
101
+ return 'vendor';
102
+ }
103
+ }
104
+ }
105
+ }
106
+ });
107
+ ```
108
+
109
+ ### 4.2 找不到文件
110
+
111
+ > 由于组件库输出文件类型由 js 修改成了 mjs, 如果配置了 resolve 属性的项目, 需要将 mjs 文件类型添加至 extensions 中
112
+
113
+ ```javascript
114
+ // vite.config.ts
115
+ const config = {
116
+ // ...otherOptions
117
+ resolve: {
118
+ // ...otherOptions
119
+ // 如果没有配置, 则不用考虑
120
+ extensions: ['.js', '.ts', '.vue', '.json', '.mjs']
121
+ }
122
+ };
123
+ ```
@@ -394,7 +394,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
394
394
  visible: checkVisible,
395
395
  resizable: false,
396
396
  width: checkMinWidth,
397
- slots: selectType === "checkbox" && !((_b = attr.checkboxConfig) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
397
+ slots: selectType === "checkbox" && !((_b = getAttr("checkbox-config")) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
398
398
  showOverflow: true
399
399
  }];
400
400
  const seqObj = columns.find((v) => v.type == "seq");
@@ -1311,10 +1311,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
1311
1311
  $rowIndex,
1312
1312
  triggerCheckbox
1313
1313
  } = data;
1314
- if (((_a = attr.checkboxConfig) == null ? void 0 : _a.noTriggerCellClick) && triggerCheckbox) {
1314
+ if (((_a = getAttr("checkbox-config")) == null ? void 0 : _a.noTriggerCellClick) && triggerCheckbox) {
1315
1315
  return false;
1316
1316
  }
1317
- if (((_b = attr.checkboxConfig) == null ? void 0 : _b.trigger) === "default") {
1317
+ if (((_b = getAttr("checkbox-config")) == null ? void 0 : _b.trigger) === "default") {
1318
1318
  emit("handlerClickRow", row, $rowIndex);
1319
1319
  return false;
1320
1320
  }
@@ -269,7 +269,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
269
269
  painYCell: painYCell.value,
270
270
  event: event.value,
271
271
  itemList: itemList.value,
272
- getRightInfo: getRightInfo.value
272
+ getRightInfo: getRightInfo.value,
273
+ config: props.data.config || {}
273
274
  });
274
275
  function computedYCell(type) {
275
276
  const { yScaleValue } = props.data.left;
@@ -40,7 +40,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
40
40
  event,
41
41
  vitalSignsOriginY,
42
42
  painOriginY,
43
- hospitalizationDate
43
+ hospitalizationDate,
44
+ config
44
45
  } = propItems;
45
46
  const pointTipProps = reactive({
46
47
  show: false,
@@ -256,100 +257,176 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
256
257
  const lineList = [];
257
258
  const otherList = [];
258
259
  item.list.forEach((v, index) => {
259
- var _a;
260
260
  const _item = type !== "temperature" ? item : dataList.find((_v) => _v.key === v.key);
261
- const {
262
- pointAttr = {},
263
- lineAttr = {},
264
- type: pointType = "circle",
265
- upArrowShow = false,
266
- limitValueShow = false
267
- } = _item;
268
261
  const points = getPointer(v, scaleValue);
269
- const nextV = item.list[index + 1];
270
- const nextPoint = getPointer(nextV, scaleValue);
271
- let reduceLine, reducePoint, noRiseText, arrowGroup, riseText, verifiedText;
272
- if ((points == null ? void 0 : points.length) && (type === "temperature" || type === "pain")) {
273
- if (v.noRise && noRiseStyle.show) {
274
- if (typeof v.noRise === "string") {
275
- noRiseText = drawText([points[0], points[1] + 5], {
276
- value: v.noRise.split("").join("\n"),
277
- originY: "top",
278
- ...noRiseStyle
279
- });
280
- otherList.push(noRiseText);
281
- } else {
282
- const top = points[1] + yCellHeight * 2;
283
- arrowGroup = drawArrow([points[0], points[1], top], noRiseStyle);
284
- otherList.push(arrowGroup);
285
- }
262
+ const otherObj = {};
263
+ otherObj.value = drawValue(points, v, _item);
264
+ drawOther(points, v, _item, otherObj);
265
+ drawPulseOther(points, v, _item, otherObj);
266
+ drawPointLine(points, v, index, _item, otherObj);
267
+ });
268
+ type === "pulse" && shadowPointCache.push(pointList);
269
+ Promise.all(pointList).then((res) => {
270
+ const lineListFilter = lineList.filter((v) => v);
271
+ let prevPoint = null;
272
+ res = res.filter((v) => {
273
+ if (v && prevPoint) {
274
+ prevPoint.nextPoint = v;
275
+ v.prevPoint = prevPoint;
286
276
  }
287
- if (v.rise && riseStyle.show) {
288
- riseText = drawText([points[0], points[1] - 5], {
289
- value: v.rise.split("").join("\n"),
290
- originY: "bottom",
291
- ...riseStyle
277
+ prevPoint = v || prevPoint;
278
+ v == null ? void 0 : v.bringToFront();
279
+ return v;
280
+ });
281
+ Promise.all(otherList).then((r) => {
282
+ canvas.value.add(...lineListFilter, ...res, ...r);
283
+ res.forEach((v) => {
284
+ v == null ? void 0 : v.bringToFront();
285
+ });
286
+ });
287
+ });
288
+ function drawValue(points, v, _item) {
289
+ if (!(points == null ? void 0 : points.length) || !config.showValue)
290
+ return;
291
+ const { lineAttr = {} } = _item;
292
+ const y = points[1] <= vitalSignsOriginY.originY + yCellHeight ? points[1] + yCellHeight : points[1] - yCellHeight;
293
+ const value = drawText([points[0], y], {
294
+ value: v.value,
295
+ originX: "center",
296
+ originY: "center",
297
+ fill: lineAttr.stroke || "#000"
298
+ });
299
+ otherList.push(value);
300
+ return {
301
+ obj: value,
302
+ top: -yCellHeight
303
+ };
304
+ }
305
+ function drawOther(points, v, _item, otherObj) {
306
+ var _a;
307
+ if (!(points == null ? void 0 : points.length) || !["temperature", "pain"].includes(type))
308
+ return;
309
+ const { lineAttr = {} } = _item;
310
+ const { value } = otherObj;
311
+ let reduceLine, reducePoint, noRiseText, arrowGroup, riseText, verifiedText;
312
+ if (v.noRise && noRiseStyle.show) {
313
+ if (typeof v.noRise === "string") {
314
+ noRiseText = drawText([points[0], points[1] + 5], {
315
+ value: v.noRise.split("").join("\n"),
316
+ originY: "top",
317
+ ...noRiseStyle
292
318
  });
293
- otherList.push(riseText);
319
+ otherList.push(noRiseText);
320
+ } else {
321
+ const top = points[1] + yCellHeight * 2;
322
+ arrowGroup = drawArrow([points[0], points[1], top], noRiseStyle);
323
+ otherList.push(arrowGroup);
294
324
  }
295
- if (v.verified) {
296
- verifiedText = drawText([points[0], points[1] - 5], {
297
- value: "v",
298
- originX: "center",
299
- originY: "bottom",
300
- ...verifiedStyle
301
- });
302
- otherList.push(verifiedText);
325
+ }
326
+ if (v.rise && riseStyle.show) {
327
+ riseText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
328
+ value: v.rise.split("").join("\n"),
329
+ originY: "bottom",
330
+ ...riseStyle
331
+ });
332
+ otherList.push(riseText);
333
+ }
334
+ if (v.verified) {
335
+ verifiedText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
336
+ value: "v",
337
+ originX: "center",
338
+ originY: "bottom",
339
+ ...verifiedStyle
340
+ });
341
+ otherList.push(verifiedText);
342
+ }
343
+ if (v.physicsReduce || v.drugReduce) {
344
+ const reduceY = cumputedY(type, scaleValue.list, v.physicsReduce || v.drugReduce);
345
+ reduceLine = drawLine([...points, points[0], reduceY], {
346
+ ...lineAttr,
347
+ ...reduceStyle.line,
348
+ ...defaultStyle
349
+ });
350
+ reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
351
+ left: points[0],
352
+ top: reduceY,
353
+ ...reduceStyle.point,
354
+ ...defaultStyle
355
+ });
356
+ reduceLine && otherList.push(reduceLine);
357
+ reducePoint && otherList.push(reducePoint);
358
+ }
359
+ Object.assign(otherObj, {
360
+ reduceLine: {
361
+ obj: reduceLine,
362
+ type: "line"
363
+ },
364
+ noRiseText: {
365
+ obj: noRiseText,
366
+ top: 5
367
+ },
368
+ arrowGroup: {
369
+ obj: arrowGroup,
370
+ top: yCellHeight * 2
371
+ },
372
+ riseText: {
373
+ obj: riseText,
374
+ top: (value ? -yCellHeight : 0) - 5
375
+ },
376
+ verifiedText: {
377
+ obj: verifiedText,
378
+ top: (value ? -yCellHeight : 0) - 5
303
379
  }
304
- if (v.physicsReduce || v.drugReduce) {
305
- const reduceY = cumputedY(type, scaleValue.list, v.physicsReduce || v.drugReduce);
306
- reduceLine = drawLine([...points, points[0], reduceY], {
307
- ...lineAttr,
308
- ...reduceStyle.line,
309
- ...defaultStyle
310
- });
311
- reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
312
- left: points[0],
313
- top: reduceY,
314
- ...reduceStyle.point,
315
- ...defaultStyle
316
- });
317
- reduceLine && otherList.push(reduceLine);
318
- reducePoint && otherList.push(reducePoint);
380
+ });
381
+ }
382
+ function drawPulseOther(points, v, _item, otherObj) {
383
+ if (!(points == null ? void 0 : points.length) || !["pulse"].includes(type))
384
+ return;
385
+ let upArrow, limitValue;
386
+ const { upArrowShow = false, limitValueShow = false } = _item;
387
+ if (upArrowShow && v.value > 180) {
388
+ let top = points[1] - yCellHeight * 2.5;
389
+ let yArr = [points[1] - yCellHeight / 2, top];
390
+ if (top < vitalSignsOriginY.originY) {
391
+ top = points[1] + yCellHeight * 2.5;
392
+ yArr = [top, points[1] + yCellHeight / 2];
319
393
  }
394
+ upArrow = drawArrow([points[0], yArr[0], yArr[1]], upArrowStyle, "up");
395
+ otherList.push(upArrow);
320
396
  }
321
- if ((points == null ? void 0 : points.length) && type === "pulse") {
322
- let upArrow;
323
- if (upArrowShow && v.value > 180) {
324
- let top = points[1] - yCellHeight * 2.5;
325
- let yArr = [points[1] - yCellHeight / 2, top];
326
- if (top < vitalSignsOriginY.originY) {
327
- top = points[1] + yCellHeight * 2.5;
328
- yArr = [top, points[1] + yCellHeight / 2];
329
- }
330
- upArrow = drawArrow([points[0], yArr[0], yArr[1]], upArrowStyle, "up");
331
- otherList.push(upArrow);
397
+ if (limitValueShow) {
398
+ const commonOptions = {
399
+ value: v.value,
400
+ originX: "center",
401
+ originY: "center",
402
+ ...limitValueStyle
403
+ };
404
+ if (v.value > Math.max(...scaleValue.list)) {
405
+ const top = upArrow ? points[1] + yCellHeight / 2 + upArrow.height : points[1] + yCellHeight;
406
+ limitValue = drawText([points[0], top], commonOptions);
407
+ otherList.push(limitValue);
332
408
  }
333
- if (limitValueShow) {
334
- const commonOptions = {
335
- value: v.value,
336
- originX: "center",
337
- originY: "center",
338
- ...limitValueStyle
339
- };
340
- if (v.value > Math.max(...scaleValue.list)) {
341
- const top = upArrow ? points[1] + yCellHeight / 2 + upArrow.height : points[1] + yCellHeight;
342
- const limitValue = drawText([points[0], top], commonOptions);
343
- otherList.push(limitValue);
344
- }
345
- if (v.value < Math.min(...scaleValue.list)) {
346
- const limitValue = drawText([points[0], points[1] - yCellHeight], commonOptions);
347
- otherList.push(limitValue);
348
- }
409
+ if (v.value < Math.min(...scaleValue.list)) {
410
+ limitValue = drawText([points[0], points[1] - yCellHeight], commonOptions);
411
+ otherList.push(limitValue);
349
412
  }
350
413
  }
414
+ Object.assign(otherObj, {
415
+ upArrow: {
416
+ obj: upArrow
417
+ },
418
+ limitValue: {
419
+ obj: limitValue,
420
+ top: -yCellHeight
421
+ }
422
+ });
423
+ }
424
+ function drawPointLine(points, v, index, _item, otherObj) {
351
425
  let point;
352
426
  let line;
427
+ const { pointAttr = {}, lineAttr = {}, title = "", key, type: pointType = "circle" } = _item;
428
+ const nextV = item.list[index + 1];
429
+ const nextPoint = getPointer(nextV, scaleValue);
353
430
  if (points && nextPoint && !v.breakpoint) {
354
431
  line = drawLine([...points, ...nextPoint], {
355
432
  ...lineAttr
@@ -368,20 +445,16 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
368
445
  const pointAttrNew = {
369
446
  origin: {
370
447
  data: v,
371
- title: _item.title,
372
- key: _item.key || "",
448
+ title,
449
+ key: key || "",
373
450
  unit: scaleValue.unit,
374
451
  type,
375
452
  dataIndex,
376
453
  index
377
454
  },
378
- noRiseText,
379
- arrowGroup,
380
- verifiedText,
381
455
  leftLine: previousLine,
382
456
  rightLine: line,
383
- reduceLine,
384
- reducePoint,
457
+ otherObj,
385
458
  lockMovementX: true,
386
459
  ...v.pacemakerShow && type == "pulse" ? pacemaker.style : pointAttr,
387
460
  ...propItems.event
@@ -405,7 +478,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
405
478
  }
406
479
  lineList.push(line);
407
480
  if (point) {
408
- if (_item.title.includes("\u8109\u640F")) {
481
+ if (title.includes("\u8109\u640F")) {
409
482
  maiboPoints.add(point);
410
483
  } else {
411
484
  otherPoints.add(point);
@@ -413,27 +486,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
413
486
  setPointEvent(point);
414
487
  pointList.push(point);
415
488
  }
416
- });
417
- type === "pulse" && shadowPointCache.push(pointList);
418
- Promise.all(pointList).then((res) => {
419
- const lineListFilter = lineList.filter((v) => v);
420
- let prevPoint = null;
421
- res = res.filter((v) => {
422
- if (v && prevPoint) {
423
- prevPoint.nextPoint = v;
424
- v.prevPoint = prevPoint;
425
- }
426
- prevPoint = v || prevPoint;
427
- v == null ? void 0 : v.bringToFront();
428
- return v;
429
- });
430
- Promise.all(otherList).then((r) => {
431
- canvas.value.add(...lineListFilter, ...res, ...r);
432
- res.forEach((v) => {
433
- v == null ? void 0 : v.bringToFront();
434
- });
435
- });
436
- });
489
+ }
437
490
  }
438
491
  function setPointEvent(point) {
439
492
  if (event.hovered) {
@@ -494,30 +547,17 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
494
547
  }
495
548
  }
496
549
  function updateLine(point) {
497
- if (point.leftLine) {
498
- point.leftLine.setCoords();
499
- point.leftLine.set({ x2: point.left, y2: point.top });
500
- }
501
- if (point.rightLine) {
502
- point.rightLine.setCoords();
503
- point.rightLine.set({ x1: point.left, y1: point.top });
504
- }
505
- if (point.reduceLine) {
506
- point.reduceLine.setCoords();
507
- point.reduceLine.set({ x1: point.left, y1: point.top });
508
- }
509
- if (point.noRiseText) {
510
- point.noRiseText.setCoords();
511
- point.noRiseText.set({ left: point.left, top: point.top + 5 });
512
- }
513
- if (point.arrowGroup) {
514
- point.arrowGroup.setCoords();
515
- point.arrowGroup.set({ left: point.left, top: point.top });
516
- }
517
- if (point.verifiedText) {
518
- point.verifiedText.setCoords();
519
- point.verifiedText.set({ left: point.left, top: point.top - 5 });
520
- }
550
+ var _a, _b;
551
+ (_a = point.leftLine) == null ? void 0 : _a.setCoords().set({ x2: point.left, y2: point.top });
552
+ (_b = point.rightLine) == null ? void 0 : _b.setCoords().set({ x1: point.left, y1: point.top });
553
+ Object.values(point.otherObj).forEach((o) => {
554
+ const { obj, type = "", top = 0 } = o;
555
+ if (type === "line") {
556
+ obj == null ? void 0 : obj.setCoords().set({ x1: point.left, y1: point.top });
557
+ } else {
558
+ obj == null ? void 0 : obj.setCoords().set({ left: point.left, top: point.top + top });
559
+ }
560
+ });
521
561
  drawShaDow(point);
522
562
  }
523
563
  function isLimit(time) {
@@ -64,6 +64,7 @@ export interface IPropItems {
64
64
  event: Partial<IEvent>;
65
65
  itemList: Array<any>;
66
66
  getRightInfo: AnyObject;
67
+ config: AnyObject;
67
68
  }
68
69
  export interface IPoint {
69
70
  time: string;
@@ -114,6 +115,7 @@ export interface IData {
114
115
  left: ILeft;
115
116
  right?: IRight;
116
117
  bottom: any;
118
+ config?: any;
117
119
  }
118
120
  export interface ICoordinateValue {
119
121
  x: number;