cnhis-design-vue 3.1.20-beta.0 → 3.1.20-beta.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.
@@ -29,29 +29,28 @@ function useOther(canvas, propItems, cumputedX) {
29
29
  let topY = vitalSignsOriginY.originY;
30
30
  let leftX = item.left;
31
31
  let textHeight = 0;
32
- item.vertical.forEach((v) => {
32
+ item.vertical.forEach((v, i) => {
33
+ var _a;
33
34
  const valueLenght = String(v.value).length;
34
- setPointer();
35
- const text = getText(v, leftX, topY);
36
- text && list.push(text);
37
- function checkNode() {
38
- const node = hasNode(leftX, topY, valueLenght);
39
- if (node) {
40
- topY += node.trueHeight + node.baseTop;
41
- }
35
+ const lastLeft = ((_a = list.at(-1)) == null ? void 0 : _a.left) || 0;
36
+ if (i === 0 && item.left <= lastLeft) {
37
+ leftX = lastLeft + xCellWidth;
42
38
  }
43
- function setPointer() {
44
- topY += (v.baseTop || 0) + textHeight;
45
- const valueHeight = valueLenght * yCellHeight;
46
- checkNode();
47
- if (topY + valueHeight > vitalSignsOriginY.endY) {
48
- leftX += xCellWidth;
49
- topY = (v.baseTop || 0) + vitalSignsOriginY.originY;
50
- textHeight = 0;
51
- setPointer();
52
- } else {
53
- textHeight = valueHeight || textHeight;
54
- }
39
+ topY += (v.baseTop || 0) + textHeight;
40
+ const valueHeight = valueLenght * yCellHeight;
41
+ const node = hasNode(leftX, topY, valueLenght);
42
+ if (node) {
43
+ topY += node.trueHeight + node.baseTop;
44
+ }
45
+ if (topY + valueHeight > vitalSignsOriginY.endY) {
46
+ leftX += xCellWidth;
47
+ topY = (v.baseTop || 0) + vitalSignsOriginY.originY;
48
+ textHeight = 0;
49
+ } else {
50
+ textHeight = valueHeight || textHeight;
51
+ }
52
+ if (String(v.value).length) {
53
+ list.push(getText(v, leftX, topY));
55
54
  }
56
55
  });
57
56
  item.horizontal.forEach((v, i) => {
@@ -63,8 +62,9 @@ function useOther(canvas, propItems, cumputedX) {
63
62
  if (node) {
64
63
  leftX = xCellWidth + node.left;
65
64
  }
66
- const text = getText(v, leftX, y);
67
- text && list.push(text);
65
+ if (String(v.value).length) {
66
+ list.push(getText(v, leftX, topY));
67
+ }
68
68
  });
69
69
  });
70
70
  const group = list.length > 0 ? new fabric.Group([...list], { ...defaultStyle }) : null;
@@ -89,8 +89,6 @@ function useOther(canvas, propItems, cumputedX) {
89
89
  });
90
90
  texts.push(text);
91
91
  });
92
- if (!texts.length)
93
- return null;
94
92
  return new fabric.Group(texts, {
95
93
  originX: "center",
96
94
  left: x,
@@ -933,12 +933,12 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
933
933
  multi_select_value?: string | number | undefined;
934
934
  wordbook?: {
935
935
  level_num?: number | undefined;
936
- id: string;
937
- name: string;
938
- render_key: string[];
939
- search_key: string[];
940
- type: string;
941
- value_key: string;
936
+ id?: string | undefined;
937
+ name?: string | undefined;
938
+ render_key?: string[] | undefined;
939
+ search_key?: string[] | undefined;
940
+ type?: string | undefined;
941
+ value_key?: string | undefined;
942
942
  } | undefined;
943
943
  open?: {
944
944
  value?: any;
@@ -935,12 +935,12 @@ declare const _default: import("vue").DefineComponent<{
935
935
  multi_select_value?: string | number | undefined;
936
936
  wordbook?: {
937
937
  level_num?: number | undefined;
938
- id: string;
939
- name: string;
940
- render_key: string[];
941
- search_key: string[];
942
- type: string;
943
- value_key: string;
938
+ id?: string | undefined;
939
+ name?: string | undefined;
940
+ render_key?: string[] | undefined;
941
+ search_key?: string[] | undefined;
942
+ type?: string | undefined;
943
+ value_key?: string | undefined;
944
944
  } | undefined;
945
945
  open?: {
946
946
  value?: any;
@@ -62,12 +62,12 @@ declare const _default: import("vue").DefineComponent<{}, {
62
62
  multi_select_value?: string | number | undefined;
63
63
  wordbook?: {
64
64
  level_num?: number | undefined;
65
- id: string;
66
- name: string;
67
- render_key: string[];
68
- search_key: string[];
69
- type: string;
70
- value_key: string;
65
+ id?: string | undefined;
66
+ name?: string | undefined;
67
+ render_key?: string[] | undefined;
68
+ search_key?: string[] | undefined;
69
+ type?: string | undefined;
70
+ value_key?: string | undefined;
71
71
  } | undefined;
72
72
  open?: {
73
73
  value?: any;
@@ -1,5 +1,4 @@
1
1
  import { Func } from '../../../../../../es/shared/types';
2
- import { FormWordbook } from '../../types';
3
2
  import { PropType } from 'vue';
4
3
  export declare const SEARCH: import("vue").DefineComponent<{
5
4
  value: {
@@ -14,7 +13,15 @@ export declare const SEARCH: import("vue").DefineComponent<{
14
13
  default: boolean;
15
14
  };
16
15
  wordbook: {
17
- type: PropType<FormWordbook>;
16
+ type: PropType<Partial<{
17
+ level_num: number;
18
+ id: string;
19
+ name: string;
20
+ render_key: string[];
21
+ search_key: string[];
22
+ type: string;
23
+ value_key: string;
24
+ }>>;
18
25
  required: true;
19
26
  };
20
27
  onFocus: {
@@ -34,7 +41,15 @@ export declare const SEARCH: import("vue").DefineComponent<{
34
41
  default: boolean;
35
42
  };
36
43
  wordbook: {
37
- type: PropType<FormWordbook>;
44
+ type: PropType<Partial<{
45
+ level_num: number;
46
+ id: string;
47
+ name: string;
48
+ render_key: string[];
49
+ search_key: string[];
50
+ type: string;
51
+ value_key: string;
52
+ }>>;
38
53
  required: true;
39
54
  };
40
55
  onFocus: {
@@ -70,6 +70,7 @@ function useFieldListAdaptor(collector) {
70
70
  const multiple = item2.multi_select === "0";
71
71
  Object.assign(schema2["x-component-props"], {
72
72
  multiple,
73
+ options: item2.option,
73
74
  maxTagCount: parseNumberFromMaybeString(item2.multi_select_value)
74
75
  });
75
76
  multiple && (schema2.type = "array");
@@ -83,8 +84,7 @@ function useFieldListAdaptor(collector) {
83
84
  }
84
85
  function bindUrlProps(schema2, item2) {
85
86
  Object.assign(schema2["x-component-props"], {
86
- ...pick(item2, ["lazyRequest", "urlConfig"]),
87
- options: item2.option
87
+ ...pick(item2, ["lazyRequest", "urlConfig"])
88
88
  });
89
89
  }
90
90
  };
@@ -63,15 +63,15 @@ interface ReactionType {
63
63
  };
64
64
  [key: string]: any;
65
65
  }
66
- export interface FormWordbook {
67
- level_num?: number;
66
+ export declare type FormWordbook = Partial<{
67
+ level_num: number;
68
68
  id: string;
69
69
  name: string;
70
70
  render_key: string[];
71
71
  search_key: string[];
72
72
  type: string;
73
73
  value_key: string;
74
- }
74
+ }>;
75
75
  export declare type FieldItem = {
76
76
  /**
77
77
  * 字段的key
@@ -93,12 +93,12 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
93
93
  multi_select_value?: string | number | undefined;
94
94
  wordbook?: {
95
95
  level_num?: number | undefined;
96
- id: string;
97
- name: string;
98
- render_key: string[];
99
- search_key: string[];
100
- type: string;
101
- value_key: string;
96
+ id?: string | undefined;
97
+ name?: string | undefined;
98
+ render_key?: string[] | undefined;
99
+ search_key?: string[] | undefined;
100
+ type?: string | undefined;
101
+ value_key?: string | undefined;
102
102
  } | undefined;
103
103
  open?: {
104
104
  value?: any;
@@ -95,12 +95,12 @@ declare const _default: import("vue").DefineComponent<{
95
95
  multi_select_value?: string | number | undefined;
96
96
  wordbook?: {
97
97
  level_num?: number | undefined;
98
- id: string;
99
- name: string;
100
- render_key: string[];
101
- search_key: string[];
102
- type: string;
103
- value_key: string;
98
+ id?: string | undefined;
99
+ name?: string | undefined;
100
+ render_key?: string[] | undefined;
101
+ search_key?: string[] | undefined;
102
+ type?: string | undefined;
103
+ value_key?: string | undefined;
104
104
  } | undefined;
105
105
  open?: {
106
106
  value?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.20-beta.0",
3
+ "version": "3.1.20-beta.2",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -66,5 +66,5 @@
66
66
  "iOS 7",
67
67
  "last 3 iOS versions"
68
68
  ],
69
- "gitHead": "3d0072794380e810a8c9ffc124b0b1d952374dcc"
69
+ "gitHead": "6c6ab160bc65bb020fe6df41dc32ea11d40842af"
70
70
  }