cnhis-design-vue 3.1.21-beta.0 → 3.1.21-beta.2
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/index.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -1
- package/es/components/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +3 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
- package/es/components/form-render/src/hooks/useBusinessBinding2.js +12 -1
- package/package.json +2 -2
|
@@ -713,7 +713,7 @@ declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
713
713
|
setGroupTreeExpand: () => void;
|
|
714
714
|
resetTableInlineEditStatus: () => false | undefined;
|
|
715
715
|
renderAnnotation: (columnConfig: import("../../../es/shared/types").AnyObject) => JSX.Element | null;
|
|
716
|
-
toolTipTitle: (item: any, type: any) => any[] | (() => any
|
|
716
|
+
toolTipTitle: (item: any, type: any) => any[] | (() => any);
|
|
717
717
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
718
718
|
getOtherConfigInit: () => any;
|
|
719
719
|
refreshTable: () => void;
|
|
@@ -711,7 +711,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
711
711
|
setGroupTreeExpand: () => void;
|
|
712
712
|
resetTableInlineEditStatus: () => false | undefined;
|
|
713
713
|
renderAnnotation: (columnConfig: import("../../../shared/types").AnyObject) => JSX.Element | null;
|
|
714
|
-
toolTipTitle: (item: any, type: any) => any[] | (() => any
|
|
714
|
+
toolTipTitle: (item: any, type: any) => any[] | (() => any);
|
|
715
715
|
triggerExpand: (e: any, isExpand: any) => void;
|
|
716
716
|
getOtherConfigInit: () => any;
|
|
717
717
|
refreshTable: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, nextTick, createVNode, h, resolveComponent, Teleport, createTextVNode, watch, openBlock, createElementBlock, Fragment, createBlock, unref, withCtx, renderList, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, mergeProps, renderSlot, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { isFunction, isArray } from 'lodash-es';
|
|
3
3
|
import bigTableState from './bigTableState2.js';
|
|
4
4
|
import bigTableProps from './bigTableProps2.js';
|
|
5
5
|
import bigTableEmits from './bigTableEmits2.js';
|
|
@@ -970,6 +970,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
970
970
|
if (name && tooltipTitle && name !== tooltipTitle) {
|
|
971
971
|
isAlias = !!tooltipTitle;
|
|
972
972
|
}
|
|
973
|
+
if (isFunction(item.headerSlotFn))
|
|
974
|
+
return () => item.headerSlotFn(item);
|
|
973
975
|
if (type === "format")
|
|
974
976
|
return [createVNode(script, {
|
|
975
977
|
"tooltipTitle": tooltipTitle,
|
|
@@ -10,6 +10,7 @@ export declare class BusinessCollector {
|
|
|
10
10
|
private formatter;
|
|
11
11
|
collect(type: FIELD_BUSINESS_TYPE, fieldName: string): void;
|
|
12
12
|
private getField;
|
|
13
|
+
getFieldInstanceByType(type: FIELD_BUSINESS_TYPE): import("@formily/core").GeneralField | null;
|
|
13
14
|
private getType;
|
|
14
15
|
private getValueByField;
|
|
15
16
|
getValueByType(type: FIELD_BUSINESS_TYPE): unknown;
|
|
@@ -26,6 +26,10 @@ class BusinessCollector {
|
|
|
26
26
|
getField(type) {
|
|
27
27
|
return this.typeCollector.get(type);
|
|
28
28
|
}
|
|
29
|
+
getFieldInstanceByType(type) {
|
|
30
|
+
const field = this.getField(type);
|
|
31
|
+
return field ? this.formModel.query(field).take() : null;
|
|
32
|
+
}
|
|
29
33
|
getType(fieldName) {
|
|
30
34
|
return this.fieldNameCollector.get(fieldName);
|
|
31
35
|
}
|
|
@@ -63,14 +67,21 @@ class BusinessCollector {
|
|
|
63
67
|
function useBusinessBinding() {
|
|
64
68
|
function handlerIdCardType() {
|
|
65
69
|
const idCard = this.getValueByType(FIELD_BUSINESS_TYPE.ID_CARD);
|
|
66
|
-
if (!idCard || !isString(idCard) || !isIdCard(idCard))
|
|
70
|
+
if (!idCard || !isString(idCard) || !isIdCard(idCard)) {
|
|
71
|
+
setSexDisabled.call(this, false);
|
|
67
72
|
return;
|
|
73
|
+
}
|
|
68
74
|
const info = parseIdCard(idCard);
|
|
69
75
|
const { age, ageUnit } = parseAge2FromContext(info);
|
|
70
76
|
this.setValueByType(FIELD_BUSINESS_TYPE.AGE_UNIT, ageUnit);
|
|
71
77
|
this.setValueByType(FIELD_BUSINESS_TYPE.AGE, age);
|
|
72
78
|
this.setValueByType(FIELD_BUSINESS_TYPE.SEX, info.sex);
|
|
73
79
|
this.setValueByType(FIELD_BUSINESS_TYPE.BIRTHDAY, info.birthday);
|
|
80
|
+
setSexDisabled.call(this, true);
|
|
81
|
+
function setSexDisabled(value) {
|
|
82
|
+
const sexField = this.getFieldInstanceByType(FIELD_BUSINESS_TYPE.SEX);
|
|
83
|
+
isField(sexField) && (sexField.disabled = value);
|
|
84
|
+
}
|
|
74
85
|
}
|
|
75
86
|
function handlerBirthdayType() {
|
|
76
87
|
const birthday = this.getValueByType(FIELD_BUSINESS_TYPE.BIRTHDAY);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.21-beta.
|
|
3
|
+
"version": "3.1.21-beta.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"iOS 7",
|
|
67
67
|
"last 3 iOS versions"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "b7eb6e1e2cc3c9ad58c462276bc230200a185de7"
|
|
70
70
|
}
|