cnhis-design-vue 3.1.14-beta.16 → 3.1.14-beta.17
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/big-table/index.d.ts +13 -0
- package/es/packages/big-table/src/BigTable.vue.d.ts +18 -19
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +3 -0
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +1 -0
- package/es/packages/big-table/src/components/edit-form/edit-date.js +11 -3
- package/es/packages/big-table/src/components/edit-form/edit-input.js +15 -4
- package/es/packages/big-table/src/components/edit-form/edit-time.d.ts +43 -0
- package/es/packages/big-table/src/components/edit-form/edit-time.js +52 -0
- package/es/packages/big-table/src/hooks/useColumnConfigAdaptor.js +51 -12
- package/es/packages/big-table/src/hooks/useEdit.d.ts +42 -0
- package/es/packages/big-table/src/hooks/useEdit.js +2 -0
- package/es/packages/big-table/src/hooks/useFormat.js +8 -1
- package/es/packages/big-table/style/index.css +11 -0
- package/es/packages/button-print/src/utils/print.d.ts +1 -1
- package/es/packages/button-print/src/utils/print.js +4 -4
- package/es/packages/form-render/index.d.ts +0 -1
- package/es/packages/form-render/src/FormRender.js +2 -2
- package/es/packages/form-render/src/FormRender.vue.d.ts +0 -1
- package/es/packages/form-render/src/components/renderer/cascader.d.ts +4 -4
- package/es/packages/form-render/src/components/renderer/cascader.js +44 -45
- package/es/packages/form-render/src/components/renderer/combination.js +9 -9
- package/es/packages/form-render/src/components/renderer/formItem.js +1 -1
- package/es/packages/form-render/src/components/renderer/radio.d.ts +12 -4
- package/es/packages/form-render/src/components/renderer/radio.js +23 -5
- package/es/packages/form-render/src/components/renderer/select.js +45 -49
- package/es/packages/form-render/src/components/renderer/simpleComponent.d.ts +3 -2
- package/es/packages/form-render/src/hooks/useAsyncQueue.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useChangeContext.js +1 -1
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +2 -2
- package/es/packages/form-render/src/hooks/useFormItemDeps.d.ts +4 -3
- package/es/packages/form-render/src/hooks/useFormRequest.d.ts +2 -2
- package/es/packages/form-render/src/types/fieldItem.d.ts +122 -35
- package/es/packages/form-render/src/types/index.d.ts +4 -2
- package/es/packages/form-render/src/utils/index.d.ts +3 -6
- package/es/packages/index.css +14 -0
- package/es/packages/info-header/style/index.css +3 -0
- package/es/packages/shortcut-setter/index.d.ts +0 -1
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
- package/es/src/utils/anime.d.ts +1 -1
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { AnyObject, ArrayAble } from '../../../../../es/src/types';
|
|
2
|
+
import { SchemaReaction } from '@formily/json-schema/esm/types';
|
|
3
|
+
import { SchemaTypes } from '@formily/vue';
|
|
2
4
|
import { CSSProperties, VNode } from 'vue';
|
|
5
|
+
import { DependKeyType, FormCommonState } from '../../../../../es/packages/form-render';
|
|
6
|
+
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
3
7
|
export declare type ValidateItem = Partial<{
|
|
4
|
-
|
|
8
|
+
/**
|
|
9
|
+
* 业务类型
|
|
10
|
+
*/
|
|
11
|
+
obj_type: FieldBusinessType;
|
|
12
|
+
/**
|
|
13
|
+
* 校验类型
|
|
14
|
+
*/
|
|
5
15
|
vali_obj: string;
|
|
6
16
|
max_value: string | number;
|
|
7
17
|
min_value: string | number;
|
|
8
18
|
min_length: string | number;
|
|
9
19
|
max_length: string | number;
|
|
10
20
|
decimal_length: string | number;
|
|
11
|
-
regular_expression:
|
|
21
|
+
regular_expression: RegExp | string;
|
|
12
22
|
regular_error_tip: string;
|
|
13
23
|
[key: string]: any;
|
|
14
24
|
}>;
|
|
@@ -17,10 +27,6 @@ interface OptionItem {
|
|
|
17
27
|
value: any;
|
|
18
28
|
children?: OptionItem[];
|
|
19
29
|
}
|
|
20
|
-
export interface Ievent {
|
|
21
|
-
event_field: string;
|
|
22
|
-
event_type: string;
|
|
23
|
-
}
|
|
24
30
|
interface FormRendererPayload {
|
|
25
31
|
clearable: boolean;
|
|
26
32
|
disabled: boolean;
|
|
@@ -36,65 +42,146 @@ interface SwitchProperty {
|
|
|
36
42
|
describe?: string;
|
|
37
43
|
}
|
|
38
44
|
export declare type FieldItem = {
|
|
45
|
+
/**
|
|
46
|
+
* 字段的key
|
|
47
|
+
*/
|
|
39
48
|
val_key: string;
|
|
49
|
+
/**
|
|
50
|
+
* 控件类型
|
|
51
|
+
*/
|
|
40
52
|
html_type: string;
|
|
41
53
|
} & Partial<{
|
|
54
|
+
/**
|
|
55
|
+
* 是否开启批注(需要先在表单维度开启)
|
|
56
|
+
*/
|
|
42
57
|
annotation: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* 定制化字段, AGE类型控件时的单位字段
|
|
60
|
+
*/
|
|
43
61
|
val_key_unit: string;
|
|
44
|
-
|
|
62
|
+
/**
|
|
63
|
+
* 是否允许编辑('1'为允许编辑)
|
|
64
|
+
*/
|
|
65
|
+
is_edit: FormCommonState;
|
|
66
|
+
/**
|
|
67
|
+
* 控件在栅栏系统中的的宽度值, 默认为3
|
|
68
|
+
*/
|
|
45
69
|
elem_width: number;
|
|
46
|
-
|
|
47
|
-
|
|
70
|
+
/**
|
|
71
|
+
* 是否展示('1'为展示)
|
|
72
|
+
*/
|
|
73
|
+
is_show: FormCommonState;
|
|
74
|
+
/**
|
|
75
|
+
* 是否允许为空('1'为允许为空)
|
|
76
|
+
*/
|
|
77
|
+
is_null: FormCommonState;
|
|
78
|
+
/**
|
|
79
|
+
* 字段label
|
|
80
|
+
*/
|
|
48
81
|
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* 字段label(优先级比name高)
|
|
84
|
+
*/
|
|
49
85
|
alias: string;
|
|
86
|
+
/**
|
|
87
|
+
* 默认值
|
|
88
|
+
*/
|
|
50
89
|
default_val: any;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
90
|
+
/**
|
|
91
|
+
* 是否开启清空功能('0'表示开启)
|
|
92
|
+
*/
|
|
93
|
+
is_empty: FormCommonState;
|
|
94
|
+
/**
|
|
95
|
+
* 是否隐藏label('1'表示隐藏)
|
|
96
|
+
*/
|
|
97
|
+
hide_title: FormCommonState;
|
|
54
98
|
placeholder: string;
|
|
55
99
|
validate: ValidateItem;
|
|
56
100
|
option: OptionItem[];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
101
|
+
/**
|
|
102
|
+
* 用于cascader控件提供层级参数
|
|
103
|
+
*/
|
|
104
|
+
wordbook: {
|
|
105
|
+
level_num: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* switch控件,开启状态参数
|
|
109
|
+
*/
|
|
60
110
|
open: SwitchProperty;
|
|
111
|
+
/**
|
|
112
|
+
* switch控件,关闭状态参数
|
|
113
|
+
*/
|
|
61
114
|
close: SwitchProperty;
|
|
115
|
+
/**
|
|
116
|
+
* date控件value格式
|
|
117
|
+
*/
|
|
62
118
|
date_format: string;
|
|
119
|
+
/**
|
|
120
|
+
* slider控件间距
|
|
121
|
+
*/
|
|
63
122
|
step_length: string | number;
|
|
64
123
|
urlConfig: Partial<{
|
|
65
124
|
url: string;
|
|
66
125
|
method: 'post' | 'get' | 'put' | 'patch' | 'delete';
|
|
67
|
-
|
|
126
|
+
/**
|
|
127
|
+
* 请求参数依赖关系
|
|
128
|
+
*/
|
|
129
|
+
dependKey: DependKeyType;
|
|
68
130
|
params: AnyObject;
|
|
69
131
|
nameKey: string;
|
|
70
132
|
valueKey: string;
|
|
71
133
|
}>;
|
|
72
|
-
|
|
73
|
-
|
|
134
|
+
/**
|
|
135
|
+
* 控件组
|
|
136
|
+
*/
|
|
137
|
+
suffixConfig: ArrayAble<FieldItem>;
|
|
138
|
+
/**
|
|
139
|
+
* 数据类型
|
|
140
|
+
*/
|
|
141
|
+
fieldType: SchemaTypes;
|
|
142
|
+
/**
|
|
143
|
+
* BUTTON/TEXT控件内容
|
|
144
|
+
*/
|
|
74
145
|
content: string | FormRenderer | Record<string, FormRenderer>;
|
|
146
|
+
/**
|
|
147
|
+
* COMBINATION控件最大表单组数量
|
|
148
|
+
*/
|
|
75
149
|
maxGroupNum: number;
|
|
76
|
-
|
|
150
|
+
/**
|
|
151
|
+
* COMBINATION控件子项
|
|
152
|
+
*/
|
|
77
153
|
children: FieldItem[];
|
|
154
|
+
/**
|
|
155
|
+
* 子项
|
|
156
|
+
*/
|
|
157
|
+
properties: FieldItem[];
|
|
158
|
+
/**
|
|
159
|
+
* 控件额外的props
|
|
160
|
+
*/
|
|
78
161
|
componentProps: AnyObject;
|
|
162
|
+
/**
|
|
163
|
+
* FormItem额外的props
|
|
164
|
+
*/
|
|
79
165
|
decoratorProps: AnyObject;
|
|
166
|
+
/**
|
|
167
|
+
* COMPLEX控件布局类型
|
|
168
|
+
*/
|
|
80
169
|
display: 'grid' | 'flex';
|
|
170
|
+
/**
|
|
171
|
+
* COMPLEX控件额外样式
|
|
172
|
+
*/
|
|
81
173
|
wrapperStyle: CSSProperties | Record<string, string>;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
selfErrors: string;
|
|
94
|
-
[key: string]: string | AnyObject;
|
|
95
|
-
}>;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
174
|
+
/**
|
|
175
|
+
* 自定义校验规则
|
|
176
|
+
* @param value 表单当前控件的值
|
|
177
|
+
* @param fieldItem 配置参数
|
|
178
|
+
* @return {void|string} 返回校验信息
|
|
179
|
+
*/
|
|
180
|
+
validator: (value: unknown, fieldItem: FieldItem) => void | string;
|
|
181
|
+
/**
|
|
182
|
+
* 表单联动配置
|
|
183
|
+
*/
|
|
184
|
+
reactions: ArrayAble<SchemaReaction>;
|
|
98
185
|
[key: string]: any;
|
|
99
186
|
}>;
|
|
100
187
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { AnyObject } from '../../../../../es/src/types';
|
|
1
|
+
import { AnyObject, ArrayAble } from '../../../../../es/src/types';
|
|
2
2
|
import { DataField, Field } from '@formily/core';
|
|
3
3
|
import { FIELD_BUSINESS_TYPE } from '../../../../../es/packages/form-render/src/constants';
|
|
4
4
|
import { FieldItem } from '../types';
|
|
5
5
|
import { AsyncQueue } from '../hooks';
|
|
6
6
|
export * from './fieldItem';
|
|
7
|
+
export declare type FormCommonState = '0' | '1';
|
|
7
8
|
export interface FieldVisitorContext {
|
|
8
9
|
field: FieldItem;
|
|
9
10
|
replace(f: FieldItem): void;
|
|
@@ -15,7 +16,7 @@ export declare type FormRequestType = 'post' | 'get' | 'patch' | 'delete' | 'put
|
|
|
15
16
|
export interface FormAsyncQueueItem {
|
|
16
17
|
key: any;
|
|
17
18
|
url: string;
|
|
18
|
-
method
|
|
19
|
+
method?: FormRequestType;
|
|
19
20
|
params?: AnyObject;
|
|
20
21
|
}
|
|
21
22
|
export declare type FormAsyncQueue = AsyncQueue<FormAsyncQueueItem, any, AnyObject[]>;
|
|
@@ -48,3 +49,4 @@ export declare type FormBusinessFilter = (payload: {
|
|
|
48
49
|
type: FIELD_BUSINESS_TYPE;
|
|
49
50
|
context?: any;
|
|
50
51
|
}) => unknown;
|
|
52
|
+
export declare type DependKeyType = ArrayAble<string> | Record<string, string> | ArrayAble<Record<'paramName' | 'paramValue', string>>;
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { FunctionalComponent, InjectionKey, VNode } from 'vue';
|
|
5
|
-
import { AgeContext, FieldItem, IdCardParseInfo } from '../types';
|
|
5
|
+
import { AgeContext, DependKeyType, 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];
|
|
8
8
|
export declare function assignUpdateValue(props: AnyObject, field: GeneralField): {
|
|
@@ -14,15 +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 traverseDependKey(dependKeys:
|
|
18
|
-
paramName: string;
|
|
19
|
-
paramValue: string;
|
|
20
|
-
}>, handler: {
|
|
17
|
+
export declare function traverseDependKey(dependKeys: DependKeyType, handler: {
|
|
21
18
|
(dependKey: string, valueKey: string): void;
|
|
22
19
|
}): void;
|
|
23
20
|
export declare function traverseSchema(schema: ISchema, handler: (_s: ISchema) => void): void;
|
|
24
21
|
export declare function uuidGenerator(): string;
|
|
25
|
-
export declare function createSlot(renderer: unknown, props:
|
|
22
|
+
export declare function createSlot(renderer: unknown, props: AnyObject): Record<string, () => ArrayAble<VNode>> | {
|
|
26
23
|
default(): any;
|
|
27
24
|
};
|
|
28
25
|
export declare function queryDecorator(key: string, wrapperElement: HTMLElement, formUUID: string): HTMLElement | null;
|
package/es/packages/index.css
CHANGED
|
@@ -396,6 +396,17 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
396
396
|
height: var(--tableImageHeight);
|
|
397
397
|
width: var(--tableImageWidth);
|
|
398
398
|
}
|
|
399
|
+
.custom-big-table .domPropsInnerHTML-span .icon-dot-custom {
|
|
400
|
+
width: 8px;
|
|
401
|
+
height: 8px;
|
|
402
|
+
-webkit-border-radius: 50%;
|
|
403
|
+
-moz-border-radius: 50%;
|
|
404
|
+
border-radius: 50%;
|
|
405
|
+
background: var(--table-icon-color);
|
|
406
|
+
display: inline-block;
|
|
407
|
+
margin-right: 6px;
|
|
408
|
+
box-shadow: 0px 2px 4px 0px var(--table-icon-shadow);
|
|
409
|
+
}
|
|
399
410
|
.custom-big-table .domPropsInnerHTML-span .icon-dot-red {
|
|
400
411
|
width: 8px;
|
|
401
412
|
height: 8px;
|
|
@@ -2774,6 +2785,9 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
2774
2785
|
display: none !important;
|
|
2775
2786
|
}
|
|
2776
2787
|
.c-info-header.is-compact .icon-double_down {
|
|
2788
|
+
transform: rotate(0deg);
|
|
2789
|
+
}
|
|
2790
|
+
.c-info-header .icon-double_down {
|
|
2777
2791
|
transform: rotate(180deg);
|
|
2778
2792
|
}
|
|
2779
2793
|
.c-info-header__hidden {
|
|
@@ -4691,7 +4691,6 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4691
4691
|
title: string;
|
|
4692
4692
|
}[]>;
|
|
4693
4693
|
formHeight: import("vue").ComputedRef<any>;
|
|
4694
|
-
scrollTo: (id: string) => Promise<void>;
|
|
4695
4694
|
onScroll: () => void;
|
|
4696
4695
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: import("..").FieldItem[]) => Promise<{
|
|
4697
4696
|
widgetElement: HTMLInputElement | null | undefined;
|
|
@@ -4691,7 +4691,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
4691
4691
|
title: string;
|
|
4692
4692
|
}[]>;
|
|
4693
4693
|
formHeight: import("vue").ComputedRef<any>;
|
|
4694
|
-
scrollTo: (id: string) => Promise<void>;
|
|
4695
4694
|
onScroll: () => void;
|
|
4696
4695
|
queryWidget: (key: string, wrapperElement: HTMLElement, fieldList: FieldItem[]) => Promise<{
|
|
4697
4696
|
widgetElement: HTMLInputElement | null | undefined;
|
package/es/src/utils/anime.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ declare const animeType: {
|
|
|
31
31
|
easeOutBounce: typeof bounceOut;
|
|
32
32
|
easeInOutBounce: (x: number) => number;
|
|
33
33
|
};
|
|
34
|
-
export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) =>
|
|
34
|
+
export declare const doAnimation: (startValue: number, endValue: number, during: number | undefined, callback: (v: number) => void, type?: keyof typeof animeType, onAnimationEnd?: ((...args: unknown[]) => void) | undefined) => void;
|
|
35
35
|
export {};
|
package/global.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as NaiveUI from 'naive-ui';
|
|
2
|
-
|
|
3
|
-
declare module 'naive-ui' {
|
|
4
|
-
// @ts-ignore
|
|
5
|
-
export const NTree: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export {};
|
|
1
|
+
import * as NaiveUI from 'naive-ui';
|
|
2
|
+
|
|
3
|
+
declare module 'naive-ui' {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
export const NTree: any;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {};
|