cnhis-design-vue 3.1.15 → 3.1.16-beta.10

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 (104) hide show
  1. package/es/packages/big-table/index.d.ts +652 -430
  2. package/es/packages/big-table/src/BigTable.vue.d.ts +655 -457
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +106 -112
  4. package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
  5. package/es/packages/big-table/src/bigTableProps.js +2 -1
  6. package/es/packages/big-table/src/bigTableState.d.ts +2 -0
  7. package/es/packages/big-table/src/bigTableState.js +3 -1
  8. package/es/packages/big-table/src/components/edit-form/edit-time.js +1 -1
  9. package/es/packages/big-table/src/hooks/index.d.ts +9 -0
  10. package/es/packages/big-table/src/hooks/index.js +9 -0
  11. package/es/packages/big-table/src/hooks/useAnchor.d.ts +7 -0
  12. package/es/packages/big-table/src/hooks/useAnchor.js +49 -0
  13. package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +24 -8
  14. package/es/packages/big-table/src/hooks/useEdit.js +1 -1
  15. package/es/packages/big-table/src/hooks/useEvent.d.ts +1 -1
  16. package/es/packages/big-table/src/hooks/useEvent.js +3 -2
  17. package/es/packages/big-table/style/index.css +1 -2
  18. package/es/packages/button-print/index.d.ts +2 -2
  19. package/es/packages/button-print/src/ButtonPrint.vue.d.ts +2 -2
  20. package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +2 -1
  21. package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +2 -2
  22. package/es/packages/drag-layout/index.d.ts +2 -2
  23. package/es/packages/drag-layout/src/DragLayout.vue.d.ts +2 -2
  24. package/es/packages/fabric-chart/src/FabricChart.js +2 -1
  25. package/es/packages/fabric-chart/src/hooks/constant.js +4 -4
  26. package/es/packages/fabric-chart/src/hooks/useCenter.js +20 -23
  27. package/es/packages/fabric-chart/src/hooks/useDraw.js +11 -4
  28. package/es/packages/fabric-chart/src/hooks/useEvent.js +11 -3
  29. package/es/packages/fabric-chart/src/hooks/useLeft.js +8 -4
  30. package/es/packages/fabric-chart/src/hooks/useTop.js +5 -8
  31. package/es/packages/field-set/index.d.ts +1 -1
  32. package/es/packages/field-set/src/FieldSet.vue.d.ts +1 -1
  33. package/es/packages/form-config/index.d.ts +110 -3367
  34. package/es/packages/form-config/src/FormConfig.js +42 -34
  35. package/es/packages/form-config/src/FormConfig.vue.d.ts +147 -3404
  36. package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
  37. package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +23 -22
  38. package/es/packages/form-config/src/components/FormConfigEdit.js +2 -2
  39. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +75 -49
  40. package/es/packages/form-config/src/constants/index.d.ts +58 -24
  41. package/es/packages/form-config/src/constants/index.js +52 -23
  42. package/es/packages/form-config/src/hooks/index.d.ts +1 -0
  43. package/es/packages/form-config/src/hooks/index.js +1 -0
  44. package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
  45. package/es/packages/form-config/src/hooks/useConfigurationField.js +29 -80
  46. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
  47. package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
  48. package/es/packages/form-config/src/hooks/useSortable.js +1 -1
  49. package/es/packages/form-config/src/types/index.d.ts +22 -4
  50. package/es/packages/form-config/src/utils/index.d.ts +2 -0
  51. package/es/packages/form-config/src/utils/index.js +15 -0
  52. package/es/packages/form-config/style/index.css +26 -2
  53. package/es/packages/form-render/index.d.ts +13 -15
  54. package/es/packages/form-render/src/FormRender.js +10 -7
  55. package/es/packages/form-render/src/FormRender.vue.d.ts +14 -16
  56. package/es/packages/form-render/src/components/renderer/cascader.d.ts +2 -14
  57. package/es/packages/form-render/src/components/renderer/cascader.js +3 -3
  58. package/es/packages/form-render/src/components/renderer/checkbox.js +1 -1
  59. package/es/packages/form-render/src/components/renderer/combination/index.js +2 -1
  60. package/es/packages/form-render/src/components/renderer/complex.js +1 -1
  61. package/es/packages/form-render/src/components/renderer/date.d.ts +20 -4
  62. package/es/packages/form-render/src/components/renderer/date.js +36 -20
  63. package/es/packages/form-render/src/components/renderer/input.js +2 -1
  64. package/es/packages/form-render/src/components/renderer/inputNumber.js +2 -1
  65. package/es/packages/form-render/src/components/renderer/linebar.js +1 -4
  66. package/es/packages/form-render/src/components/renderer/radio.js +1 -1
  67. package/es/packages/form-render/src/components/renderer/select.d.ts +1 -10
  68. package/es/packages/form-render/src/components/renderer/select.js +26 -17
  69. package/es/packages/form-render/src/components/renderer/slider.d.ts +8 -344
  70. package/es/packages/form-render/src/components/renderer/slider.js +24 -2
  71. package/es/packages/form-render/src/components/renderer/switch.js +1 -1
  72. package/es/packages/form-render/src/components/renderer/textarea.js +1 -1
  73. package/es/packages/form-render/src/hooks/useAnchor.js +7 -4
  74. package/es/packages/form-render/src/hooks/useBusinessBinding.d.ts +15 -9
  75. package/es/packages/form-render/src/hooks/useBusinessBinding.js +62 -58
  76. package/es/packages/form-render/src/hooks/useChangeContext.d.ts +4 -2
  77. package/es/packages/form-render/src/hooks/useChangeContext.js +4 -7
  78. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +17 -7
  79. package/es/packages/form-render/src/hooks/useFormContext.d.ts +2 -1
  80. package/es/packages/form-render/src/hooks/useFormContext.js +2 -2
  81. package/es/packages/form-render/src/hooks/useFormValidator.js +13 -3
  82. package/es/packages/form-render/src/hooks/useInitialData.d.ts +1 -1
  83. package/es/packages/form-render/src/hooks/useInitialData.js +9 -4
  84. package/es/packages/form-render/src/hooks/useTypeNormalize.js +1 -1
  85. package/es/packages/form-render/src/types/fieldItem.d.ts +11 -12
  86. package/es/packages/form-render/src/types/index.d.ts +7 -8
  87. package/es/packages/form-render/src/utils/business.d.ts +12 -0
  88. package/es/packages/form-render/src/utils/business.js +78 -0
  89. package/es/packages/form-render/src/utils/dom.d.ts +6 -0
  90. package/es/packages/form-render/src/utils/dom.js +14 -0
  91. package/es/packages/form-render/src/utils/index.d.ts +6 -26
  92. package/es/packages/form-render/src/utils/index.js +9 -138
  93. package/es/packages/form-render/src/utils/schema.d.ts +16 -0
  94. package/es/packages/form-render/src/utils/schema.js +94 -0
  95. package/es/packages/index.css +27 -4
  96. package/es/packages/scale-view/src/hooks/use-component.d.ts +7 -7
  97. package/es/packages/select-label/index.d.ts +10 -10
  98. package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -3
  99. package/es/packages/select-label/src/SelectLabel.vue.d.ts +7 -7
  100. package/es/packages/shortcut-setter/index.d.ts +18 -20
  101. package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +18 -20
  102. package/es/packages/time-line/index.d.ts +2 -2
  103. package/es/packages/time-line/src/TimeLine.vue.d.ts +2 -2
  104. package/package.json +1 -1
@@ -28,6 +28,7 @@ function useColumnConfigAdaptor() {
28
28
  type,
29
29
  "select"
30
30
  ]),
31
+ ...["DATE"].map((type) => [type, "date"]),
31
32
  ...["INPUT"].map((type) => [type, "input"]),
32
33
  ...["DIGITAL"].map((type) => [type, "number"])
33
34
  ]);
@@ -40,13 +41,17 @@ function useColumnConfigAdaptor() {
40
41
  const validateHandler = (value, result) => {
41
42
  if (!isObject(value))
42
43
  return;
43
- result.componentProps = Object.assign({}, result.comonentProps, {
44
- maxlength: value.max_length,
45
- minlength: value.min_length,
46
- max: value.max_value,
47
- min: value.min_value,
48
- precision: value.decimal_length
49
- });
44
+ const keyMap = {
45
+ maxlength: "max_length",
46
+ minlength: "min_length",
47
+ max: "max_value",
48
+ min: "min_value",
49
+ precision: "decimal_length"
50
+ };
51
+ result.componentProps = Object.assign({}, result.comonentProps, Object.entries(keyMap).reduce((res, [k, v]) => {
52
+ res[k] = value[v];
53
+ return res;
54
+ }, {}));
50
55
  };
51
56
  const dateRangeValidate = (value, result) => {
52
57
  if (!isObject(value))
@@ -71,14 +76,25 @@ function useColumnConfigAdaptor() {
71
76
  const option = { label: value.describe, ...value };
72
77
  result.options = isArray(result.options) ? [...result.options, option] : [option];
73
78
  };
79
+ const htmlTypeHandler = (value, result, fieldItem) => {
80
+ var _a;
81
+ if (!isString(value))
82
+ return;
83
+ if (value === "DATE") {
84
+ result.formType = isString(fieldItem.date_format) && fieldItem.date_format.startsWith("HH:mm") ? "time" : "date";
85
+ return;
86
+ }
87
+ result.formType = (_a = htmlTypeValueMap.get(value)) != null ? _a : value;
88
+ };
74
89
  const settingMap = new Map([
75
90
  ["multi_select_value", { property: "multiple", valueMap: multipleValueMap }],
76
91
  ["is_null", isNullHandler],
77
92
  ["validate", validateHandler],
78
93
  ["dateValidate", dateRangeValidate],
94
+ ["date_format", "valueFormat"],
79
95
  ...["open", "close"].map((key) => [key, switchOptionHandler]),
80
96
  ["is_edit", { property: "isEdit", valueMap: isEditValueMap }],
81
- ["html_type", { property: "formType", valueMap: htmlTypeValueMap }],
97
+ ["html_type", htmlTypeHandler],
82
98
  ["option", { property: "options", fieldMap: /* @__PURE__ */ new Map([["text", "label"]]) }],
83
99
  [
84
100
  "alias",
@@ -100,7 +100,7 @@ const useEdit = (props, state, emit, xGrid) => {
100
100
  } else {
101
101
  row[column.columnName] = value;
102
102
  }
103
- if ((column == null ? void 0 : column.formType) === "date" && !value) {
103
+ if (((column == null ? void 0 : column.formType) === "date" || (column == null ? void 0 : column.formType) === "time") && !value) {
104
104
  row[column.columnName] = void 0;
105
105
  }
106
106
  emit("formChange", { value, row, column, index, oldValue });
@@ -1,4 +1,4 @@
1
- export declare const useEvent: (props: any, state: any, emit: any, xGrid: any) => {
1
+ export declare const useEvent: (props: any, state: any, emit: any, xGrid: any, anchorEvent: Function) => {
2
2
  keyDown: ({ $event }: {
3
3
  $event: KeyboardEvent;
4
4
  }) => void;
@@ -1,7 +1,7 @@
1
1
  import vexutils from '../../../../src/utils/vexutils';
2
2
  import { hideFilterWrap } from '../utils.js';
3
3
 
4
- const useEvent = (props, state, emit, xGrid) => {
4
+ const useEvent = (props, state, emit, xGrid, anchorEvent) => {
5
5
  function keyDown({ $event }) {
6
6
  var _a, _b;
7
7
  let activeRow = null;
@@ -29,7 +29,7 @@ const useEvent = (props, state, emit, xGrid) => {
29
29
  if ($event.key === "ArrowDown" && index < ((_b = props.data) == null ? void 0 : _b.length) - 1) {
30
30
  activeIndex = index + 1;
31
31
  }
32
- let row = xGridRef.getData(activeIndex);
32
+ const row = xGridRef.getData(activeIndex);
33
33
  xGridRef.setCurrentRow(row);
34
34
  xGridRef.scrollToRow(row);
35
35
  emitKeyBoard();
@@ -60,6 +60,7 @@ const useEvent = (props, state, emit, xGrid) => {
60
60
  hideFilterWrap(state, props);
61
61
  }
62
62
  scrollEvent(params);
63
+ anchorEvent(params);
63
64
  };
64
65
  return {
65
66
  keyDown,
@@ -282,7 +282,7 @@ body > .vxe-table--tooltip-wrapper {
282
282
  height: 30px;
283
283
  line-height: 30px;
284
284
  }
285
- .custom-big-table .vxe-table .vxe-cell--checkbox.is--disabled .vxe-checkbox--icon {
285
+ .custom-big-table .vxe-table .vxe-cell--checkbox .vxe-checkbox--label {
286
286
  display: none;
287
287
  }
288
288
  .custom-big-table .filter-box {
@@ -307,7 +307,6 @@ body > .vxe-table--tooltip-wrapper {
307
307
  }
308
308
  .custom-big-table .disabled-checked-tips {
309
309
  position: absolute;
310
- left: 6px;
311
310
  top: 50%;
312
311
  bottom: 0;
313
312
  right: 0;
@@ -4016,7 +4016,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
4016
4016
  type: BooleanConstructor;
4017
4017
  default: boolean;
4018
4018
  };
4019
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
4019
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
4020
4020
  to: import("vue").PropType<string | HTMLElement>;
4021
4021
  displayDirective: {
4022
4022
  type: import("vue").PropType<"show" | "if">;
@@ -4978,7 +4978,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
4978
4978
  type: BooleanConstructor;
4979
4979
  default: boolean;
4980
4980
  };
4981
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
4981
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
4982
4982
  to: import("vue").PropType<string | HTMLElement>;
4983
4983
  displayDirective: {
4984
4984
  type: import("vue").PropType<"show" | "if">;
@@ -4020,7 +4020,7 @@ declare const _default: import("vue").DefineComponent<{
4020
4020
  type: BooleanConstructor;
4021
4021
  default: boolean;
4022
4022
  };
4023
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
4023
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
4024
4024
  to: import("vue").PropType<string | HTMLElement>;
4025
4025
  displayDirective: {
4026
4026
  type: import("vue").PropType<"show" | "if">;
@@ -4982,7 +4982,7 @@ declare const _default: import("vue").DefineComponent<{
4982
4982
  type: BooleanConstructor;
4983
4983
  default: boolean;
4984
4984
  };
4985
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
4985
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
4986
4986
  to: import("vue").PropType<string | HTMLElement>;
4987
4987
  displayDirective: {
4988
4988
  type: import("vue").PropType<"show" | "if">;
@@ -228,7 +228,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
228
228
  templateId: getTemplateIdByFormatId(state.currentFormatId),
229
229
  print: {
230
230
  print: "1",
231
- type: "1"
231
+ type: "1",
232
+ callback: "1"
232
233
  },
233
234
  params
234
235
  };
@@ -1505,7 +1505,7 @@ declare const _default: import("vue").DefineComponent<{
1505
1505
  type: BooleanConstructor;
1506
1506
  default: boolean;
1507
1507
  };
1508
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
1508
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
1509
1509
  to: import("vue").PropType<string | HTMLElement>;
1510
1510
  displayDirective: {
1511
1511
  type: import("vue").PropType<"show" | "if">;
@@ -2467,7 +2467,7 @@ declare const _default: import("vue").DefineComponent<{
2467
2467
  type: BooleanConstructor;
2468
2468
  default: boolean;
2469
2469
  };
2470
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
2470
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
2471
2471
  to: import("vue").PropType<string | HTMLElement>;
2472
2472
  displayDirective: {
2473
2473
  type: import("vue").PropType<"show" | "if">;
@@ -1888,7 +1888,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
1888
1888
  type: BooleanConstructor;
1889
1889
  default: boolean;
1890
1890
  };
1891
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
1891
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
1892
1892
  to: import("vue").PropType<string | HTMLElement>;
1893
1893
  displayDirective: {
1894
1894
  type: import("vue").PropType<"show" | "if">;
@@ -2850,7 +2850,7 @@ declare const DragLayout: SFCWithInstall<import("vue").DefineComponent<{
2850
2850
  type: BooleanConstructor;
2851
2851
  default: boolean;
2852
2852
  };
2853
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
2853
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
2854
2854
  to: import("vue").PropType<string | HTMLElement>;
2855
2855
  displayDirective: {
2856
2856
  type: import("vue").PropType<"show" | "if">;
@@ -1888,7 +1888,7 @@ declare const _default: import("vue").DefineComponent<{
1888
1888
  type: BooleanConstructor;
1889
1889
  default: boolean;
1890
1890
  };
1891
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
1891
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
1892
1892
  to: import("vue").PropType<string | HTMLElement>;
1893
1893
  displayDirective: {
1894
1894
  type: import("vue").PropType<"show" | "if">;
@@ -2850,7 +2850,7 @@ declare const _default: import("vue").DefineComponent<{
2850
2850
  type: BooleanConstructor;
2851
2851
  default: boolean;
2852
2852
  };
2853
- preset: import("vue").PropType<"dialog" | "confirm" | "card">;
2853
+ preset: import("vue").PropType<"dialog" | "card" | "confirm">;
2854
2854
  to: import("vue").PropType<string | HTMLElement>;
2855
2855
  displayDirective: {
2856
2856
  type: import("vue").PropType<"show" | "if">;
@@ -115,7 +115,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
115
  const times = top.xScalevalue.times;
116
116
  let left = originX.value - xCellWidth.value;
117
117
  function getDate(date) {
118
- return String(date).length < 9 ? `20${date}` : date;
118
+ const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
119
+ return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
119
120
  }
120
121
  const timeList = dateList.map((item) => {
121
122
  return times.map((v) => {
@@ -7,12 +7,12 @@ const TEMPERATURE_MENU = [
7
7
  {
8
8
  label: "\u836F\u7269\u964D\u6E29",
9
9
  value: void 0,
10
- type: "drugCooling"
10
+ type: "drugReduce"
11
11
  },
12
12
  {
13
13
  label: "\u7269\u7406\u964D\u6E29",
14
14
  value: void 0,
15
- type: "physicalCooling"
15
+ type: "physicsReduce"
16
16
  },
17
17
  {
18
18
  label: "\u4E0D\u5347",
@@ -24,12 +24,12 @@ const PAIN_MENU = [
24
24
  {
25
25
  label: "\u836F\u7269\u964D\u75DB",
26
26
  value: void 0,
27
- type: "drugReducePain"
27
+ type: "drugReduce"
28
28
  },
29
29
  {
30
30
  label: "\u7269\u7406\u964D\u75DB",
31
31
  value: void 0,
32
- type: "physicalReducePain"
32
+ type: "physicsReduce"
33
33
  }
34
34
  ];
35
35
 
@@ -234,19 +234,19 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
234
234
  lineAttr = {},
235
235
  noRiseStyle = {},
236
236
  verifiedStyle = {},
237
- coolingStyle = {},
237
+ reduceStyle = {},
238
238
  type = "circle"
239
239
  } = item;
240
240
  const pointList = [];
241
241
  const lineList = [];
242
242
  const otherList = [];
243
243
  item.list.forEach((v, index) => {
244
- var _a;
244
+ var _a, _b;
245
245
  const points = getPointer(v, scaleValue);
246
246
  const nextV = item.list[index + 1];
247
247
  const nextPoint = getPointer(nextV, scaleValue);
248
- let coolLine, coolPoint, noRiseText, arrowGroup, verifiedText;
249
- if (points && scaleValue.type === "temperature") {
248
+ let reduceLine, reducePoint, noRiseText, arrowGroup, verifiedText;
249
+ if ((points == null ? void 0 : points.length) && (scaleValue.type === "temperature" || scaleValue.type === "pain")) {
250
250
  if (v.noRise) {
251
251
  if (typeof v.noRise === "string") {
252
252
  noRiseText = drawText([points[0], points[1] + 5], {
@@ -285,24 +285,21 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
285
285
  });
286
286
  otherList.push(verifiedText);
287
287
  }
288
- if (v.physicalCooling || v.drugCooling) {
289
- const coolingLineStyle = {
288
+ if (v.physicsReduce || v.drugReduce) {
289
+ const reduceY = cumputedY(scaleValue.type, scaleValue.list, v.physicsReduce || v.drugReduce);
290
+ reduceLine = drawLine([...points, points[0], reduceY], {
290
291
  ...lineAttr,
291
- stroke: coolingStyle.stroke,
292
- strokeDashArray: [3, 3]
293
- };
294
- const coolY = cumputedY(scaleValue.type, scaleValue.list, v.physicalCooling || v.drugCooling);
295
- coolLine = drawLine([...points, points[0], coolY], {
296
- ...coolingLineStyle
292
+ ...reduceStyle.line,
293
+ ...defaultStyle
297
294
  });
298
- coolPoint = drawPoint("circle", {
295
+ reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
299
296
  left: points[0],
300
- top: coolY,
301
- ...coolingStyle,
297
+ top: reduceY,
298
+ ...reduceStyle.point,
302
299
  ...defaultStyle
303
300
  });
304
- coolLine && otherList.push(coolLine);
305
- coolPoint && otherList.push(coolPoint);
301
+ reduceLine && otherList.push(reduceLine);
302
+ reducePoint && otherList.push(reducePoint);
306
303
  }
307
304
  }
308
305
  let point;
@@ -312,7 +309,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
312
309
  ...lineAttr
313
310
  });
314
311
  } else if (points && !nextPoint && !v.breakpoint && scaleValue.type === "temperature" && dataIndex < scaleValue.dataList.length - 1 && index === item.list.length - 1) {
315
- const nextV2 = (_a = scaleValue.dataList[dataIndex + 1].list) == null ? void 0 : _a[0];
312
+ const nextV2 = (_b = scaleValue.dataList[dataIndex + 1].list) == null ? void 0 : _b[0];
316
313
  const nextLinePoint = getPointer(nextV2, scaleValue);
317
314
  line = nextLinePoint ? drawLine([...points, ...nextLinePoint], {
318
315
  ...lineAttr
@@ -338,8 +335,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
338
335
  verifiedText,
339
336
  leftLine: previousLine,
340
337
  rightLine: line,
341
- coolLine,
342
- coolPoint,
338
+ reduceLine,
339
+ reducePoint,
343
340
  lockMovementX: true,
344
341
  ...pointAttr,
345
342
  ...propItems.event
@@ -456,9 +453,9 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
456
453
  point.rightLine.setCoords();
457
454
  point.rightLine.set({ x1: point.left, y1: point.top });
458
455
  }
459
- if (point.coolLine) {
460
- point.coolLine.setCoords();
461
- point.coolLine.set({ x1: point.left, y1: point.top });
456
+ if (point.reduceLine) {
457
+ point.reduceLine.setCoords();
458
+ point.reduceLine.set({ x1: point.left, y1: point.top });
462
459
  }
463
460
  if (point.noRiseText) {
464
461
  point.noRiseText.setCoords();
@@ -44,12 +44,19 @@ function drawTextGroup(rectStyle, fontStyle, groupStyle) {
44
44
  ...defaultRectStyle,
45
45
  ...rectStyle
46
46
  });
47
- const texts = new fabric.Text(String(fontStyle.value), {
47
+ const { value = "\u6807\u9898", textAlign = "center", verticalAlign = "center" } = fontStyle;
48
+ const textLeft = rectStyle.width / 2;
49
+ const textTop = rectStyle.height / 2;
50
+ const texts = new fabric.Text(String(value), {
48
51
  ...defaultTextStyle,
49
52
  ...fontStyle,
50
- ...fontStyle.textAlign == "left" ? {
51
- originX: "left",
52
- left: -(rectStyle.width / 2)
53
+ ...textAlign == "left" || textAlign == "right" ? {
54
+ originX: textAlign,
55
+ left: textAlign == "left" ? -textLeft : textLeft
56
+ } : {},
57
+ ...verticalAlign == "top" || verticalAlign == "bottom" ? {
58
+ originY: verticalAlign,
59
+ top: verticalAlign == "top" ? -textTop : textTop
53
60
  } : {}
54
61
  });
55
62
  return new fabric.Group([rect, texts], {
@@ -47,12 +47,20 @@ function useCanvasEvent(canvas, propItems, emits) {
47
47
  if (index > 0) {
48
48
  topY += propItems[`${topList[index - 1].key}Height`];
49
49
  }
50
- selections2.push(drawRect({
51
- left: iconsWidth,
50
+ const commonOptions = {
52
51
  top: topY + 1,
53
- width: endX - iconsWidth,
54
52
  height: propItems[`${item.key}Height`] - 1
53
+ };
54
+ selections2.push(drawRect({
55
+ left: iconsWidth,
56
+ width: originX - iconsWidth,
57
+ ...commonOptions
55
58
  }, item.key));
59
+ selections2.push(drawRect({
60
+ left: originX,
61
+ width: endX - originX,
62
+ ...commonOptions
63
+ }, item.key + "Title"));
56
64
  });
57
65
  selections2.push(drawRect({
58
66
  left: originX,
@@ -65,12 +65,14 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
65
65
  const list = [];
66
66
  if (item.showScale || item.showNumber) {
67
67
  const { lineXMain, textLeft } = getScaleInfo(item.position, iconsWidth, originX - iconsWidth);
68
+ const listLen = item.list.length;
68
69
  item.list.forEach((v, i) => {
69
70
  let top = painOriginY.endY - i * yCellHeight * item.spaceGridNumber;
70
71
  if (i === 0) {
71
72
  top = endY - 5;
72
73
  }
73
- if (item.showNumber) {
74
+ const isMaxMinNumber = i === 0 || i === listLen - 1;
75
+ if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
74
76
  list.push(drawScaleNumber(v, item, textLeft, top));
75
77
  }
76
78
  if (item.showScale && i !== 0) {
@@ -117,20 +119,22 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
117
119
  const spaceScale = spaceGridNumber * yCellHeight / 5;
118
120
  const position = item.position || "center";
119
121
  const { lineXMain, lineXSub, textLeft } = getScaleInfo(item.position, rectLeft, rectWidth);
122
+ const listLen = item.list.length;
120
123
  item.list.forEach((v, i) => {
121
124
  const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
122
- if (item.showNumber) {
125
+ const isMaxMinNumber = i === 0 || i === listLen - 1;
126
+ if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
123
127
  const text = drawScaleNumber(v, item, textLeft, i === 0 ? top - 5 : top);
124
128
  list.push(text);
125
129
  }
126
- if (item.showScale && i !== item.list.length - 1) {
130
+ if (item.showScale && i !== listLen - 1) {
127
131
  for (let j = 0; j < 5; j++) {
128
132
  if (j > 0 || !item.showNumber || position !== "center") {
129
133
  const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
130
134
  const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
131
135
  const y = top - j * spaceScale;
132
136
  createLine([x1, y, x2, y]);
133
- if (i == item.list.length - 2 && j == 4) {
137
+ if (i == listLen - 2 && j == 4) {
134
138
  createLine([lineXMain[0], y - spaceScale, lineXMain[1], y - spaceScale]);
135
139
  }
136
140
  }
@@ -24,7 +24,7 @@ function useTop(canvas, propItems) {
24
24
  topY += propItems[`${topList[index - 1].key}Height`];
25
25
  }
26
26
  if (item.key == "xScalevalue") {
27
- drawDay(list, topY);
27
+ drawDay(item, list, topY);
28
28
  drawTime(item, list, topY);
29
29
  } else {
30
30
  propItems[`${item.key}Height`] && drawDate(item, list, topY);
@@ -35,7 +35,6 @@ function useTop(canvas, propItems) {
35
35
  group && canvas.value.add(group);
36
36
  }
37
37
  function drawTime(item, list, topY) {
38
- var _a;
39
38
  const dayHeight = top.xScalevalue.show ? top.dayHeight || 0 : 0;
40
39
  const height = xScalevalueHeight - dayHeight;
41
40
  const title = drawTextGroup({
@@ -45,7 +44,7 @@ function useTop(canvas, propItems) {
45
44
  }, {
46
45
  value: top.xScalevalue.title,
47
46
  ...defaultTextStyle,
48
- ...((_a = top.date) == null ? void 0 : _a.style) || {},
47
+ ...item.style || {},
49
48
  ...item.titleStyle || {}
50
49
  }, {
51
50
  left: iconsWidth,
@@ -57,7 +56,6 @@ function useTop(canvas, propItems) {
57
56
  timeList.push(top.xScalevalue.list);
58
57
  }
59
58
  timeList.flat().forEach((v, i) => {
60
- var _a2;
61
59
  const left = originX + i * xCellWidth;
62
60
  const textGroup = drawTextGroup({
63
61
  width: xCellWidth,
@@ -65,7 +63,7 @@ function useTop(canvas, propItems) {
65
63
  }, {
66
64
  value: v,
67
65
  ...defaultTextStyle,
68
- ...((_a2 = top.date) == null ? void 0 : _a2.style) || {}
66
+ ...item.style || {}
69
67
  }, {
70
68
  left,
71
69
  top: topY + dayHeight
@@ -73,8 +71,7 @@ function useTop(canvas, propItems) {
73
71
  list.push(textGroup);
74
72
  });
75
73
  }
76
- function drawDay(list, topY) {
77
- var _a;
74
+ function drawDay(item, list, topY) {
78
75
  if (!top.dayHeight)
79
76
  return false;
80
77
  const height = top.dayHeight;
@@ -89,7 +86,7 @@ function useTop(canvas, propItems) {
89
86
  }, {
90
87
  value,
91
88
  ...defaultTextStyle,
92
- ...((_a = top.date) == null ? void 0 : _a.style) || {}
89
+ ...item.style || {}
93
90
  }, {
94
91
  left,
95
92
  top: topY
@@ -6974,7 +6974,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
6974
6974
  modelValue: unknown[];
6975
6975
  componentData: Record<string, any>;
6976
6976
  }>;
6977
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
6977
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onClose" | "onSave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
6978
6978
  fields: {
6979
6979
  type: import("vue").PropType<any[]>;
6980
6980
  default: () => never[];
@@ -6954,7 +6954,7 @@ declare const _default: import("vue").DefineComponent<{
6954
6954
  modelValue: unknown[];
6955
6955
  componentData: Record<string, any>;
6956
6956
  }>;
6957
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
6957
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onSave" | "onClose")[], "onClose" | "onSave", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
6958
6958
  fields: {
6959
6959
  type: PropType<any[]>;
6960
6960
  default: () => never[];