@zat-design/sisyphus-react 4.6.1-beta.3 → 4.6.1-beta.4
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/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProEditTable/components/RenderField/index.js +2 -1
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +3 -2
- package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/es/ProForm/components/combination/FormList/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/FormList/style/index.less +17 -0
- package/es/ProLayout/components/ProCollapse/style/index.less +9 -0
- package/package.json +1 -1
|
@@ -138,7 +138,8 @@ const RenderField = ({ text: value, record, index, column, config }) => {
|
|
|
138
138
|
lastFieldProps = dynamicProps.fieldProps ?? fieldProps(rowData, reactiveParams);
|
|
139
139
|
}
|
|
140
140
|
if (isFunction(rules)) {
|
|
141
|
-
|
|
141
|
+
const canReuseDynamicRules = isRecordShallowEqual(dynamicProps.rowSnapshot, rowData);
|
|
142
|
+
lastRules = canReuseDynamicRules ? dynamicProps.rules ?? rules(rowData, reactiveParams) : rules(rowData, reactiveParams);
|
|
142
143
|
}
|
|
143
144
|
if (isFunction(valueType)) {
|
|
144
145
|
lastValueType = dynamicProps.valueType ?? valueType(currentValue, rowData, {
|
|
@@ -43,8 +43,9 @@ const useShouldUpdateForTable = (props) => {
|
|
|
43
43
|
}
|
|
44
44
|
if (isFunction(column.rules)) {
|
|
45
45
|
const newRules = column.rules(values, reactiveParams);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const rulesChanged = !isEqualWith(rulesRef.current, newRules, customEqualForFunction);
|
|
47
|
+
rulesRef.current = newRules;
|
|
48
|
+
if (rulesChanged) {
|
|
48
49
|
hasChange = true;
|
|
49
50
|
}
|
|
50
51
|
} else {
|
|
@@ -30,7 +30,8 @@ const LineFields = (props) => {
|
|
|
30
30
|
className,
|
|
31
31
|
id,
|
|
32
32
|
diffConfig,
|
|
33
|
-
hideStartEndActionProps
|
|
33
|
+
hideStartEndActionProps,
|
|
34
|
+
actionAlign
|
|
34
35
|
} = props;
|
|
35
36
|
const isLess = mode === "less";
|
|
36
37
|
const {
|
|
@@ -48,6 +49,7 @@ const LineFields = (props) => {
|
|
|
48
49
|
const classnames = classNames({
|
|
49
50
|
"pro-form-list": true,
|
|
50
51
|
"pro-form-list-line": mode === "line",
|
|
52
|
+
[`pro-form-list-action-${actionAlign}`]: !!actionAlign,
|
|
51
53
|
[className]: !!className
|
|
52
54
|
});
|
|
53
55
|
const style = {
|
|
@@ -66,7 +68,7 @@ const LineFields = (props) => {
|
|
|
66
68
|
children: /* @__PURE__ */ jsx(ProIcon, { component: dragSvg, size: 20, color: "#949599" })
|
|
67
69
|
}
|
|
68
70
|
),
|
|
69
|
-
/* @__PURE__ */ jsx(Row, { gutter: isLess ? 0 : 24, children: /* @__PURE__ */ jsx(
|
|
71
|
+
/* @__PURE__ */ jsx(Row, { className: "pro-form-list-fields", gutter: isLess ? 0 : 24, children: /* @__PURE__ */ jsx(
|
|
70
72
|
MemoRenderFields,
|
|
71
73
|
{
|
|
72
74
|
columns,
|
|
@@ -62,6 +62,7 @@ export interface FormListType {
|
|
|
62
62
|
emptyBtnText?: string;
|
|
63
63
|
hideStartEndActionProps?: [boolean, boolean];
|
|
64
64
|
titlePosition?: 'top' | 'left';
|
|
65
|
+
actionAlign?: 'top' | 'center' | 'bottom';
|
|
65
66
|
className?: string;
|
|
66
67
|
}
|
|
67
68
|
export type TypeWithRef = FormListType & React.RefAttributes<FormListRefType>;
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
padding-right: @zaui-space-size-sm;
|
|
53
53
|
border: none;
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
> .pro-form-list-fields {
|
|
57
|
+
flex: 1;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
}
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
.pro-form-list-line {
|
|
@@ -63,6 +68,18 @@
|
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
|
|
71
|
+
.pro-form-list-action-top > .pro-form-list-action {
|
|
72
|
+
align-self: flex-start;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pro-form-list-action-center > .pro-form-list-action {
|
|
76
|
+
align-self: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pro-form-list-action-bottom > .pro-form-list-action {
|
|
80
|
+
align-self: flex-end;
|
|
81
|
+
}
|
|
82
|
+
|
|
66
83
|
.pro-form-list-toolbar,
|
|
67
84
|
.pro-form-list-action {
|
|
68
85
|
.@{ant-prefix}-btn-link {
|
|
@@ -36,6 +36,14 @@
|
|
|
36
36
|
border-radius: 8px !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.@{ant-prefix}-collapse-item-active {
|
|
40
|
+
&.pro-collapse-panel {
|
|
41
|
+
& > .@{ant-prefix}-collapse-header {
|
|
42
|
+
border-radius: var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px) 0 0 !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
.@{ant-prefix}-collapse-title {
|
|
40
48
|
color: var(--zaui-text, #343434);
|
|
41
49
|
font-weight: 500;
|
|
@@ -62,6 +70,7 @@
|
|
|
62
70
|
padding-bottom: 0;
|
|
63
71
|
background: var(--zaui-base-bg, #ffffff);
|
|
64
72
|
border: 1px solid #ebecee;
|
|
73
|
+
border-radius: 0 0 var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px);
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|