cnhis-design-vue 3.1.35-beta.9 → 3.1.35
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/big-table/src/BigTable.vue2.js +0 -1
- package/es/components/big-table/src/hooks/useSeparateRow.js +8 -4
- package/es/components/iho-table/index.d.ts +0 -2
- package/es/components/iho-table/src/IhoTable.vue.d.ts +0 -2
- package/es/components/iho-table/src/components/IhoTableColumn.js +4 -4
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +5 -6
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +9 -8
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +3 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +6 -5
- package/es/components/info-header/index.d.ts +9 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +9 -0
- package/es/components/info-header/src/InfoHeader.vue.js +34 -27
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +10 -1
- package/package.json +2 -2
|
@@ -1170,7 +1170,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1170
1170
|
} = separateDataMap.value.get(rawRow) || {};
|
|
1171
1171
|
if (colspans) {
|
|
1172
1172
|
const colspan = colspans[column.field];
|
|
1173
|
-
column.title === "\u64CD\u4F5C" && console.log(rowIndex, colspan);
|
|
1174
1173
|
if (colspan === 0)
|
|
1175
1174
|
return {
|
|
1176
1175
|
colspan: 0,
|
|
@@ -97,6 +97,8 @@ function useSeparateRow(getColumnConfig, spanMethod, getFieldItem, $VXETable) {
|
|
|
97
97
|
return { colspan: 1, columnIndex: 0 };
|
|
98
98
|
const columnInfo = $VXETable.value.getColumnByField(field);
|
|
99
99
|
const columnIndex = $VXETable.value.getColumnIndex(columnInfo);
|
|
100
|
+
const visibleColumn = $VXETable.value.getColumns() || [];
|
|
101
|
+
const _columnIndex = visibleColumn.findIndex((column) => column.field === field);
|
|
100
102
|
const { colspan = 1 } = spanMethod({
|
|
101
103
|
column: columnInfo,
|
|
102
104
|
row,
|
|
@@ -104,15 +106,17 @@ function useSeparateRow(getColumnConfig, spanMethod, getFieldItem, $VXETable) {
|
|
|
104
106
|
$rowIndex: rowIndex,
|
|
105
107
|
_rowIndex: rowIndex,
|
|
106
108
|
columnIndex,
|
|
107
|
-
$columnIndex: columnIndex
|
|
109
|
+
$columnIndex: columnIndex,
|
|
110
|
+
_columnIndex
|
|
108
111
|
}) || {};
|
|
109
|
-
return { colspan, columnIndex };
|
|
112
|
+
return { colspan, columnIndex, _columnIndex };
|
|
110
113
|
}
|
|
111
114
|
async function getColumnRenderWidth(column, row, rowIndex) {
|
|
112
115
|
if (!isFunction(spanMethod) || !$VXETable.value)
|
|
113
116
|
return { width: await getWidth(column), colspan: 1 };
|
|
114
|
-
const { colspan, columnIndex } = getColspanInfo(column.columnName, row, rowIndex);
|
|
115
|
-
const
|
|
117
|
+
const { colspan, _columnIndex, columnIndex } = getColspanInfo(column.columnName, row, rowIndex);
|
|
118
|
+
const colIndex = _columnIndex != null ? _columnIndex : columnIndex;
|
|
119
|
+
const width = colspan <= 0 ? 0 : colspan === 1 ? await getWidth(column) : await $VXETable.value.getColumns().slice(colIndex, colIndex + colspan).reduce(async (res, columnInfo) => {
|
|
116
120
|
return await res + await getWidth({ columnName: columnInfo.field });
|
|
117
121
|
}, Promise.resolve(0));
|
|
118
122
|
return { width, colspan };
|
|
@@ -2077,7 +2077,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2077
2077
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2078
2078
|
uuid?: string | undefined;
|
|
2079
2079
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2080
|
-
isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2081
2080
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2082
2081
|
showSeq?: boolean | undefined;
|
|
2083
2082
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
@@ -4468,7 +4467,6 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4468
4467
|
params?: any;
|
|
4469
4468
|
uuid?: string | undefined;
|
|
4470
4469
|
isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4471
|
-
isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4472
4470
|
isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4473
4471
|
showSeq?: boolean | undefined;
|
|
4474
4472
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
@@ -2076,7 +2076,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2076
2076
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
|
2077
2077
|
uuid?: string | undefined;
|
|
2078
2078
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
2079
|
-
isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2080
2079
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
2081
2080
|
showSeq?: boolean | undefined;
|
|
2082
2081
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
@@ -4467,7 +4466,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4467
4466
|
params?: any;
|
|
4468
4467
|
uuid?: string | undefined;
|
|
4469
4468
|
isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
|
|
4470
|
-
isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4471
4469
|
isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
|
|
4472
4470
|
showSeq?: boolean | undefined;
|
|
4473
4471
|
selectType?: "checkbox" | "radio" | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, resolveComponent, createVNode } from 'vue';
|
|
2
|
-
import { widthAppend, arrayed } from '../../../../shared/utils/index.js';
|
|
3
|
-
import { isEmpty,
|
|
2
|
+
import { shallowOmit, widthAppend, arrayed } from '../../../../shared/utils/index.js';
|
|
3
|
+
import { isEmpty, isObject, isString, isFunction } from 'lodash-es';
|
|
4
4
|
import Annotation from '../../../annotation-edit/index.js';
|
|
5
5
|
import { NEllipsis } from 'naive-ui';
|
|
6
6
|
import { getLowCodeFieldFromField } from '../utils/index.js';
|
|
@@ -54,10 +54,10 @@ const ColumnComponent = defineComponent({
|
|
|
54
54
|
return result;
|
|
55
55
|
}
|
|
56
56
|
function renderColumn(field) {
|
|
57
|
-
return createVNode(VxeColumn,
|
|
57
|
+
return createVNode(VxeColumn, shallowOmit(field, ["slots"]), columnSlot(field));
|
|
58
58
|
}
|
|
59
59
|
function renderColumnGroup(group, children) {
|
|
60
|
-
return createVNode(VxeColumnGroup,
|
|
60
|
+
return createVNode(VxeColumnGroup, shallowOmit(group, ["children"]), {
|
|
61
61
|
default: () => children.map((child) => createVNode(ColumnComponent, {
|
|
62
62
|
"field": child,
|
|
63
63
|
"annotation": props.annotation
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { shallowOmit } from '../../../../../shared/utils/index.js';
|
|
1
2
|
import { ref, watch, unref } from 'vue';
|
|
2
3
|
import { useThrottleFn } from '@vueuse/core';
|
|
3
|
-
import { cloneDeep
|
|
4
|
+
import { cloneDeep } from 'lodash-es';
|
|
4
5
|
|
|
5
6
|
function flatFieldList(fieldList, _flatFieldList) {
|
|
6
7
|
fieldList.forEach((field) => {
|
|
7
8
|
var _a;
|
|
8
9
|
if ((_a = field.children) == null ? void 0 : _a.length) {
|
|
9
|
-
const temp = cloneDeep(field);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
width: 0
|
|
13
|
-
});
|
|
10
|
+
const temp = shallowOmit(cloneDeep(field), ["children"]);
|
|
11
|
+
temp.width = 0;
|
|
12
|
+
_flatFieldList.push(temp);
|
|
14
13
|
flatFieldList(field.children, _flatFieldList);
|
|
15
14
|
} else {
|
|
16
15
|
isVisible(field) && _flatFieldList.push(field);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isFunction, cloneDeep, isObject } from 'lodash-es';
|
|
2
2
|
import { toRaw, h } from 'vue';
|
|
3
3
|
import { HIGHEST_PRIORITY, IHO_TABLE_FIXED_STATUS, WIDGET_TYPE } from '../../constants/index.js';
|
|
4
4
|
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
@@ -15,13 +15,13 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
15
15
|
const result = {
|
|
16
16
|
className: _field.bold ? "iho-table__boldCell" : "",
|
|
17
17
|
field: _field.columnName,
|
|
18
|
-
showOverflow:
|
|
18
|
+
showOverflow: "tooltip",
|
|
19
19
|
visible: IhoTableStatusHelper.notNegative(_field.isShow),
|
|
20
20
|
minWidth: _field.colWidth,
|
|
21
21
|
sortable: IhoTableStatusHelper.isPositive(_field.isSort),
|
|
22
|
-
title: _field.alias || _field.title,
|
|
23
22
|
fixed: IHO_TABLE_FIXED_STATUS[_field.isFixed],
|
|
24
|
-
...
|
|
23
|
+
..._field,
|
|
24
|
+
title: _field.alias || _field.title
|
|
25
25
|
};
|
|
26
26
|
slotsAdaptor(result, _field);
|
|
27
27
|
settingObjAdaptor(result, _field, config);
|
|
@@ -32,16 +32,18 @@ function lowCodeFieldAdaptorPlugin() {
|
|
|
32
32
|
}
|
|
33
33
|
function slotsAdaptor(fieldItem, lowCodeField) {
|
|
34
34
|
const slots = {
|
|
35
|
-
...lowCodeField.slots,
|
|
36
35
|
default: lowCodeField.slotFn,
|
|
37
|
-
header: lowCodeField.headerSlotFn
|
|
36
|
+
header: lowCodeField.headerSlotFn,
|
|
37
|
+
edit: lowCodeField.editSlotFn,
|
|
38
|
+
...lowCodeField.slots
|
|
38
39
|
};
|
|
39
40
|
if (isFunction(lowCodeField.checkEditStatus)) {
|
|
40
41
|
const { default: defaultSlot } = slots;
|
|
41
42
|
if (isFunction(defaultSlot)) {
|
|
42
43
|
slots.default = (payload) => {
|
|
43
|
-
if (!lowCodeField.checkEditStatus(payload))
|
|
44
|
+
if (!lowCodeField.checkEditStatus(payload)) {
|
|
44
45
|
return [h("span", null, getDefaultValue(payload.row, payload.column.editRender.props))];
|
|
46
|
+
}
|
|
45
47
|
return defaultSlot(payload);
|
|
46
48
|
};
|
|
47
49
|
}
|
|
@@ -53,7 +55,6 @@ function settingObjAdaptor(fieldItem, lowCodeField, config) {
|
|
|
53
55
|
const props = cloneDeep(toRaw(lowCodeField));
|
|
54
56
|
props.componentProps = {
|
|
55
57
|
size: config.size === "mini" ? "small" : config.size,
|
|
56
|
-
options: lowCodeField.options,
|
|
57
58
|
...props.componentProps
|
|
58
59
|
};
|
|
59
60
|
fieldItem.editRender = {
|
|
@@ -43,7 +43,9 @@ function selectRendererPlugin() {
|
|
|
43
43
|
column,
|
|
44
44
|
$rowIndex
|
|
45
45
|
}) => {
|
|
46
|
-
return [createVNode(EditSelect, mergeProps(
|
|
46
|
+
return [createVNode(EditSelect, mergeProps({
|
|
47
|
+
"options": fieldItem.options
|
|
48
|
+
}, fieldItem.componentProps, {
|
|
47
49
|
"column": column,
|
|
48
50
|
"row": row,
|
|
49
51
|
"row-index": $rowIndex,
|
|
@@ -9,7 +9,7 @@ function getDefaultValue(row, item) {
|
|
|
9
9
|
var _a2;
|
|
10
10
|
return ((_a2 = options == null ? void 0 : options.find((v) => v.value == value2)) == null ? void 0 : _a2.label) || value2 || "";
|
|
11
11
|
};
|
|
12
|
-
return findValue(((_a = item.componentProps) == null ? void 0 : _a.options) || []);
|
|
12
|
+
return findValue(((_a = item.componentProps) == null ? void 0 : _a.options) || item.options || []);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -14,7 +14,6 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
14
14
|
}> & Partial<{
|
|
15
15
|
uuid: string;
|
|
16
16
|
isTree: MaybeString<0 | 1 | 2 | 3>;
|
|
17
|
-
isSort: MaybeString<0 | 1>;
|
|
18
17
|
isBatchSelect: MaybeString<0 | 1>;
|
|
19
18
|
showSeq: boolean;
|
|
20
19
|
selectType: Exclude<VxeTableDefines.ColumnInfo['type'], 'seq' | 'expand' | 'html'>;
|
|
@@ -53,7 +52,6 @@ export declare type LowCodeTableFieldItem = {
|
|
|
53
52
|
[K: string]: unknown;
|
|
54
53
|
} & Partial<{
|
|
55
54
|
id: number | string;
|
|
56
|
-
title: string;
|
|
57
55
|
alias: string;
|
|
58
56
|
isFixed: 0 | 1 | 2;
|
|
59
57
|
colWidth: VxeTableDefines.ColumnInfo['width'];
|
|
@@ -64,18 +62,21 @@ export declare type LowCodeTableFieldItem = {
|
|
|
64
62
|
formType: string;
|
|
65
63
|
fieldSetting: string;
|
|
66
64
|
componentProps: AnyObject;
|
|
67
|
-
showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
|
|
68
65
|
options: AnyObject[];
|
|
69
66
|
annotation: boolean;
|
|
70
|
-
slots: IhoTableFieldItem['slots'];
|
|
71
67
|
slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
|
|
72
68
|
headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
|
|
69
|
+
editSlotFn: NonNullable<IhoTableFieldItem['slots']>['edit'];
|
|
73
70
|
filterDefaultValue: Partial<{
|
|
74
71
|
checked: string[];
|
|
75
72
|
sortStatus: null | 'asc' | 'desc';
|
|
76
73
|
}>;
|
|
74
|
+
/**
|
|
75
|
+
* 即将被废弃,请使用表格外层的beforeEditMethod属性
|
|
76
|
+
* @deprecated
|
|
77
|
+
*/
|
|
77
78
|
checkEditStatus: (payload: VxeTableDefines.CellRenderBodyParams) => boolean | void;
|
|
78
|
-
}> & Partial<
|
|
79
|
+
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
79
80
|
export declare type IhoTableFormChangePayload = {
|
|
80
81
|
column: IhoTableFieldItem;
|
|
81
82
|
row: AnyObject;
|
|
@@ -10,6 +10,8 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10
10
|
};
|
|
11
11
|
patientInfo: {
|
|
12
12
|
type: import("vue").PropType<Partial<{
|
|
13
|
+
avatar: string;
|
|
14
|
+
avatarProps: string;
|
|
13
15
|
name: string;
|
|
14
16
|
sex: string;
|
|
15
17
|
age: string;
|
|
@@ -66,6 +68,8 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
66
68
|
};
|
|
67
69
|
patientInfo: {
|
|
68
70
|
type: import("vue").PropType<Partial<{
|
|
71
|
+
avatar: string;
|
|
72
|
+
avatarProps: string;
|
|
69
73
|
name: string;
|
|
70
74
|
sex: string;
|
|
71
75
|
age: string;
|
|
@@ -185,6 +189,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
185
189
|
}>;
|
|
186
190
|
NTag: any;
|
|
187
191
|
NScrollbar: any;
|
|
192
|
+
NImage: any;
|
|
188
193
|
SlotRender: import("vue").DefineComponent<{
|
|
189
194
|
renderer: {
|
|
190
195
|
type: import("vue").PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("../../../es/shared/types").Func<any[], any>>;
|
|
@@ -328,6 +333,8 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
328
333
|
};
|
|
329
334
|
patientInfo: {
|
|
330
335
|
type: import("vue").PropType<Partial<{
|
|
336
|
+
avatar: string;
|
|
337
|
+
avatarProps: string;
|
|
331
338
|
name: string;
|
|
332
339
|
sex: string;
|
|
333
340
|
age: string;
|
|
@@ -379,6 +386,8 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
379
386
|
}, {
|
|
380
387
|
separator: string;
|
|
381
388
|
patientInfo: Partial<{
|
|
389
|
+
avatar: string;
|
|
390
|
+
avatarProps: string;
|
|
382
391
|
name: string;
|
|
383
392
|
sex: string;
|
|
384
393
|
age: string;
|
|
@@ -19,6 +19,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
};
|
|
20
20
|
patientInfo: {
|
|
21
21
|
type: PropType<Partial<{
|
|
22
|
+
avatar: string;
|
|
23
|
+
avatarProps: string;
|
|
22
24
|
name: string;
|
|
23
25
|
sex: string;
|
|
24
26
|
age: string;
|
|
@@ -73,6 +75,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
75
|
};
|
|
74
76
|
patientInfo: {
|
|
75
77
|
type: PropType<Partial<{
|
|
78
|
+
avatar: string;
|
|
79
|
+
avatarProps: string;
|
|
76
80
|
name: string;
|
|
77
81
|
sex: string;
|
|
78
82
|
age: string;
|
|
@@ -179,6 +183,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
179
183
|
}>;
|
|
180
184
|
NTag: any;
|
|
181
185
|
NScrollbar: any;
|
|
186
|
+
NImage: any;
|
|
182
187
|
SlotRender: import("vue").DefineComponent<{
|
|
183
188
|
renderer: {
|
|
184
189
|
type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | Func<any[], any>>;
|
|
@@ -322,6 +327,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
322
327
|
};
|
|
323
328
|
patientInfo: {
|
|
324
329
|
type: PropType<Partial<{
|
|
330
|
+
avatar: string;
|
|
331
|
+
avatarProps: string;
|
|
325
332
|
name: string;
|
|
326
333
|
sex: string;
|
|
327
334
|
age: string;
|
|
@@ -371,6 +378,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
371
378
|
}, {
|
|
372
379
|
separator: string;
|
|
373
380
|
patientInfo: Partial<{
|
|
381
|
+
avatar: string;
|
|
382
|
+
avatarProps: string;
|
|
374
383
|
name: string;
|
|
375
384
|
sex: string;
|
|
376
385
|
age: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, nextTick, onMounted, watch, onBeforeUnmount, onDeactivated, onActivated, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, toDisplayString, renderList, withDirectives, createBlock,
|
|
1
|
+
import { defineComponent, computed, ref, nextTick, onMounted, watch, onBeforeUnmount, onDeactivated, onActivated, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, Fragment, createVNode, unref, mergeProps, toDisplayString, renderList, withDirectives, createBlock, withCtx, createTextVNode, vShow, resolveDynamicComponent, h } from 'vue';
|
|
2
2
|
import { isString } from 'lodash-es';
|
|
3
|
-
import { NTag, NScrollbar, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
|
3
|
+
import { NImage, NTag, NScrollbar, NDescriptions, NDescriptionsItem } from 'naive-ui';
|
|
4
4
|
import { useThrottleFn, useEventListener } from '@vueuse/core';
|
|
5
5
|
import script$1 from '../../../shared/components/SlotRender/SlotRender.js';
|
|
6
6
|
import InfoEllipsis from './InfoEllipsis.vue.js';
|
|
@@ -164,32 +164,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
164
164
|
_ctx.$slots.operation ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("v-if", true),
|
|
165
165
|
createElementVNode("section", _hoisted_3, [
|
|
166
166
|
renderSlot(_ctx.$slots, "patientModule"),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
__props.patientInfo.
|
|
174
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.patientInfo.tagList || [], (tag) => {
|
|
175
|
-
return withDirectives((openBlock(), createBlock(unref(NTag), mergeProps({
|
|
176
|
-
key: tag.content,
|
|
177
|
-
size: "medium",
|
|
178
|
-
bordered: false,
|
|
179
|
-
color: getTagColor(tag)
|
|
180
|
-
}, tag), {
|
|
181
|
-
default: withCtx(() => [
|
|
182
|
-
createTextVNode(toDisplayString(tag.content), 1)
|
|
183
|
-
]),
|
|
184
|
-
_: 2
|
|
185
|
-
}, 1040, ["color"])), [
|
|
186
|
-
[vShow, tag.content]
|
|
187
|
-
]);
|
|
188
|
-
}), 128))
|
|
167
|
+
renderSlot(_ctx.$slots, "avatarModule", {}, () => [
|
|
168
|
+
!_ctx.$slots.avatarModule ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
169
|
+
renderSlot(_ctx.$slots, "avatar", {}, () => [
|
|
170
|
+
createVNode(unref(NImage), mergeProps({
|
|
171
|
+
style: { "border-radius": "50%", "width": "40px", "height": "40px" },
|
|
172
|
+
src: __props.patientInfo.avatar
|
|
173
|
+
}, __props.patientInfo.avatarProps), null, 16, ["src"])
|
|
189
174
|
]),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
175
|
+
createElementVNode("section", null, [
|
|
176
|
+
createElementVNode("header", _hoisted_4, [
|
|
177
|
+
__props.patientInfo.name ? (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(__props.patientInfo.name), 1)) : createCommentVNode("v-if", true),
|
|
178
|
+
__props.patientInfo.sex ? (openBlock(), createElementBlock("div", _hoisted_6, "/ " + toDisplayString(__props.patientInfo.sex), 1)) : createCommentVNode("v-if", true),
|
|
179
|
+
__props.patientInfo.age ? (openBlock(), createElementBlock("div", _hoisted_7, " / " + toDisplayString(__props.patientInfo.age) + toDisplayString(__props.patientInfo.ageUnit || "\u5C81"), 1)) : createCommentVNode("v-if", true),
|
|
180
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.patientInfo.tagList || [], (tag) => {
|
|
181
|
+
return withDirectives((openBlock(), createBlock(unref(NTag), mergeProps({
|
|
182
|
+
key: tag.content,
|
|
183
|
+
size: "medium",
|
|
184
|
+
bordered: false,
|
|
185
|
+
color: getTagColor(tag)
|
|
186
|
+
}, tag), {
|
|
187
|
+
default: withCtx(() => [
|
|
188
|
+
createTextVNode(toDisplayString(tag.content), 1)
|
|
189
|
+
]),
|
|
190
|
+
_: 2
|
|
191
|
+
}, 1040, ["color"])), [
|
|
192
|
+
[vShow, tag.content]
|
|
193
|
+
]);
|
|
194
|
+
}), 128))
|
|
195
|
+
]),
|
|
196
|
+
renderSlot(_ctx.$slots, "avatarInfo")
|
|
197
|
+
])
|
|
198
|
+
], 64)) : createCommentVNode("v-if", true)
|
|
199
|
+
])
|
|
193
200
|
]),
|
|
194
201
|
createElementVNode("section", {
|
|
195
202
|
class: "c-info-header__info",
|
|
@@ -13,3 +13,4 @@ export declare function findAncestor(ele: HTMLElement | null, finder: (ele: HTML
|
|
|
13
13
|
export declare function widthAppend(value: string | number, append?: string): string;
|
|
14
14
|
export declare function targetStringIncludes(arr: string[], target: string): boolean;
|
|
15
15
|
export declare const jsonParse: import("@vueuse/core").UseMemoizedFn<any, [value: string]>;
|
|
16
|
+
export declare function shallowOmit<T, K extends Array<keyof T>>(target: T, keys: K): Omit<T, K[number]>;
|
package/es/shared/utils/index.js
CHANGED
|
@@ -149,5 +149,14 @@ const jsonParse = useMemoize(
|
|
|
149
149
|
},
|
|
150
150
|
{ getKey: (value) => value }
|
|
151
151
|
);
|
|
152
|
+
function shallowOmit(target, keys) {
|
|
153
|
+
if (!isObject(target))
|
|
154
|
+
return target;
|
|
155
|
+
const result = { ...target };
|
|
156
|
+
for (let i = 0; i < keys.length; i++) {
|
|
157
|
+
Reflect.deleteProperty(result, keys[i]);
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
152
161
|
|
|
153
|
-
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, jsonParse, safeComponentRegister, separateMetaModule, targetStringIncludes, traverse, uuidGenerator, widthAppend };
|
|
162
|
+
export { DMZ, arrayed, deepOmit, findAncestor, generateTimeFormat, getStringWidth, jsonParse, safeComponentRegister, separateMetaModule, shallowOmit, targetStringIncludes, traverse, uuidGenerator, widthAppend };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.35
|
|
3
|
+
"version": "3.1.35",
|
|
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": "aaa5ebb047af4fcf32f1a2947f360b1d9015b8e4"
|
|
65
65
|
}
|