cnhis-design-vue 3.1.16-beta.7 → 3.1.16-beta.8
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.
- package/es/packages/button-print/src/ButtonPrint.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/packages/fabric-chart/src/hooks/constant.js +4 -4
- package/es/packages/fabric-chart/src/hooks/useCenter.js +20 -23
- package/es/packages/fabric-chart/src/hooks/useDraw.js +11 -4
- package/es/packages/fabric-chart/src/hooks/useEvent.js +11 -3
- package/es/packages/fabric-chart/src/hooks/useTop.js +5 -8
- package/es/packages/form-config/index.d.ts +15 -15
- package/es/packages/form-config/src/FormConfig.vue.d.ts +15 -15
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +5 -5
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +2 -14
- package/es/packages/form-render/src/components/renderer/select.d.ts +1 -10
- package/es/packages/form-render/src/components/renderer/select.js +7 -4
- package/es/packages/form-render/src/types/fieldItem.d.ts +11 -12
- package/es/packages/shortcut-setter/index.d.ts +5 -5
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -5
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -7,12 +7,12 @@ const TEMPERATURE_MENU = [
|
|
|
7
7
|
{
|
|
8
8
|
label: "\u836F\u7269\u964D\u6E29",
|
|
9
9
|
value: void 0,
|
|
10
|
-
type: "
|
|
10
|
+
type: "drugReduce"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
label: "\u7269\u7406\u964D\u6E29",
|
|
14
14
|
value: void 0,
|
|
15
|
-
type: "
|
|
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: "
|
|
27
|
+
type: "drugReduce"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
label: "\u7269\u7406\u964D\u75DB",
|
|
31
31
|
value: void 0,
|
|
32
|
-
type: "
|
|
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
|
-
|
|
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
|
|
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.
|
|
289
|
-
const
|
|
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
|
-
|
|
292
|
-
|
|
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
|
-
|
|
295
|
+
reducePoint = drawPoint(((_a = reduceStyle == null ? void 0 : reduceStyle.point) == null ? void 0 : _a.type) || "circle", {
|
|
299
296
|
left: points[0],
|
|
300
|
-
top:
|
|
301
|
-
...
|
|
297
|
+
top: reduceY,
|
|
298
|
+
...reduceStyle.point,
|
|
302
299
|
...defaultStyle
|
|
303
300
|
});
|
|
304
|
-
|
|
305
|
-
|
|
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 = (
|
|
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
|
-
|
|
342
|
-
|
|
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.
|
|
460
|
-
point.
|
|
461
|
-
point.
|
|
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
|
|
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
|
-
...
|
|
51
|
-
originX:
|
|
52
|
-
left: -
|
|
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
|
-
|
|
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,
|
|
@@ -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
|
-
...
|
|
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
|
-
...
|
|
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
|
-
...
|
|
89
|
+
...item.style || {}
|
|
93
90
|
}, {
|
|
94
91
|
left,
|
|
95
92
|
top: topY
|
|
@@ -91,16 +91,16 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
91
91
|
date_format?: string | undefined;
|
|
92
92
|
step_length?: string | number | undefined;
|
|
93
93
|
urlConfig?: {
|
|
94
|
-
url
|
|
95
|
-
method?: "
|
|
94
|
+
url: string;
|
|
95
|
+
method?: import("..").FormRequestType | undefined;
|
|
96
|
+
nameKey?: string | undefined;
|
|
97
|
+
valueKey?: string | undefined;
|
|
98
|
+
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
96
99
|
dependKey?: string | Record<string, string> | (string | {
|
|
97
100
|
paramName: string;
|
|
98
101
|
paramValue?: string | undefined;
|
|
99
102
|
required?: boolean | undefined;
|
|
100
103
|
})[] | undefined;
|
|
101
|
-
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
102
|
-
nameKey?: string | undefined;
|
|
103
|
-
valueKey?: string | undefined;
|
|
104
104
|
} | undefined;
|
|
105
105
|
suffixConfig?: any | any[] | undefined;
|
|
106
106
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -1744,16 +1744,16 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1744
1744
|
date_format?: string | undefined;
|
|
1745
1745
|
step_length?: string | number | undefined;
|
|
1746
1746
|
urlConfig?: {
|
|
1747
|
-
url
|
|
1748
|
-
method?: "
|
|
1747
|
+
url: string;
|
|
1748
|
+
method?: import("..").FormRequestType | undefined;
|
|
1749
|
+
nameKey?: string | undefined;
|
|
1750
|
+
valueKey?: string | undefined;
|
|
1751
|
+
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
1749
1752
|
dependKey?: string | Record<string, string> | (string | {
|
|
1750
1753
|
paramName: string;
|
|
1751
1754
|
paramValue?: string | undefined;
|
|
1752
1755
|
required?: boolean | undefined;
|
|
1753
1756
|
})[] | undefined;
|
|
1754
|
-
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
1755
|
-
nameKey?: string | undefined;
|
|
1756
|
-
valueKey?: string | undefined;
|
|
1757
1757
|
} | undefined;
|
|
1758
1758
|
suffixConfig?: any | any[] | undefined;
|
|
1759
1759
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -3498,16 +3498,16 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3498
3498
|
date_format?: string | undefined;
|
|
3499
3499
|
step_length?: string | number | undefined;
|
|
3500
3500
|
urlConfig?: {
|
|
3501
|
-
url
|
|
3502
|
-
method?: "
|
|
3501
|
+
url: string;
|
|
3502
|
+
method?: import("..").FormRequestType | undefined;
|
|
3503
|
+
nameKey?: string | undefined;
|
|
3504
|
+
valueKey?: string | undefined;
|
|
3505
|
+
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
3503
3506
|
dependKey?: string | Record<string, string> | (string | {
|
|
3504
3507
|
paramName: string;
|
|
3505
3508
|
paramValue?: string | undefined;
|
|
3506
3509
|
required?: boolean | undefined;
|
|
3507
3510
|
})[] | undefined;
|
|
3508
|
-
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
3509
|
-
nameKey?: string | undefined;
|
|
3510
|
-
valueKey?: string | undefined;
|
|
3511
3511
|
} | undefined;
|
|
3512
3512
|
suffixConfig?: any | any[] | undefined;
|
|
3513
3513
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -93,16 +93,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
93
|
date_format?: string | undefined;
|
|
94
94
|
step_length?: string | number | undefined;
|
|
95
95
|
urlConfig?: {
|
|
96
|
-
url
|
|
97
|
-
method?: "
|
|
96
|
+
url: string;
|
|
97
|
+
method?: import("../../../../es/packages/form-render").FormRequestType | undefined;
|
|
98
|
+
nameKey?: string | undefined;
|
|
99
|
+
valueKey?: string | undefined;
|
|
100
|
+
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
98
101
|
dependKey?: string | Record<string, string> | (string | {
|
|
99
102
|
paramName: string;
|
|
100
103
|
paramValue?: string | undefined;
|
|
101
104
|
required?: boolean | undefined;
|
|
102
105
|
})[] | undefined;
|
|
103
|
-
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
104
|
-
nameKey?: string | undefined;
|
|
105
|
-
valueKey?: string | undefined;
|
|
106
106
|
} | undefined;
|
|
107
107
|
suffixConfig?: any | any[] | undefined;
|
|
108
108
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -1746,16 +1746,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1746
1746
|
date_format?: string | undefined;
|
|
1747
1747
|
step_length?: string | number | undefined;
|
|
1748
1748
|
urlConfig?: {
|
|
1749
|
-
url
|
|
1750
|
-
method?: "
|
|
1749
|
+
url: string;
|
|
1750
|
+
method?: import("../../../../es/packages/form-render").FormRequestType | undefined;
|
|
1751
|
+
nameKey?: string | undefined;
|
|
1752
|
+
valueKey?: string | undefined;
|
|
1753
|
+
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
1751
1754
|
dependKey?: string | Record<string, string> | (string | {
|
|
1752
1755
|
paramName: string;
|
|
1753
1756
|
paramValue?: string | undefined;
|
|
1754
1757
|
required?: boolean | undefined;
|
|
1755
1758
|
})[] | undefined;
|
|
1756
|
-
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
1757
|
-
nameKey?: string | undefined;
|
|
1758
|
-
valueKey?: string | undefined;
|
|
1759
1759
|
} | undefined;
|
|
1760
1760
|
suffixConfig?: any | any[] | undefined;
|
|
1761
1761
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -3500,16 +3500,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3500
3500
|
date_format?: string | undefined;
|
|
3501
3501
|
step_length?: string | number | undefined;
|
|
3502
3502
|
urlConfig?: {
|
|
3503
|
-
url
|
|
3504
|
-
method?: "
|
|
3503
|
+
url: string;
|
|
3504
|
+
method?: import("../../../../es/packages/form-render").FormRequestType | undefined;
|
|
3505
|
+
nameKey?: string | undefined;
|
|
3506
|
+
valueKey?: string | undefined;
|
|
3507
|
+
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
3505
3508
|
dependKey?: string | Record<string, string> | (string | {
|
|
3506
3509
|
paramName: string;
|
|
3507
3510
|
paramValue?: string | undefined;
|
|
3508
3511
|
required?: boolean | undefined;
|
|
3509
3512
|
})[] | undefined;
|
|
3510
|
-
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
3511
|
-
nameKey?: string | undefined;
|
|
3512
|
-
valueKey?: string | undefined;
|
|
3513
3513
|
} | undefined;
|
|
3514
3514
|
suffixConfig?: any | any[] | undefined;
|
|
3515
3515
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -76,16 +76,16 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
76
76
|
date_format?: string | undefined;
|
|
77
77
|
step_length?: string | number | undefined;
|
|
78
78
|
urlConfig?: {
|
|
79
|
-
url
|
|
80
|
-
method?: "
|
|
79
|
+
url: string;
|
|
80
|
+
method?: import("../../../../../es/packages/form-render").FormRequestType | undefined;
|
|
81
|
+
nameKey?: string | undefined;
|
|
82
|
+
valueKey?: string | undefined;
|
|
83
|
+
params?: AnyObject | undefined;
|
|
81
84
|
dependKey?: string | Record<string, string> | (string | {
|
|
82
85
|
paramName: string;
|
|
83
86
|
paramValue?: string | undefined;
|
|
84
87
|
required?: boolean | undefined;
|
|
85
88
|
})[] | undefined;
|
|
86
|
-
params?: AnyObject | undefined;
|
|
87
|
-
nameKey?: string | undefined;
|
|
88
|
-
valueKey?: string | undefined;
|
|
89
89
|
} | undefined;
|
|
90
90
|
suffixConfig?: any | any[] | undefined;
|
|
91
91
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import { AnyObject,
|
|
2
|
-
import {
|
|
1
|
+
import { AnyObject, Func } from '../../../../../../es/src/types';
|
|
2
|
+
import { UrlConfig } from '../../../../../../es/packages/form-render';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
|
-
declare type DependKeyObj = {
|
|
5
|
-
paramName: string;
|
|
6
|
-
paramValue: string;
|
|
7
|
-
};
|
|
8
|
-
declare type UrlConfig = {
|
|
9
|
-
method?: FormRequestType;
|
|
10
|
-
nameKey?: string;
|
|
11
|
-
valueKey?: string;
|
|
12
|
-
dependKey?: ArrayAble<string> | Record<string, string> | ArrayAble<DependKeyObj>;
|
|
13
|
-
url: string;
|
|
14
|
-
};
|
|
15
4
|
export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
16
5
|
options: {
|
|
17
6
|
type: PropType<AnyObject[]>;
|
|
@@ -51,4 +40,3 @@ export declare const SEARCH_CASCADE: import("vue").DefineComponent<{
|
|
|
51
40
|
}, {
|
|
52
41
|
options: AnyObject[];
|
|
53
42
|
}>;
|
|
54
|
-
export {};
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { AnyObject, Func } from '../../../../../../es/src/types';
|
|
2
|
-
import {
|
|
2
|
+
import { UrlConfig } from '../../types';
|
|
3
3
|
import { PropType } from 'vue';
|
|
4
|
-
declare type UrlConfig = {
|
|
5
|
-
method: FormRequestType;
|
|
6
|
-
dependKey?: string | string[];
|
|
7
|
-
nameKey: string;
|
|
8
|
-
url: string;
|
|
9
|
-
params?: AnyObject;
|
|
10
|
-
valueKey: string;
|
|
11
|
-
};
|
|
12
4
|
export declare const SELECT: import("vue").DefineComponent<{
|
|
13
5
|
value: {
|
|
14
6
|
type: StringConstructor;
|
|
@@ -53,4 +45,3 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
53
45
|
options: AnyObject[];
|
|
54
46
|
lazyRequest: boolean;
|
|
55
47
|
}>;
|
|
56
|
-
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, inject, nextTick, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
|
-
import { cloneDeep, isEqual } from 'lodash-es';
|
|
3
|
+
import { cloneDeep, isEqual, isString } from 'lodash-es';
|
|
4
4
|
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
5
5
|
import { InjectAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
6
|
+
import { formRenderLog } from '../../utils/index.js';
|
|
6
7
|
import { connect, mapProps } from '@formily/vue';
|
|
7
8
|
import { NSelect } from 'naive-ui';
|
|
8
9
|
import { useFormField } from '../../hooks/useFormField.js';
|
|
@@ -61,9 +62,11 @@ const script = defineComponent({
|
|
|
61
62
|
}
|
|
62
63
|
if (remoteOptions.value)
|
|
63
64
|
return;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
})
|
|
65
|
+
try {
|
|
66
|
+
remoteOptions.value = await asyncQueue.addAsync(await createParams(configFor(props), field.value, fieldKey.value));
|
|
67
|
+
} catch (e) {
|
|
68
|
+
isString(e) && formRenderLog(e, "warn");
|
|
69
|
+
}
|
|
67
70
|
async function createParams(config, field2, key) {
|
|
68
71
|
const _params = {};
|
|
69
72
|
try {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject, ArrayAble } from '../../../../../es/src/types';
|
|
2
2
|
import { SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
|
-
import { DependKeyType, FormCommonState } from '../../../../../es/packages/form-render';
|
|
4
|
+
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/packages/form-render';
|
|
5
5
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
6
6
|
export declare type ValidateItem = Partial<{
|
|
7
7
|
/**
|
|
@@ -36,6 +36,15 @@ interface FormRendererPayload {
|
|
|
36
36
|
export interface FormRenderer {
|
|
37
37
|
(payload: FormRendererPayload): ArrayAble<VNode> | any;
|
|
38
38
|
}
|
|
39
|
+
export declare type UrlConfig = {
|
|
40
|
+
url: string;
|
|
41
|
+
} & Partial<{
|
|
42
|
+
method?: FormRequestType;
|
|
43
|
+
nameKey?: string;
|
|
44
|
+
valueKey?: string;
|
|
45
|
+
params?: AnyObject;
|
|
46
|
+
dependKey?: DependKeyType;
|
|
47
|
+
}>;
|
|
39
48
|
interface SwitchProperty {
|
|
40
49
|
value?: any;
|
|
41
50
|
describe?: string;
|
|
@@ -141,17 +150,7 @@ export declare type FieldItem = {
|
|
|
141
150
|
* slider控件间距
|
|
142
151
|
*/
|
|
143
152
|
step_length: string | number;
|
|
144
|
-
urlConfig:
|
|
145
|
-
url: string;
|
|
146
|
-
method: 'post' | 'get' | 'put' | 'patch' | 'delete';
|
|
147
|
-
/**
|
|
148
|
-
* 请求参数依赖关系
|
|
149
|
-
*/
|
|
150
|
-
dependKey: DependKeyType;
|
|
151
|
-
params: AnyObject;
|
|
152
|
-
nameKey: string;
|
|
153
|
-
valueKey: string;
|
|
154
|
-
}>;
|
|
153
|
+
urlConfig: UrlConfig;
|
|
155
154
|
/**
|
|
156
155
|
* 控件组
|
|
157
156
|
*/
|
|
@@ -106,16 +106,16 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
106
106
|
date_format?: string | undefined;
|
|
107
107
|
step_length?: string | number | undefined;
|
|
108
108
|
urlConfig?: {
|
|
109
|
-
url
|
|
110
|
-
method?: "
|
|
109
|
+
url: string;
|
|
110
|
+
method?: import("..").FormRequestType | undefined;
|
|
111
|
+
nameKey?: string | undefined;
|
|
112
|
+
valueKey?: string | undefined;
|
|
113
|
+
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
111
114
|
dependKey?: string | Record<string, string> | (string | {
|
|
112
115
|
paramName: string;
|
|
113
116
|
paramValue?: string | undefined;
|
|
114
117
|
required?: boolean | undefined;
|
|
115
118
|
})[] | undefined;
|
|
116
|
-
params?: import("../../../es/src/types").AnyObject | undefined;
|
|
117
|
-
nameKey?: string | undefined;
|
|
118
|
-
valueKey?: string | undefined;
|
|
119
119
|
} | undefined;
|
|
120
120
|
suffixConfig?: any | any[] | undefined;
|
|
121
121
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
@@ -108,16 +108,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
108
|
date_format?: string | undefined;
|
|
109
109
|
step_length?: string | number | undefined;
|
|
110
110
|
urlConfig?: {
|
|
111
|
-
url
|
|
112
|
-
method?: "
|
|
111
|
+
url: string;
|
|
112
|
+
method?: import("../../../../es/packages/form-render").FormRequestType | undefined;
|
|
113
|
+
nameKey?: string | undefined;
|
|
114
|
+
valueKey?: string | undefined;
|
|
115
|
+
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
113
116
|
dependKey?: string | Record<string, string> | (string | {
|
|
114
117
|
paramName: string;
|
|
115
118
|
paramValue?: string | undefined;
|
|
116
119
|
required?: boolean | undefined;
|
|
117
120
|
})[] | undefined;
|
|
118
|
-
params?: import("../../../../es/src/types").AnyObject | undefined;
|
|
119
|
-
nameKey?: string | undefined;
|
|
120
|
-
valueKey?: string | undefined;
|
|
121
121
|
} | undefined;
|
|
122
122
|
suffixConfig?: any | any[] | undefined;
|
|
123
123
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
package/global.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as NaiveUI from 'naive-ui';
|
|
2
|
-
|
|
3
|
-
declare module 'naive-ui' {
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
export const NTree: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export {};
|
|
1
|
+
import * as NaiveUI from 'naive-ui';
|
|
2
|
+
|
|
3
|
+
declare module 'naive-ui' {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
export const NTree: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {};
|