cnhis-design-vue 3.1.14-beta.7 → 3.1.14-beta.9

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 +23 -23
  2. package/es/packages/big-table/index.d.ts +1 -0
  3. package/es/packages/big-table/src/BigTable.vue.d.ts +30 -20
  4. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +38 -17
  5. package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +25 -8
  6. package/es/packages/big-table/src/components/edit-form/edit-separate.vue_vue_type_script_setup_true_lang.js +29 -9
  7. package/es/packages/big-table/src/components/separate.vue.d.ts +3 -4
  8. package/es/packages/big-table/src/components/separate.vue_vue_type_script_setup_true_lang.js +7 -3
  9. package/es/packages/big-table/src/hooks/useEdit.d.ts +25 -7
  10. package/es/packages/big-table/src/hooks/useSeparateRow.d.ts +1 -1
  11. package/es/packages/big-table/src/hooks/useSeparateRow.js +14 -10
  12. package/es/packages/big-table/src/utils.js +1 -1
  13. package/es/packages/big-table/style/index.css +12 -2
  14. package/es/packages/fabric-chart/index.d.ts +2 -0
  15. package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +2 -0
  16. package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +16 -6
  17. package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
  18. package/es/packages/fabric-chart/src/hooks/useLeft.js +14 -14
  19. package/es/packages/fabric-chart/src/hooks/useRight.js +2 -13
  20. package/es/packages/fabric-chart/src/hooks/useTop.js +9 -10
  21. package/es/packages/fabric-chart/src/interface.d.ts +4 -0
  22. package/es/packages/form-render/src/components/renderer/cascader.d.ts +1 -1
  23. package/es/packages/form-render/src/components/renderer/cascader.js +4 -8
  24. package/es/packages/form-render/src/components/renderer/input.js +5 -16
  25. package/es/packages/form-render/src/components/renderer/inputNumber.d.ts +12 -0
  26. package/es/packages/form-render/src/components/renderer/inputNumber.js +11 -4
  27. package/es/packages/form-render/src/components/renderer/select.js +9 -2
  28. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +3 -1
  29. package/es/packages/form-render/src/types/fieldItem.d.ts +1 -1
  30. package/es/packages/form-render/src/utils/index.d.ts +8 -2
  31. package/es/packages/form-render/src/utils/index.js +40 -14
  32. package/es/packages/index.css +12 -2
  33. package/es/packages/info-header/index.d.ts +2 -2
  34. package/es/packages/info-header/src/InfoHeader.vue.d.ts +2 -2
  35. package/es/src/components/SlotRender/SlotRender.d.ts +3 -3
  36. package/es/src/components/SlotRender/SlotRender.js +4 -4
  37. package/global.d.ts +8 -8
  38. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { useMemoize } from '@vueuse/core';
2
- import { isNumber, isString } from 'lodash-es';
2
+ import { isNumber, isArray, cloneDeep, isString } from 'lodash-es';
3
3
  import { ref, computed, provide, watch, nextTick } from 'vue';
4
4
  import { InjectionSeparateHandle } from '../../../../packages/big-table/src/constants';
5
5
 
@@ -17,7 +17,6 @@ class SeparateHandle {
17
17
  this.callbacks.clear();
18
18
  }
19
19
  trigger() {
20
- console.log("trigger");
21
20
  this.callbacks.forEach((cb) => cb());
22
21
  }
23
22
  }
@@ -38,15 +37,15 @@ const getStringWidth = /* @__PURE__ */ useMemoize(function(str) {
38
37
  return width + 4;
39
38
  }
40
39
  if (/[\u4e00-\u9fa5]/.test(char)) {
41
- return width + 16;
40
+ return width + 15;
42
41
  }
43
42
  if (/-/.test(char)) {
44
43
  return width + 4;
45
44
  }
46
- if (/(|)/.test(char)) {
45
+ if (/[()]/.test(char)) {
47
46
  return width + 14;
48
47
  }
49
- if (/\(|\)/.test(char)) {
48
+ if (/[)(]/.test(char)) {
50
49
  return width + 5;
51
50
  }
52
51
  if (/-/.test(char)) {
@@ -68,7 +67,7 @@ function useSeparateMap() {
68
67
  }
69
68
  return { separateDataMap, getRowData };
70
69
  }
71
- function useSeparateRow(getColumnConfig, $VXETable) {
70
+ function useSeparateRow(getColumnConfig, getFieldItem, $VXETable) {
72
71
  const needSeparateColumn = computed(() => {
73
72
  return getColumnConfig().filter((column) => column.formType === "separate");
74
73
  });
@@ -77,11 +76,11 @@ function useSeparateRow(getColumnConfig, $VXETable) {
77
76
  return data;
78
77
  }
79
78
  return data.reduce(async (res, row, dataIndex) => {
80
- let parsedRowData = [];
79
+ const parsedRowData = [];
81
80
  for (const column of needSeparateColumn.value) {
82
81
  parsedRowData.push({
83
82
  columnName: column.columnName,
84
- data: contentSeparate(row[column.columnName], await getColumnRenderWidth(column))
83
+ data: contentSeparate(row[column.columnName], column.columnName, await getColumnRenderWidth(column))
85
84
  });
86
85
  }
87
86
  (await res).push(...Array.from({ length: getColumnInfoMaxLength(parsedRowData) }).map((_, index) => {
@@ -129,10 +128,15 @@ function useSeparateRow(getColumnConfig, $VXETable) {
129
128
  }
130
129
  }
131
130
  }
132
- function contentSeparate(value, width) {
131
+ function contentSeparate(value, columnName, width) {
132
+ if (isArray(value))
133
+ return value.map((row) => {
134
+ var _a, _b, _c;
135
+ return (_c = (_b = (_a = getFieldItem(columnName)) == null ? void 0 : _a.separateFormatter) == null ? void 0 : _b.call(_a, cloneDeep(row))) != null ? _c : row;
136
+ });
133
137
  if (!isString(value) || !isNumber(width))
134
138
  return [value];
135
- width -= 20;
139
+ width -= 24;
136
140
  return [...value].reduce((res, char) => {
137
141
  const latestString = res[res.length - 1];
138
142
  if (getStringWidth(latestString + char) > width) {
@@ -418,7 +418,7 @@ const setFilterStatus = (state, props) => {
418
418
  state.filterFields[item.field_key]["CONVERT"] = [];
419
419
  return false;
420
420
  }
421
- const value = item.value.map((item2) => JSON.stringify(item2));
421
+ const value = item.value;
422
422
  state.filterFields[item.field_key]["CONVERT"] = value;
423
423
  }
424
424
  });
@@ -18,7 +18,7 @@
18
18
  margin-top: 6px;
19
19
  }
20
20
  .big-table-filter-wrap .sort-item {
21
- line-height: 32px;
21
+ height: 32px;
22
22
  padding: 0 13px;
23
23
  display: flex;
24
24
  align-items: center;
@@ -97,7 +97,7 @@
97
97
  }
98
98
  .big-table-filter-wrap .checkbox-btn-wrap {
99
99
  display: flex;
100
- padding: 9px 10px 19px 14px;
100
+ padding: 9px 10px 9px 14px;
101
101
  }
102
102
  .big-table-filter-wrap .checkbox-btn-wrap .checkbox-btn {
103
103
  width: 56px;
@@ -131,6 +131,16 @@
131
131
  width: 25px;
132
132
  height: 20px;
133
133
  }
134
+ .big-table__separate {
135
+ padding: 4px;
136
+ }
137
+ .big-table__separatePlaceholder {
138
+ display: inline-block;
139
+ visibility: hidden;
140
+ max-width: 0;
141
+ word-break: keep-all;
142
+ width: 0;
143
+ }
134
144
  body > .vxe-table--tooltip-wrapper {
135
145
  display: none !important;
136
146
  }
@@ -26,9 +26,11 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
26
26
  gridXNumber: import("vue").ComputedRef<number>;
27
27
  gridYNumber: import("vue").ComputedRef<number>;
28
28
  endX: import("vue").ComputedRef<number>;
29
+ endXLimit: import("vue").ComputedRef<number>;
29
30
  originX: import("vue").ComputedRef<any>;
30
31
  endY: import("vue").ComputedRef<number>;
31
32
  originY: import("vue").ComputedRef<number>;
33
+ originYLimit: import("vue").ComputedRef<number>;
32
34
  xCellWidth: import("vue").ComputedRef<number>;
33
35
  yCellHeight: import("vue").ComputedRef<number>;
34
36
  iconsWidth: import("vue").ComputedRef<any>;
@@ -26,9 +26,11 @@ declare const _default: import("vue").DefineComponent<{
26
26
  gridXNumber: import("vue").ComputedRef<number>;
27
27
  gridYNumber: import("vue").ComputedRef<number>;
28
28
  endX: import("vue").ComputedRef<number>;
29
+ endXLimit: import("vue").ComputedRef<number>;
29
30
  originX: import("vue").ComputedRef<any>;
30
31
  endY: import("vue").ComputedRef<number>;
31
32
  originY: import("vue").ComputedRef<number>;
33
+ originYLimit: import("vue").ComputedRef<number>;
32
34
  xCellWidth: import("vue").ComputedRef<number>;
33
35
  yCellHeight: import("vue").ComputedRef<number>;
34
36
  iconsWidth: import("vue").ComputedRef<any>;
@@ -54,11 +54,11 @@ var script = /* @__PURE__ */ defineComponent({
54
54
  });
55
55
  const gridXNumber = computed(() => {
56
56
  const { grid } = props.data;
57
- return grid.mainXCell * grid.subXCell;
57
+ return grid.mainXCell * grid.subXCell + grid.surplusXCell;
58
58
  });
59
59
  const gridYNumber = computed(() => {
60
60
  const { grid } = props.data;
61
- return grid.mainYCell * grid.subYCell;
61
+ return grid.mainYCell * grid.subYCell + grid.surplusYCell;
62
62
  });
63
63
  const endX = computed(() => {
64
64
  const { width, right = null, top } = props.data;
@@ -67,6 +67,10 @@ var script = /* @__PURE__ */ defineComponent({
67
67
  const endWidth = right.width || 50;
68
68
  return width - endWidth;
69
69
  });
70
+ const endXLimit = computed(() => {
71
+ const { grid } = props.data;
72
+ return endX.value - grid.surplusXCell * xCellWidth.value;
73
+ });
70
74
  const originX = computed(() => {
71
75
  const { top, left } = props.data;
72
76
  const originX2 = top.titleWidth + iconsWidth.value;
@@ -86,6 +90,10 @@ var script = /* @__PURE__ */ defineComponent({
86
90
  const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
87
91
  return topHeight;
88
92
  });
93
+ const originYLimit = computed(() => {
94
+ const { grid } = props.data;
95
+ return originY.value + grid.surplusYCell * yCellHeight.value;
96
+ });
89
97
  const xCellWidth = computed(() => {
90
98
  return (endX.value - originX.value) / gridXNumber.value;
91
99
  });
@@ -178,8 +186,8 @@ var script = /* @__PURE__ */ defineComponent({
178
186
  endY: endY.value
179
187
  };
180
188
  if (painIndex.value === 0) {
181
- obj.originY = originY.value;
182
- obj.endY = originY.value + painHeight.value;
189
+ obj.originY = originYLimit.value;
190
+ obj.endY = originYLimit.value + painHeight.value;
183
191
  } else if (painIndex.value === left.yScaleValue.length - 1) {
184
192
  obj.originY = endY.value - painHeight.value;
185
193
  obj.endY = endY.value;
@@ -193,10 +201,10 @@ var script = /* @__PURE__ */ defineComponent({
193
201
  endY: endY.value
194
202
  };
195
203
  if (painIndex.value === 0) {
196
- obj.originY = originY.value + painHeight.value;
204
+ obj.originY = originYLimit.value + painHeight.value;
197
205
  obj.endY = endY.value;
198
206
  } else if (painIndex.value === left.yScaleValue.length - 1) {
199
- obj.originY = originY.value;
207
+ obj.originY = originYLimit.value;
200
208
  obj.endY = endY.value - painHeight.value;
201
209
  }
202
210
  return obj;
@@ -240,7 +248,9 @@ var script = /* @__PURE__ */ defineComponent({
240
248
  iconsWidth: iconsWidth.value,
241
249
  originX: originX.value,
242
250
  originY: originY.value,
251
+ originYLimit: originYLimit.value,
243
252
  endX: endX.value,
253
+ endXLimit: endXLimit.value,
244
254
  endY: endY.value,
245
255
  xCellWidth: xCellWidth.value,
246
256
  yCellHeight: yCellHeight.value,
@@ -62,6 +62,7 @@ function drawPoint(type = "circle", style) {
62
62
  originY: "center",
63
63
  hasControls: false,
64
64
  hasBorders: false,
65
+ hoverCursor: "pointer",
65
66
  ...style
66
67
  };
67
68
  const createCircleBorder = () => {
@@ -9,13 +9,13 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
9
9
  originX,
10
10
  endX,
11
11
  yCellHeight,
12
- borderStyle,
13
12
  left,
14
13
  vitalSignsOriginY,
15
14
  painOriginY,
16
15
  painHeight,
17
16
  iconsWidth,
18
- itemList
17
+ itemList,
18
+ painIndex
19
19
  } = propItems;
20
20
  const mainScaleWidth = 9;
21
21
  const subScaleWidth = 5;
@@ -86,7 +86,7 @@ ${item.title.slice(-2)}`,
86
86
  title.sendToBack();
87
87
  }
88
88
  function drawScaleValue() {
89
- let groupList = [];
89
+ const groupList = [];
90
90
  const column = !painHeight ? left.yScaleValue.length : left.yScaleValue.length - 1;
91
91
  const colWidth = (originX - iconsWidth) / column;
92
92
  const residue = (originX - iconsWidth) % column;
@@ -96,10 +96,17 @@ ${item.title.slice(-2)}`,
96
96
  drwaPainScaleValue(item);
97
97
  return;
98
98
  }
99
- let list = [];
99
+ const list = [];
100
+ function createLine(points) {
101
+ const line2 = new fabric.Line(points, {
102
+ ...defaultBorderStyle,
103
+ ...item.style
104
+ });
105
+ list.push(line2);
106
+ }
100
107
  const rectWidth = index === 0 ? firstColWidth : colWidth;
101
108
  const rectLeft = index === 0 ? iconsWidth : firstColWidth + iconsWidth + (index - 1) * colWidth;
102
- const line = index > 0 ? new fabric.Line([rectLeft, vitalSignsOriginY.originY, rectLeft, vitalSignsOriginY.endY], {
109
+ const line = index > 0 ? new fabric.Line([rectLeft, painIndex == 0 ? vitalSignsOriginY.originY : originY, rectLeft, vitalSignsOriginY.endY], {
103
110
  ...defaultBorderStyle
104
111
  }) : null;
105
112
  line && list.push(line);
@@ -118,13 +125,6 @@ ${item.title.slice(-2)}`,
118
125
  if (item.showScale && i !== item.list.length - 1) {
119
126
  for (let j = 0; j < 5; j++) {
120
127
  if (j > 0 || !item.showNumber || position !== "center") {
121
- let createLine = function(points) {
122
- const line2 = new fabric.Line(points, {
123
- ...defaultBorderStyle,
124
- ...item.style
125
- });
126
- list.push(line2);
127
- };
128
128
  const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
129
129
  const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
130
130
  const y = top - j * spaceScale;
@@ -164,9 +164,9 @@ ${item.title.slice(-2)}`,
164
164
  group && group.sendToBack();
165
165
  }
166
166
  function drawIcons() {
167
- let list = JSON.parse(JSON.stringify(itemList));
167
+ const list = JSON.parse(JSON.stringify(itemList));
168
168
  let topY = endY;
169
- let leftX = iconsWidth - left.icons.marginRight;
169
+ const leftX = iconsWidth - left.icons.marginRight;
170
170
  list.reverse().forEach((item, index) => {
171
171
  topY -= 10;
172
172
  let title = item.title.replace(/(.{2})/g, "$1\n");
@@ -3,25 +3,14 @@ import { fabric } from '../utils/index.js';
3
3
  import { defaultBorderStyle, defaultRectStyle, defaultStyle } from './useDraw.js';
4
4
 
5
5
  function useRight(canvas, propItems) {
6
- const {
7
- endX,
8
- endY,
9
- temperatureYCell,
10
- canvasWidth,
11
- canvasHeight,
12
- left,
13
- right,
14
- breathingHeight,
15
- vitalSignsOriginY,
16
- painOriginY
17
- } = propItems;
6
+ const { endX, endY, temperatureYCell, canvasWidth, canvasHeight, left, right, breathingHeight, vitalSignsOriginY } = propItems;
18
7
  function drawScaleValue() {
19
8
  var _a, _b, _c;
20
9
  if (!right) {
21
10
  canvas.value.add(new fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, canvasHeight], defaultBorderStyle));
22
11
  return false;
23
12
  }
24
- let list = [];
13
+ const list = [];
25
14
  list.push(new fabric.Rect({
26
15
  ...defaultRectStyle,
27
16
  width: canvasWidth - endX - 1,
@@ -1,24 +1,23 @@
1
1
  import { onMounted, nextTick } from 'vue';
2
2
  import { fabric } from '../utils/index.js';
3
- import { defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
3
+ import { defaultBorderStyle, defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
4
4
 
5
5
  function useTop(canvas, propItems) {
6
6
  const {
7
- originY,
8
7
  grid,
9
8
  originX,
10
9
  xCellWidth,
11
10
  gridXNumber,
12
11
  top,
13
- dateHeight,
14
- hospitalDaysHeight,
15
- operationDaysHeight,
16
12
  xScalevalueHeight,
17
13
  iconsWidth,
18
- topList
14
+ topList,
15
+ endXLimit,
16
+ canvasWidth
19
17
  } = propItems;
20
18
  function drawTop() {
21
- let list = [];
19
+ const list = [];
20
+ endXLimit && list.push(new fabric.Line([endXLimit, 0, canvasWidth, 0], defaultBorderStyle));
22
21
  let topY = 0;
23
22
  topList.forEach((item, index) => {
24
23
  if (index > 0) {
@@ -53,7 +52,7 @@ function useTop(canvas, propItems) {
53
52
  top: topY
54
53
  });
55
54
  list.push(title);
56
- let timeList = [];
55
+ const timeList = [];
57
56
  for (let j = 0; j < grid.mainXCell; j++) {
58
57
  timeList.push(top.xScalevalue.list);
59
58
  }
@@ -80,7 +79,7 @@ function useTop(canvas, propItems) {
80
79
  return false;
81
80
  const height = top.dayHeight;
82
81
  const width = xCellWidth * grid.subSecondXCell;
83
- const dayList = gridXNumber / grid.subSecondXCell;
82
+ const dayList = (gridXNumber - grid.surplusXCell) / grid.subSecondXCell;
84
83
  for (let i = 0; i < dayList; i++) {
85
84
  const left = originX + i * width;
86
85
  const value = i % 2 === 0 ? "\u4E0A\u5348" : "\u4E0B\u5348";
@@ -99,7 +98,7 @@ function useTop(canvas, propItems) {
99
98
  }
100
99
  }
101
100
  function drawDate(item, list, topY) {
102
- let height = propItems[`${item.key}Height`];
101
+ const height = propItems[`${item.key}Height`];
103
102
  const title = drawTextGroup({
104
103
  width: originX - iconsWidth,
105
104
  height,
@@ -14,6 +14,8 @@ interface IGrid {
14
14
  subSecondXCell: number;
15
15
  mainYCell: number;
16
16
  subYCell: number;
17
+ surplusXCell: number;
18
+ surplusYCell: number;
17
19
  mainLineStyle?: ImainLineStyle;
18
20
  subLineStyle?: fabric.ILineOptions;
19
21
  subSecondLineStyle?: fabric.ILineOptions;
@@ -45,7 +47,9 @@ export interface IPropItems {
45
47
  iconsWidth: number;
46
48
  originX: number;
47
49
  originY: number;
50
+ originYLimit: number;
48
51
  endX: number;
52
+ endXLimit: number;
49
53
  endY: number;
50
54
  xCellWidth: number;
51
55
  yCellHeight: number;
@@ -8,7 +8,7 @@ declare type DependKeyObj = {
8
8
  declare type UrlConfig = {
9
9
  method: FormRequestType;
10
10
  nameKey: string;
11
- dependKey: ArrayAble<string> | ArrayAble<DependKeyObj>;
11
+ dependKey: ArrayAble<string> | Record<string, string> | ArrayAble<DependKeyObj>;
12
12
  url: string;
13
13
  valueKey: string;
14
14
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
2
2
  import { isField } from '@formily/core';
3
- import { isObject, isString } from 'lodash-es';
3
+ import { isObject } from 'lodash-es';
4
4
  import { InjectAsyncQueue } from '../../constants/index.js';
5
- import { assignUpdateValue, formRenderLog, arrayed } from '../../utils/index.js';
5
+ import { assignUpdateValue, formRenderLog, traverseDependKey } from '../../utils/index.js';
6
6
  import { connect, mapProps } from '@formily/vue';
7
7
  import { NCascader } from 'naive-ui';
8
8
  import { useFormField } from '../../hooks/useFormField.js';
@@ -74,12 +74,8 @@ const script = defineComponent({
74
74
  lvlnr: deep + 1 + ""
75
75
  };
76
76
  if (option2 && config2.dependKey) {
77
- arrayed(config2.dependKey).forEach((key) => {
78
- if (isString(key)) {
79
- params[key] = option2[valueKey.value];
80
- } else if (isObject(key)) {
81
- params[key.paramName] = option2[key.paramValue];
82
- }
77
+ traverseDependKey(config2.dependKey, (dependKey, valueKey2) => {
78
+ params[valueKey2] = option2[dependKey];
83
79
  });
84
80
  }
85
81
  return {
@@ -1,5 +1,5 @@
1
- import { defineComponent, computed, createVNode, Fragment } from 'vue';
2
- import { createSlot, assignUpdateValue } from '../../utils/index.js';
1
+ import { defineComponent, createVNode } from 'vue';
2
+ import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
3
3
  import { connect, mapProps } from '@formily/vue';
4
4
  import { NInput } from 'naive-ui';
5
5
 
@@ -13,21 +13,10 @@ const script = defineComponent({
13
13
  type: String
14
14
  }
15
15
  },
16
- setup(props, {
17
- attrs
18
- }) {
19
- const _slots = computed(() => {
20
- const res = {};
21
- if (props.prefix) {
22
- res.prefix = () => createVNode(Fragment, null, [createSlot(props.prefix, props).default()]);
23
- }
24
- if (props.suffix) {
25
- res.suffix = () => createVNode(Fragment, null, [createSlot(props.suffix, props).default()]);
26
- }
27
- return res;
28
- });
16
+ setup(props) {
17
+ const _slots = createInputSlot(props);
29
18
  return () => {
30
- return createVNode(NInput, attrs, _slots.value);
19
+ return createVNode(NInput, null, _slots.value);
31
20
  };
32
21
  }
33
22
  });
@@ -1,5 +1,17 @@
1
1
  export declare const INPUT_NUMBER: import("vue").DefineComponent<{
2
2
  onChange: {};
3
+ prefix: {
4
+ type: StringConstructor;
5
+ };
6
+ suffix: {
7
+ type: StringConstructor;
8
+ };
3
9
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4
10
  onChange: {};
11
+ prefix: {
12
+ type: StringConstructor;
13
+ };
14
+ suffix: {
15
+ type: StringConstructor;
16
+ };
5
17
  }>>, {}>;
@@ -1,15 +1,22 @@
1
1
  import { defineComponent, createVNode } from 'vue';
2
- import { assignUpdateValue } from '../../utils/index.js';
2
+ import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
3
3
  import { connect, mapProps } from '@formily/vue';
4
4
  import { NInputNumber } from 'naive-ui';
5
5
 
6
6
  const script = defineComponent({
7
7
  props: {
8
- onChange: {}
8
+ onChange: {},
9
+ prefix: {
10
+ type: String
11
+ },
12
+ suffix: {
13
+ type: String
14
+ }
9
15
  },
10
- setup(_) {
16
+ setup(props) {
17
+ const _slots = createInputSlot(props);
11
18
  return () => {
12
- return createVNode(NInputNumber, null, null);
19
+ return createVNode(NInputNumber, null, _slots.value);
13
20
  };
14
21
  }
15
22
  });
@@ -2,7 +2,7 @@ import { defineComponent, ref, inject, computed, watch, nextTick, createVNode }
2
2
  import { isField } from '@formily/core';
3
3
  import { cloneDeep } from 'lodash-es';
4
4
  import { InjectAsyncQueue, InjectionFormItemDepsCollector, InjectionChangeContextCollector } from '../../constants/index.js';
5
- import { assignUpdateValue, formRenderLog, generateUrlParams } from '../../utils/index.js';
5
+ import { assignUpdateValue, formRenderLog, traverseDependKey } from '../../utils/index.js';
6
6
  import { isObject } from '@vueuse/core';
7
7
  import { connect, mapProps } from '@formily/vue';
8
8
  import { NSelect } from 'naive-ui';
@@ -65,9 +65,16 @@ const script = defineComponent({
65
65
  remoteOptions.value = null;
66
66
  }
67
67
  function createParams(config2, field2) {
68
+ const _params = {};
69
+ traverseDependKey(config2.dependKey, (dependKey, valueKey2) => {
70
+ const _field = field2.query(dependKey).take();
71
+ if (isField(_field)) {
72
+ _params[valueKey2] = _field.value;
73
+ }
74
+ });
68
75
  return {
69
76
  ...config2,
70
- params: Object.assign({}, config2.params, generateUrlParams(field2, config2.dependKey))
77
+ params: Object.assign({}, config2.params, _params)
71
78
  };
72
79
  }
73
80
  }
@@ -108,7 +108,9 @@ function useFieldListAdaptor(collector, uuid) {
108
108
  Object.assign(schema["x-component-props"], {
109
109
  precision: decimal_length || (validate == null ? void 0 : validate.decimal_length),
110
110
  max: validate == null ? void 0 : validate.max_value,
111
- min: validate == null ? void 0 : validate.min_value
111
+ min: validate == null ? void 0 : validate.min_value,
112
+ prefix: item.prefix,
113
+ suffix: item.suffix
112
114
  });
113
115
  return schema;
114
116
  };
@@ -64,7 +64,7 @@ export declare type FieldItem = {
64
64
  urlConfig: Partial<{
65
65
  url: string;
66
66
  method: 'post' | 'get' | 'put' | 'patch' | 'delete';
67
- dependKey: string | string[];
67
+ dependKey: string | string[] | Record<string, string>;
68
68
  params: AnyObject;
69
69
  nameKey: string;
70
70
  valueKey: string;
@@ -1,7 +1,7 @@
1
1
  import { AnyObject, ArrayAble } from '../../../../../es/src/types';
2
2
  import { ISchema } from '@formily/json-schema/esm/types';
3
3
  import { GeneralField } from '@formily/core';
4
- import { InjectionKey, VNode } from 'vue';
4
+ import { FunctionalComponent, InjectionKey, VNode } from 'vue';
5
5
  import { AgeContext, FieldItem, IdCardParseInfo } from '../types';
6
6
  export declare function formRenderLog(message: string, type?: keyof Console): void;
7
7
  export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
@@ -14,7 +14,12 @@ export declare function isMobile(mobile: string): boolean;
14
14
  export declare function parseBirthday(birthday: string): AgeContext;
15
15
  export declare function parseIdCard(idCardNo: string): IdCardParseInfo;
16
16
  export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
17
- export declare function generateUrlParams(field: GeneralField, dependKeys?: string | string[]): AnyObject;
17
+ export declare function traverseDependKey(dependKeys: ArrayAble<string> | Record<string, string> | ArrayAble<{
18
+ paramName: string;
19
+ paramValue: string;
20
+ }>, handler: {
21
+ (dependKey: string, valueKey: string): void;
22
+ }): void;
18
23
  export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema) => void): void;
19
24
  export declare function uuidGenerator(): string;
20
25
  export declare function createSlot(renderer: unknown, props: any): Record<string, () => ArrayAble<VNode>> | {
@@ -28,3 +33,4 @@ export declare function queryInput(decoratorElement?: HTMLElement | null): {
28
33
  export declare function getParentLinebar(key: string, fieldList: FieldItem[]): string | null;
29
34
  export declare function createLinebarId(id: string): string;
30
35
  export declare function fieldKeyEscape(fieldList: FieldItem[]): string;
36
+ export declare function createInputSlot(props: AnyObject): import("vue").ComputedRef<Record<string, FunctionalComponent<{}, {}>>>;