cnhis-design-vue 3.1.20-beta.2 → 3.1.20-beta.4
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/FabricChart.js +2 -2
- package/es/components/fabric-chart/src/hooks/useCenter2.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent2.js +7 -2
- package/es/components/fabric-chart/src/hooks/useLeft2.js +14 -1
- package/es/components/fabric-chart/src/hooks/useOther2.js +6 -3
- package/es/components/form-config/index.d.ts +2 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +2 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -1
- package/es/components/form-render/index.d.ts +1 -1
- package/es/components/form-render/index.js +1 -0
- package/es/components/form-render/index2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldVisitor2.js +9 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -2
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/index.js +1 -0
- package/es/components/shortcut-setter/index.d.ts +2 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -1
- package/es/shared/global/variable.d.ts +0 -1
- package/es/shared/global/variable.js +1 -1
- package/es/shared/global/variable2.js +1 -2
- package/package.json +2 -2
- package/es/shared/core/create.d.ts +0 -1
|
@@ -178,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
178
178
|
originY: endY.value,
|
|
179
179
|
endY: endY.value
|
|
180
180
|
};
|
|
181
|
-
if (painIndex.value === 0) {
|
|
181
|
+
if (painIndex.value === 0 && left.yScaleValue.length > 1) {
|
|
182
182
|
obj.originY = originYLimit.value;
|
|
183
183
|
obj.endY = originYLimit.value + painHeight.value;
|
|
184
184
|
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
|
@@ -193,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
193
193
|
originY: originY.value,
|
|
194
194
|
endY: endY.value
|
|
195
195
|
};
|
|
196
|
-
if (painIndex.value === 0) {
|
|
196
|
+
if (painIndex.value === 0 && left.yScaleValue.length > 1) {
|
|
197
197
|
obj.originY = originYLimit.value + painHeight.value;
|
|
198
198
|
obj.endY = endY.value;
|
|
199
199
|
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
|
@@ -458,7 +458,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
458
458
|
pointTipProps.list = [getListValue(), `\u65F6\u95F4 ${((data == null ? void 0 : data.time) || getXValue(point.left)).slice(-5)}`];
|
|
459
459
|
pointTipProps.show = true;
|
|
460
460
|
function getListValue() {
|
|
461
|
-
const { value, drugReduce, physicsReduce } = data;
|
|
461
|
+
const { value = getYValue(type, point.top), drugReduce, physicsReduce } = data || {};
|
|
462
462
|
if (drugReduce) {
|
|
463
463
|
return `\u836F\u7269\u964D${type == "pain" ? "\u75DB" : "\u6E29"} ${value}\u2014>${drugReduce}${unit || ""}`;
|
|
464
464
|
}
|
|
@@ -51,16 +51,21 @@ function useCanvasEvent(canvas, propItems, emits) {
|
|
|
51
51
|
top: topY + 1,
|
|
52
52
|
height: propItems[`${item.key}Height`] - 1
|
|
53
53
|
};
|
|
54
|
+
selections2.push(drawRect({
|
|
55
|
+
left: iconsWidth,
|
|
56
|
+
width: endX - iconsWidth,
|
|
57
|
+
...commonOptions
|
|
58
|
+
}, item.key + "All"));
|
|
54
59
|
selections2.push(drawRect({
|
|
55
60
|
left: iconsWidth,
|
|
56
61
|
width: originX - iconsWidth,
|
|
57
62
|
...commonOptions
|
|
58
|
-
}, item.key));
|
|
63
|
+
}, item.key + "Title"));
|
|
59
64
|
selections2.push(drawRect({
|
|
60
65
|
left: originX,
|
|
61
66
|
width: endX - originX,
|
|
62
67
|
...commonOptions
|
|
63
|
-
}, item.key
|
|
68
|
+
}, item.key));
|
|
64
69
|
});
|
|
65
70
|
selections2.push(drawRect({
|
|
66
71
|
left: originX,
|
|
@@ -17,6 +17,8 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
17
17
|
itemList,
|
|
18
18
|
painIndex,
|
|
19
19
|
right,
|
|
20
|
+
canvasWidth,
|
|
21
|
+
canvasHeight,
|
|
20
22
|
getRightInfo
|
|
21
23
|
} = propItems;
|
|
22
24
|
const mainScaleWidth = 9;
|
|
@@ -267,6 +269,16 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
267
269
|
}
|
|
268
270
|
});
|
|
269
271
|
}
|
|
272
|
+
function drawBorder() {
|
|
273
|
+
canvas.value.add(new fabric.Rect({
|
|
274
|
+
left: iconsWidth,
|
|
275
|
+
top: 0,
|
|
276
|
+
width: canvasWidth - iconsWidth,
|
|
277
|
+
height: canvasHeight - 1,
|
|
278
|
+
fill: "transparent",
|
|
279
|
+
...defaultBorderStyle
|
|
280
|
+
}));
|
|
281
|
+
}
|
|
270
282
|
onMounted(() => {
|
|
271
283
|
nextTick(() => {
|
|
272
284
|
var _a;
|
|
@@ -275,9 +287,10 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
275
287
|
if ((right == null ? void 0 : right.width) && ((_a = right == null ? void 0 : right.yScaleValue) == null ? void 0 : _a.layout) === "left") {
|
|
276
288
|
yScaleValueList.push(getRightInfo);
|
|
277
289
|
}
|
|
278
|
-
painIndex == 0 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
|
|
290
|
+
painIndex == 0 && left.yScaleValue.length > 1 && yScaleValueList.unshift(left.yScaleValue[painIndex]);
|
|
279
291
|
painIndex == left.yScaleValue.length - 1 && yScaleValueList.push(left.yScaleValue[painIndex]);
|
|
280
292
|
drawScaleValue(yScaleValueList);
|
|
293
|
+
drawBorder();
|
|
281
294
|
canvas.value.renderAll();
|
|
282
295
|
});
|
|
283
296
|
});
|
|
@@ -4,6 +4,7 @@ import { defaultStyle } from './useDraw2.js';
|
|
|
4
4
|
|
|
5
5
|
function useOther(canvas, propItems, cumputedX) {
|
|
6
6
|
const { other, vitalSignsOriginY, xCellWidth, yCellHeight } = propItems;
|
|
7
|
+
let textDiff = 0;
|
|
7
8
|
function drawOther() {
|
|
8
9
|
if (!(other == null ? void 0 : other.list))
|
|
9
10
|
return false;
|
|
@@ -71,8 +72,9 @@ function useOther(canvas, propItems, cumputedX) {
|
|
|
71
72
|
group && canvas.value.add(group);
|
|
72
73
|
function hasNode(x, y, currentLenght) {
|
|
73
74
|
return list.find((v) => {
|
|
74
|
-
const
|
|
75
|
-
const
|
|
75
|
+
const trueY = y + textDiff;
|
|
76
|
+
const condition1 = trueY < v.top + v.trueHeight;
|
|
77
|
+
const condition2 = trueY + currentLenght * yCellHeight < v.top + v.trueHeight;
|
|
76
78
|
return v.left === x && (condition1 || condition2);
|
|
77
79
|
});
|
|
78
80
|
}
|
|
@@ -87,12 +89,13 @@ function useOther(canvas, propItems, cumputedX) {
|
|
|
87
89
|
...defaultStyle,
|
|
88
90
|
...v.style || {}
|
|
89
91
|
});
|
|
92
|
+
textDiff = (yCellHeight - (text.height || 0)) / 2;
|
|
90
93
|
texts.push(text);
|
|
91
94
|
});
|
|
92
95
|
return new fabric.Group(texts, {
|
|
93
96
|
originX: "center",
|
|
94
97
|
left: x,
|
|
95
|
-
top: y,
|
|
98
|
+
top: y + textDiff,
|
|
96
99
|
baseTop: v.baseTop,
|
|
97
100
|
trueHeight: texts.length * yCellHeight
|
|
98
101
|
});
|
|
@@ -2512,6 +2512,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2512
2512
|
[x: string]: any;
|
|
2513
2513
|
dependencies?: string[] | undefined;
|
|
2514
2514
|
target?: string | undefined;
|
|
2515
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
2515
2516
|
when?: string | boolean | undefined;
|
|
2516
2517
|
fulfill?: {
|
|
2517
2518
|
state?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -2525,6 +2526,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2525
2526
|
[x: string]: any;
|
|
2526
2527
|
dependencies?: string[] | undefined;
|
|
2527
2528
|
target?: string | undefined;
|
|
2529
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
2528
2530
|
when?: string | boolean | undefined;
|
|
2529
2531
|
fulfill?: {
|
|
2530
2532
|
state?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -2514,6 +2514,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2514
2514
|
[x: string]: any;
|
|
2515
2515
|
dependencies?: string[] | undefined;
|
|
2516
2516
|
target?: string | undefined;
|
|
2517
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
2517
2518
|
when?: string | boolean | undefined;
|
|
2518
2519
|
fulfill?: {
|
|
2519
2520
|
state?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -2527,6 +2528,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2527
2528
|
[x: string]: any;
|
|
2528
2529
|
dependencies?: string[] | undefined;
|
|
2529
2530
|
target?: string | undefined;
|
|
2531
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
2530
2532
|
when?: string | boolean | undefined;
|
|
2531
2533
|
fulfill?: {
|
|
2532
2534
|
state?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -249,7 +249,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
249
249
|
}>>;
|
|
250
250
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
251
251
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
252
|
-
formModel: import("
|
|
252
|
+
formModel: import("../../../../../es/components/form-render").Form<{
|
|
253
253
|
[x: string]: any;
|
|
254
254
|
}>;
|
|
255
255
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -1641,6 +1641,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1641
1641
|
[x: string]: any;
|
|
1642
1642
|
dependencies?: string[] | undefined;
|
|
1643
1643
|
target?: string | undefined;
|
|
1644
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1644
1645
|
when?: string | boolean | undefined;
|
|
1645
1646
|
fulfill?: {
|
|
1646
1647
|
state?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1654,6 +1655,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1654
1655
|
[x: string]: any;
|
|
1655
1656
|
dependencies?: string[] | undefined;
|
|
1656
1657
|
target?: string | undefined;
|
|
1658
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1657
1659
|
when?: string | boolean | undefined;
|
|
1658
1660
|
fulfill?: {
|
|
1659
1661
|
state?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1936,7 +1938,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
1936
1938
|
}>>;
|
|
1937
1939
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
1938
1940
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1939
|
-
formModel: import("
|
|
1941
|
+
formModel: import("../../../../../es/components/form-render").Form<{
|
|
1940
1942
|
[x: string]: any;
|
|
1941
1943
|
}>;
|
|
1942
1944
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -235,7 +235,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
235
235
|
}>>;
|
|
236
236
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
237
237
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
238
|
-
formModel: import("@formily/core").Form<{
|
|
238
|
+
formModel: import("@formily/core/esm/models/Form").Form<{
|
|
239
239
|
[x: string]: any;
|
|
240
240
|
}>;
|
|
241
241
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -12,3 +12,4 @@ export { ContextCollector, useChangeContext } from './src/hooks/useChangeContext
|
|
|
12
12
|
export { FormItemDepsCollector, useFormItemDeps } from './src/hooks/useFormItemDeps2.js';
|
|
13
13
|
export { useAnchor } from './src/hooks/useAnchor2.js';
|
|
14
14
|
export { useFormContext } from './src/hooks/useFormContext2.js';
|
|
15
|
+
export * from '@formily/core';
|
|
@@ -7,7 +7,7 @@ import 'vue';
|
|
|
7
7
|
import '@formily/path';
|
|
8
8
|
import '@vue/shared';
|
|
9
9
|
import 'date-fns';
|
|
10
|
-
|
|
10
|
+
export * from '@formily/core';
|
|
11
11
|
import '@formily/vue';
|
|
12
12
|
import '../../shared/utils/tapable/SyncHook.js';
|
|
13
13
|
import '../../shared/utils/tapable/SyncBailHook.js';
|
|
@@ -2,7 +2,12 @@ import { arrayed } from '../utils/index.js';
|
|
|
2
2
|
import { isFunction } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
function useFieldVisitor() {
|
|
5
|
+
function matchFieldName(matcher, target) {
|
|
6
|
+
return matcher.split("|").some((m) => m.trim() === target);
|
|
7
|
+
}
|
|
5
8
|
function traverse(fieldList, visitorMap, key = "val_key") {
|
|
9
|
+
if (!visitorMap)
|
|
10
|
+
return fieldList;
|
|
6
11
|
return fieldList.reduce((fin, field) => {
|
|
7
12
|
if (Array.isArray(field.children)) {
|
|
8
13
|
field.children = traverse(field.children, visitorMap, key);
|
|
@@ -13,7 +18,10 @@ function useFieldVisitor() {
|
|
|
13
18
|
if (field.suffixConfig) {
|
|
14
19
|
field.suffixConfig = traverse(arrayed(field.suffixConfig), visitorMap, key);
|
|
15
20
|
}
|
|
16
|
-
const
|
|
21
|
+
const visitorKey = Object.keys(visitorMap).find((matcher) => {
|
|
22
|
+
return matchFieldName(matcher, field[key]);
|
|
23
|
+
});
|
|
24
|
+
const visitor = visitorKey && visitorMap[visitorKey];
|
|
17
25
|
let current = field;
|
|
18
26
|
const before = [];
|
|
19
27
|
const after = [];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AnyObject, ArrayAble } from '../../../../../es/shared/types';
|
|
2
|
-
import { SchemaTypes } from '@formily/vue';
|
|
2
|
+
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
|
3
3
|
import { CSSProperties, VNode } from 'vue';
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
|
+
export * from '@formily/core';
|
|
5
6
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
6
7
|
export declare type ValidateItem = Partial<{
|
|
7
8
|
/**
|
|
@@ -52,6 +53,7 @@ interface SwitchProperty {
|
|
|
52
53
|
interface ReactionType {
|
|
53
54
|
dependencies?: string[];
|
|
54
55
|
target?: string;
|
|
56
|
+
effects?: SchemaEffectTypes[];
|
|
55
57
|
when?: string | boolean;
|
|
56
58
|
fulfill?: {
|
|
57
59
|
state?: AnyObject;
|
|
@@ -228,4 +230,3 @@ export declare type FieldItem = {
|
|
|
228
230
|
reactions: ArrayAble<ReactionType>;
|
|
229
231
|
[key: string]: any;
|
|
230
232
|
}>;
|
|
231
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from '@formily/core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export * from '@formily/core';
|
package/es/components/index.js
CHANGED
|
@@ -30,6 +30,7 @@ export { ContextCollector, useChangeContext } from './form-render/src/hooks/useC
|
|
|
30
30
|
export { FormItemDepsCollector, useFormItemDeps } from './form-render/src/hooks/useFormItemDeps2.js';
|
|
31
31
|
export { useAnchor } from './form-render/src/hooks/useAnchor2.js';
|
|
32
32
|
export { useFormContext } from './form-render/src/hooks/useFormContext2.js';
|
|
33
|
+
export * from '@formily/core';
|
|
33
34
|
export { GlobalShortcutProvider, ShortcutManager, useShortcuts } from './shortcut-provider/src/hooks/useShortcuts2.js';
|
|
34
35
|
export { useShortcutSignature } from './shortcut-provider/src/hooks/useShortcutSignature2.js';
|
|
35
36
|
export { useColumnConfigAdaptor } from './big-table/src/hooks/useColumnConfigAdaptor2.js';
|
|
@@ -1672,6 +1672,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1672
1672
|
[x: string]: any;
|
|
1673
1673
|
dependencies?: string[] | undefined;
|
|
1674
1674
|
target?: string | undefined;
|
|
1675
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1675
1676
|
when?: string | boolean | undefined;
|
|
1676
1677
|
fulfill?: {
|
|
1677
1678
|
state?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1685,6 +1686,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1685
1686
|
[x: string]: any;
|
|
1686
1687
|
dependencies?: string[] | undefined;
|
|
1687
1688
|
target?: string | undefined;
|
|
1689
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1688
1690
|
when?: string | boolean | undefined;
|
|
1689
1691
|
fulfill?: {
|
|
1690
1692
|
state?: import("../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1674,6 +1674,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1674
1674
|
[x: string]: any;
|
|
1675
1675
|
dependencies?: string[] | undefined;
|
|
1676
1676
|
target?: string | undefined;
|
|
1677
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1677
1678
|
when?: string | boolean | undefined;
|
|
1678
1679
|
fulfill?: {
|
|
1679
1680
|
state?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1687,6 +1688,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1687
1688
|
[x: string]: any;
|
|
1688
1689
|
dependencies?: string[] | undefined;
|
|
1689
1690
|
target?: string | undefined;
|
|
1691
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
|
1690
1692
|
when?: string | boolean | undefined;
|
|
1691
1693
|
fulfill?: {
|
|
1692
1694
|
state?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
@@ -1940,7 +1942,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1940
1942
|
}>>;
|
|
1941
1943
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
1942
1944
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
1943
|
-
formModel: import("
|
|
1945
|
+
formModel: import("../../../../es/components/form-render").Form<{
|
|
1944
1946
|
[x: string]: any;
|
|
1945
1947
|
}>;
|
|
1946
1948
|
SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { COMPONENT_NAMESPACE
|
|
1
|
+
export { COMPONENT_NAMESPACE } from './variable2.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.20-beta.
|
|
3
|
+
"version": "3.1.20-beta.4",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"iOS 7",
|
|
67
67
|
"last 3 iOS versions"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "0e27466bf48b9b2fc276b4e2e5ee200bbee7cdfa"
|
|
70
70
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function _default(vm: any): any;
|