cnhis-design-vue 3.1.14-beta.8 → 3.1.14-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/es/packages/big-table/index.d.ts +1 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +31 -14
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +29 -16
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue.d.ts +9 -14
- package/es/packages/big-table/src/components/edit-form/edit-separate.vue_vue_type_script_setup_true_lang.js +1 -2
- package/es/packages/big-table/src/components/separate.vue.d.ts +3 -4
- package/es/packages/big-table/src/components/separate.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/packages/big-table/src/hooks/useEdit.d.ts +9 -13
- package/es/packages/big-table/src/hooks/useSeparateRow.js +4 -4
- package/es/packages/big-table/src/utils.js +1 -1
- package/es/packages/big-table/style/index.css +12 -2
- package/es/packages/fabric-chart/index.d.ts +2 -0
- package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +2 -0
- package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +16 -6
- package/es/packages/fabric-chart/src/hooks/useDraw.js +1 -0
- package/es/packages/fabric-chart/src/hooks/useLeft.js +14 -14
- package/es/packages/fabric-chart/src/hooks/useRight.js +2 -13
- package/es/packages/fabric-chart/src/hooks/useTop.js +9 -10
- package/es/packages/fabric-chart/src/interface.d.ts +4 -0
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +1 -1
- package/es/packages/form-render/src/components/renderer/cascader.js +4 -8
- package/es/packages/form-render/src/components/renderer/input.js +5 -16
- package/es/packages/form-render/src/components/renderer/inputNumber.d.ts +12 -0
- package/es/packages/form-render/src/components/renderer/inputNumber.js +11 -4
- package/es/packages/form-render/src/components/renderer/select.js +9 -2
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +3 -1
- package/es/packages/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/packages/form-render/src/utils/index.d.ts +8 -2
- package/es/packages/form-render/src/utils/index.js +40 -14
- package/es/packages/index.css +12 -2
- package/es/packages/info-header/index.d.ts +3 -7
- package/es/packages/info-header/src/InfoHeader.vue.d.ts +3 -7
- package/es/src/components/SlotRender/SlotRender.d.ts +4 -8
- package/es/src/components/SlotRender/SlotRender.js +4 -5
- package/global.d.ts +8 -8
- package/package.json +2 -2
@@ -54,11 +54,11 @@ var script = /* @__PURE__ */ defineComponent({
|
|
54
54
|
});
|
55
55
|
const gridXNumber = computed(() => {
|
56
56
|
const { grid } = props.data;
|
57
|
-
return grid.mainXCell * grid.subXCell;
|
57
|
+
return grid.mainXCell * grid.subXCell + grid.surplusXCell;
|
58
58
|
});
|
59
59
|
const gridYNumber = computed(() => {
|
60
60
|
const { grid } = props.data;
|
61
|
-
return grid.mainYCell * grid.subYCell;
|
61
|
+
return grid.mainYCell * grid.subYCell + grid.surplusYCell;
|
62
62
|
});
|
63
63
|
const endX = computed(() => {
|
64
64
|
const { width, right = null, top } = props.data;
|
@@ -67,6 +67,10 @@ var script = /* @__PURE__ */ defineComponent({
|
|
67
67
|
const endWidth = right.width || 50;
|
68
68
|
return width - endWidth;
|
69
69
|
});
|
70
|
+
const endXLimit = computed(() => {
|
71
|
+
const { grid } = props.data;
|
72
|
+
return endX.value - grid.surplusXCell * xCellWidth.value;
|
73
|
+
});
|
70
74
|
const originX = computed(() => {
|
71
75
|
const { top, left } = props.data;
|
72
76
|
const originX2 = top.titleWidth + iconsWidth.value;
|
@@ -86,6 +90,10 @@ var script = /* @__PURE__ */ defineComponent({
|
|
86
90
|
const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
|
87
91
|
return topHeight;
|
88
92
|
});
|
93
|
+
const originYLimit = computed(() => {
|
94
|
+
const { grid } = props.data;
|
95
|
+
return originY.value + grid.surplusYCell * yCellHeight.value;
|
96
|
+
});
|
89
97
|
const xCellWidth = computed(() => {
|
90
98
|
return (endX.value - originX.value) / gridXNumber.value;
|
91
99
|
});
|
@@ -178,8 +186,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
178
186
|
endY: endY.value
|
179
187
|
};
|
180
188
|
if (painIndex.value === 0) {
|
181
|
-
obj.originY =
|
182
|
-
obj.endY =
|
189
|
+
obj.originY = originYLimit.value;
|
190
|
+
obj.endY = originYLimit.value + painHeight.value;
|
183
191
|
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
184
192
|
obj.originY = endY.value - painHeight.value;
|
185
193
|
obj.endY = endY.value;
|
@@ -193,10 +201,10 @@ var script = /* @__PURE__ */ defineComponent({
|
|
193
201
|
endY: endY.value
|
194
202
|
};
|
195
203
|
if (painIndex.value === 0) {
|
196
|
-
obj.originY =
|
204
|
+
obj.originY = originYLimit.value + painHeight.value;
|
197
205
|
obj.endY = endY.value;
|
198
206
|
} else if (painIndex.value === left.yScaleValue.length - 1) {
|
199
|
-
obj.originY =
|
207
|
+
obj.originY = originYLimit.value;
|
200
208
|
obj.endY = endY.value - painHeight.value;
|
201
209
|
}
|
202
210
|
return obj;
|
@@ -240,7 +248,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
240
248
|
iconsWidth: iconsWidth.value,
|
241
249
|
originX: originX.value,
|
242
250
|
originY: originY.value,
|
251
|
+
originYLimit: originYLimit.value,
|
243
252
|
endX: endX.value,
|
253
|
+
endXLimit: endXLimit.value,
|
244
254
|
endY: endY.value,
|
245
255
|
xCellWidth: xCellWidth.value,
|
246
256
|
yCellHeight: yCellHeight.value,
|
@@ -9,13 +9,13 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
9
9
|
originX,
|
10
10
|
endX,
|
11
11
|
yCellHeight,
|
12
|
-
borderStyle,
|
13
12
|
left,
|
14
13
|
vitalSignsOriginY,
|
15
14
|
painOriginY,
|
16
15
|
painHeight,
|
17
16
|
iconsWidth,
|
18
|
-
itemList
|
17
|
+
itemList,
|
18
|
+
painIndex
|
19
19
|
} = propItems;
|
20
20
|
const mainScaleWidth = 9;
|
21
21
|
const subScaleWidth = 5;
|
@@ -86,7 +86,7 @@ ${item.title.slice(-2)}`,
|
|
86
86
|
title.sendToBack();
|
87
87
|
}
|
88
88
|
function drawScaleValue() {
|
89
|
-
|
89
|
+
const groupList = [];
|
90
90
|
const column = !painHeight ? left.yScaleValue.length : left.yScaleValue.length - 1;
|
91
91
|
const colWidth = (originX - iconsWidth) / column;
|
92
92
|
const residue = (originX - iconsWidth) % column;
|
@@ -96,10 +96,17 @@ ${item.title.slice(-2)}`,
|
|
96
96
|
drwaPainScaleValue(item);
|
97
97
|
return;
|
98
98
|
}
|
99
|
-
|
99
|
+
const list = [];
|
100
|
+
function createLine(points) {
|
101
|
+
const line2 = new fabric.Line(points, {
|
102
|
+
...defaultBorderStyle,
|
103
|
+
...item.style
|
104
|
+
});
|
105
|
+
list.push(line2);
|
106
|
+
}
|
100
107
|
const rectWidth = index === 0 ? firstColWidth : colWidth;
|
101
108
|
const rectLeft = index === 0 ? iconsWidth : firstColWidth + iconsWidth + (index - 1) * colWidth;
|
102
|
-
const line = index > 0 ? new fabric.Line([rectLeft, vitalSignsOriginY.originY, rectLeft, vitalSignsOriginY.endY], {
|
109
|
+
const line = index > 0 ? new fabric.Line([rectLeft, painIndex == 0 ? vitalSignsOriginY.originY : originY, rectLeft, vitalSignsOriginY.endY], {
|
103
110
|
...defaultBorderStyle
|
104
111
|
}) : null;
|
105
112
|
line && list.push(line);
|
@@ -118,13 +125,6 @@ ${item.title.slice(-2)}`,
|
|
118
125
|
if (item.showScale && i !== item.list.length - 1) {
|
119
126
|
for (let j = 0; j < 5; j++) {
|
120
127
|
if (j > 0 || !item.showNumber || position !== "center") {
|
121
|
-
let createLine = function(points) {
|
122
|
-
const line2 = new fabric.Line(points, {
|
123
|
-
...defaultBorderStyle,
|
124
|
-
...item.style
|
125
|
-
});
|
126
|
-
list.push(line2);
|
127
|
-
};
|
128
128
|
const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
|
129
129
|
const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
|
130
130
|
const y = top - j * spaceScale;
|
@@ -164,9 +164,9 @@ ${item.title.slice(-2)}`,
|
|
164
164
|
group && group.sendToBack();
|
165
165
|
}
|
166
166
|
function drawIcons() {
|
167
|
-
|
167
|
+
const list = JSON.parse(JSON.stringify(itemList));
|
168
168
|
let topY = endY;
|
169
|
-
|
169
|
+
const leftX = iconsWidth - left.icons.marginRight;
|
170
170
|
list.reverse().forEach((item, index) => {
|
171
171
|
topY -= 10;
|
172
172
|
let title = item.title.replace(/(.{2})/g, "$1\n");
|
@@ -3,25 +3,14 @@ import { fabric } from '../utils/index.js';
|
|
3
3
|
import { defaultBorderStyle, defaultRectStyle, defaultStyle } from './useDraw.js';
|
4
4
|
|
5
5
|
function useRight(canvas, propItems) {
|
6
|
-
const {
|
7
|
-
endX,
|
8
|
-
endY,
|
9
|
-
temperatureYCell,
|
10
|
-
canvasWidth,
|
11
|
-
canvasHeight,
|
12
|
-
left,
|
13
|
-
right,
|
14
|
-
breathingHeight,
|
15
|
-
vitalSignsOriginY,
|
16
|
-
painOriginY
|
17
|
-
} = propItems;
|
6
|
+
const { endX, endY, temperatureYCell, canvasWidth, canvasHeight, left, right, breathingHeight, vitalSignsOriginY } = propItems;
|
18
7
|
function drawScaleValue() {
|
19
8
|
var _a, _b, _c;
|
20
9
|
if (!right) {
|
21
10
|
canvas.value.add(new fabric.Line([canvasWidth - 1, 0, canvasWidth - 1, canvasHeight], defaultBorderStyle));
|
22
11
|
return false;
|
23
12
|
}
|
24
|
-
|
13
|
+
const list = [];
|
25
14
|
list.push(new fabric.Rect({
|
26
15
|
...defaultRectStyle,
|
27
16
|
width: canvasWidth - endX - 1,
|
@@ -1,24 +1,23 @@
|
|
1
1
|
import { onMounted, nextTick } from 'vue';
|
2
2
|
import { fabric } from '../utils/index.js';
|
3
|
-
import { defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
|
3
|
+
import { defaultBorderStyle, defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
|
4
4
|
|
5
5
|
function useTop(canvas, propItems) {
|
6
6
|
const {
|
7
|
-
originY,
|
8
7
|
grid,
|
9
8
|
originX,
|
10
9
|
xCellWidth,
|
11
10
|
gridXNumber,
|
12
11
|
top,
|
13
|
-
dateHeight,
|
14
|
-
hospitalDaysHeight,
|
15
|
-
operationDaysHeight,
|
16
12
|
xScalevalueHeight,
|
17
13
|
iconsWidth,
|
18
|
-
topList
|
14
|
+
topList,
|
15
|
+
endXLimit,
|
16
|
+
canvasWidth
|
19
17
|
} = propItems;
|
20
18
|
function drawTop() {
|
21
|
-
|
19
|
+
const list = [];
|
20
|
+
endXLimit && list.push(new fabric.Line([endXLimit, 0, canvasWidth, 0], defaultBorderStyle));
|
22
21
|
let topY = 0;
|
23
22
|
topList.forEach((item, index) => {
|
24
23
|
if (index > 0) {
|
@@ -53,7 +52,7 @@ function useTop(canvas, propItems) {
|
|
53
52
|
top: topY
|
54
53
|
});
|
55
54
|
list.push(title);
|
56
|
-
|
55
|
+
const timeList = [];
|
57
56
|
for (let j = 0; j < grid.mainXCell; j++) {
|
58
57
|
timeList.push(top.xScalevalue.list);
|
59
58
|
}
|
@@ -80,7 +79,7 @@ function useTop(canvas, propItems) {
|
|
80
79
|
return false;
|
81
80
|
const height = top.dayHeight;
|
82
81
|
const width = xCellWidth * grid.subSecondXCell;
|
83
|
-
const dayList = gridXNumber / grid.subSecondXCell;
|
82
|
+
const dayList = (gridXNumber - grid.surplusXCell) / grid.subSecondXCell;
|
84
83
|
for (let i = 0; i < dayList; i++) {
|
85
84
|
const left = originX + i * width;
|
86
85
|
const value = i % 2 === 0 ? "\u4E0A\u5348" : "\u4E0B\u5348";
|
@@ -99,7 +98,7 @@ function useTop(canvas, propItems) {
|
|
99
98
|
}
|
100
99
|
}
|
101
100
|
function drawDate(item, list, topY) {
|
102
|
-
|
101
|
+
const height = propItems[`${item.key}Height`];
|
103
102
|
const title = drawTextGroup({
|
104
103
|
width: originX - iconsWidth,
|
105
104
|
height,
|
@@ -14,6 +14,8 @@ interface IGrid {
|
|
14
14
|
subSecondXCell: number;
|
15
15
|
mainYCell: number;
|
16
16
|
subYCell: number;
|
17
|
+
surplusXCell: number;
|
18
|
+
surplusYCell: number;
|
17
19
|
mainLineStyle?: ImainLineStyle;
|
18
20
|
subLineStyle?: fabric.ILineOptions;
|
19
21
|
subSecondLineStyle?: fabric.ILineOptions;
|
@@ -45,7 +47,9 @@ export interface IPropItems {
|
|
45
47
|
iconsWidth: number;
|
46
48
|
originX: number;
|
47
49
|
originY: number;
|
50
|
+
originYLimit: number;
|
48
51
|
endX: number;
|
52
|
+
endXLimit: number;
|
49
53
|
endY: number;
|
50
54
|
xCellWidth: number;
|
51
55
|
yCellHeight: number;
|
@@ -8,7 +8,7 @@ declare type DependKeyObj = {
|
|
8
8
|
declare type UrlConfig = {
|
9
9
|
method: FormRequestType;
|
10
10
|
nameKey: string;
|
11
|
-
dependKey: ArrayAble<string> | ArrayAble<DependKeyObj>;
|
11
|
+
dependKey: ArrayAble<string> | Record<string, string> | ArrayAble<DependKeyObj>;
|
12
12
|
url: string;
|
13
13
|
valueKey: string;
|
14
14
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
|
2
2
|
import { isField } from '@formily/core';
|
3
|
-
import { isObject
|
3
|
+
import { isObject } from 'lodash-es';
|
4
4
|
import { InjectAsyncQueue } from '../../constants/index.js';
|
5
|
-
import { assignUpdateValue, formRenderLog,
|
5
|
+
import { assignUpdateValue, formRenderLog, traverseDependKey } from '../../utils/index.js';
|
6
6
|
import { connect, mapProps } from '@formily/vue';
|
7
7
|
import { NCascader } from 'naive-ui';
|
8
8
|
import { useFormField } from '../../hooks/useFormField.js';
|
@@ -74,12 +74,8 @@ const script = defineComponent({
|
|
74
74
|
lvlnr: deep + 1 + ""
|
75
75
|
};
|
76
76
|
if (option2 && config2.dependKey) {
|
77
|
-
|
78
|
-
|
79
|
-
params[key] = option2[valueKey.value];
|
80
|
-
} else if (isObject(key)) {
|
81
|
-
params[key.paramName] = option2[key.paramValue];
|
82
|
-
}
|
77
|
+
traverseDependKey(config2.dependKey, (dependKey, valueKey2) => {
|
78
|
+
params[valueKey2] = option2[dependKey];
|
83
79
|
});
|
84
80
|
}
|
85
81
|
return {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { defineComponent,
|
2
|
-
import {
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
2
|
+
import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
4
4
|
import { NInput } from 'naive-ui';
|
5
5
|
|
@@ -13,21 +13,10 @@ const script = defineComponent({
|
|
13
13
|
type: String
|
14
14
|
}
|
15
15
|
},
|
16
|
-
setup(props
|
17
|
-
|
18
|
-
}) {
|
19
|
-
const _slots = computed(() => {
|
20
|
-
const res = {};
|
21
|
-
if (props.prefix) {
|
22
|
-
res.prefix = () => createVNode(Fragment, null, [createSlot(props.prefix, props).default()]);
|
23
|
-
}
|
24
|
-
if (props.suffix) {
|
25
|
-
res.suffix = () => createVNode(Fragment, null, [createSlot(props.suffix, props).default()]);
|
26
|
-
}
|
27
|
-
return res;
|
28
|
-
});
|
16
|
+
setup(props) {
|
17
|
+
const _slots = createInputSlot(props);
|
29
18
|
return () => {
|
30
|
-
return createVNode(NInput,
|
19
|
+
return createVNode(NInput, null, _slots.value);
|
31
20
|
};
|
32
21
|
}
|
33
22
|
});
|
@@ -1,5 +1,17 @@
|
|
1
1
|
export declare const INPUT_NUMBER: import("vue").DefineComponent<{
|
2
2
|
onChange: {};
|
3
|
+
prefix: {
|
4
|
+
type: StringConstructor;
|
5
|
+
};
|
6
|
+
suffix: {
|
7
|
+
type: StringConstructor;
|
8
|
+
};
|
3
9
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
4
10
|
onChange: {};
|
11
|
+
prefix: {
|
12
|
+
type: StringConstructor;
|
13
|
+
};
|
14
|
+
suffix: {
|
15
|
+
type: StringConstructor;
|
16
|
+
};
|
5
17
|
}>>, {}>;
|
@@ -1,15 +1,22 @@
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
2
|
-
import { assignUpdateValue } from '../../utils/index.js';
|
2
|
+
import { createInputSlot, assignUpdateValue } from '../../utils/index.js';
|
3
3
|
import { connect, mapProps } from '@formily/vue';
|
4
4
|
import { NInputNumber } from 'naive-ui';
|
5
5
|
|
6
6
|
const script = defineComponent({
|
7
7
|
props: {
|
8
|
-
onChange: {}
|
8
|
+
onChange: {},
|
9
|
+
prefix: {
|
10
|
+
type: String
|
11
|
+
},
|
12
|
+
suffix: {
|
13
|
+
type: String
|
14
|
+
}
|
9
15
|
},
|
10
|
-
setup(
|
16
|
+
setup(props) {
|
17
|
+
const _slots = createInputSlot(props);
|
11
18
|
return () => {
|
12
|
-
return createVNode(NInputNumber, null,
|
19
|
+
return createVNode(NInputNumber, null, _slots.value);
|
13
20
|
};
|
14
21
|
}
|
15
22
|
});
|
@@ -2,7 +2,7 @@ import { defineComponent, ref, inject, computed, watch, nextTick, createVNode }
|
|
2
2
|
import { isField } from '@formily/core';
|
3
3
|
import { cloneDeep } from 'lodash-es';
|
4
4
|
import { InjectAsyncQueue, InjectionFormItemDepsCollector, InjectionChangeContextCollector } from '../../constants/index.js';
|
5
|
-
import { assignUpdateValue, formRenderLog,
|
5
|
+
import { assignUpdateValue, formRenderLog, traverseDependKey } from '../../utils/index.js';
|
6
6
|
import { isObject } from '@vueuse/core';
|
7
7
|
import { connect, mapProps } from '@formily/vue';
|
8
8
|
import { NSelect } from 'naive-ui';
|
@@ -65,9 +65,16 @@ const script = defineComponent({
|
|
65
65
|
remoteOptions.value = null;
|
66
66
|
}
|
67
67
|
function createParams(config2, field2) {
|
68
|
+
const _params = {};
|
69
|
+
traverseDependKey(config2.dependKey, (dependKey, valueKey2) => {
|
70
|
+
const _field = field2.query(dependKey).take();
|
71
|
+
if (isField(_field)) {
|
72
|
+
_params[valueKey2] = _field.value;
|
73
|
+
}
|
74
|
+
});
|
68
75
|
return {
|
69
76
|
...config2,
|
70
|
-
params: Object.assign({}, config2.params,
|
77
|
+
params: Object.assign({}, config2.params, _params)
|
71
78
|
};
|
72
79
|
}
|
73
80
|
}
|
@@ -108,7 +108,9 @@ function useFieldListAdaptor(collector, uuid) {
|
|
108
108
|
Object.assign(schema["x-component-props"], {
|
109
109
|
precision: decimal_length || (validate == null ? void 0 : validate.decimal_length),
|
110
110
|
max: validate == null ? void 0 : validate.max_value,
|
111
|
-
min: validate == null ? void 0 : validate.min_value
|
111
|
+
min: validate == null ? void 0 : validate.min_value,
|
112
|
+
prefix: item.prefix,
|
113
|
+
suffix: item.suffix
|
112
114
|
});
|
113
115
|
return schema;
|
114
116
|
};
|
@@ -64,7 +64,7 @@ export declare type FieldItem = {
|
|
64
64
|
urlConfig: Partial<{
|
65
65
|
url: string;
|
66
66
|
method: 'post' | 'get' | 'put' | 'patch' | 'delete';
|
67
|
-
dependKey: string | string[]
|
67
|
+
dependKey: string | string[] | Record<string, string>;
|
68
68
|
params: AnyObject;
|
69
69
|
nameKey: string;
|
70
70
|
valueKey: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AnyObject, ArrayAble } from '../../../../../es/src/types';
|
2
2
|
import { ISchema } from '@formily/json-schema/esm/types';
|
3
3
|
import { GeneralField } from '@formily/core';
|
4
|
-
import { InjectionKey, VNode } from 'vue';
|
4
|
+
import { FunctionalComponent, InjectionKey, VNode } from 'vue';
|
5
5
|
import { AgeContext, FieldItem, IdCardParseInfo } from '../types';
|
6
6
|
export declare function formRenderLog(message: string, type?: keyof Console): void;
|
7
7
|
export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
|
@@ -14,7 +14,12 @@ export declare function isMobile(mobile: string): boolean;
|
|
14
14
|
export declare function parseBirthday(birthday: string): AgeContext;
|
15
15
|
export declare function parseIdCard(idCardNo: string): IdCardParseInfo;
|
16
16
|
export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
|
17
|
-
export declare function
|
17
|
+
export declare function traverseDependKey(dependKeys: ArrayAble<string> | Record<string, string> | ArrayAble<{
|
18
|
+
paramName: string;
|
19
|
+
paramValue: string;
|
20
|
+
}>, handler: {
|
21
|
+
(dependKey: string, valueKey: string): void;
|
22
|
+
}): void;
|
18
23
|
export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema) => void): void;
|
19
24
|
export declare function uuidGenerator(): string;
|
20
25
|
export declare function createSlot(renderer: unknown, props: any): Record<string, () => ArrayAble<VNode>> | {
|
@@ -28,3 +33,4 @@ export declare function queryInput(decoratorElement?: HTMLElement | null): {
|
|
28
33
|
export declare function getParentLinebar(key: string, fieldList: FieldItem[]): string | null;
|
29
34
|
export declare function createLinebarId(id: string): string;
|
30
35
|
export declare function fieldKeyEscape(fieldList: FieldItem[]): string;
|
36
|
+
export declare function createInputSlot(props: AnyObject): import("vue").ComputedRef<Record<string, FunctionalComponent<{}, {}>>>;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { inject, provide, computed, createVNode, Fragment } from 'vue';
|
2
|
+
import { isArray, isObject, isString, isFunction } from 'lodash-es';
|
2
3
|
import { FIELD_SEX_VALUE } from '../constants/index.js';
|
3
4
|
import { isField } from '@formily/core';
|
4
5
|
import differenceInDays from '../../../../node_modules/date-fns/esm/differenceInDays/index.js';
|
5
6
|
import differenceInMonths from '../../../../node_modules/date-fns/esm/differenceInMonths/index.js';
|
6
7
|
import differenceInYears from '../../../../node_modules/date-fns/esm/differenceInYears/index.js';
|
7
8
|
import '../../../../node_modules/date-fns/esm/parse/_lib/parsers/index.js';
|
8
|
-
import { inject, provide } from 'vue';
|
9
9
|
|
10
10
|
function formRenderLog(message, type = "log") {
|
11
11
|
console[type](`[FormRender]: ${message}`);
|
@@ -16,7 +16,9 @@ function arrayed(maybeArray) {
|
|
16
16
|
return [maybeArray];
|
17
17
|
}
|
18
18
|
function assignUpdateValue(props, field) {
|
19
|
-
const _props = {
|
19
|
+
const _props = {
|
20
|
+
...props
|
21
|
+
};
|
20
22
|
if (isField(field)) {
|
21
23
|
Object.assign(_props, {
|
22
24
|
"onUpdate:value"(value) {
|
@@ -69,17 +71,29 @@ function injectOrProvide(key, creator) {
|
|
69
71
|
}
|
70
72
|
return injected;
|
71
73
|
}
|
72
|
-
function
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
function traverseDependKey(dependKeys, handler) {
|
75
|
+
if (!dependKeys)
|
76
|
+
return;
|
77
|
+
Object.entries(createDependKeyMap()).forEach(([dependKey, valueKey]) => {
|
78
|
+
handler(dependKey, valueKey);
|
79
|
+
});
|
80
|
+
function createDependKeyMap() {
|
81
|
+
let result = {};
|
82
|
+
if (isArray(dependKeys)) {
|
83
|
+
dependKeys.forEach((k) => {
|
84
|
+
if (isObject(k)) {
|
85
|
+
result[k.paramName] = k.paramValue;
|
86
|
+
} else {
|
87
|
+
result[k] = k;
|
88
|
+
}
|
89
|
+
});
|
90
|
+
} else if (isObject(dependKeys)) {
|
91
|
+
result = dependKeys;
|
92
|
+
} else if (isString(dependKeys)) {
|
93
|
+
result[dependKeys] = dependKeys;
|
94
|
+
}
|
95
|
+
return result;
|
81
96
|
}
|
82
|
-
return result;
|
83
97
|
}
|
84
98
|
function traverseSchema(schema, handler) {
|
85
99
|
handler(schema);
|
@@ -142,5 +156,17 @@ function createLinebarId(id) {
|
|
142
156
|
function fieldKeyEscape(fieldList) {
|
143
157
|
return fieldList.map((f) => f.val_key).join("-").replace(/[.]/g, "_");
|
144
158
|
}
|
159
|
+
function createInputSlot(props) {
|
160
|
+
return computed(() => {
|
161
|
+
const res = {};
|
162
|
+
if (props.prefix) {
|
163
|
+
res.prefix = () => createVNode(Fragment, null, [createSlot(props.prefix, props).default()]);
|
164
|
+
}
|
165
|
+
if (props.suffix) {
|
166
|
+
res.suffix = () => createVNode(Fragment, null, [createSlot(props.suffix, props).default()]);
|
167
|
+
}
|
168
|
+
return res;
|
169
|
+
});
|
170
|
+
}
|
145
171
|
|
146
|
-
export { arrayed, assignUpdateValue, createLinebarId, createSlot, fieldKeyEscape, formRenderLog,
|
172
|
+
export { arrayed, assignUpdateValue, createInputSlot, createLinebarId, createSlot, fieldKeyEscape, formRenderLog, getParentLinebar, injectOrProvide, isIdCard, isMobile, parseBirthday, parseIdCard, queryDecorator, queryInput, transformDateFormat, traverseDependKey, traverseSchema, uuidGenerator };
|
package/es/packages/index.css
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
margin-top: 6px;
|
19
19
|
}
|
20
20
|
.big-table-filter-wrap .sort-item {
|
21
|
-
|
21
|
+
height: 32px;
|
22
22
|
padding: 0 13px;
|
23
23
|
display: flex;
|
24
24
|
align-items: center;
|
@@ -97,7 +97,7 @@
|
|
97
97
|
}
|
98
98
|
.big-table-filter-wrap .checkbox-btn-wrap {
|
99
99
|
display: flex;
|
100
|
-
padding: 9px 10px
|
100
|
+
padding: 9px 10px 9px 14px;
|
101
101
|
}
|
102
102
|
.big-table-filter-wrap .checkbox-btn-wrap .checkbox-btn {
|
103
103
|
width: 56px;
|
@@ -131,6 +131,16 @@
|
|
131
131
|
width: 25px;
|
132
132
|
height: 20px;
|
133
133
|
}
|
134
|
+
.big-table__separate {
|
135
|
+
padding: 4px;
|
136
|
+
}
|
137
|
+
.big-table__separatePlaceholder {
|
138
|
+
display: inline-block;
|
139
|
+
visibility: hidden;
|
140
|
+
max-width: 0;
|
141
|
+
word-break: keep-all;
|
142
|
+
width: 0;
|
143
|
+
}
|
134
144
|
body > .vxe-table--tooltip-wrapper {
|
135
145
|
display: none !important;
|
136
146
|
}
|
@@ -1405,26 +1405,22 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
1405
1405
|
readonly tooltip: boolean | import("naive-ui").PopoverProps;
|
1406
1406
|
}>;
|
1407
1407
|
SlotRender: import("vue").DefineComponent<{
|
1408
|
-
functional: BooleanConstructor;
|
1409
1408
|
renderer: {
|
1410
|
-
type: (
|
1409
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../es/src/types").Func<any[], any>>;
|
1411
1410
|
required: true;
|
1412
1411
|
};
|
1413
1412
|
rootSlots: {
|
1414
1413
|
type: import("vue").PropType<Record<string, import("../../../es/src/types").Func<any[], any>>>;
|
1415
1414
|
};
|
1416
1415
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1417
|
-
functional: BooleanConstructor;
|
1418
1416
|
renderer: {
|
1419
|
-
type: (
|
1417
|
+
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../es/src/types").Func<any[], any>>;
|
1420
1418
|
required: true;
|
1421
1419
|
};
|
1422
1420
|
rootSlots: {
|
1423
1421
|
type: import("vue").PropType<Record<string, import("../../../es/src/types").Func<any[], any>>>;
|
1424
1422
|
};
|
1425
|
-
}>>, {
|
1426
|
-
functional: boolean;
|
1427
|
-
}>;
|
1423
|
+
}>>, {}>;
|
1428
1424
|
HiddenContent: import("vue").DefineComponent<{
|
1429
1425
|
content: {
|
1430
1426
|
type: StringConstructor;
|
@@ -1406,26 +1406,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
1406
1406
|
readonly tooltip: boolean | import("naive-ui").PopoverProps;
|
1407
1407
|
}>;
|
1408
1408
|
SlotRender: import("vue").DefineComponent<{
|
1409
|
-
functional: BooleanConstructor;
|
1410
1409
|
renderer: {
|
1411
|
-
type: (
|
1410
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../es/src/types").Func<any[], any>>;
|
1412
1411
|
required: true;
|
1413
1412
|
};
|
1414
1413
|
rootSlots: {
|
1415
1414
|
type: PropType<Record<string, import("../../../../es/src/types").Func<any[], any>>>;
|
1416
1415
|
};
|
1417
1416
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
1418
|
-
functional: BooleanConstructor;
|
1419
1417
|
renderer: {
|
1420
|
-
type: (
|
1418
|
+
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../../es/src/types").Func<any[], any>>;
|
1421
1419
|
required: true;
|
1422
1420
|
};
|
1423
1421
|
rootSlots: {
|
1424
1422
|
type: PropType<Record<string, import("../../../../es/src/types").Func<any[], any>>>;
|
1425
1423
|
};
|
1426
|
-
}>>, {
|
1427
|
-
functional: boolean;
|
1428
|
-
}>;
|
1424
|
+
}>>, {}>;
|
1429
1425
|
HiddenContent: import("vue").DefineComponent<{
|
1430
1426
|
content: {
|
1431
1427
|
type: StringConstructor;
|
@@ -1,24 +1,20 @@
|
|
1
1
|
import { Func } from '../../../../es/src/types';
|
2
|
-
import { PropType } from 'vue';
|
2
|
+
import { Component, PropType } from 'vue';
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
|
-
functional: BooleanConstructor;
|
5
4
|
renderer: {
|
6
|
-
type: (
|
5
|
+
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
|
7
6
|
required: true;
|
8
7
|
};
|
9
8
|
rootSlots: {
|
10
9
|
type: PropType<Record<string, Func<any[], any>>>;
|
11
10
|
};
|
12
11
|
}, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
13
|
-
functional: BooleanConstructor;
|
14
12
|
renderer: {
|
15
|
-
type: (
|
13
|
+
type: PropType<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
|
16
14
|
required: true;
|
17
15
|
};
|
18
16
|
rootSlots: {
|
19
17
|
type: PropType<Record<string, Func<any[], any>>>;
|
20
18
|
};
|
21
|
-
}>>, {
|
22
|
-
functional: boolean;
|
23
|
-
}>;
|
19
|
+
}>>, {}>;
|
24
20
|
export default _default;
|