cnhis-design-vue 3.1.15-beta.2 → 3.1.15-beta.3
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/annotation-edit/src/AnnotationEdit.js +2 -1
- package/es/packages/big-table/index.d.ts +12 -11
- package/es/packages/big-table/src/BigTable.vue.d.ts +28 -19
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +7 -6
- package/es/packages/big-table/src/bigTableProps.d.ts +5 -3
- package/es/packages/big-table/src/bigTableProps.js +1 -1
- package/es/packages/big-table/src/components/edit-form/edit-separate.js +8 -1
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +2 -1
- package/es/packages/big-table/src/hooks/useAnnotation.d.ts +4 -0
- package/es/packages/big-table/src/hooks/useAnnotation.js +21 -0
- package/es/packages/big-table/src/hooks/useEdit.d.ts +2 -1
- package/es/packages/big-table/style/index.css +27 -1
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +1 -1
- package/es/packages/fabric-chart/index.d.ts +1 -0
- package/es/packages/fabric-chart/src/FabricChart.js +12 -16
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +5 -4
- package/es/packages/fabric-chart/src/hooks/useCenter.js +1 -3
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +4 -2
- package/es/packages/form-render/src/components/renderer/cascader.js +7 -7
- package/es/packages/form-render/src/components/renderer/complex.d.ts +2 -0
- package/es/packages/form-render/src/components/renderer/complex.js +2 -5
- package/es/packages/form-render/src/components/renderer/date.d.ts +29 -0
- package/es/packages/form-render/src/components/renderer/date.js +63 -56
- package/es/packages/form-render/src/components/renderer/select.js +7 -7
- package/es/packages/form-render/src/hooks/useCommonInjection.d.ts +6 -0
- package/es/packages/form-render/src/hooks/useCommonInjection.js +19 -0
- package/es/packages/form-render/style/index.css +11 -10
- package/es/packages/index.css +38 -11
- package/package.json +1 -1
|
@@ -36,7 +36,8 @@ var script = defineComponent({
|
|
|
36
36
|
});
|
|
37
37
|
const isEdit = ref(false);
|
|
38
38
|
let clickTimer;
|
|
39
|
-
function iconClick() {
|
|
39
|
+
function iconClick(evt) {
|
|
40
|
+
evt.stopPropagation();
|
|
40
41
|
clearTimeout(clickTimer);
|
|
41
42
|
if (showPopper.value && isEdit.value) {
|
|
42
43
|
showPopper.value = false;
|
|
@@ -9,9 +9,9 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9
9
|
type: NumberConstructor;
|
|
10
10
|
default: number;
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
type:
|
|
14
|
-
default:
|
|
12
|
+
annotation: {
|
|
13
|
+
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
14
|
+
default: () => {};
|
|
15
15
|
};
|
|
16
16
|
showFooter: BooleanConstructor;
|
|
17
17
|
sumData: {
|
|
@@ -2595,9 +2595,9 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2595
2595
|
type: NumberConstructor;
|
|
2596
2596
|
default: number;
|
|
2597
2597
|
};
|
|
2598
|
-
|
|
2599
|
-
type:
|
|
2600
|
-
default:
|
|
2598
|
+
annotation: {
|
|
2599
|
+
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
2600
|
+
default: () => {};
|
|
2601
2601
|
};
|
|
2602
2602
|
showFooter: BooleanConstructor;
|
|
2603
2603
|
sumData: {
|
|
@@ -2945,7 +2945,8 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2945
2945
|
maskUp: (e: any) => void;
|
|
2946
2946
|
setGroupTreeExpand: () => void;
|
|
2947
2947
|
resetTableInlineEditStatus: () => false | undefined;
|
|
2948
|
-
|
|
2948
|
+
renderAnnotation: (columnConfig: import("../../../es/src/types").AnyObject) => JSX.Element | null;
|
|
2949
|
+
toolTipTitle: (item: any, type: any) => any[] | (() => any[]);
|
|
2949
2950
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
2950
2951
|
getOtherConfigInit: () => any;
|
|
2951
2952
|
refreshTable: () => void;
|
|
@@ -4082,9 +4083,9 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4082
4083
|
type: NumberConstructor;
|
|
4083
4084
|
default: number;
|
|
4084
4085
|
};
|
|
4085
|
-
|
|
4086
|
-
type:
|
|
4087
|
-
default:
|
|
4086
|
+
annotation: {
|
|
4087
|
+
type: import("vue").PropType<import("../../../es/src/types").AnyObject>;
|
|
4088
|
+
default: () => {};
|
|
4088
4089
|
};
|
|
4089
4090
|
showFooter: BooleanConstructor;
|
|
4090
4091
|
sumData: {
|
|
@@ -4281,7 +4282,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4281
4282
|
columnConfig: Record<string, any>;
|
|
4282
4283
|
menuConfig: Record<string, any>;
|
|
4283
4284
|
maxCheckSize: number;
|
|
4284
|
-
|
|
4285
|
+
annotation: import("../../../es/src/types").AnyObject;
|
|
4285
4286
|
sumData: Record<string, any>;
|
|
4286
4287
|
avgData: Record<string, any>;
|
|
4287
4288
|
refreshRow: number;
|
|
@@ -7,9 +7,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
type: NumberConstructor;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
type:
|
|
12
|
-
default:
|
|
10
|
+
annotation: {
|
|
11
|
+
type: import("vue").PropType<import("../../../src/types").AnyObject>;
|
|
12
|
+
default: () => {};
|
|
13
13
|
};
|
|
14
14
|
showFooter: BooleanConstructor;
|
|
15
15
|
sumData: {
|
|
@@ -1162,7 +1162,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1162
1162
|
paddingMedium: string;
|
|
1163
1163
|
paddingLarge: string;
|
|
1164
1164
|
paddingRoundTiny: string;
|
|
1165
|
-
paddingRoundSmall: string;
|
|
1165
|
+
paddingRoundSmall: string; /**
|
|
1166
|
+
* 初始化props
|
|
1167
|
+
* @param {*} unionItem
|
|
1168
|
+
* @param {*} row
|
|
1169
|
+
* @param {*} column
|
|
1170
|
+
* @param {*} $rowIndex
|
|
1171
|
+
* @returns
|
|
1172
|
+
*/
|
|
1166
1173
|
paddingRoundMedium: string;
|
|
1167
1174
|
paddingRoundLarge: string;
|
|
1168
1175
|
iconMarginTiny: string;
|
|
@@ -1252,9 +1259,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1252
1259
|
borderHoverPrimary: string;
|
|
1253
1260
|
borderPressedPrimary: string;
|
|
1254
1261
|
borderFocusPrimary: string;
|
|
1255
|
-
borderDisabledPrimary: string;
|
|
1256
|
-
* tsx渲染表格
|
|
1257
|
-
*/
|
|
1262
|
+
borderDisabledPrimary: string;
|
|
1258
1263
|
rippleColorPrimary: string;
|
|
1259
1264
|
colorInfo: string;
|
|
1260
1265
|
colorHoverInfo: string;
|
|
@@ -2595,9 +2600,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2595
2600
|
type: NumberConstructor;
|
|
2596
2601
|
default: number;
|
|
2597
2602
|
};
|
|
2598
|
-
|
|
2599
|
-
type:
|
|
2600
|
-
default:
|
|
2603
|
+
annotation: {
|
|
2604
|
+
type: import("vue").PropType<import("../../../src/types").AnyObject>;
|
|
2605
|
+
default: () => {};
|
|
2601
2606
|
};
|
|
2602
2607
|
showFooter: BooleanConstructor;
|
|
2603
2608
|
sumData: {
|
|
@@ -2945,7 +2950,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2945
2950
|
maskUp: (e: any) => void;
|
|
2946
2951
|
setGroupTreeExpand: () => void;
|
|
2947
2952
|
resetTableInlineEditStatus: () => false | undefined;
|
|
2948
|
-
|
|
2953
|
+
renderAnnotation: (columnConfig: import("../../../src/types").AnyObject) => JSX.Element | null;
|
|
2954
|
+
toolTipTitle: (item: any, type: any) => any[] | (() => any[]);
|
|
2949
2955
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
2950
2956
|
getOtherConfigInit: () => any;
|
|
2951
2957
|
refreshTable: () => void;
|
|
@@ -3292,7 +3298,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3292
3298
|
buttonColor2: string;
|
|
3293
3299
|
buttonColor2Hover: string;
|
|
3294
3300
|
buttonColor2Pressed: string;
|
|
3295
|
-
boxShadow1: string;
|
|
3301
|
+
boxShadow1: string;
|
|
3302
|
+
boxShadow2: string;
|
|
3303
|
+
boxShadow3: string;
|
|
3304
|
+
/**
|
|
3296
3305
|
* 针对 bigTable 的设置列
|
|
3297
3306
|
* type: 列的类型
|
|
3298
3307
|
* field: 列字段名(注:属性层级越深,渲染性能将直线下降)
|
|
@@ -3308,8 +3317,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3308
3317
|
* formatter: 格式化显示内容 Function({cellValue, row, column})
|
|
3309
3318
|
* sortable: 是否允许列排序
|
|
3310
3319
|
*/
|
|
3311
|
-
boxShadow2: string;
|
|
3312
|
-
boxShadow3: string;
|
|
3313
3320
|
fontFamily: string;
|
|
3314
3321
|
fontFamilyMono: string;
|
|
3315
3322
|
fontWeight: string;
|
|
@@ -4061,7 +4068,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4061
4068
|
color: string;
|
|
4062
4069
|
opacity1Depth: string;
|
|
4063
4070
|
opacity2Depth: string;
|
|
4064
|
-
opacity3Depth: string;
|
|
4071
|
+
opacity3Depth: string; /**
|
|
4072
|
+
* computed
|
|
4073
|
+
*/
|
|
4065
4074
|
opacity4Depth: string;
|
|
4066
4075
|
opacity5Depth: string;
|
|
4067
4076
|
}, any>>;
|
|
@@ -4097,9 +4106,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4097
4106
|
type: NumberConstructor;
|
|
4098
4107
|
default: number;
|
|
4099
4108
|
};
|
|
4100
|
-
|
|
4101
|
-
type:
|
|
4102
|
-
default:
|
|
4109
|
+
annotation: {
|
|
4110
|
+
type: import("vue").PropType<import("../../../src/types").AnyObject>;
|
|
4111
|
+
default: () => {};
|
|
4103
4112
|
};
|
|
4104
4113
|
showFooter: BooleanConstructor;
|
|
4105
4114
|
sumData: {
|
|
@@ -4296,7 +4305,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4296
4305
|
columnConfig: Record<string, any>;
|
|
4297
4306
|
menuConfig: Record<string, any>;
|
|
4298
4307
|
maxCheckSize: number;
|
|
4299
|
-
|
|
4308
|
+
annotation: import("../../../src/types").AnyObject;
|
|
4300
4309
|
sumData: Record<string, any>;
|
|
4301
4310
|
avgData: Record<string, any>;
|
|
4302
4311
|
refreshRow: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, unref, mergeProps, withCtx, renderSlot, createBlock, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
|
|
2
2
|
import { isArray, isFunction } from 'lodash-es';
|
|
3
|
+
import { useAnnotation } from '../../../packages/big-table/src/hooks/useAnnotation';
|
|
3
4
|
import { useSeparateRow } from '../../../packages/big-table/src/hooks/useSeparateRow';
|
|
4
5
|
import bigTableState from './bigTableState.js';
|
|
5
6
|
import bigTableProps from './bigTableProps.js';
|
|
@@ -950,6 +951,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
950
951
|
return false;
|
|
951
952
|
handleClickCancelBtnByInline();
|
|
952
953
|
};
|
|
954
|
+
const {
|
|
955
|
+
renderAnnotation
|
|
956
|
+
} = useAnnotation(props);
|
|
953
957
|
const toolTipTitle = (item, type) => {
|
|
954
958
|
var _a;
|
|
955
959
|
let name = item.formTitle || item.alias || item.title;
|
|
@@ -962,11 +966,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
962
966
|
isAlias = !!tooltipTitle;
|
|
963
967
|
}
|
|
964
968
|
if (type === "format")
|
|
965
|
-
return createVNode(TextOverTooltip, {
|
|
969
|
+
return [createVNode(TextOverTooltip, {
|
|
966
970
|
"tooltipTitle": tooltipTitle,
|
|
967
971
|
"content": name,
|
|
968
972
|
"isAlias": isAlias
|
|
969
|
-
}, null);
|
|
973
|
+
}, null), renderAnnotation(item)];
|
|
970
974
|
return () => {
|
|
971
975
|
return [createVNode(TextOverTooltip, {
|
|
972
976
|
"tooltipTitle": tooltipTitle,
|
|
@@ -977,7 +981,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
977
981
|
"component": state.isExpand && state.total < 1001 ? CaretDown : CaretForward,
|
|
978
982
|
"onClick": (e) => triggerExpand(e, state.isExpand)
|
|
979
983
|
}, null) : ""]
|
|
980
|
-
})];
|
|
984
|
+
}), renderAnnotation(item)];
|
|
981
985
|
};
|
|
982
986
|
};
|
|
983
987
|
const triggerExpand = (e, isExpand) => {
|
|
@@ -1341,9 +1345,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1341
1345
|
}
|
|
1342
1346
|
isAboutNestTable.value && emit("setNestLastClickTable", table, props.isNestTable, row[handleRowId.value], row);
|
|
1343
1347
|
emit("setNestTableClick", false);
|
|
1344
|
-
if (!props.checkboxBindRowClick) {
|
|
1345
|
-
return;
|
|
1346
|
-
}
|
|
1347
1348
|
if (props.isNestTable) {
|
|
1348
1349
|
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1349
1350
|
nestHandleClickRow(table, data);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/src/types';
|
|
2
|
+
import { PropType } from 'vue';
|
|
1
3
|
declare const bigTableProps: {
|
|
2
4
|
data: {
|
|
3
5
|
type: ArrayConstructor;
|
|
@@ -7,9 +9,9 @@ declare const bigTableProps: {
|
|
|
7
9
|
type: NumberConstructor;
|
|
8
10
|
default: number;
|
|
9
11
|
};
|
|
10
|
-
|
|
11
|
-
type:
|
|
12
|
-
default:
|
|
12
|
+
annotation: {
|
|
13
|
+
type: PropType<AnyObject>;
|
|
14
|
+
default: () => {};
|
|
13
15
|
};
|
|
14
16
|
showFooter: BooleanConstructor;
|
|
15
17
|
sumData: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const bigTableProps = {
|
|
2
2
|
data: { type: Array, default: () => [] },
|
|
3
3
|
maxCheckSize: { type: Number, default: 0 },
|
|
4
|
-
|
|
4
|
+
annotation: { type: Object, default: () => ({}) },
|
|
5
5
|
showFooter: Boolean,
|
|
6
6
|
sumData: { type: Object, default: () => ({}) },
|
|
7
7
|
avgData: { type: Object, default: () => ({}) },
|
|
@@ -18,15 +18,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const props = __props;
|
|
19
19
|
const popoverRef = ref();
|
|
20
20
|
const show = ref(false);
|
|
21
|
+
function setShow(v) {
|
|
22
|
+
show.value = v;
|
|
23
|
+
}
|
|
21
24
|
watch(show, updateShow);
|
|
22
25
|
const editContent = ref();
|
|
23
26
|
const { getRowData } = useSeparateMap();
|
|
24
|
-
function updateShow(show2) {
|
|
27
|
+
async function updateShow(show2) {
|
|
28
|
+
var _a;
|
|
25
29
|
const target = getRowData(props.row);
|
|
26
30
|
if (!target)
|
|
27
31
|
return;
|
|
28
32
|
if (show2) {
|
|
29
33
|
editContent.value = cloneDeep(target.row[props.col.field]);
|
|
34
|
+
await new Promise((resolve) => setTimeout(resolve));
|
|
35
|
+
(_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
|
|
30
36
|
return;
|
|
31
37
|
}
|
|
32
38
|
const old = target.row[props.col.field];
|
|
@@ -73,6 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
79
|
renderer: __props.col.separateSlot,
|
|
74
80
|
value: editContent.value,
|
|
75
81
|
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => editContent.value = $event),
|
|
82
|
+
"onUpdate:show": setShow,
|
|
76
83
|
col: __props.col,
|
|
77
84
|
row: __props.row
|
|
78
85
|
}, null, 8, ["renderer", "value", "col", "row"])) : (openBlock(), createBlock(unref(NInput), {
|
|
@@ -32,6 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
}>>;
|
|
33
33
|
popoverRef: import("vue").Ref<any>;
|
|
34
34
|
show: import("vue").Ref<boolean>;
|
|
35
|
+
setShow: (v: boolean) => void;
|
|
35
36
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
36
37
|
editContent: import("vue").Ref<any>;
|
|
37
38
|
getRowData: (row: AnyObject) => {
|
|
@@ -40,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
41
|
rawRow: AnyObject;
|
|
41
42
|
row: AnyObject;
|
|
42
43
|
} | undefined;
|
|
43
|
-
updateShow: (show: boolean) => void
|
|
44
|
+
updateShow: (show: boolean) => Promise<void>;
|
|
44
45
|
style: CSSProperties;
|
|
45
46
|
SlotRender: import("vue").DefineComponent<{
|
|
46
47
|
renderer: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createVNode } from 'vue';
|
|
2
|
+
import { isObject } from '@vue/shared';
|
|
3
|
+
import Annotation from '../../../annotation-edit/index.js';
|
|
4
|
+
|
|
5
|
+
function useAnnotation(props) {
|
|
6
|
+
function renderAnnotation(columnConfig) {
|
|
7
|
+
if (!isObject(props.annotation))
|
|
8
|
+
return null;
|
|
9
|
+
return createVNode("section", {
|
|
10
|
+
"class": "big-table__annotationWrapper"
|
|
11
|
+
}, [createVNode(Annotation, {
|
|
12
|
+
"modelValue": props.annotation[columnConfig.columnName],
|
|
13
|
+
"onUpdate:modelValue": ($event) => props.annotation[columnConfig.columnName] = $event
|
|
14
|
+
}, null)]);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
renderAnnotation
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { useAnnotation };
|
|
@@ -224,6 +224,7 @@ export declare const comps: {
|
|
|
224
224
|
}>>;
|
|
225
225
|
popoverRef: import("vue").Ref<any>;
|
|
226
226
|
show: import("vue").Ref<boolean>;
|
|
227
|
+
setShow: (v: boolean) => void;
|
|
227
228
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
228
229
|
editContent: import("vue").Ref<any>;
|
|
229
230
|
getRowData: (row: import("../../../../src/types").AnyObject) => {
|
|
@@ -232,7 +233,7 @@ export declare const comps: {
|
|
|
232
233
|
rawRow: import("../../../../src/types").AnyObject;
|
|
233
234
|
row: import("../../../../src/types").AnyObject;
|
|
234
235
|
} | undefined;
|
|
235
|
-
updateShow: (show: boolean) => void
|
|
236
|
+
updateShow: (show: boolean) => Promise<void>;
|
|
236
237
|
style: import("vue").CSSProperties;
|
|
237
238
|
SlotRender: import("vue").DefineComponent<{
|
|
238
239
|
renderer: {
|
|
@@ -291,7 +291,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
291
291
|
width: 100%;
|
|
292
292
|
}
|
|
293
293
|
.custom-big-table .filter-box .text-over-tooltip-components {
|
|
294
|
-
max-width: calc(100% -
|
|
294
|
+
max-width: calc(100% - 40px);
|
|
295
295
|
}
|
|
296
296
|
.custom-big-table .filter-box .vxe-filter--btn {
|
|
297
297
|
border-top-color: #c0c4cc;
|
|
@@ -539,6 +539,21 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
539
539
|
margin-right: 6px;
|
|
540
540
|
box-shadow: 0px 2px 4px 0px rgba(99, 129, 249, 0.5);
|
|
541
541
|
}
|
|
542
|
+
.annotation-edit {
|
|
543
|
+
cursor: pointer;
|
|
544
|
+
color: #0067ee;
|
|
545
|
+
font-size: 16px;
|
|
546
|
+
user-select: none;
|
|
547
|
+
display: inline-flex;
|
|
548
|
+
align-items: center;
|
|
549
|
+
}
|
|
550
|
+
.annotation-edit.is-active {
|
|
551
|
+
color: rgba(255, 152, 40);
|
|
552
|
+
}
|
|
553
|
+
.annotation-edit__icon {
|
|
554
|
+
display: inline-flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
}
|
|
542
557
|
.no-data-tip {
|
|
543
558
|
display: flex;
|
|
544
559
|
flex-direction: column;
|
|
@@ -601,3 +616,14 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
601
616
|
fill: currentColor;
|
|
602
617
|
overflow: hidden;
|
|
603
618
|
}
|
|
619
|
+
.vxe-header--column [annotation-hover-show='true'] {
|
|
620
|
+
visibility: hidden;
|
|
621
|
+
}
|
|
622
|
+
.vxe-header--column:hover [annotation-hover-show='true'] {
|
|
623
|
+
visibility: visible;
|
|
624
|
+
}
|
|
625
|
+
.big-table__annotationWrapper {
|
|
626
|
+
width: 20px;
|
|
627
|
+
display: inline-flex;
|
|
628
|
+
align-items: center;
|
|
629
|
+
}
|
|
@@ -11,7 +11,7 @@ export declare class Print {
|
|
|
11
11
|
_queryServicesPrint(params: AnyObject): Promise<any>;
|
|
12
12
|
_callPrintWithFile(queryParams: AnyObject): Promise<any>;
|
|
13
13
|
_handleResult(data: AnyObject, errorCallbackFn?: Func): false | AnyObject;
|
|
14
|
-
_handleResultTest(result:
|
|
14
|
+
_handleResultTest(result: unknown, errorCallbackFn?: Func): boolean;
|
|
15
15
|
_handleEventQueryPrintData(templateId: string, formatId: string, params: AnyObject, errorCallbackFn?: Func): Promise<false | {
|
|
16
16
|
file: any;
|
|
17
17
|
printerName: any;
|
|
@@ -53,6 +53,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
53
53
|
}>;
|
|
54
54
|
topList: import("vue").ComputedRef<import("./src/interface").IDate[]>;
|
|
55
55
|
propItems: any;
|
|
56
|
+
computedYCell: (type: import("./src/interface").IPointType) => number;
|
|
56
57
|
cumputedX: (value: string | number) => any;
|
|
57
58
|
cumputedY: (type: import("./src/interface").IPointType, scaleValueList: number[], value: string | number) => number;
|
|
58
59
|
getXValue: (pointX: number) => string | undefined;
|
|
@@ -130,28 +130,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
130
130
|
return timeList.flat();
|
|
131
131
|
});
|
|
132
132
|
const breatheYCell = computed(() => {
|
|
133
|
-
|
|
134
|
-
const { yScaleValue, spaceGridNumber = 5 } = props.data.left;
|
|
135
|
-
const list = (_a = yScaleValue.find((v) => v.type === "breathe")) == null ? void 0 : _a.list;
|
|
136
|
-
return list ? yCellHeight.value / ((parseInt(list[1]) - parseInt(list[0])) / spaceGridNumber) : 0;
|
|
133
|
+
return computedYCell("breathe");
|
|
137
134
|
});
|
|
138
135
|
const pulseYCell = computed(() => {
|
|
139
|
-
|
|
140
|
-
const list = yScaleValue.find((v) => v.type === "pulse").list;
|
|
141
|
-
return yCellHeight.value / ((parseInt(list[1]) - parseInt(list[0])) / spaceGridNumber);
|
|
136
|
+
return computedYCell("pulse");
|
|
142
137
|
});
|
|
143
138
|
const temperatureYCell = computed(() => {
|
|
144
|
-
|
|
145
|
-
const list = yScaleValue.find((v) => v.type === "temperature").list;
|
|
146
|
-
return yCellHeight.value / ((parseInt(list[1]) - parseInt(list[0])) / spaceGridNumber);
|
|
139
|
+
return computedYCell("temperature");
|
|
147
140
|
});
|
|
148
141
|
const painYCell = computed(() => {
|
|
149
|
-
|
|
150
|
-
const item = yScaleValue.find((v) => v.type === "pain");
|
|
151
|
-
const list = (item == null ? void 0 : item.list) || [];
|
|
152
|
-
if (!list.length)
|
|
153
|
-
return 0;
|
|
154
|
-
return yCellHeight.value / ((parseInt(list[1]) - parseInt(list[0])) / item.spaceGridNumber);
|
|
142
|
+
return computedYCell("pain");
|
|
155
143
|
});
|
|
156
144
|
const event = computed(() => {
|
|
157
145
|
var _a;
|
|
@@ -261,6 +249,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
261
249
|
event: event.value,
|
|
262
250
|
itemList: itemList.value
|
|
263
251
|
});
|
|
252
|
+
function computedYCell(type) {
|
|
253
|
+
const { yScaleValue } = props.data.left;
|
|
254
|
+
const item = yScaleValue.find((v) => v.type === type);
|
|
255
|
+
const list = (item == null ? void 0 : item.list) || [];
|
|
256
|
+
if (!list.length)
|
|
257
|
+
return 0;
|
|
258
|
+
return yCellHeight.value / ((parseInt(list[1]) - parseInt(list[0])) / item.spaceGridNumber);
|
|
259
|
+
}
|
|
264
260
|
const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
|
|
265
261
|
useTop(canvas, propItems);
|
|
266
262
|
const { pointTipProps, pointMenuProps, clickMenu, setPopup, getEqualXTypes } = useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, props.addRenderItem);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IData, IDate } from './interface';
|
|
1
|
+
import { IData, IDate, IPointType } from './interface';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
data: {
|
|
4
4
|
type: null;
|
|
@@ -53,10 +53,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
}>;
|
|
54
54
|
topList: import("vue").ComputedRef<IDate[]>;
|
|
55
55
|
propItems: any;
|
|
56
|
+
computedYCell: (type: IPointType) => number;
|
|
56
57
|
cumputedX: (value: string | number) => any;
|
|
57
|
-
cumputedY: (type:
|
|
58
|
+
cumputedY: (type: IPointType, scaleValueList: number[], value: string | number) => number;
|
|
58
59
|
getXValue: (pointX: number) => string | undefined;
|
|
59
|
-
getYValue: (type:
|
|
60
|
+
getYValue: (type: IPointType, pointY: number) => number;
|
|
60
61
|
pointTipProps: {
|
|
61
62
|
show: boolean;
|
|
62
63
|
point: {
|
|
@@ -79,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
80
|
target: any;
|
|
80
81
|
}) => void;
|
|
81
82
|
setPopup: (point: any) => void;
|
|
82
|
-
getEqualXTypes: (pointX: number) =>
|
|
83
|
+
getEqualXTypes: (pointX: number) => IPointType[];
|
|
83
84
|
PopupTip: import("vue").DefineComponent<{
|
|
84
85
|
show: {
|
|
85
86
|
type: BooleanConstructor;
|
|
@@ -488,14 +488,12 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
|
|
|
488
488
|
return getTime >= minMinute && getTime <= maxMinute;
|
|
489
489
|
}
|
|
490
490
|
function getPointer(v, scaleValue) {
|
|
491
|
-
let points;
|
|
492
491
|
const objOriginY = scaleValue.type === "pain" ? painOriginY : vitalSignsOriginY;
|
|
493
492
|
if (isEffectiveNode(v) && isLimit(v.time)) {
|
|
494
493
|
const x = cumputedX(v.time);
|
|
495
494
|
const y = cumputedY(scaleValue.type, scaleValue.list, v.value);
|
|
496
|
-
|
|
495
|
+
return [x, y < objOriginY.originY ? objOriginY.originY : y > objOriginY.endY ? objOriginY.endY : y];
|
|
497
496
|
}
|
|
498
|
-
return points;
|
|
499
497
|
}
|
|
500
498
|
function clickMenu({ item, target }) {
|
|
501
499
|
if (!target) {
|
|
@@ -31,10 +31,12 @@ function useCumputedPoint(propItems) {
|
|
|
31
31
|
const residueX = pointX - item.left;
|
|
32
32
|
const residueTime = item.scaleCell * residueX;
|
|
33
33
|
const time = item.start + residueTime;
|
|
34
|
-
|
|
34
|
+
const d = new Date(time);
|
|
35
35
|
const month = `00${d.getMonth() + 1}`.slice(-2);
|
|
36
36
|
const day = `00${d.getDate()}`.slice(-2);
|
|
37
|
-
const
|
|
37
|
+
const hours = `00${d.getHours()}`.slice(-2);
|
|
38
|
+
const minutes = `00${d.getMinutes()}`.slice(-2);
|
|
39
|
+
const date = `${d.getFullYear()}-${month}-${day} ${hours}:${minutes}`;
|
|
38
40
|
return date;
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, inject, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
3
|
import { isEqual } from 'lodash-es';
|
|
4
|
+
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
4
5
|
import { InjectAsyncQueue } from '../../constants/index.js';
|
|
5
6
|
import { assignUpdateValue, traverseDependKey } from '../../utils/index.js';
|
|
6
7
|
import { connect, mapProps } from '@formily/vue';
|
|
@@ -123,13 +124,12 @@ const script = defineComponent({
|
|
|
123
124
|
return (_a = target == null ? void 0 : target.depth) != null ? _a : -1;
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
127
|
+
const {
|
|
128
|
+
injectValueValidate,
|
|
129
|
+
injectValueWatchFromEmpty
|
|
130
|
+
} = useCommonInjection();
|
|
131
|
+
injectValueWatchFromEmpty(() => props.value, fetchData);
|
|
132
|
+
injectValueValidate(() => props.value);
|
|
133
133
|
watch(() => props.urlConfig, async (config, oldConfig) => {
|
|
134
134
|
if (isEqual(config, oldConfig))
|
|
135
135
|
return;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, PropType } from 'vue';
|
|
2
2
|
export declare const COMPLEX: import("vue").DefineComponent<{
|
|
3
|
+
onChange: {};
|
|
3
4
|
span: {
|
|
4
5
|
type: NumberConstructor;
|
|
5
6
|
default: number;
|
|
@@ -13,6 +14,7 @@ export declare const COMPLEX: import("vue").DefineComponent<{
|
|
|
13
14
|
default: () => {};
|
|
14
15
|
};
|
|
15
16
|
}, () => 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<{
|
|
17
|
+
onChange: {};
|
|
16
18
|
span: {
|
|
17
19
|
type: NumberConstructor;
|
|
18
20
|
default: number;
|
|
@@ -4,6 +4,7 @@ import { assignUpdateValue } from '../../utils/index.js';
|
|
|
4
4
|
|
|
5
5
|
const script = defineComponent({
|
|
6
6
|
props: {
|
|
7
|
+
onChange: {},
|
|
7
8
|
span: {
|
|
8
9
|
type: Number,
|
|
9
10
|
default: 6
|
|
@@ -20,16 +21,12 @@ const script = defineComponent({
|
|
|
20
21
|
setup(props, {
|
|
21
22
|
slots
|
|
22
23
|
}) {
|
|
23
|
-
function onChange(e) {
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
}
|
|
26
24
|
return () => {
|
|
27
25
|
return createVNode("section", {
|
|
28
26
|
"class": "form-render__complex"
|
|
29
27
|
}, [createVNode("section", {
|
|
30
28
|
"class": `form-render__complexContent--${props.display}`,
|
|
31
|
-
"style": props.wrapperStyle
|
|
32
|
-
"onChange": onChange
|
|
29
|
+
"style": props.wrapperStyle
|
|
33
30
|
}, [slots.default && slots.default()])]);
|
|
34
31
|
};
|
|
35
32
|
}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
export declare const DATE: import("vue").DefineComponent<{
|
|
2
3
|
onChange: {};
|
|
3
4
|
value: {};
|
|
5
|
+
validate: {
|
|
6
|
+
type: PropType<Partial<{
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
obj_type: "password" | "sex" | "age" | "email" | "birthday" | "id_card" | "age_unit" | "mobile" | "telephone" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
|
|
9
|
+
vali_obj: string;
|
|
10
|
+
max_value: string | number;
|
|
11
|
+
min_value: string | number;
|
|
12
|
+
min_length: string | number;
|
|
13
|
+
max_length: string | number;
|
|
14
|
+
decimal_length: string | number;
|
|
15
|
+
regular_expression: string | RegExp;
|
|
16
|
+
regular_error_tip: string;
|
|
17
|
+
}>>;
|
|
18
|
+
};
|
|
4
19
|
}, () => 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<{
|
|
5
20
|
onChange: {};
|
|
6
21
|
value: {};
|
|
22
|
+
validate: {
|
|
23
|
+
type: PropType<Partial<{
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
obj_type: "password" | "sex" | "age" | "email" | "birthday" | "id_card" | "age_unit" | "mobile" | "telephone" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name";
|
|
26
|
+
vali_obj: string;
|
|
27
|
+
max_value: string | number;
|
|
28
|
+
min_value: string | number;
|
|
29
|
+
min_length: string | number;
|
|
30
|
+
max_length: string | number;
|
|
31
|
+
decimal_length: string | number;
|
|
32
|
+
regular_expression: string | RegExp;
|
|
33
|
+
regular_error_tip: string;
|
|
34
|
+
}>>;
|
|
35
|
+
};
|
|
7
36
|
}>>, {}>;
|
|
@@ -1,18 +1,75 @@
|
|
|
1
|
-
import { defineComponent, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, computed, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
|
4
4
|
import { isObject } from '@vueuse/core';
|
|
5
5
|
import { NDatePicker } from 'naive-ui';
|
|
6
|
+
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
6
7
|
|
|
7
8
|
const script = defineComponent({
|
|
8
9
|
props: {
|
|
9
10
|
onChange: {},
|
|
10
|
-
value: {}
|
|
11
|
+
value: {},
|
|
12
|
+
validate: {
|
|
13
|
+
type: Object
|
|
14
|
+
}
|
|
11
15
|
},
|
|
12
|
-
setup(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
setup(props) {
|
|
17
|
+
useCommonInjection().injectValueValidate(() => props.value);
|
|
18
|
+
function minCurrentDate() {
|
|
19
|
+
var _a;
|
|
20
|
+
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
21
|
+
}
|
|
22
|
+
function maxCurrentDate() {
|
|
23
|
+
var _a;
|
|
24
|
+
return ((_a = props.validate) == null ? void 0 : _a.max_date) === "currTime";
|
|
25
|
+
}
|
|
26
|
+
function isDateDisabled(time) {
|
|
27
|
+
return minCurrentDate() && time < yesterday() || maxCurrentDate() && time > Date.now();
|
|
28
|
+
function yesterday() {
|
|
29
|
+
return Date.now() - 24 * 60 * 60 * 1e3;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function isTimeDisabled(time) {
|
|
33
|
+
const checkDate = new Date(time);
|
|
34
|
+
const currentDate = new Date();
|
|
35
|
+
return {
|
|
36
|
+
isHourDisabled,
|
|
37
|
+
isMinuteDisabled
|
|
38
|
+
};
|
|
39
|
+
function checkHour() {
|
|
40
|
+
return checkDate.getHours();
|
|
41
|
+
}
|
|
42
|
+
function currentHour() {
|
|
43
|
+
return currentDate.getHours();
|
|
44
|
+
}
|
|
45
|
+
function currentMinute() {
|
|
46
|
+
return currentDate.getMinutes();
|
|
47
|
+
}
|
|
48
|
+
function isHourDisabled(hour) {
|
|
49
|
+
return minCurrentDate() && hour < currentHour() || maxCurrentDate() && hour > currentHour();
|
|
50
|
+
}
|
|
51
|
+
function isMinuteDisabled(minute) {
|
|
52
|
+
if (checkHour() === currentHour()) {
|
|
53
|
+
return minCurrentDate() && minute < currentMinute() || maxCurrentDate() && minute > currentMinute();
|
|
54
|
+
}
|
|
55
|
+
return minCurrentDate() && checkHour() < currentHour() || maxCurrentDate() && checkHour() > currentHour();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const validateConfig = computed(() => {
|
|
59
|
+
const result = {};
|
|
60
|
+
if (isObject(props.validate)) {
|
|
61
|
+
const {
|
|
62
|
+
min_date,
|
|
63
|
+
max_date
|
|
64
|
+
} = props.validate;
|
|
65
|
+
if (min_date || max_date) {
|
|
66
|
+
result.isDateDisabled = isDateDisabled;
|
|
67
|
+
result.isTimeDisabled = isTimeDisabled;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
});
|
|
72
|
+
return () => createVNode(NDatePicker, validateConfig.value, null);
|
|
16
73
|
}
|
|
17
74
|
});
|
|
18
75
|
const DATE = connect(script, mapProps((props, field) => {
|
|
@@ -26,58 +83,8 @@ const DATE = connect(script, mapProps((props, field) => {
|
|
|
26
83
|
field.setValue(v);
|
|
27
84
|
}
|
|
28
85
|
});
|
|
29
|
-
if (isObject(props.validate)) {
|
|
30
|
-
const {
|
|
31
|
-
min_date,
|
|
32
|
-
max_date
|
|
33
|
-
} = props.validate;
|
|
34
|
-
if (min_date || max_date) {
|
|
35
|
-
_props.isDateDisabled = isDateDisabled;
|
|
36
|
-
_props.isTimeDisabled = isTimeDisabled;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
86
|
}
|
|
40
87
|
return _props;
|
|
41
|
-
function minCurrentDate() {
|
|
42
|
-
var _a;
|
|
43
|
-
return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
|
|
44
|
-
}
|
|
45
|
-
function maxCurrentDate() {
|
|
46
|
-
var _a;
|
|
47
|
-
return ((_a = props.validate) == null ? void 0 : _a.max_date) === "currTime";
|
|
48
|
-
}
|
|
49
|
-
function isDateDisabled(time) {
|
|
50
|
-
return minCurrentDate() && time < yesterday() || maxCurrentDate() && time > Date.now();
|
|
51
|
-
function yesterday() {
|
|
52
|
-
return Date.now() - 24 * 60 * 60 * 1e3;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function isTimeDisabled(time) {
|
|
56
|
-
const checkDate = new Date(time);
|
|
57
|
-
const currentDate = new Date();
|
|
58
|
-
return {
|
|
59
|
-
isHourDisabled,
|
|
60
|
-
isMinuteDisabled
|
|
61
|
-
};
|
|
62
|
-
function checkHour() {
|
|
63
|
-
return checkDate.getHours();
|
|
64
|
-
}
|
|
65
|
-
function currentHour() {
|
|
66
|
-
return currentDate.getHours();
|
|
67
|
-
}
|
|
68
|
-
function currentMinute() {
|
|
69
|
-
return currentDate.getMinutes();
|
|
70
|
-
}
|
|
71
|
-
function isHourDisabled(hour) {
|
|
72
|
-
return minCurrentDate() && hour < currentHour() || maxCurrentDate() && hour > currentHour();
|
|
73
|
-
}
|
|
74
|
-
function isMinuteDisabled(minute) {
|
|
75
|
-
if (checkHour() === currentHour()) {
|
|
76
|
-
return minCurrentDate() && minute < currentMinute() || maxCurrentDate() && minute > currentMinute();
|
|
77
|
-
}
|
|
78
|
-
return minCurrentDate() && checkHour() < currentHour() || maxCurrentDate() && checkHour() > currentHour();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
88
|
}));
|
|
82
89
|
|
|
83
90
|
export { DATE };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, inject, watch, createVNode } from 'vue';
|
|
2
2
|
import { isField } from '@formily/core';
|
|
3
3
|
import { isEqual, cloneDeep } from 'lodash-es';
|
|
4
|
+
import { useCommonInjection } from '../../../../../packages/form-render/src/hooks/useCommonInjection';
|
|
4
5
|
import { InjectionChangeContextCollector, InjectAsyncQueue, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
5
6
|
import { assignUpdateValue, traverseDependKey } from '../../utils/index.js';
|
|
6
7
|
import { connect, mapProps } from '@formily/vue';
|
|
@@ -106,13 +107,12 @@ const script = defineComponent({
|
|
|
106
107
|
}, {
|
|
107
108
|
immediate: true
|
|
108
109
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
110
|
+
const {
|
|
111
|
+
injectValueValidate,
|
|
112
|
+
injectValueWatchFromEmpty
|
|
113
|
+
} = useCommonInjection();
|
|
114
|
+
injectValueWatchFromEmpty(() => props.value, fetchData);
|
|
115
|
+
injectValueValidate(() => props.value);
|
|
116
116
|
function focusDecorator(onFocus) {
|
|
117
117
|
return (...args) => {
|
|
118
118
|
if (isField(field.value)) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Func } from '../../../../../es/src/types';
|
|
2
|
+
import { WatchSource } from '@vue/runtime-core';
|
|
3
|
+
export declare function useCommonInjection(): {
|
|
4
|
+
injectValueValidate: (traverser: WatchSource) => void;
|
|
5
|
+
injectValueWatchFromEmpty: (traverser: WatchSource, trigger: Func) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { isField } from '@formily/core';
|
|
2
|
+
import { watch } from 'vue';
|
|
3
|
+
import { useFormField } from '../../../../packages/form-render';
|
|
4
|
+
|
|
5
|
+
function useCommonInjection() {
|
|
6
|
+
function injectValueValidate(traverser) {
|
|
7
|
+
const { field } = useFormField();
|
|
8
|
+
watch(traverser, () => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
return isField(field.value) && field.value.visited && ((_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a));
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function injectValueWatchFromEmpty(traverser, trigger) {
|
|
14
|
+
watch(traverser, (n, o) => n != null && o == null && trigger(), { immediate: true });
|
|
15
|
+
}
|
|
16
|
+
return { injectValueValidate, injectValueWatchFromEmpty };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useCommonInjection };
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
.form-render__formItem {
|
|
26
26
|
grid-column: span var(--form-item-column) / span var(--form-item-column);
|
|
27
27
|
}
|
|
28
|
-
.form-render__formItem .n-date-picker
|
|
28
|
+
.form-render__formItem .n-date-picker,
|
|
29
|
+
.form-render__formItem .n-input-number {
|
|
29
30
|
width: 100%;
|
|
30
31
|
}
|
|
31
32
|
.form-render__formItemLabel {
|
|
@@ -42,6 +43,15 @@
|
|
|
42
43
|
transform: translateY(-50%);
|
|
43
44
|
right: calc(var(--icon-right) * 1px);
|
|
44
45
|
}
|
|
46
|
+
.form-render__formItem .n-form-item-label {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
}
|
|
49
|
+
.form-render__formItem .n-form-item-label [annotation-hover-show='true'] {
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
}
|
|
52
|
+
.form-render__formItem .n-form-item-label:hover [annotation-hover-show='true'] {
|
|
53
|
+
visibility: visible;
|
|
54
|
+
}
|
|
45
55
|
.form-render__linebar {
|
|
46
56
|
grid-column: span var(--column) / span var(--column);
|
|
47
57
|
}
|
|
@@ -131,12 +141,3 @@
|
|
|
131
141
|
display: flex !important;
|
|
132
142
|
gap: 0 8px;
|
|
133
143
|
}
|
|
134
|
-
.form-render .n-form-item-label {
|
|
135
|
-
display: inline-flex;
|
|
136
|
-
}
|
|
137
|
-
.form-render .n-form-item-label [annotation-hover-show='true'] {
|
|
138
|
-
visibility: hidden;
|
|
139
|
-
}
|
|
140
|
-
.form-render .n-form-item-label:hover [annotation-hover-show='true'] {
|
|
141
|
-
visibility: visible;
|
|
142
|
-
}
|
package/es/packages/index.css
CHANGED
|
@@ -291,7 +291,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
291
291
|
width: 100%;
|
|
292
292
|
}
|
|
293
293
|
.custom-big-table .filter-box .text-over-tooltip-components {
|
|
294
|
-
max-width: calc(100% -
|
|
294
|
+
max-width: calc(100% - 40px);
|
|
295
295
|
}
|
|
296
296
|
.custom-big-table .filter-box .vxe-filter--btn {
|
|
297
297
|
border-top-color: #c0c4cc;
|
|
@@ -539,6 +539,21 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
539
539
|
margin-right: 6px;
|
|
540
540
|
box-shadow: 0px 2px 4px 0px rgba(99, 129, 249, 0.5);
|
|
541
541
|
}
|
|
542
|
+
.annotation-edit {
|
|
543
|
+
cursor: pointer;
|
|
544
|
+
color: #0067ee;
|
|
545
|
+
font-size: 16px;
|
|
546
|
+
user-select: none;
|
|
547
|
+
display: inline-flex;
|
|
548
|
+
align-items: center;
|
|
549
|
+
}
|
|
550
|
+
.annotation-edit.is-active {
|
|
551
|
+
color: rgba(255, 152, 40);
|
|
552
|
+
}
|
|
553
|
+
.annotation-edit__icon {
|
|
554
|
+
display: inline-flex;
|
|
555
|
+
align-items: center;
|
|
556
|
+
}
|
|
542
557
|
.no-data-tip {
|
|
543
558
|
display: flex;
|
|
544
559
|
flex-direction: column;
|
|
@@ -601,6 +616,17 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
601
616
|
fill: currentColor;
|
|
602
617
|
overflow: hidden;
|
|
603
618
|
}
|
|
619
|
+
.vxe-header--column [annotation-hover-show='true'] {
|
|
620
|
+
visibility: hidden;
|
|
621
|
+
}
|
|
622
|
+
.vxe-header--column:hover [annotation-hover-show='true'] {
|
|
623
|
+
visibility: visible;
|
|
624
|
+
}
|
|
625
|
+
.big-table__annotationWrapper {
|
|
626
|
+
width: 20px;
|
|
627
|
+
display: inline-flex;
|
|
628
|
+
align-items: center;
|
|
629
|
+
}
|
|
604
630
|
.people-tree {
|
|
605
631
|
display: flex;
|
|
606
632
|
}
|
|
@@ -2830,7 +2856,8 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2830
2856
|
.form-render__formItem {
|
|
2831
2857
|
grid-column: span var(--form-item-column) / span var(--form-item-column);
|
|
2832
2858
|
}
|
|
2833
|
-
.form-render__formItem .n-date-picker
|
|
2859
|
+
.form-render__formItem .n-date-picker,
|
|
2860
|
+
.form-render__formItem .n-input-number {
|
|
2834
2861
|
width: 100%;
|
|
2835
2862
|
}
|
|
2836
2863
|
.form-render__formItemLabel {
|
|
@@ -2847,6 +2874,15 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2847
2874
|
transform: translateY(-50%);
|
|
2848
2875
|
right: calc(var(--icon-right) * 1px);
|
|
2849
2876
|
}
|
|
2877
|
+
.form-render__formItem .n-form-item-label {
|
|
2878
|
+
display: inline-flex;
|
|
2879
|
+
}
|
|
2880
|
+
.form-render__formItem .n-form-item-label [annotation-hover-show='true'] {
|
|
2881
|
+
visibility: hidden;
|
|
2882
|
+
}
|
|
2883
|
+
.form-render__formItem .n-form-item-label:hover [annotation-hover-show='true'] {
|
|
2884
|
+
visibility: visible;
|
|
2885
|
+
}
|
|
2850
2886
|
.form-render__linebar {
|
|
2851
2887
|
grid-column: span var(--column) / span var(--column);
|
|
2852
2888
|
}
|
|
@@ -2936,15 +2972,6 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2936
2972
|
display: flex !important;
|
|
2937
2973
|
gap: 0 8px;
|
|
2938
2974
|
}
|
|
2939
|
-
.form-render .n-form-item-label {
|
|
2940
|
-
display: inline-flex;
|
|
2941
|
-
}
|
|
2942
|
-
.form-render .n-form-item-label [annotation-hover-show='true'] {
|
|
2943
|
-
visibility: hidden;
|
|
2944
|
-
}
|
|
2945
|
-
.form-render .n-form-item-label:hover [annotation-hover-show='true'] {
|
|
2946
|
-
visibility: visible;
|
|
2947
|
-
}
|
|
2948
2975
|
.c-fabric-chart-popup-tip,
|
|
2949
2976
|
.c-fabric-chart-popup-menu {
|
|
2950
2977
|
position: absolute;
|