cnhis-design-vue 3.1.37 → 3.1.38-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.
- package/es/components/fabric-chart/src/hooks/constant.js +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +58 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +3 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +19 -12
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +4 -14
- package/es/components/fabric-chart/src/hooks/useOther.js +2 -2
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -0
- package/es/components/fabric-chart/src/utils/utils.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/utils.js +6 -1
- package/es/components/form-config/index.d.ts +10 -6
- package/es/components/form-config/src/FormConfig.vue.d.ts +10 -6
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +5 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -3
- package/es/components/form-render/index.d.ts +5 -3
- package/es/components/form-render/src/FormRender.vue.d.ts +5 -3
- package/es/components/form-render/src/FormRender.vue.js +3 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +5 -3
- package/es/components/form-render/src/components/renderer/combination.js +2 -4
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +2 -4
- package/es/components/form-render/src/hooks/useAnchor.d.ts +3 -4
- package/es/components/form-render/src/hooks/useAnchor.js +3 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +2 -4
- package/es/components/shortcut-setter/index.d.ts +5 -3
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +5 -3
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ import { drawLine, drawPoint, defaultTextStyle, drawText, defaultRectStyle } fro
|
|
|
4
4
|
import { fabric } from '../utils/index.js';
|
|
5
5
|
import { getIndex, isEffectiveNode } from '../utils/utils.js';
|
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
|
7
|
+
import { format } from 'date-fns';
|
|
7
8
|
|
|
8
9
|
function useBirthProcess(canvas, propItems, emits, pointTipProps, pointMenuProps, commonFunc) {
|
|
9
10
|
const { cumputedX, cumputedY, getXValue, getYValue } = useBirthProcessCumputedPoint(propItems);
|
|
@@ -26,16 +27,18 @@ function useBirthProcess(canvas, propItems, emits, pointTipProps, pointMenuProps
|
|
|
26
27
|
borderStyle,
|
|
27
28
|
rightAddAreaWidth,
|
|
28
29
|
event,
|
|
29
|
-
originYCervix
|
|
30
|
+
originYCervix,
|
|
31
|
+
other
|
|
30
32
|
} = propItems;
|
|
31
33
|
const yScaleValue = cloneDeep(scaleValues);
|
|
32
34
|
const gridPoints = /* @__PURE__ */ new Set();
|
|
33
35
|
useGrid(canvas, propItems, true);
|
|
34
36
|
init();
|
|
35
37
|
function init() {
|
|
38
|
+
drawBorder();
|
|
36
39
|
drawYScale();
|
|
37
40
|
drawXScale();
|
|
38
|
-
|
|
41
|
+
drawOther();
|
|
39
42
|
drawPolyLine();
|
|
40
43
|
setCanvasEvent();
|
|
41
44
|
drawIcons();
|
|
@@ -297,6 +300,59 @@ function useBirthProcess(canvas, propItems, emits, pointTipProps, pointMenuProps
|
|
|
297
300
|
updateData(params);
|
|
298
301
|
}
|
|
299
302
|
}
|
|
303
|
+
function drawOther() {
|
|
304
|
+
const lineData = Object.values(other);
|
|
305
|
+
const lines = [];
|
|
306
|
+
lineData.forEach((line) => {
|
|
307
|
+
if (!line.show)
|
|
308
|
+
return;
|
|
309
|
+
const { key } = line;
|
|
310
|
+
if (key === "fetalPresentation") {
|
|
311
|
+
const { range } = yScaleValue.find((item) => item.key === key);
|
|
312
|
+
const y = cumputedY(key, range, 0);
|
|
313
|
+
lines.push(
|
|
314
|
+
drawLine([originX, y, endX, y], {
|
|
315
|
+
...line
|
|
316
|
+
})
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
if (key === "alert") {
|
|
320
|
+
const item = yScaleValue.find((item2) => item2.key === "cervix");
|
|
321
|
+
const { data = [], key: key2, range } = item || {};
|
|
322
|
+
const startPoint = data.find((_data) => +_data.value === 3);
|
|
323
|
+
if (startPoint) {
|
|
324
|
+
const _time = 6 * 60 * 60 * 1e3;
|
|
325
|
+
const endPoint = {
|
|
326
|
+
time: format(new Date(new Date(startPoint.time).getTime() + _time), "yyyy-MM-dd HH:mm"),
|
|
327
|
+
value: 10
|
|
328
|
+
};
|
|
329
|
+
const [x1, y1] = [cumputedX(startPoint.time) - originX, endY - cumputedY(key2, range, startPoint.value)];
|
|
330
|
+
const [x2, y2] = [cumputedX(endPoint.time) - originX, endY - cumputedY(key2, range, endPoint.value)];
|
|
331
|
+
const k = (y2 - y1) / (x1 + x2);
|
|
332
|
+
const b = y1 - x1 * k;
|
|
333
|
+
let pointer1 = [-(b / k), 0];
|
|
334
|
+
if (pointer1[0] < 0) {
|
|
335
|
+
pointer1 = [originX, endY - b];
|
|
336
|
+
} else {
|
|
337
|
+
pointer1 = [originX + b / k, endY];
|
|
338
|
+
}
|
|
339
|
+
const _originY = cumputedY(key2, range, 10);
|
|
340
|
+
let pointer2 = [(endY - _originY - b) / k, endY - _originY];
|
|
341
|
+
if (pointer2[0] > endX - originX) {
|
|
342
|
+
pointer2 = [endX, endY - (k * (endX - originX) + b)];
|
|
343
|
+
} else {
|
|
344
|
+
pointer2 = [originX + (endY - _originY - b) / k, _originY];
|
|
345
|
+
}
|
|
346
|
+
lines.push(
|
|
347
|
+
drawLine([...pointer1, ...pointer2], {
|
|
348
|
+
...line
|
|
349
|
+
})
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
canvas.value.add(...lines);
|
|
355
|
+
}
|
|
300
356
|
function drawIcons() {
|
|
301
357
|
const leftX = leftAddAreaWidth / 2;
|
|
302
358
|
const rightX = canvasWidth - rightAddAreaWidth / 2;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ref, reactive, computed, onMounted, nextTick } from 'vue';
|
|
2
2
|
import { defaultBorderStyle } from './useDraw.js';
|
|
3
|
+
import 'date-fns';
|
|
3
4
|
import '../utils/index.js';
|
|
4
|
-
import './useShadow.js';
|
|
5
5
|
import 'lodash-es';
|
|
6
|
+
import './useShadow.js';
|
|
6
7
|
import { useEvent, useCanvasEvent } from './useEvent.js';
|
|
7
8
|
import { useBirthProcess } from './useBirthProcess.js';
|
|
8
9
|
import { useCommon } from './useCommon.js';
|
|
@@ -99,6 +100,7 @@ function useBirthProcessChart(canvas, props, emits, canvasRef) {
|
|
|
99
100
|
borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
|
|
100
101
|
selectionStyle: props.data.selectionStyle || {},
|
|
101
102
|
grid: props.data.grid,
|
|
103
|
+
other: props.data.other,
|
|
102
104
|
originX: originX.value,
|
|
103
105
|
endX: endX.value,
|
|
104
106
|
originY: originY.value,
|
|
@@ -4,7 +4,7 @@ import useGrid from './useGrid.js';
|
|
|
4
4
|
import { useShadow } from './useShadow.js';
|
|
5
5
|
import { TEMPERATURE_MENU, PAIN_MENU, OVERLAP } from './constant.js';
|
|
6
6
|
import { cloneDeep } from 'lodash-es';
|
|
7
|
-
import { isOneLine, getType, setOtherType, isEffectiveNode, getIndex, deleteProperty } from '../utils/utils.js';
|
|
7
|
+
import { isOneLine, getType, isValidValue, setOtherType, isEffectiveNode, getIndex, deleteProperty } from '../utils/utils.js';
|
|
8
8
|
|
|
9
9
|
function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, addRenderItem, pointTipProps, pointMenuProps, commonFunc) {
|
|
10
10
|
useGrid(canvas, propItems);
|
|
@@ -24,7 +24,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
24
24
|
vitalSignsOriginY,
|
|
25
25
|
painOriginY,
|
|
26
26
|
hospitalizationDate,
|
|
27
|
-
config
|
|
27
|
+
config,
|
|
28
|
+
canvasHeight
|
|
28
29
|
} = propItems;
|
|
29
30
|
const shadowLinesCache = /* @__PURE__ */ new Set();
|
|
30
31
|
const SHADOWKEYS = ["xinmai", "mai"];
|
|
@@ -371,12 +372,17 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
374
|
if (v.rise && riseStyle.show) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
if (typeof v.rise === "boolean") {
|
|
376
|
+
v.rise = "\u5347\u6E29";
|
|
377
|
+
}
|
|
378
|
+
if (typeof v.rise === "string") {
|
|
379
|
+
riseText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
|
|
380
|
+
value: v.rise.split("").join("\n"),
|
|
381
|
+
originY: "bottom",
|
|
382
|
+
...riseStyle
|
|
383
|
+
});
|
|
384
|
+
otherList.push(riseText);
|
|
385
|
+
}
|
|
380
386
|
}
|
|
381
387
|
if (v.verified) {
|
|
382
388
|
verifiedText = drawText([points[0], points[1] - (value ? yCellHeight : 0) - 5], {
|
|
@@ -387,7 +393,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
387
393
|
});
|
|
388
394
|
otherList.push(verifiedText);
|
|
389
395
|
}
|
|
390
|
-
if (v.physicsReduce || v.drugReduce) {
|
|
396
|
+
if (isValidValue(v.physicsReduce) || isValidValue(v.drugReduce)) {
|
|
391
397
|
const reduceY = cumputedY(type, scaleValue.list, v.physicsReduce || v.drugReduce);
|
|
392
398
|
reduceLine = drawLine([...points, points[0], reduceY], {
|
|
393
399
|
...lineAttr,
|
|
@@ -398,7 +404,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
398
404
|
left: points[0],
|
|
399
405
|
top: reduceY,
|
|
400
406
|
...reduceStyle.point,
|
|
401
|
-
...defaultStyle
|
|
407
|
+
...defaultStyle,
|
|
408
|
+
originY: reduceY === canvasHeight ? "bottom" : "center"
|
|
402
409
|
});
|
|
403
410
|
reduceLine && otherList.push(reduceLine);
|
|
404
411
|
reducePoint && otherList.push(reducePoint);
|
|
@@ -581,10 +588,10 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
581
588
|
pointTipProps.show = true;
|
|
582
589
|
function getListValue() {
|
|
583
590
|
const { value = getYValue(type, point.top), drugReduce, physicsReduce } = data || {};
|
|
584
|
-
if (drugReduce) {
|
|
591
|
+
if (isValidValue(drugReduce)) {
|
|
585
592
|
return `\u836F\u7269\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${drugReduce}${unit || ""}`;
|
|
586
593
|
}
|
|
587
|
-
if (physicsReduce) {
|
|
594
|
+
if (isValidValue(physicsReduce)) {
|
|
588
595
|
return `\u7269\u7406\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${physicsReduce}${unit || ""}`;
|
|
589
596
|
}
|
|
590
597
|
return `${title} ${value}${unit || ""}`;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { format } from 'date-fns';
|
|
2
|
+
|
|
1
3
|
function useCumputedPoint(propItems) {
|
|
2
4
|
const { xScaleList, originX, endY, xCellWidth, left, vitalSignsOriginY, painOriginY, canvasWidth } = propItems;
|
|
3
5
|
function cumputedX(value, setAllCenter = false) {
|
|
@@ -27,13 +29,7 @@ function useCumputedPoint(propItems) {
|
|
|
27
29
|
const residueX = pointX - item.left;
|
|
28
30
|
const residueTime = item.scaleCell * residueX;
|
|
29
31
|
const time = item.start + residueTime;
|
|
30
|
-
|
|
31
|
-
const month = `00${d.getMonth() + 1}`.slice(-2);
|
|
32
|
-
const day = `00${d.getDate()}`.slice(-2);
|
|
33
|
-
const hours = `00${d.getHours()}`.slice(-2);
|
|
34
|
-
const minutes = `00${d.getMinutes()}`.slice(-2);
|
|
35
|
-
const date = `${d.getFullYear()}-${month}-${day} ${hours}:${minutes}`;
|
|
36
|
-
return date;
|
|
32
|
+
return format(new Date(time), "yyyy-MM-dd HH:mm");
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
35
|
function getYValue(type, pointY) {
|
|
@@ -64,13 +60,7 @@ function useBirthProcessCumputedPoint(propItems) {
|
|
|
64
60
|
}
|
|
65
61
|
function getXValue(pointX) {
|
|
66
62
|
const time = (pointX - originX) * timeXCell + startTime;
|
|
67
|
-
|
|
68
|
-
const month = `00${d.getMonth() + 1}`.slice(-2);
|
|
69
|
-
const day = `00${d.getDate()}`.slice(-2);
|
|
70
|
-
const hours = `00${d.getHours()}`.slice(-2);
|
|
71
|
-
const minutes = `00${d.getMinutes()}`.slice(-2);
|
|
72
|
-
const date = `${d.getFullYear()}-${month}-${day} ${hours}:${minutes}`;
|
|
73
|
-
return date;
|
|
63
|
+
return format(new Date(time), "yyyy-MM-dd HH:mm");
|
|
74
64
|
}
|
|
75
65
|
function getYValue(key, pointY) {
|
|
76
66
|
const item = scaleValues.find((item2) => key === item2.key);
|
|
@@ -9,8 +9,8 @@ function useOther(canvas, propItems, cumputedX) {
|
|
|
9
9
|
return false;
|
|
10
10
|
const list = [];
|
|
11
11
|
const otherList = [];
|
|
12
|
-
other.list.forEach((item) => {
|
|
13
|
-
const align = item.align || "vertical";
|
|
12
|
+
other.list.forEach((item, index) => {
|
|
13
|
+
const align = index === 0 ? "vertical" : item.align || "vertical";
|
|
14
14
|
const left = cumputedX(item.time, true);
|
|
15
15
|
const obj = otherList.find((v) => v.left == left);
|
|
16
16
|
if (obj) {
|
|
@@ -11,6 +11,7 @@ import { useEvent, useCanvasEvent } from './useEvent.js';
|
|
|
11
11
|
import '../utils/index.js';
|
|
12
12
|
import { setOtherType } from '../utils/utils.js';
|
|
13
13
|
import 'lodash-es';
|
|
14
|
+
import 'date-fns';
|
|
14
15
|
import { useCommon } from './useCommon.js';
|
|
15
16
|
|
|
16
17
|
function useTemperatureChart(canvas, props, emits, canvasRef) {
|
|
@@ -11,3 +11,4 @@ export declare function getIndex(time: string, list: AnyObject[]): number;
|
|
|
11
11
|
export declare function isOneLine(type: string): boolean;
|
|
12
12
|
export declare function setOtherType(title: string, type: string): string;
|
|
13
13
|
export declare function getType(type: string): string;
|
|
14
|
+
export declare function isValidValue(value: number | string): boolean;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isNull } from 'lodash-es';
|
|
2
|
+
|
|
1
3
|
function isEffectiveNode(node) {
|
|
2
4
|
return (node == null ? void 0 : node.time) && ((node == null ? void 0 : node.value) || (node == null ? void 0 : node.value) === 0);
|
|
3
5
|
}
|
|
@@ -23,5 +25,8 @@ function setOtherType(title, type) {
|
|
|
23
25
|
function getType(type) {
|
|
24
26
|
return type.includes("_other") ? type.split("_")[0] : type;
|
|
25
27
|
}
|
|
28
|
+
function isValidValue(value) {
|
|
29
|
+
return !Number.isNaN(+value) && !isNull(value);
|
|
30
|
+
}
|
|
26
31
|
|
|
27
|
-
export { deleteProperty, getIndex, getType, isEffectiveNode, isOneLine, setOtherType };
|
|
32
|
+
export { deleteProperty, getIndex, getType, isEffectiveNode, isOneLine, isValidValue, setOtherType };
|
|
@@ -422,8 +422,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
422
422
|
};
|
|
423
423
|
}>> & {
|
|
424
424
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
425
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
425
426
|
}>>;
|
|
426
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
427
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
427
428
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
428
429
|
formModel: import("@formily/core").Form<{
|
|
429
430
|
[x: string]: any;
|
|
@@ -614,7 +615,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
614
615
|
title: string;
|
|
615
616
|
}[]>;
|
|
616
617
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
617
|
-
onScroll: () => void;
|
|
618
|
+
onScroll: (scrollEvent: Event) => void;
|
|
618
619
|
onKeydown: (event: KeyboardEvent) => void;
|
|
619
620
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("..").FieldItem[]) => Promise<{
|
|
620
621
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -679,7 +680,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
679
680
|
}>;
|
|
680
681
|
NTabs: any;
|
|
681
682
|
NConfigProvider: any;
|
|
682
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
683
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
683
684
|
fieldList: {
|
|
684
685
|
type: import("vue").PropType<import("..").FieldItem[]>;
|
|
685
686
|
};
|
|
@@ -805,6 +806,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
805
806
|
};
|
|
806
807
|
}>> & {
|
|
807
808
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
809
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
808
810
|
}, {
|
|
809
811
|
anchor: boolean;
|
|
810
812
|
maxHeight: string | number;
|
|
@@ -2919,8 +2921,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2919
2921
|
};
|
|
2920
2922
|
}>> & {
|
|
2921
2923
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2924
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
2922
2925
|
}>>;
|
|
2923
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
2926
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
2924
2927
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
2925
2928
|
formModel: import("@formily/core").Form<{
|
|
2926
2929
|
[x: string]: any;
|
|
@@ -3111,7 +3114,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3111
3114
|
title: string;
|
|
3112
3115
|
}[]>;
|
|
3113
3116
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
3114
|
-
onScroll: () => void;
|
|
3117
|
+
onScroll: (scrollEvent: Event) => void;
|
|
3115
3118
|
onKeydown: (event: KeyboardEvent) => void;
|
|
3116
3119
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("..").FieldItem[]) => Promise<{
|
|
3117
3120
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -3176,7 +3179,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3176
3179
|
}>;
|
|
3177
3180
|
NTabs: any;
|
|
3178
3181
|
NConfigProvider: any;
|
|
3179
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3182
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3180
3183
|
fieldList: {
|
|
3181
3184
|
type: import("vue").PropType<import("..").FieldItem[]>;
|
|
3182
3185
|
};
|
|
@@ -3302,6 +3305,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3302
3305
|
};
|
|
3303
3306
|
}>> & {
|
|
3304
3307
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
3308
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
3305
3309
|
}, {
|
|
3306
3310
|
anchor: boolean;
|
|
3307
3311
|
maxHeight: string | number;
|
|
@@ -423,8 +423,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
423
423
|
};
|
|
424
424
|
}>> & {
|
|
425
425
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
426
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
426
427
|
}>>;
|
|
427
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
428
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
428
429
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
429
430
|
formModel: import("@formily/core").Form<{
|
|
430
431
|
[x: string]: any;
|
|
@@ -615,7 +616,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
615
616
|
title: string;
|
|
616
617
|
}[]>;
|
|
617
618
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
618
|
-
onScroll: () => void;
|
|
619
|
+
onScroll: (scrollEvent: Event) => void;
|
|
619
620
|
onKeydown: (event: KeyboardEvent) => void;
|
|
620
621
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("../..").FieldItem[]) => Promise<{
|
|
621
622
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -680,7 +681,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
680
681
|
}>;
|
|
681
682
|
NTabs: any;
|
|
682
683
|
NConfigProvider: any;
|
|
683
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
684
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
684
685
|
fieldList: {
|
|
685
686
|
type: PropType<import("../..").FieldItem[]>;
|
|
686
687
|
};
|
|
@@ -806,6 +807,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
806
807
|
};
|
|
807
808
|
}>> & {
|
|
808
809
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
810
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
809
811
|
}, {
|
|
810
812
|
anchor: boolean;
|
|
811
813
|
maxHeight: string | number;
|
|
@@ -2920,8 +2922,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2920
2922
|
};
|
|
2921
2923
|
}>> & {
|
|
2922
2924
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2925
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
2923
2926
|
}>>;
|
|
2924
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
2927
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
2925
2928
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
2926
2929
|
formModel: import("@formily/core").Form<{
|
|
2927
2930
|
[x: string]: any;
|
|
@@ -3112,7 +3115,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3112
3115
|
title: string;
|
|
3113
3116
|
}[]>;
|
|
3114
3117
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
3115
|
-
onScroll: () => void;
|
|
3118
|
+
onScroll: (scrollEvent: Event) => void;
|
|
3116
3119
|
onKeydown: (event: KeyboardEvent) => void;
|
|
3117
3120
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("../..").FieldItem[]) => Promise<{
|
|
3118
3121
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -3177,7 +3180,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3177
3180
|
}>;
|
|
3178
3181
|
NTabs: any;
|
|
3179
3182
|
NConfigProvider: any;
|
|
3180
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3183
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
3181
3184
|
fieldList: {
|
|
3182
3185
|
type: PropType<import("../..").FieldItem[]>;
|
|
3183
3186
|
};
|
|
@@ -3303,6 +3306,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3303
3306
|
};
|
|
3304
3307
|
}>> & {
|
|
3305
3308
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
3309
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
3306
3310
|
}, {
|
|
3307
3311
|
anchor: boolean;
|
|
3308
3312
|
maxHeight: string | number;
|
|
@@ -272,8 +272,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
272
272
|
};
|
|
273
273
|
}>> & {
|
|
274
274
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
275
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
275
276
|
}>>;
|
|
276
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
277
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
277
278
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
278
279
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
279
280
|
[x: string]: any;
|
|
@@ -464,7 +465,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
464
465
|
title: string;
|
|
465
466
|
}[]>;
|
|
466
467
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
467
|
-
onScroll: () => void;
|
|
468
|
+
onScroll: (scrollEvent: Event) => void;
|
|
468
469
|
onKeydown: (event: KeyboardEvent) => void;
|
|
469
470
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
470
471
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -529,7 +530,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
529
530
|
}>;
|
|
530
531
|
NTabs: any;
|
|
531
532
|
NConfigProvider: any;
|
|
532
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
533
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
533
534
|
fieldList: {
|
|
534
535
|
type: import("vue").PropType<FieldItem[]>;
|
|
535
536
|
};
|
|
@@ -655,6 +656,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
655
656
|
};
|
|
656
657
|
}>> & {
|
|
657
658
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
659
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
658
660
|
}, {
|
|
659
661
|
anchor: boolean;
|
|
660
662
|
maxHeight: string | number;
|
|
@@ -1992,8 +1992,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1992
1992
|
};
|
|
1993
1993
|
}>> & {
|
|
1994
1994
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
1995
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
1995
1996
|
}>>;
|
|
1996
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
1997
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
1997
1998
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1998
1999
|
formModel: import("../../../../../es/components/form-render").Form<{
|
|
1999
2000
|
[x: string]: any;
|
|
@@ -2184,7 +2185,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2184
2185
|
title: string;
|
|
2185
2186
|
}[]>;
|
|
2186
2187
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
2187
|
-
onScroll: () => void;
|
|
2188
|
+
onScroll: (scrollEvent: Event) => void;
|
|
2188
2189
|
onKeydown: (event: KeyboardEvent) => void;
|
|
2189
2190
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
2190
2191
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -2249,7 +2250,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2249
2250
|
}>;
|
|
2250
2251
|
NTabs: any;
|
|
2251
2252
|
NConfigProvider: any;
|
|
2252
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2253
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2253
2254
|
fieldList: {
|
|
2254
2255
|
type: import("vue").PropType<FieldItem[]>;
|
|
2255
2256
|
};
|
|
@@ -2375,6 +2376,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2375
2376
|
};
|
|
2376
2377
|
}>> & {
|
|
2377
2378
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2379
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
2378
2380
|
}, {
|
|
2379
2381
|
anchor: boolean;
|
|
2380
2382
|
maxHeight: string | number;
|
|
@@ -259,8 +259,9 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
259
259
|
};
|
|
260
260
|
}>> & {
|
|
261
261
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
262
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
262
263
|
}>>;
|
|
263
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
264
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
264
265
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
265
266
|
formModel: import("@formily/core/esm/models/Form").Form<{
|
|
266
267
|
[x: string]: any;
|
|
@@ -451,7 +452,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
451
452
|
title: string;
|
|
452
453
|
}[]>;
|
|
453
454
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
454
|
-
onScroll: () => void;
|
|
455
|
+
onScroll: (scrollEvent: Event) => void;
|
|
455
456
|
onKeydown: (event: KeyboardEvent) => void;
|
|
456
457
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("./src/types").FieldItem[]) => Promise<{
|
|
457
458
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -516,7 +517,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
516
517
|
}>;
|
|
517
518
|
NTabs: any;
|
|
518
519
|
NConfigProvider: any;
|
|
519
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
520
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
520
521
|
fieldList: {
|
|
521
522
|
type: import("vue").PropType<import("./src/types").FieldItem[]>;
|
|
522
523
|
};
|
|
@@ -642,6 +643,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
|
642
643
|
};
|
|
643
644
|
}>> & {
|
|
644
645
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
646
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
645
647
|
}, {
|
|
646
648
|
anchor: boolean;
|
|
647
649
|
maxHeight: string | number;
|
|
@@ -253,8 +253,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
253
253
|
};
|
|
254
254
|
}>> & {
|
|
255
255
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
256
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
256
257
|
}>>;
|
|
257
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
258
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
258
259
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
259
260
|
formModel: import("@formily/core").Form<{
|
|
260
261
|
[x: string]: any;
|
|
@@ -445,7 +446,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
445
446
|
title: string;
|
|
446
447
|
}[]>;
|
|
447
448
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
448
|
-
onScroll: () => void;
|
|
449
|
+
onScroll: (scrollEvent: Event) => void;
|
|
449
450
|
onKeydown: (event: KeyboardEvent) => void;
|
|
450
451
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
451
452
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -510,7 +511,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
510
511
|
}>;
|
|
511
512
|
NTabs: any;
|
|
512
513
|
NConfigProvider: any;
|
|
513
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
514
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
514
515
|
fieldList: {
|
|
515
516
|
type: PropType<FieldItem[]>;
|
|
516
517
|
};
|
|
@@ -636,6 +637,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
636
637
|
};
|
|
637
638
|
}>> & {
|
|
638
639
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
640
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
639
641
|
}, {
|
|
640
642
|
anchor: boolean;
|
|
641
643
|
maxHeight: string | number;
|
|
@@ -70,7 +70,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
emits: [
|
|
73
|
-
"formChange"
|
|
73
|
+
"formChange",
|
|
74
|
+
"scroll"
|
|
74
75
|
],
|
|
75
76
|
setup(__props, { expose, emit }) {
|
|
76
77
|
const props = __props;
|
|
@@ -119,6 +120,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
120
|
});
|
|
120
121
|
const { currentAnchor, generateAnchorList, anchorIdList, formHeight, onScroll } = useAnchor(
|
|
121
122
|
props,
|
|
123
|
+
emit,
|
|
122
124
|
formRenderRef,
|
|
123
125
|
formItemDepsCollector
|
|
124
126
|
);
|
|
@@ -256,8 +256,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
256
256
|
};
|
|
257
257
|
}>> & {
|
|
258
258
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
259
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
259
260
|
}>>;
|
|
260
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
261
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
261
262
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
262
263
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
263
264
|
[x: string]: any;
|
|
@@ -448,7 +449,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
448
449
|
title: string;
|
|
449
450
|
}[]>;
|
|
450
451
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
451
|
-
onScroll: () => void;
|
|
452
|
+
onScroll: (scrollEvent: Event) => void;
|
|
452
453
|
onKeydown: (event: KeyboardEvent) => void;
|
|
453
454
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("../../../../es/components/form-render").FieldItem[]) => Promise<{
|
|
454
455
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -513,7 +514,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
513
514
|
}>;
|
|
514
515
|
NTabs: any;
|
|
515
516
|
NConfigProvider: any;
|
|
516
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
517
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
517
518
|
fieldList: {
|
|
518
519
|
type: import("vue").PropType<import("../../../../es/components/form-render").FieldItem[]>;
|
|
519
520
|
};
|
|
@@ -639,6 +640,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
639
640
|
};
|
|
640
641
|
}>> & {
|
|
641
642
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
643
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
642
644
|
}, {
|
|
643
645
|
anchor: boolean;
|
|
644
646
|
maxHeight: string | number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, inject, createVNode } from 'vue';
|
|
2
2
|
import { isObjectField } from '@formily/core';
|
|
3
|
-
import { isNumber, isArray } from 'lodash-es';
|
|
3
|
+
import { isNumber, isArray, range } from 'lodash-es';
|
|
4
4
|
import '../../../index.js';
|
|
5
5
|
import { useField, RecursionField, connect } from '@formily/vue';
|
|
6
6
|
import { NButton, NIcon } from 'naive-ui';
|
|
@@ -87,9 +87,7 @@ const script = defineComponent({
|
|
|
87
87
|
"component": AddCircleOutline
|
|
88
88
|
}, null),
|
|
89
89
|
default: () => "\u65B0\u589E"
|
|
90
|
-
})]),
|
|
91
|
-
length: currentGroupNum.value
|
|
92
|
-
}).map((_, idx) => createVNode("section", {
|
|
90
|
+
})]), range(currentGroupNum.value).map((_, idx) => createVNode("section", {
|
|
93
91
|
"class": "form-render__combinationContent"
|
|
94
92
|
}, [createVNode(RecursionField, {
|
|
95
93
|
"schema": createObjSchema(schemaAdaptor(props.getProperties())),
|
|
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, watch, onMounted, createVNode } from 'v
|
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
3
|
import { Path } from '@formily/path';
|
|
4
4
|
import { AddCircleOutline, RemoveCircle } from '@vicons/ionicons5';
|
|
5
|
-
import { isNumber, isArray, isEqual } from 'lodash-es';
|
|
5
|
+
import { isNumber, range, isArray, isEqual } from 'lodash-es';
|
|
6
6
|
import { useDeepValidate } from './hooks/useDeepValidate.js';
|
|
7
7
|
import { formRenderLog, mergeDeepProperties } from '../../../utils/index.js';
|
|
8
8
|
import { connect, mapProps } from '@formily/vue';
|
|
@@ -151,9 +151,7 @@ const script = defineComponent({
|
|
|
151
151
|
"component": AddCircleOutline
|
|
152
152
|
}, null),
|
|
153
153
|
default: () => "\u65B0\u589E"
|
|
154
|
-
})]),
|
|
155
|
-
length: currentGroupNum.value
|
|
156
|
-
}).map((_, idx) => createVNode("section", {
|
|
154
|
+
})]), range(currentGroupNum.value).map((_, idx) => createVNode("section", {
|
|
157
155
|
"class": "form-render__combinationContentJson"
|
|
158
156
|
}, [createVNode(FormRenderComponent, {
|
|
159
157
|
"ref": (_ref) => setFormRenderRef(idx, _ref),
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { UndefinedAble } from '../../../../../es/shared/types';
|
|
1
|
+
import { Func, UndefinedAble } from '../../../../../es/shared/types';
|
|
2
2
|
import { ISchema } from '@formily/json-schema/esm/types';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
4
|
import { FormItemDepsCollector, FormRenderProps } from '../../../../../es/components/form-render';
|
|
5
|
-
export declare function useAnchor(props: Readonly<FormRenderProps>, scrollbarRef: Ref<UndefinedAble<HTMLElement>>, collector: FormItemDepsCollector): {
|
|
5
|
+
export declare function useAnchor(props: Readonly<FormRenderProps>, emit: Func, scrollbarRef: Ref<UndefinedAble<HTMLElement>>, collector: FormItemDepsCollector): {
|
|
6
6
|
currentAnchor: import("vue").WritableComputedRef<string>;
|
|
7
|
-
onScroll: () => void;
|
|
7
|
+
onScroll: (scrollEvent: Event) => void;
|
|
8
8
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
9
9
|
anchorIdList: Ref<{
|
|
10
10
|
name: string;
|
|
11
11
|
title: string;
|
|
12
12
|
}[]>;
|
|
13
13
|
generateAnchorList: (schema: ISchema) => void;
|
|
14
|
-
scrollbarRef: Ref<UndefinedAble<HTMLElement>>;
|
|
15
14
|
scrollTo: (id: string) => Promise<void>;
|
|
16
15
|
};
|
|
@@ -6,7 +6,7 @@ import { FormItemLineBarDepKeyPrepend } from '../constants/index.js';
|
|
|
6
6
|
import '../utils/index.js';
|
|
7
7
|
import { createLinebarId, traverseSchema } from '../utils/schema.js';
|
|
8
8
|
|
|
9
|
-
function useAnchor(props, scrollbarRef, collector) {
|
|
9
|
+
function useAnchor(props, emit, scrollbarRef, collector) {
|
|
10
10
|
const __currentAnchor = ref("");
|
|
11
11
|
const formHeight = computed(() => {
|
|
12
12
|
if (isNumber(props.maxHeight))
|
|
@@ -51,7 +51,7 @@ function useAnchor(props, scrollbarRef, collector) {
|
|
|
51
51
|
scrollLock = false;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const onScroll = useDebounceFn(function() {
|
|
54
|
+
const onScroll = useDebounceFn(function(scrollEvent) {
|
|
55
55
|
var _a;
|
|
56
56
|
if (scrollLock || !scrollbarRef.value)
|
|
57
57
|
return;
|
|
@@ -66,6 +66,7 @@ function useAnchor(props, scrollbarRef, collector) {
|
|
|
66
66
|
return node.offsetTop > scrollTop + clientHeight / 2;
|
|
67
67
|
}) || anchorIdList.value[anchorIdList.value.length - 1];
|
|
68
68
|
__currentAnchor.value = (_a = result == null ? void 0 : result.name) != null ? _a : "";
|
|
69
|
+
emit("scroll", scrollEvent);
|
|
69
70
|
}, 300);
|
|
70
71
|
watch(
|
|
71
72
|
anchorIdList,
|
|
@@ -91,7 +92,6 @@ function useAnchor(props, scrollbarRef, collector) {
|
|
|
91
92
|
formHeight,
|
|
92
93
|
anchorIdList,
|
|
93
94
|
generateAnchorList,
|
|
94
|
-
scrollbarRef,
|
|
95
95
|
scrollTo
|
|
96
96
|
};
|
|
97
97
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { reactive, inject, createVNode, toRaw, h, onBeforeUnmount } from 'vue';
|
|
2
2
|
import { traverse } from '../../../../../../../shared/utils/index.js';
|
|
3
|
-
import { isFunction, isObject } from 'lodash-es';
|
|
3
|
+
import { isFunction, isObject, range } from 'lodash-es';
|
|
4
4
|
import '../../../../../index.js';
|
|
5
5
|
import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
|
|
6
6
|
import { IhoTableRenderHelper, getRowHeight, getColumnRenderWidth } from '../../../../utils/index.js';
|
|
@@ -98,9 +98,7 @@ function separateRendererPlugins() {
|
|
|
98
98
|
data: contentSeparate(rowData[column.field], column, width)
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
length: getColumnInfoMaxLength(parsedRowDataInfo)
|
|
103
|
-
}).forEach((_, index) => {
|
|
101
|
+
range(getColumnInfoMaxLength(parsedRowDataInfo)).forEach((_, index) => {
|
|
104
102
|
const separateData = generateSeparateRowData(parsedRowDataInfo, index);
|
|
105
103
|
if (index === 0) {
|
|
106
104
|
setSeparateRowData(config.uuid, rowData, {
|
|
@@ -1972,8 +1972,9 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1972
1972
|
};
|
|
1973
1973
|
}>> & {
|
|
1974
1974
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
1975
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
1975
1976
|
}>>;
|
|
1976
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
1977
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
1977
1978
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1978
1979
|
formModel: import("@formily/core").Form<{
|
|
1979
1980
|
[x: string]: any;
|
|
@@ -2164,7 +2165,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2164
2165
|
title: string;
|
|
2165
2166
|
}[]>;
|
|
2166
2167
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
2167
|
-
onScroll: () => void;
|
|
2168
|
+
onScroll: (scrollEvent: Event) => void;
|
|
2168
2169
|
onKeydown: (event: KeyboardEvent) => void;
|
|
2169
2170
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("..").FieldItem[]) => Promise<{
|
|
2170
2171
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -2229,7 +2230,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2229
2230
|
}>;
|
|
2230
2231
|
NTabs: any;
|
|
2231
2232
|
NConfigProvider: any;
|
|
2232
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2233
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2233
2234
|
fieldList: {
|
|
2234
2235
|
type: import("vue").PropType<import("..").FieldItem[]>;
|
|
2235
2236
|
};
|
|
@@ -2355,6 +2356,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2355
2356
|
};
|
|
2356
2357
|
}>> & {
|
|
2357
2358
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2359
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
2358
2360
|
}, {
|
|
2359
2361
|
anchor: boolean;
|
|
2360
2362
|
maxHeight: string | number;
|
|
@@ -1974,8 +1974,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1974
1974
|
};
|
|
1975
1975
|
}>> & {
|
|
1976
1976
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
1977
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
1977
1978
|
}>>;
|
|
1978
|
-
emit: (event: "formChange", ...args: any[]) => void;
|
|
1979
|
+
emit: (event: "scroll" | "formChange", ...args: any[]) => void;
|
|
1979
1980
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1980
1981
|
formModel: import("../../../../es/components/form-render").Form<{
|
|
1981
1982
|
[x: string]: any;
|
|
@@ -2166,7 +2167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2166
2167
|
title: string;
|
|
2167
2168
|
}[]>;
|
|
2168
2169
|
formHeight: import("vue").ComputedRef<string | undefined>;
|
|
2169
|
-
onScroll: () => void;
|
|
2170
|
+
onScroll: (scrollEvent: Event) => void;
|
|
2170
2171
|
onKeydown: (event: KeyboardEvent) => void;
|
|
2171
2172
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
2172
2173
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -2231,7 +2232,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2231
2232
|
}>;
|
|
2232
2233
|
NTabs: any;
|
|
2233
2234
|
NConfigProvider: any;
|
|
2234
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formChange"[], "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2235
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "formChange")[], "scroll" | "formChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
2235
2236
|
fieldList: {
|
|
2236
2237
|
type: import("vue").PropType<FieldItem[]>;
|
|
2237
2238
|
};
|
|
@@ -2357,6 +2358,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2357
2358
|
};
|
|
2358
2359
|
}>> & {
|
|
2359
2360
|
onFormChange?: ((...args: any[]) => any) | undefined;
|
|
2361
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
2360
2362
|
}, {
|
|
2361
2363
|
anchor: boolean;
|
|
2362
2364
|
maxHeight: string | number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.38-beta.1",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"iOS 7",
|
|
62
62
|
"last 3 iOS versions"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "81cf177885dd1c953d895711c55df5a347dc69fc"
|
|
65
65
|
}
|