@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.
Files changed (174) hide show
  1. package/.dumi/theme/builtins/Alert.tsx +19 -0
  2. package/.dumi/theme/builtins/Previewer.tsx +232 -0
  3. package/.dumi/theme/builtins/SourceCode.tsx +64 -0
  4. package/.dumi/theme/hooks/useCodeSandbox.tsx +197 -0
  5. package/.dumi/theme/hooks/useTheme.tsx +707 -0
  6. package/.dumi/theme/layouts/BasicLayout.tsx +88 -0
  7. package/.dumi/theme/layouts/components/Dark.less +157 -0
  8. package/.dumi/theme/layouts/components/Dark.tsx +78 -0
  9. package/.dumi/theme/layouts/components/Navbar.tsx +83 -0
  10. package/.dumi/theme/layouts/components/SideMenu.tsx +61 -0
  11. package/.dumi/theme/layouts/index.tsx +26 -0
  12. package/.dumi/theme/layouts/layout.less +87 -0
  13. package/.dumi/theme/typings.d.ts +7 -0
  14. package/dist/index.esm.css +122 -249
  15. package/es/ProAction/index.less +3 -2
  16. package/es/ProConfigProvider/index.d.ts +2 -0
  17. package/es/ProConfigProvider/index.js +18 -2
  18. package/es/ProDrawerForm/index.js +5 -3
  19. package/es/ProDrawerForm/style/index.less +15 -11
  20. package/es/ProEditLabel/style/index.less +2 -2
  21. package/es/ProEditTable/style/index.less +15 -8
  22. package/es/ProEditTable/utils/config.js +11 -4
  23. package/es/ProEnum/style/index.less +1 -1
  24. package/es/ProForm/components/base/RangePicker/index.js +0 -3
  25. package/es/ProForm/components/base/TextArea/index.less +1 -1
  26. package/es/ProForm/components/combination/Container/style/index.less +0 -1
  27. package/es/ProForm/components/combination/FormList/style/index.less +20 -19
  28. package/es/ProForm/components/combination/Group/index.js +2 -2
  29. package/es/ProForm/components/combination/ProAddressBar/index.js +81 -61
  30. package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  31. package/es/ProForm/components/combination/ProModalSelect/index.js +75 -13
  32. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  33. package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  34. package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  35. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  36. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  37. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  38. package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
  39. package/es/ProForm/components/render/RenderFields.js +10 -5
  40. package/es/ProForm/components/render/propsType.d.ts +5 -4
  41. package/es/ProForm/index.js +5 -0
  42. package/es/ProForm/style/index.less +55 -169
  43. package/es/ProForm/utils/useShouldUpdate.js +16 -16
  44. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
  45. package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
  46. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  47. package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  48. package/es/ProLayout/components/ProHeader/components/index.js +2 -1
  49. package/es/ProLayout/components/ProHeader/index.js +4 -2
  50. package/es/ProLayout/components/ProHeader/style/index.less +16 -7
  51. package/es/ProStep/style/index.less +0 -1
  52. package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
  53. package/es/ProTable/components/RenderColumn/index.js +41 -25
  54. package/es/ProTable/index.js +3 -2
  55. package/es/ProTable/propsType.d.ts +2 -0
  56. package/es/ProTable/style/index.less +14 -1
  57. package/es/ProTable/utils.d.ts +1 -1
  58. package/es/ProTable/utils.js +258 -201
  59. package/es/ProTabs/style/index.less +1 -1
  60. package/es/ProThemeTools/component/PrdTools/index.js +1 -1
  61. package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
  62. package/es/ProThemeTools/index.d.ts +2 -2
  63. package/es/ProThemeTools/index.js +24 -17
  64. package/es/ProThemeTools/propsType.d.ts +8 -6
  65. package/es/ProThemeTools/style/index.less +2 -2
  66. package/es/ProThemeTools/utils/index.d.ts +7 -0
  67. package/es/ProThemeTools/utils/index.js +19 -1
  68. package/es/ProTree/components/ProTree.js +1 -1
  69. package/es/ProTree/components/SearchTitle.d.ts +2 -2
  70. package/es/ProTree/components/SearchTitle.js +11 -1
  71. package/es/ProTree/components/Tree.js +6 -1
  72. package/es/ProTree/style/index.less +193 -141
  73. package/es/ProTreeModal/style/index.less +2 -6
  74. package/es/ProUpload/style/index.less +41 -39
  75. package/es/index.d.ts +2 -1
  76. package/es/index.js +2 -1
  77. package/es/locale/en_US.d.ts +69 -0
  78. package/es/locale/en_US.js +68 -0
  79. package/es/locale/index.d.ts +7 -0
  80. package/es/locale/index.js +21 -0
  81. package/es/locale/zh_CN.d.ts +69 -0
  82. package/es/locale/zh_CN.js +68 -0
  83. package/es/old/ProEditableTable/style/index.less +1 -2
  84. package/es/style/components.less +0 -1
  85. package/es/style/core/normalize.less +1 -1
  86. package/es/style/theme/antd.less +3 -4
  87. package/es/style/theme/index.less +80 -79
  88. package/es/style/theme/tokens.less +1 -0
  89. package/lib/ProAction/index.less +3 -2
  90. package/lib/ProConfigProvider/index.d.ts +2 -0
  91. package/lib/ProConfigProvider/index.js +17 -2
  92. package/lib/ProDrawerForm/index.js +5 -3
  93. package/lib/ProDrawerForm/style/index.less +15 -11
  94. package/lib/ProEditLabel/style/index.less +2 -2
  95. package/lib/ProEditTable/style/index.less +15 -8
  96. package/lib/ProEditTable/utils/config.js +11 -4
  97. package/lib/ProEnum/style/index.less +1 -1
  98. package/lib/ProForm/components/base/RangePicker/index.js +0 -3
  99. package/lib/ProForm/components/base/TextArea/index.less +1 -1
  100. package/lib/ProForm/components/combination/Container/style/index.less +0 -1
  101. package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
  102. package/lib/ProForm/components/combination/Group/index.js +2 -2
  103. package/lib/ProForm/components/combination/ProAddressBar/index.js +76 -58
  104. package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  105. package/lib/ProForm/components/combination/ProModalSelect/index.js +75 -13
  106. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  107. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  108. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  109. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  110. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  111. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
  112. package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
  113. package/lib/ProForm/components/render/RenderFields.js +9 -4
  114. package/lib/ProForm/components/render/propsType.d.ts +5 -4
  115. package/lib/ProForm/index.js +5 -0
  116. package/lib/ProForm/style/index.less +55 -169
  117. package/lib/ProForm/utils/useShouldUpdate.js +16 -16
  118. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
  119. package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
  120. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  121. package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  122. package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
  123. package/lib/ProLayout/components/ProHeader/index.js +4 -2
  124. package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
  125. package/lib/ProStep/style/index.less +0 -1
  126. package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
  127. package/lib/ProTable/components/RenderColumn/index.js +38 -24
  128. package/lib/ProTable/index.js +3 -2
  129. package/lib/ProTable/propsType.d.ts +2 -0
  130. package/lib/ProTable/style/index.less +14 -1
  131. package/lib/ProTable/utils.d.ts +1 -1
  132. package/lib/ProTable/utils.js +258 -201
  133. package/lib/ProTabs/style/index.less +1 -1
  134. package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
  135. package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
  136. package/lib/ProThemeTools/index.d.ts +2 -2
  137. package/lib/ProThemeTools/index.js +23 -16
  138. package/lib/ProThemeTools/propsType.d.ts +8 -6
  139. package/lib/ProThemeTools/style/index.less +2 -2
  140. package/lib/ProThemeTools/utils/index.d.ts +7 -0
  141. package/lib/ProThemeTools/utils/index.js +20 -2
  142. package/lib/ProTree/components/ProTree.js +1 -1
  143. package/lib/ProTree/components/SearchTitle.d.ts +2 -2
  144. package/lib/ProTree/components/SearchTitle.js +11 -1
  145. package/lib/ProTree/components/Tree.js +6 -1
  146. package/lib/ProTree/style/index.less +193 -141
  147. package/lib/ProTreeModal/style/index.less +2 -6
  148. package/lib/ProUpload/style/index.less +41 -39
  149. package/lib/index.d.ts +2 -1
  150. package/lib/index.js +13 -1
  151. package/lib/locale/en_US.d.ts +69 -0
  152. package/lib/locale/en_US.js +74 -0
  153. package/lib/locale/index.d.ts +7 -0
  154. package/lib/locale/index.js +28 -0
  155. package/lib/locale/zh_CN.d.ts +69 -0
  156. package/lib/locale/zh_CN.js +74 -0
  157. package/lib/old/ProEditableTable/style/index.less +1 -2
  158. package/lib/style/components.less +0 -1
  159. package/lib/style/core/normalize.less +1 -1
  160. package/lib/style/theme/antd.less +3 -4
  161. package/lib/style/theme/index.less +80 -79
  162. package/lib/style/theme/tokens.less +1 -0
  163. package/package.json +2 -2
  164. package/typings.d.ts +2 -0
  165. package/es/old/ProBackBtn/style/index.less +0 -19
  166. package/lib/old/ProBackBtn/style/index.less +0 -19
  167. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  168. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
  169. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  170. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
  171. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  172. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
  173. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  174. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
@@ -1,6 +1,7 @@
1
1
  .pro-action-view-tile {
2
- margin-bottom: 12px;
3
- color: #666;
2
+ margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
3
+ color : #666;
4
+
4
5
  span {
5
6
  color: #000;
6
7
  }
@@ -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: _jsxs("div", {
52
- children: [" ", props.children]
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
- > div {
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, 16px);
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, 16px);
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
- form.setFieldValue(rowName, record);
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 8:
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
- form.setFieldValue(virtualRowName, record);
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
- margin-bottom: var(--zaui-space-size-sm);
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])];
@@ -6,6 +6,6 @@ div.pro-textarea-view {
6
6
  }
7
7
  &::after {
8
8
  display: none;
9
- padding-bottom: 11px;
9
+ padding-bottom: 12px;
10
10
  }
11
11
  }
@@ -23,7 +23,6 @@
23
23
  min-width : 0;
24
24
  margin-left : -12px;
25
25
  margin-right : -12px;
26
- // margin-bottom: -22px;
27
26
 
28
27
  &>.ant-col {
29
28
  padding-left : 12px;
@@ -1,17 +1,18 @@
1
1
  .pro-form-list-block-title {
2
- height: 14px;
3
- margin: 3px 0;
4
- padding-left: 7px;
5
- font-weight: 600;
6
- line-height: 14px;
7
- border-left: 4px solid #006aff;
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: #939599;
25
+ color : @zaui-placeholder;
25
26
 
26
27
  &:hover {
27
- color: #8f8c8c;
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
- & > .ant-space-item:first-child > .ant-btn-link {
39
- margin-left: 8px;
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: 22px;
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: 4px 0;
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) {