@zat-design/sisyphus-react 3.1.4 → 3.1.5-beta.10
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/.dumi/theme/builtins/Alert.tsx +19 -0
- package/.dumi/theme/builtins/Previewer.tsx +232 -0
- package/.dumi/theme/builtins/SourceCode.tsx +64 -0
- package/.dumi/theme/hooks/useCodeSandbox.tsx +197 -0
- package/.dumi/theme/hooks/useTheme.tsx +707 -0
- package/.dumi/theme/layouts/BasicLayout.tsx +88 -0
- package/.dumi/theme/layouts/components/Dark.less +157 -0
- package/.dumi/theme/layouts/components/Dark.tsx +78 -0
- package/.dumi/theme/layouts/components/Navbar.tsx +83 -0
- package/.dumi/theme/layouts/components/SideMenu.tsx +61 -0
- package/.dumi/theme/layouts/index.tsx +26 -0
- package/.dumi/theme/layouts/layout.less +87 -0
- package/.dumi/theme/typings.d.ts +7 -0
- package/dist/index.esm.css +122 -249
- package/es/ProAction/index.less +3 -2
- package/es/ProConfigProvider/index.d.ts +2 -0
- package/es/ProConfigProvider/index.js +18 -2
- package/es/ProDrawerForm/index.js +5 -3
- package/es/ProDrawerForm/style/index.less +15 -11
- package/es/ProEditLabel/style/index.less +2 -2
- package/es/ProEditTable/style/index.less +15 -8
- package/es/ProEditTable/utils/config.js +11 -4
- package/es/ProEnum/style/index.less +1 -1
- package/es/ProForm/components/base/RangePicker/index.js +0 -3
- package/es/ProForm/components/base/TextArea/index.less +1 -1
- package/es/ProForm/components/combination/Container/style/index.less +0 -1
- package/es/ProForm/components/combination/FormList/style/index.less +20 -19
- package/es/ProForm/components/combination/Group/index.js +2 -2
- package/es/ProForm/components/combination/ProAddressBar/index.js +81 -61
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/es/ProForm/components/render/RenderFields.js +10 -5
- package/es/ProForm/components/render/propsType.d.ts +5 -4
- package/es/ProForm/index.js +5 -0
- package/es/ProForm/style/index.less +55 -169
- package/es/ProForm/utils/useShouldUpdate.js +16 -16
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/es/ProLayout/components/ProHeader/components/index.js +2 -1
- package/es/ProLayout/components/ProHeader/index.js +4 -2
- package/es/ProLayout/components/ProHeader/style/index.less +16 -7
- package/es/ProStep/style/index.less +0 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/es/ProTable/components/RenderColumn/index.js +41 -25
- package/es/ProTable/index.js +3 -2
- package/es/ProTable/propsType.d.ts +2 -0
- package/es/ProTable/style/index.less +14 -1
- package/es/ProTable/utils.d.ts +1 -1
- package/es/ProTable/utils.js +258 -201
- package/es/ProTabs/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +1 -1
- package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/index.js +24 -17
- package/es/ProThemeTools/propsType.d.ts +8 -6
- package/es/ProThemeTools/style/index.less +2 -2
- package/es/ProThemeTools/utils/index.d.ts +7 -0
- package/es/ProThemeTools/utils/index.js +19 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.js +11 -1
- package/es/ProTree/components/Tree.js +6 -1
- package/es/ProTree/style/index.less +193 -141
- package/es/ProTreeModal/style/index.less +2 -6
- package/es/ProUpload/style/index.less +41 -39
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/locale/en_US.d.ts +69 -0
- package/es/locale/en_US.js +68 -0
- package/es/locale/index.d.ts +7 -0
- package/es/locale/index.js +21 -0
- package/es/locale/zh_CN.d.ts +69 -0
- package/es/locale/zh_CN.js +68 -0
- package/es/old/ProEditableTable/style/index.less +1 -2
- package/es/style/components.less +0 -1
- package/es/style/core/normalize.less +1 -1
- package/es/style/theme/antd.less +3 -4
- package/es/style/theme/index.less +80 -79
- package/es/style/theme/tokens.less +1 -0
- package/lib/ProAction/index.less +3 -2
- package/lib/ProConfigProvider/index.d.ts +2 -0
- package/lib/ProConfigProvider/index.js +17 -2
- package/lib/ProDrawerForm/index.js +5 -3
- package/lib/ProDrawerForm/style/index.less +15 -11
- package/lib/ProEditLabel/style/index.less +2 -2
- package/lib/ProEditTable/style/index.less +15 -8
- package/lib/ProEditTable/utils/config.js +11 -4
- package/lib/ProEnum/style/index.less +1 -1
- package/lib/ProForm/components/base/RangePicker/index.js +0 -3
- package/lib/ProForm/components/base/TextArea/index.less +1 -1
- package/lib/ProForm/components/combination/Container/style/index.less +0 -1
- package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
- package/lib/ProForm/components/combination/Group/index.js +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.js +76 -58
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/lib/ProForm/components/render/RenderFields.js +9 -4
- package/lib/ProForm/components/render/propsType.d.ts +5 -4
- package/lib/ProForm/index.js +5 -0
- package/lib/ProForm/style/index.less +55 -169
- package/lib/ProForm/utils/useShouldUpdate.js +16 -16
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
- package/lib/ProLayout/components/ProHeader/index.js +4 -2
- package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
- package/lib/ProStep/style/index.less +0 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/lib/ProTable/components/RenderColumn/index.js +38 -24
- package/lib/ProTable/index.js +3 -2
- package/lib/ProTable/propsType.d.ts +2 -0
- package/lib/ProTable/style/index.less +14 -1
- package/lib/ProTable/utils.d.ts +1 -1
- package/lib/ProTable/utils.js +258 -201
- package/lib/ProTabs/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
- package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/index.js +23 -16
- package/lib/ProThemeTools/propsType.d.ts +8 -6
- package/lib/ProThemeTools/style/index.less +2 -2
- package/lib/ProThemeTools/utils/index.d.ts +7 -0
- package/lib/ProThemeTools/utils/index.js +20 -2
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.js +11 -1
- package/lib/ProTree/components/Tree.js +6 -1
- package/lib/ProTree/style/index.less +193 -141
- package/lib/ProTreeModal/style/index.less +2 -6
- package/lib/ProUpload/style/index.less +41 -39
- package/lib/index.d.ts +2 -1
- package/lib/index.js +13 -1
- package/lib/locale/en_US.d.ts +69 -0
- package/lib/locale/en_US.js +74 -0
- package/lib/locale/index.d.ts +7 -0
- package/lib/locale/index.js +28 -0
- package/lib/locale/zh_CN.d.ts +69 -0
- package/lib/locale/zh_CN.js +74 -0
- package/lib/old/ProEditableTable/style/index.less +1 -2
- package/lib/style/components.less +0 -1
- package/lib/style/core/normalize.less +1 -1
- package/lib/style/theme/antd.less +3 -4
- package/lib/style/theme/index.less +80 -79
- package/lib/style/theme/tokens.less +1 -0
- package/package.json +2 -2
- package/typings.d.ts +2 -0
- package/es/old/ProBackBtn/style/index.less +0 -19
- package/lib/old/ProBackBtn/style/index.less +0 -19
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
package/es/ProAction/index.less
CHANGED
|
@@ -4,6 +4,7 @@ import { ProModalSelectPropsType } from '../ProForm/components/combination/ProMo
|
|
|
4
4
|
import { AddressProps } from '../ProForm/components/combination/ProAddressBar/propsType';
|
|
5
5
|
import { ProEnumConfig } from '../ProEnum/propsType';
|
|
6
6
|
export interface ProConfigState {
|
|
7
|
+
locale?: string;
|
|
7
8
|
ProEnum?: Partial<ProEnumConfig>;
|
|
8
9
|
ProSelect?: Partial<PropSelectProps> & Record<string, any>;
|
|
9
10
|
ProModalSelect?: Partial<ProModalSelectPropsType> & Record<string, any>;
|
|
@@ -19,5 +20,6 @@ export declare function useProConfig(): ConfigContext;
|
|
|
19
20
|
export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
|
|
20
21
|
export declare const ProConfigProvider: FC<{
|
|
21
22
|
value: ProConfigState;
|
|
23
|
+
locale?: string;
|
|
22
24
|
}>;
|
|
23
25
|
export default ProConfigProvider;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import "antd/es/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/es/config-provider";
|
|
1
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
5
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
4
6
|
import React, { useContext, useReducer } from 'react';
|
|
7
|
+
import zhCN from 'antd/es/locale/zh_CN';
|
|
8
|
+
import enUS from 'antd/es/locale/en_US';
|
|
5
9
|
import merge from 'lodash/merge';
|
|
6
10
|
import useEnumRequest from '../ProEnum/hooks/useEnumRequest';
|
|
11
|
+
import { setLanguage } from '../locale';
|
|
7
12
|
export var ProConfigContext = /*#__PURE__*/React.createContext({
|
|
8
13
|
state: {
|
|
9
14
|
ProEnum: {
|
|
@@ -43,13 +48,24 @@ export var ProConfigProvider = function ProConfigProvider(props) {
|
|
|
43
48
|
state = _useReducer2[0],
|
|
44
49
|
dispatch = _useReducer2[1];
|
|
45
50
|
useEnumRequest(_objectSpread(_objectSpread(_objectSpread({}, state.ProEnum), props === null || props === void 0 ? void 0 : (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.ProEnum), props === null || props === void 0 ? void 0 : (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.globalConfig), dispatch);
|
|
51
|
+
var cacheLang = localStorage.getItem('locale');
|
|
52
|
+
// 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
|
|
53
|
+
var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
|
|
54
|
+
// 如果缓存里没有语言,那么将配置的语言设置为当前系统语言
|
|
55
|
+
if (!(state === null || state === void 0 ? void 0 : state.locale) && !cacheLang && (props === null || props === void 0 ? void 0 : props.locale)) {
|
|
56
|
+
// 设置默认语言
|
|
57
|
+
setLanguage(props === null || props === void 0 ? void 0 : props.locale);
|
|
58
|
+
}
|
|
46
59
|
return _jsx(ProConfigContext.Provider, {
|
|
47
60
|
value: {
|
|
48
61
|
state: merge(state, props.value),
|
|
49
62
|
dispatch: dispatch
|
|
50
63
|
},
|
|
51
|
-
children:
|
|
52
|
-
|
|
64
|
+
children: _jsx(_ConfigProvider, {
|
|
65
|
+
locale: lang === 'en-US' ? enUS : zhCN,
|
|
66
|
+
children: _jsxs("div", {
|
|
67
|
+
children: [" ", props.children]
|
|
68
|
+
})
|
|
53
69
|
})
|
|
54
70
|
});
|
|
55
71
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
var _locale$common2;
|
|
3
4
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
5
|
import { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
5
6
|
import { ProDrawer, ProModal } from './components';
|
|
6
7
|
import ProForm from '../ProForm';
|
|
7
8
|
import { transformBySize } from './utils';
|
|
9
|
+
import locale from '../locale';
|
|
8
10
|
var ProDrawerForm = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
9
|
-
var _okText;
|
|
11
|
+
var _okText, _locale$common;
|
|
10
12
|
var visible = props.visible,
|
|
11
13
|
showType = props.showType,
|
|
12
14
|
okText = props.okText,
|
|
@@ -21,7 +23,7 @@ var ProDrawerForm = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
21
23
|
children = props.children;
|
|
22
24
|
showType = mode || showType;
|
|
23
25
|
isView = isView || disabled;
|
|
24
|
-
okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ?
|
|
26
|
+
okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ? locale === null || locale === void 0 ? void 0 : (_locale$common = locale.common) === null || _locale$common === void 0 ? void 0 : _locale$common.save : locale === null || locale === void 0 ? void 0 : locale.dialog.confirm;
|
|
25
27
|
visible = open !== null && open !== void 0 ? open : visible;
|
|
26
28
|
var width = props.width;
|
|
27
29
|
if (!width && size) {
|
|
@@ -83,7 +85,7 @@ ProDrawerForm.defaultProps = {
|
|
|
83
85
|
size: 'middle',
|
|
84
86
|
isConfirmClose: true,
|
|
85
87
|
maskClosable: false,
|
|
86
|
-
cancelText:
|
|
88
|
+
cancelText: locale === null || locale === void 0 ? void 0 : (_locale$common2 = locale.common) === null || _locale$common2 === void 0 ? void 0 : _locale$common2.cancel,
|
|
87
89
|
proFormProps: {}
|
|
88
90
|
};
|
|
89
91
|
export default ProDrawerForm;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
justify-content: center;
|
|
9
9
|
width : 32px;
|
|
10
10
|
height : 38px;
|
|
11
|
-
color: var(--zaui-global-bg, #fff);
|
|
11
|
+
color : var(--zaui-global-bg, #fff);
|
|
12
12
|
cursor : pointer;
|
|
13
13
|
|
|
14
14
|
.close-icon {
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
z-index : 1;
|
|
18
18
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
19
19
|
transform: translateZ(100px);
|
|
20
|
-
fill: var(--zaui-aide-text, #909090);
|
|
20
|
+
fill : var(--zaui-aide-text, #909090);
|
|
21
21
|
|
|
22
22
|
&:hover {
|
|
23
23
|
fill: var(--zaui-brand-active, #005AD9);
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
>div {
|
|
26
27
|
height: 20px;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
|
|
56
57
|
.pro-drawer-scrolling {
|
|
57
58
|
z-index : 1;
|
|
58
|
-
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56,56,56,0.15));
|
|
59
|
+
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
.pro-drawer-content {
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
width : 100%;
|
|
76
77
|
padding : var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
|
|
77
78
|
background-color: var(--zaui-global-bg, #fff);
|
|
78
|
-
box-shadow : 8px 2px 8px 0 var(--zaui-shadow, rgba(56,56,56,0.15));
|
|
79
|
+
box-shadow : 8px 2px 8px 0 var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
79
80
|
|
|
80
81
|
button {
|
|
81
82
|
margin-right: var(--zaui-space-size-sm, 8px);
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
padding : 0;
|
|
92
93
|
overflow-y: hidden;
|
|
93
94
|
}
|
|
95
|
+
|
|
94
96
|
.ant-drawer-content {
|
|
95
97
|
position: static;
|
|
96
98
|
}
|
|
@@ -105,15 +107,18 @@
|
|
|
105
107
|
.ant-modal-close-x {
|
|
106
108
|
.close-icon {
|
|
107
109
|
fill: var(--zaui-aide-text, #909090);
|
|
110
|
+
|
|
108
111
|
&:hover {
|
|
109
112
|
fill: var(--zaui-brand, #006aff);
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
}
|
|
117
|
+
|
|
114
118
|
.ant-modal-header {
|
|
115
119
|
padding : var(--zaui-space-size-md, 16px);
|
|
116
120
|
border-bottom: none;
|
|
121
|
+
|
|
117
122
|
.ant-modal-title {
|
|
118
123
|
font-weight: 600;
|
|
119
124
|
}
|
|
@@ -124,7 +129,7 @@
|
|
|
124
129
|
border-top: none;
|
|
125
130
|
|
|
126
131
|
.pro-modal-footer {
|
|
127
|
-
display: flex;
|
|
132
|
+
display : flex;
|
|
128
133
|
justify-content: space-between;
|
|
129
134
|
}
|
|
130
135
|
}
|
|
@@ -143,8 +148,7 @@
|
|
|
143
148
|
.pro-modal-no-footer {
|
|
144
149
|
.ant-modal-content {
|
|
145
150
|
.ant-modal-body {
|
|
146
|
-
|
|
147
|
-
padding-bottom : var(--zaui-space-size-md, 16px);
|
|
151
|
+
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
|
|
148
152
|
}
|
|
149
153
|
}
|
|
150
154
|
}
|
|
@@ -153,7 +157,7 @@
|
|
|
153
157
|
z-index: 1;
|
|
154
158
|
|
|
155
159
|
.ant-modal-header {
|
|
156
|
-
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56,56,56,0.15));
|
|
160
|
+
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
157
161
|
position : relative;
|
|
158
162
|
z-index : 1;
|
|
159
163
|
}
|
|
@@ -163,6 +167,6 @@
|
|
|
163
167
|
.ant-modal-footer {
|
|
164
168
|
position : relative;
|
|
165
169
|
z-index : 1;
|
|
166
|
-
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56,56,56,0.15));
|
|
170
|
+
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
167
171
|
}
|
|
168
|
-
}
|
|
172
|
+
}
|
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
font-size : var(--zaui-font-size-lg, 16px);
|
|
88
88
|
font-weight : 500;
|
|
89
89
|
color : var(--zaui-text, #343434);
|
|
90
|
-
margin-bottom: var(--zaui-space-size-sm, 8px);
|
|
90
|
+
margin-bottom: calc(var(--zaui-space-size-sm, 8px) * var(--zaui-size; 1));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.pro-edit-label-tip {
|
|
94
|
-
margin-bottom: var(--zaui-space-size-md
|
|
94
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
95
95
|
color : #666;
|
|
96
96
|
|
|
97
97
|
.anticon-info-circle {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
text-indent : 5px;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
.drag-wrapper {
|
|
61
61
|
display: flex;
|
|
62
62
|
.drag-icon {
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
line-height: 1;
|
|
111
111
|
content : "*";
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
&.is-required-left {
|
|
115
115
|
&::after {
|
|
116
116
|
display: none;
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
&::before {
|
|
120
120
|
position : static;
|
|
121
121
|
top : 0;
|
|
@@ -140,6 +140,13 @@
|
|
|
140
140
|
.ant-table-cell-fix-left,
|
|
141
141
|
.ant-table-cell-fix-right {
|
|
142
142
|
background-color: var(--zaui-table-header-bg, #f2f3f5);
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.ant-table-cell-fix-right-first {
|
|
148
|
+
&::after {
|
|
149
|
+
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
|
|
143
150
|
}
|
|
144
151
|
}
|
|
145
152
|
|
|
@@ -175,12 +182,12 @@
|
|
|
175
182
|
line-height: 1;
|
|
176
183
|
content : "*";
|
|
177
184
|
}
|
|
178
|
-
|
|
185
|
+
|
|
179
186
|
&.is-required-left {
|
|
180
187
|
&::after {
|
|
181
188
|
display: none;
|
|
182
189
|
}
|
|
183
|
-
|
|
190
|
+
|
|
184
191
|
&::before {
|
|
185
192
|
position : static;
|
|
186
193
|
top : 0;
|
|
@@ -282,7 +289,7 @@
|
|
|
282
289
|
}
|
|
283
290
|
|
|
284
291
|
.pro-edit-table-header {
|
|
285
|
-
margin-bottom: var(--zaui-space-size-md
|
|
292
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
286
293
|
}
|
|
287
294
|
|
|
288
295
|
.pro-edit-table-toolbar-fixed {
|
|
@@ -300,11 +307,11 @@
|
|
|
300
307
|
display: flex;
|
|
301
308
|
align-items: center;
|
|
302
309
|
padding: 0 var(--zaui-space-size-xs, 4px);
|
|
303
|
-
|
|
310
|
+
|
|
304
311
|
&:first-child {
|
|
305
312
|
padding-left: 0;
|
|
306
313
|
}
|
|
307
|
-
|
|
314
|
+
|
|
308
315
|
span:nth-child(2) {
|
|
309
316
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
310
317
|
}
|
|
@@ -7,6 +7,7 @@ import "antd/es/message/style";
|
|
|
7
7
|
import _message from "antd/es/message";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
import { PlusOutlined } from '@ant-design/icons';
|
|
10
|
+
import { set } from 'lodash';
|
|
10
11
|
import { onDelete, getRandom } from './tools';
|
|
11
12
|
export var defaultBtnNameMap = {
|
|
12
13
|
add: '添加',
|
|
@@ -62,7 +63,7 @@ export var actions = {
|
|
|
62
63
|
},
|
|
63
64
|
save: function () {
|
|
64
65
|
var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
65
|
-
var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys;
|
|
66
|
+
var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys, values;
|
|
66
67
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
67
68
|
while (1) switch (_context.prev = _context.next) {
|
|
68
69
|
case 0:
|
|
@@ -80,11 +81,14 @@ export var actions = {
|
|
|
80
81
|
} else {
|
|
81
82
|
delete record.isEditing;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
+
// 防止value引用不变, 值不更新 - (自定义组件)
|
|
85
|
+
values = form.getFieldsValue();
|
|
86
|
+
set(values, rowName, record);
|
|
87
|
+
form.setFieldsValue(values);
|
|
84
88
|
setState({
|
|
85
89
|
editingKeys: nextEditingKeys
|
|
86
90
|
});
|
|
87
|
-
case
|
|
91
|
+
case 10:
|
|
88
92
|
case "end":
|
|
89
93
|
return _context.stop();
|
|
90
94
|
}
|
|
@@ -124,7 +128,10 @@ export var actions = {
|
|
|
124
128
|
selectedRowKeys: [record.rowKey]
|
|
125
129
|
});
|
|
126
130
|
} else {
|
|
127
|
-
|
|
131
|
+
// 防止value引用不变, 值不更新 - (自定义组件)
|
|
132
|
+
var values = form.getFieldsValue();
|
|
133
|
+
set(values, virtualRowName, record);
|
|
134
|
+
form.setFieldsValue(values);
|
|
128
135
|
}
|
|
129
136
|
},
|
|
130
137
|
delete: function _delete(_ref4) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
margin-right: var(--zaui-space-size-sm);
|
|
12
|
-
|
|
12
|
+
margin-bottom: calc(var(--zaui-space-size-sm; 8px) * var(--zaui-size; 1));
|
|
13
13
|
padding: var(--zaui-space-size-xs) 10px;
|
|
14
14
|
background-color: #f5f5f5;
|
|
15
15
|
border-radius: var(--zaui-space-size-xs);
|
|
@@ -50,9 +50,6 @@ var RangePicker = function RangePicker(props) {
|
|
|
50
50
|
var _res = _objectSpread(_objectSpread({}, rest), {}, {
|
|
51
51
|
showTime: !rest.showTime && valueType === 'dateTime' || rest.showTime
|
|
52
52
|
});
|
|
53
|
-
if (_res === null || _res === void 0 ? void 0 : _res.placeholder) {
|
|
54
|
-
_res === null || _res === void 0 ? true : delete _res.placeholder;
|
|
55
|
-
}
|
|
56
53
|
// 字符串时间格式兼容
|
|
57
54
|
if (Array.isArray(_res.value) && isString(_res.value[0]) && isString(_res.value[1])) {
|
|
58
55
|
_res.value = [moment(_res.value[0]), moment(_res.value[1])];
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
.pro-form-list-block-title {
|
|
2
|
-
height: 14px;
|
|
3
|
-
margin:
|
|
4
|
-
padding-left:
|
|
5
|
-
font-weight: 600;
|
|
6
|
-
line-height: 14px;
|
|
7
|
-
border-left: 4px solid
|
|
2
|
+
height : 14px;
|
|
3
|
+
margin : @zaui-space-size-xs 0;
|
|
4
|
+
padding-left: @zaui-space-size-sm;
|
|
5
|
+
font-weight : 600;
|
|
6
|
+
line-height : 14px;
|
|
7
|
+
border-left : 4px solid @zaui-brand;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.pro-form-list {
|
|
11
|
-
display: flex;
|
|
11
|
+
display : flex;
|
|
12
12
|
padding-bottom: 0;
|
|
13
13
|
|
|
14
14
|
&.pro-form-list-last {
|
|
15
|
+
|
|
15
16
|
.pro-form-list-drag-handle,
|
|
16
17
|
.ant-form-item {
|
|
17
18
|
margin-bottom: 0 !important;
|
|
@@ -19,12 +20,12 @@
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.single-delete {
|
|
22
|
-
width: 14px !important;
|
|
23
|
+
width : 14px !important;
|
|
23
24
|
height: 14px !important;
|
|
24
|
-
color:
|
|
25
|
+
color : @zaui-placeholder;
|
|
25
26
|
|
|
26
27
|
&:hover {
|
|
27
|
-
color:
|
|
28
|
+
color: @zaui-aide-text;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -35,19 +36,19 @@
|
|
|
35
36
|
.pro-form-list-action {
|
|
36
37
|
padding-bottom: var(--zaui-height-size-md, 16px);
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
margin-left:
|
|
39
|
+
&>.ant-space-item:first-child>.ant-btn-link {
|
|
40
|
+
margin-left: @zaui-space-size-sm;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
.pro-form-list-drag-handle {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
height: @zaui-height-size-lg;
|
|
47
|
-
margin-bottom:
|
|
48
|
-
padding: 0;
|
|
45
|
+
display : flex;
|
|
46
|
+
align-items : center;
|
|
47
|
+
height : @zaui-height-size-lg;
|
|
48
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
49
|
+
padding : 0;
|
|
49
50
|
padding-right: @zaui-space-size-sm;
|
|
50
|
-
border: none;
|
|
51
|
+
border : none;
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
.pro-form-list-toolbar,
|
|
63
64
|
.pro-form-list-action {
|
|
64
65
|
.ant-btn-link {
|
|
65
|
-
padding:
|
|
66
|
+
padding: @zaui-space-size-xs 0;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
.ant-btn-text:hover {
|
|
@@ -29,7 +29,7 @@ var Group = function Group(props) {
|
|
|
29
29
|
var fieldList = [];
|
|
30
30
|
var result = columns.map(function (item) {
|
|
31
31
|
return _objectSpread(_objectSpread({
|
|
32
|
-
disabled: props === null || props === void 0 ? void 0 : props.disabled
|
|
32
|
+
disabled: Boolean(props === null || props === void 0 ? void 0 : props.disabled)
|
|
33
33
|
}, item), {}, {
|
|
34
34
|
noStyle: (space === null || space === void 0 ? void 0 : space.compact) || (space === null || space === void 0 ? void 0 : space.separator),
|
|
35
35
|
parentNames: _parentNames
|
|
@@ -43,7 +43,7 @@ var Group = function Group(props) {
|
|
|
43
43
|
columns: insertSeparator(result, space, node, otherProps),
|
|
44
44
|
fieldList: fieldList
|
|
45
45
|
};
|
|
46
|
-
}, [name, columns, space]);
|
|
46
|
+
}, [name, columns, space, props]);
|
|
47
47
|
var _className = classnames(_defineProperty({
|
|
48
48
|
'pro-group': true,
|
|
49
49
|
'pro-group-diy-width': columns.some(function (item) {
|