@zat-design/sisyphus-react 3.1.5 → 3.2.0-beta.1

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 (256) hide show
  1. package/dist/index.esm.css +176 -251
  2. package/es/ProAction/index.js +7 -5
  3. package/es/ProAction/index.less +3 -2
  4. package/es/ProConfigProvider/index.d.ts +2 -0
  5. package/es/ProConfigProvider/index.js +23 -2
  6. package/es/ProDownload/utils.js +6 -3
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +6 -4
  8. package/es/ProDrawerForm/index.js +5 -3
  9. package/es/ProDrawerForm/style/index.less +15 -11
  10. package/es/ProEditLabel/style/index.less +2 -2
  11. package/es/ProEditTable/components/ActionButton/index.js +3 -2
  12. package/es/ProEditTable/components/RenderField/index.js +2 -1
  13. package/es/ProEditTable/index.js +7 -6
  14. package/es/ProEditTable/style/index.less +15 -8
  15. package/es/ProEditTable/utils/config.d.ts +8 -8
  16. package/es/ProEditTable/utils/config.js +20 -12
  17. package/es/ProEditTable/utils/index.js +3 -2
  18. package/es/ProEnum/hooks/useEnumRequest.js +17 -10
  19. package/es/ProEnum/index.js +9 -4
  20. package/es/ProEnum/style/index.less +1 -1
  21. package/es/ProForm/components/FormFooter/index.js +16 -20
  22. package/es/ProForm/components/base/Input/index.js +4 -3
  23. package/es/ProForm/components/base/InputNumber/index.js +4 -3
  24. package/es/ProForm/components/base/RangePicker/index.js +0 -3
  25. package/es/ProForm/components/base/Select/index.js +2 -1
  26. package/es/ProForm/components/base/Switch/index.js +9 -5
  27. package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -1
  28. package/es/ProForm/components/base/TextArea/index.js +4 -2
  29. package/es/ProForm/components/base/TextArea/index.less +1 -1
  30. package/es/ProForm/components/combination/Container/style/index.less +0 -1
  31. package/es/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
  32. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
  33. package/es/ProForm/components/combination/FormList/style/index.less +20 -19
  34. package/es/ProForm/components/combination/Group/index.js +2 -2
  35. package/es/ProForm/components/combination/ProAddressBar/index.js +83 -63
  36. package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  37. package/es/ProForm/components/combination/ProModalSelect/index.js +76 -15
  38. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  39. package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  40. package/es/ProForm/components/combination/ProNumberRange/index.js +3 -2
  41. package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  42. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  43. package/es/ProForm/components/combination/ProRangeLimit/index.js +3 -7
  44. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  45. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -11
  46. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
  47. package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
  48. package/es/ProForm/components/render/Render.js +4 -2
  49. package/es/ProForm/components/render/RenderFields.js +10 -6
  50. package/es/ProForm/components/render/propsType.d.ts +5 -4
  51. package/es/ProForm/index.js +14 -2
  52. package/es/ProForm/style/index.less +77 -169
  53. package/es/ProForm/utils/index.d.ts +1 -1
  54. package/es/ProForm/utils/index.js +7 -2
  55. package/es/ProForm/utils/rulesCreator.js +2 -1
  56. package/es/ProForm/utils/useRules.js +4 -3
  57. package/es/ProForm/utils/useShouldUpdate.js +16 -16
  58. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
  59. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
  60. package/es/ProLayout/components/Layout/Notice/index.js +3 -2
  61. package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
  62. package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
  63. package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +2 -1
  64. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  65. package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  66. package/es/ProLayout/components/ProHeader/components/index.js +2 -1
  67. package/es/ProLayout/components/ProHeader/index.js +9 -6
  68. package/es/ProLayout/components/ProHeader/style/index.less +16 -7
  69. package/es/ProLayout/utils/index.js +1 -1
  70. package/es/ProSelect/index.d.ts +3 -3
  71. package/es/ProSelect/index.js +4 -2
  72. package/es/ProStep/components/Step/index.js +3 -1
  73. package/es/ProStep/style/index.less +0 -1
  74. package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
  75. package/es/ProTable/components/RenderColumn/index.js +41 -25
  76. package/es/ProTable/index.js +10 -8
  77. package/es/ProTable/propsType.d.ts +2 -0
  78. package/es/ProTable/style/index.less +14 -1
  79. package/es/ProTable/useAntdTable.d.ts +12 -4
  80. package/es/ProTable/useAntdTable.js +18 -6
  81. package/es/ProTable/utils.d.ts +1 -1
  82. package/es/ProTable/utils.js +258 -201
  83. package/es/ProTabs/style/index.less +1 -1
  84. package/es/ProThemeTools/component/PrdTools/index.js +1 -1
  85. package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
  86. package/es/ProThemeTools/index.d.ts +2 -2
  87. package/es/ProThemeTools/index.js +24 -17
  88. package/es/ProThemeTools/propsType.d.ts +8 -6
  89. package/es/ProThemeTools/style/index.less +2 -2
  90. package/es/ProThemeTools/utils/index.d.ts +7 -0
  91. package/es/ProThemeTools/utils/index.js +19 -1
  92. package/es/ProTree/components/ProTree.js +6 -5
  93. package/es/ProTree/components/SearchTitle.d.ts +2 -2
  94. package/es/ProTree/components/SearchTitle.js +11 -1
  95. package/es/ProTree/components/Tree.js +9 -2
  96. package/es/ProTree/style/index.less +193 -141
  97. package/es/ProTreeModal/components/List.js +0 -14
  98. package/es/ProTreeModal/components/Trigger.js +9 -3
  99. package/es/ProTreeModal/index.js +29 -13
  100. package/es/ProTreeModal/style/index.less +2 -6
  101. package/es/ProUpload/components/ButtonRender.js +5 -2
  102. package/es/ProUpload/components/DragRender.js +8 -8
  103. package/es/ProUpload/components/Example.js +3 -1
  104. package/es/ProUpload/components/ImageRender.js +8 -6
  105. package/es/ProUpload/index.js +8 -6
  106. package/es/ProUpload/style/index.less +41 -39
  107. package/es/index.d.ts +2 -1
  108. package/es/index.js +2 -1
  109. package/es/locale/en_US.d.ts +138 -0
  110. package/es/locale/en_US.js +137 -0
  111. package/es/locale/index.d.ts +13 -0
  112. package/es/locale/index.js +32 -0
  113. package/es/locale/zh_CN.d.ts +137 -0
  114. package/es/locale/zh_CN.js +136 -0
  115. package/es/old/ProEditableTable/style/index.less +1 -2
  116. package/es/style/components.less +0 -1
  117. package/es/style/core/normalize.less +1 -2
  118. package/es/style/theme/antd.less +3 -4
  119. package/es/style/theme/index.less +80 -79
  120. package/es/style/theme/tokens.less +1 -0
  121. package/lib/ProAction/index.js +7 -5
  122. package/lib/ProAction/index.less +3 -2
  123. package/lib/ProConfigProvider/index.d.ts +2 -0
  124. package/lib/ProConfigProvider/index.js +22 -2
  125. package/lib/ProDownload/utils.js +4 -3
  126. package/lib/ProDrawerForm/components/ProDrawer/index.js +6 -4
  127. package/lib/ProDrawerForm/index.js +5 -3
  128. package/lib/ProDrawerForm/style/index.less +15 -11
  129. package/lib/ProEditLabel/style/index.less +2 -2
  130. package/lib/ProEditTable/components/ActionButton/index.js +3 -2
  131. package/lib/ProEditTable/components/RenderField/index.js +4 -1
  132. package/lib/ProEditTable/index.js +7 -6
  133. package/lib/ProEditTable/style/index.less +15 -8
  134. package/lib/ProEditTable/utils/config.d.ts +8 -8
  135. package/lib/ProEditTable/utils/config.js +20 -12
  136. package/lib/ProEditTable/utils/index.js +3 -2
  137. package/lib/ProEnum/hooks/useEnumRequest.js +17 -10
  138. package/lib/ProEnum/index.js +9 -4
  139. package/lib/ProEnum/style/index.less +1 -1
  140. package/lib/ProForm/components/FormFooter/index.js +16 -19
  141. package/lib/ProForm/components/base/Input/index.js +4 -3
  142. package/lib/ProForm/components/base/InputNumber/index.js +4 -3
  143. package/lib/ProForm/components/base/RangePicker/index.js +1 -4
  144. package/lib/ProForm/components/base/Select/index.js +2 -1
  145. package/lib/ProForm/components/base/Switch/index.js +8 -5
  146. package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -1
  147. package/lib/ProForm/components/base/TextArea/index.js +4 -2
  148. package/lib/ProForm/components/base/TextArea/index.less +1 -1
  149. package/lib/ProForm/components/combination/Container/style/index.less +0 -1
  150. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
  151. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
  152. package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
  153. package/lib/ProForm/components/combination/Group/index.js +2 -2
  154. package/lib/ProForm/components/combination/ProAddressBar/index.js +78 -60
  155. package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
  156. package/lib/ProForm/components/combination/ProModalSelect/index.js +76 -15
  157. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
  158. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
  159. package/lib/ProForm/components/combination/ProNumberRange/index.js +3 -2
  160. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
  161. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
  162. package/lib/ProForm/components/combination/ProRangeLimit/index.js +3 -7
  163. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
  164. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -11
  165. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
  166. package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
  167. package/lib/ProForm/components/old/InputRange/index.js +0 -1
  168. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  169. package/lib/ProForm/components/render/Render.js +5 -2
  170. package/lib/ProForm/components/render/RenderFields.js +9 -5
  171. package/lib/ProForm/components/render/propsType.d.ts +5 -4
  172. package/lib/ProForm/index.js +14 -2
  173. package/lib/ProForm/style/index.less +77 -169
  174. package/lib/ProForm/utils/index.d.ts +1 -1
  175. package/lib/ProForm/utils/index.js +7 -2
  176. package/lib/ProForm/utils/rulesCreator.js +2 -1
  177. package/lib/ProForm/utils/useRules.js +4 -3
  178. package/lib/ProForm/utils/useShouldUpdate.js +16 -16
  179. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
  180. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
  181. package/lib/ProLayout/components/Layout/Notice/index.js +3 -2
  182. package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
  183. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
  184. package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +3 -1
  185. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
  186. package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
  187. package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
  188. package/lib/ProLayout/components/ProHeader/index.js +9 -6
  189. package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
  190. package/lib/ProLayout/utils/index.js +1 -1
  191. package/lib/ProSelect/index.d.ts +3 -3
  192. package/lib/ProSelect/index.js +4 -2
  193. package/lib/ProStep/components/Step/index.js +3 -1
  194. package/lib/ProStep/style/index.less +0 -1
  195. package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
  196. package/lib/ProTable/components/RenderColumn/index.js +38 -24
  197. package/lib/ProTable/components/TableResizable/index.js +8 -0
  198. package/lib/ProTable/index.js +10 -8
  199. package/lib/ProTable/propsType.d.ts +2 -0
  200. package/lib/ProTable/style/index.less +14 -1
  201. package/lib/ProTable/useAntdTable.d.ts +12 -4
  202. package/lib/ProTable/useAntdTable.js +19 -6
  203. package/lib/ProTable/utils.d.ts +1 -1
  204. package/lib/ProTable/utils.js +258 -201
  205. package/lib/ProTabs/index.js +1 -0
  206. package/lib/ProTabs/style/index.less +1 -1
  207. package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
  208. package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
  209. package/lib/ProThemeTools/index.d.ts +2 -2
  210. package/lib/ProThemeTools/index.js +24 -16
  211. package/lib/ProThemeTools/propsType.d.ts +8 -6
  212. package/lib/ProThemeTools/style/index.less +2 -2
  213. package/lib/ProThemeTools/utils/index.d.ts +7 -0
  214. package/lib/ProThemeTools/utils/index.js +20 -2
  215. package/lib/ProTree/components/ProTree.js +6 -5
  216. package/lib/ProTree/components/SearchTitle.d.ts +2 -2
  217. package/lib/ProTree/components/SearchTitle.js +11 -1
  218. package/lib/ProTree/components/Tree.js +16 -2
  219. package/lib/ProTree/index.js +0 -1
  220. package/lib/ProTree/style/index.less +193 -141
  221. package/lib/ProTreeModal/components/List.js +0 -14
  222. package/lib/ProTreeModal/components/Tree.js +1 -0
  223. package/lib/ProTreeModal/components/Trigger.js +10 -3
  224. package/lib/ProTreeModal/index.js +29 -13
  225. package/lib/ProTreeModal/style/index.less +2 -6
  226. package/lib/ProUpload/components/ButtonRender.js +5 -2
  227. package/lib/ProUpload/components/DragRender.js +8 -8
  228. package/lib/ProUpload/components/Example.js +3 -1
  229. package/lib/ProUpload/components/ImageRender.js +8 -6
  230. package/lib/ProUpload/index.js +14 -5
  231. package/lib/ProUpload/style/index.less +41 -39
  232. package/lib/index.d.ts +2 -1
  233. package/lib/index.js +13 -1
  234. package/lib/locale/en_US.d.ts +138 -0
  235. package/lib/locale/en_US.js +143 -0
  236. package/lib/locale/index.d.ts +13 -0
  237. package/lib/locale/index.js +41 -0
  238. package/lib/locale/zh_CN.d.ts +137 -0
  239. package/lib/locale/zh_CN.js +142 -0
  240. package/lib/old/ProCertValidity/index.js +1 -1
  241. package/lib/old/ProEditableTable/style/index.less +1 -2
  242. package/lib/style/components.less +0 -1
  243. package/lib/style/core/normalize.less +1 -2
  244. package/lib/style/theme/antd.less +3 -4
  245. package/lib/style/theme/index.less +80 -79
  246. package/lib/style/theme/tokens.less +1 -0
  247. package/package.json +1 -1
  248. package/typings.d.ts +2 -0
  249. package/es/old/ProBackBtn/style/index.less +0 -19
  250. package/lib/old/ProBackBtn/style/index.less +0 -19
  251. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  252. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  253. /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
  254. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
  255. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
  256. /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
@@ -11,9 +11,10 @@ import React from 'react';
11
11
  import { useSetState } from 'ahooks';
12
12
  import { isFunction } from 'lodash';
13
13
  import { ProDrawerForm } from '../index';
14
+ import locale from '../locale';
14
15
  import './index.less';
15
16
  var ProAction = function ProAction(props) {
16
- var _config$, _config$2, _config$index;
17
+ var _config$, _config$2, _locale$ProAction2, _config$index;
17
18
  var children = props.children,
18
19
  config = props.config;
19
20
  var _Form$useForm = _Form.useForm(),
@@ -29,7 +30,8 @@ var ProAction = function ProAction(props) {
29
30
  state = _useSetState2[0],
30
31
  setState = _useSetState2[1];
31
32
  if (!config || !Array.isArray(config)) {
32
- console.error('ProAction 配置 config 必须为数据');
33
+ var _locale$ProAction;
34
+ console.error(locale === null || locale === void 0 ? void 0 : (_locale$ProAction = locale.ProAction) === null || _locale$ProAction === void 0 ? void 0 : _locale$ProAction.errorMessage);
33
35
  return _jsx(_Fragment, {
34
36
  children: children
35
37
  });
@@ -66,7 +68,7 @@ var ProAction = function ProAction(props) {
66
68
  options = _ref2.options;
67
69
  transformResponse = _ref2.transformResponse;
68
70
  _context.next = 14;
69
- return service === null || service === void 0 ? void 0 : service(options);
71
+ return service === null || service === void 0 ? void 0 : service(options === null || options === void 0 ? void 0 : options.defaultParams);
70
72
  case 14:
71
73
  _context.t1 = _context.sent;
72
74
  if (_context.t1) {
@@ -92,7 +94,7 @@ var ProAction = function ProAction(props) {
92
94
  newServicesArray[currentIndex] = res.data;
93
95
  }
94
96
  case 26:
95
- options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, newServicesArray[currentIndex], options.defaultParams);
97
+ options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, newServicesArray[currentIndex], options === null || options === void 0 ? void 0 : options.defaultParams);
96
98
  if (!service) {
97
99
  newServicesArray[currentIndex] = null;
98
100
  }
@@ -166,7 +168,7 @@ var ProAction = function ProAction(props) {
166
168
  onConfirm: function onConfirm() {
167
169
  return onActionRun(0, []);
168
170
  },
169
- title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || '确认删除吗?',
171
+ title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (locale === null || locale === void 0 ? void 0 : (_locale$ProAction2 = locale.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
170
172
  children: children
171
173
  }) : ChildContent, state.open ? _jsx(ProDrawerForm, {
172
174
  open: state.open,
@@ -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: {
@@ -17,6 +22,11 @@ export function useProConfig(name) {
17
22
  var config = useContext(ProConfigContext);
18
23
  return name ? config.state[name] : config;
19
24
  }
25
+ var antdLangMap = {
26
+ 'zh-CN': zhCN,
27
+ 'en-US': enUS // en-US
28
+ };
29
+
20
30
  var reducer = function reducer(state, action) {
21
31
  var _state$ProEnum;
22
32
  switch (action.type) {
@@ -43,13 +53,24 @@ export var ProConfigProvider = function ProConfigProvider(props) {
43
53
  state = _useReducer2[0],
44
54
  dispatch = _useReducer2[1];
45
55
  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);
56
+ var cacheLang = localStorage.getItem('locale');
57
+ // 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
58
+ var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
59
+ // 如果缓存里没有语言,那么将配置的语言设置为当前系统语言
60
+ if (!(state === null || state === void 0 ? void 0 : state.locale) && !cacheLang && (props === null || props === void 0 ? void 0 : props.locale)) {
61
+ // 设置默认语言
62
+ setLanguage(props === null || props === void 0 ? void 0 : props.locale);
63
+ }
46
64
  return _jsx(ProConfigContext.Provider, {
47
65
  value: {
48
66
  state: merge(state, props.value),
49
67
  dispatch: dispatch
50
68
  },
51
- children: _jsxs("div", {
52
- children: [" ", props.children]
69
+ children: _jsx(_ConfigProvider, {
70
+ locale: antdLangMap[lang],
71
+ children: _jsxs("div", {
72
+ children: [" ", props.children]
73
+ })
53
74
  })
54
75
  });
55
76
  };
@@ -4,7 +4,10 @@ import _message from "antd/es/message";
4
4
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
5
  import _typeof from "@babel/runtime/helpers/esm/typeof";
6
6
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
7
+ /* eslint-disable no-empty */
8
+ /* eslint-disable prefer-promise-reject-errors */
7
9
  import { isFunction, get } from 'lodash';
10
+ import locale from '../locale';
8
11
  var stringify = function stringify(data) {
9
12
  var result = '';
10
13
  if (data && Object.keys(data).length) {
@@ -109,8 +112,8 @@ export var DownloadRequest = /*#__PURE__*/function () {
109
112
  _context.next = 7;
110
113
  break;
111
114
  }
112
- _message.error('请求失败!');
113
- return _context.abrupt("return", Promise.reject('请求失败!'));
115
+ _message.error("".concat(locale.ProDownload.errorMessage));
116
+ return _context.abrupt("return", Promise.reject("".concat(locale.ProDownload.errorMessage)));
114
117
  case 7:
115
118
  if (!((_data === null || _data === void 0 ? void 0 : _data.status) > 200 || (_data === null || _data === void 0 ? void 0 : _data.code) === 401)) {
116
119
  _context.next = 11;
@@ -138,7 +141,7 @@ export var DownloadRequest = /*#__PURE__*/function () {
138
141
  }
139
142
  return _context.abrupt("return", Promise.resolve(response));
140
143
  case 20:
141
- return _context.abrupt("return", Promise.reject('请求失败!'));
144
+ return _context.abrupt("return", Promise.reject("".concat(locale.ProDownload.errorMessage)));
142
145
  case 21:
143
146
  case "end":
144
147
  return _context.stop();
@@ -14,6 +14,7 @@ import { useScroll } from 'ahooks';
14
14
  import { isArray } from 'lodash';
15
15
  import { ReactSVG } from 'react-svg';
16
16
  import closeSvg from '../../../assets/close.svg';
17
+ import locale from '../../../locale';
17
18
  /**
18
19
  * 抽屉组件
19
20
  */
@@ -46,6 +47,7 @@ var ProDrawer = function ProDrawer(_ref) {
46
47
  toggleLoading = _useState2[1];
47
48
  var noRenderFooter = isView || footer === false || footer === null;
48
49
  var onConfirm = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
50
+ var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3, _locale$ProDrawerForm4;
49
51
  return _regeneratorRuntime().wrap(function _callee$(_context) {
50
52
  while (1) switch (_context.prev = _context.next) {
51
53
  case 0:
@@ -54,10 +56,10 @@ var ProDrawer = function ProDrawer(_ref) {
54
56
  } else if (!modalRef.current) {
55
57
  modalRef.current = _Modal.confirm(_objectSpread({
56
58
  className: 'width430',
57
- title: '确认关闭当前页面',
58
- okText: '确定',
59
- cancelText: '取消',
60
- content: '关闭当前页面内容不会被保存,需要点击“保存”按钮进行保存',
59
+ title: locale === null || locale === void 0 ? void 0 : (_locale$ProDrawerForm = locale.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.isSureClose,
60
+ okText: locale === null || locale === void 0 ? void 0 : (_locale$ProDrawerForm2 = locale.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.confirm,
61
+ cancelText: locale === null || locale === void 0 ? void 0 : (_locale$ProDrawerForm3 = locale.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.cancel,
62
+ content: locale === null || locale === void 0 ? void 0 : (_locale$ProDrawerForm4 = locale.ProDrawerForm) === null || _locale$ProDrawerForm4 === void 0 ? void 0 : _locale$ProDrawerForm4.secondTipsWhenSave,
61
63
  onOk: function onOk() {
62
64
  onCancel && onCancel();
63
65
  },
@@ -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$ProDrawerForm3;
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$ProDrawerForm, _locale$ProDrawerForm2;
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$ProDrawerForm = locale.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.save : locale === null || locale === void 0 ? void 0 : (_locale$ProDrawerForm2 = locale.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.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$ProDrawerForm3 = locale.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.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 {
@@ -7,6 +7,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
7
7
  import React from 'react';
8
8
  import { isFunction, omit } from 'lodash';
9
9
  import { iconMap } from '../../utils/config';
10
+ import locale from '../../../locale';
10
11
  // 渲染操作按钮
11
12
  var ActionButton = function ActionButton(_ref) {
12
13
  var _editingKeys$includes, _btnConfig$buttonProp, _btnConfig$buttonProp2, _btnConfig$buttonProp3, _btnConfig$icon;
@@ -79,8 +80,8 @@ var ActionButton = function ActionButton(_ref) {
79
80
  btnConfig.onEvent(record, index);
80
81
  },
81
82
  disabled: isDisabled,
82
- okText: "\u786E\u8BA4",
83
- cancelText: "\u53D6\u6D88",
83
+ okText: locale.ProEditTable.confirm,
84
+ cancelText: locale.ProEditTable.cancel,
84
85
  children: /*#__PURE__*/React.isValidElement(btnConfig.label) ? /*#__PURE__*/React.cloneElement(btnConfig.label, _objectSpread(_objectSpread({}, omit(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
85
86
  record: record,
86
87
  index: index,
@@ -20,6 +20,7 @@ import transformNames from '../../../ProForm/utils/transformNames';
20
20
  import { FieldProvider } from '../../../ProForm/utils/useFieldProps';
21
21
  import useRules from '../../../ProForm/utils/useRules';
22
22
  import { isSelect } from '../../../ProForm/utils';
23
+ import locale from '../../../locale';
23
24
  var RenderField = function RenderField(_ref) {
24
25
  var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4;
25
26
  var value = _ref.text,
@@ -218,7 +219,7 @@ var RenderField = function RenderField(_ref) {
218
219
  TargetComponent = viewRender;
219
220
  }
220
221
  }
221
- var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "\u8BF7\u9009\u62E9".concat(isString(label) ? label || title : '') : "\u8BF7\u8F93\u5165".concat(isString(label) ? label || title : '');
222
+ var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "".concat(locale.ProEditTable.select).concat(isString(label) ? label || title : '') : "".concat(locale.ProEditTable.enter).concat(isString(label) ? label || title : '');
222
223
  var _placeholder = (_formItemChildProps$p = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.placeholder) !== null && _formItemChildProps$p !== void 0 ? _formItemChildProps$p : defaultPlaceholder;
223
224
  var onChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onChange;
224
225
  var onFieldChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onFieldChange;
@@ -20,6 +20,7 @@ import { transformColumns } from './utils';
20
20
  import { getRandom, getNamePath } from './utils/tools';
21
21
  import { DndWrapper, Row, Validator, Summary, RenderToolbar } from './components';
22
22
  import Empty from '../assets/empty.png';
23
+ import locale from '../locale';
23
24
  var ProEditTable = function ProEditTable(_ref, ref) {
24
25
  var _resetProps$id, _resetProps$id$split, _value$2;
25
26
  var value = _ref.value,
@@ -171,8 +172,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
171
172
  src: Empty
172
173
  }), _jsx("div", {
173
174
  className: "content",
174
- children: disabled || isForbiddenBtn('add') ? '暂无数据' : _jsxs(_Fragment, {
175
- children: ["\u6682\u65E0\u6570\u636E\uFF0C", _jsx(RenderToolbar, _objectSpread({}, _objectSpread(_objectSpread({}, config), {}, {
175
+ children: disabled || isForbiddenBtn('add') ? locale.ProEditTable.noData : _jsxs(_Fragment, {
176
+ children: [locale.ProEditTable.noData, "\uFF0C", _jsx(RenderToolbar, _objectSpread({}, _objectSpread(_objectSpread({}, config), {}, {
176
177
  toolbarProps: toolbarProps === null || toolbarProps === void 0 ? void 0 : (_toolbarProps$filter = toolbarProps.filter) === null || _toolbarProps$filter === void 0 ? void 0 : _toolbarProps$filter.call(toolbarProps, function (item) {
177
178
  return item.type === 'add';
178
179
  }),
@@ -321,9 +322,9 @@ ForwardProEditTable.defaultProps = {
321
322
  disabled: false,
322
323
  draggable: false,
323
324
  stripe: true,
324
- emptyBtnText: '点击添加',
325
- onlyOneLineMsg: '请先保存数据',
326
- deletePoConfirmMsg: '您确定要删除该行数据吗?',
327
- mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
325
+ emptyBtnText: locale.ProEditTable.clickAdd,
326
+ onlyOneLineMsg: locale.ProEditTable.onlyOneLineMsg,
327
+ deletePoConfirmMsg: locale.ProEditTable.deletePoConfirmMsg,
328
+ mulDeletePoConfirmMsg: locale.ProEditTable.mulDeletePoConfirmMsg
328
329
  };
329
330
  export default ForwardProEditTable;
@@ -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
  }
@@ -1,12 +1,12 @@
1
1
  export declare const defaultBtnNameMap: {
2
- add: string;
3
- edit: string;
4
- copy: string;
5
- delete: string;
6
- mulDelete: string;
7
- save: string;
8
- cancel: string;
9
- custom: string;
2
+ add: any;
3
+ edit: any;
4
+ copy: any;
5
+ delete: any;
6
+ mulDelete: any;
7
+ save: any;
8
+ cancel: any;
9
+ custom: any;
10
10
  };
11
11
  export declare const iconMap: {
12
12
  add: JSX.Element;
@@ -7,16 +7,18 @@ 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';
12
+ import locale from '../../locale';
11
13
  export var defaultBtnNameMap = {
12
- add: '添加',
13
- edit: '编辑',
14
- copy: '复制',
15
- delete: '删除',
16
- mulDelete: '删除',
17
- save: '保存',
18
- cancel: '取消',
19
- custom: '自定义'
14
+ add: locale.ProEditTable.add,
15
+ edit: locale.ProEditTable.edit,
16
+ copy: locale.ProEditTable.copy,
17
+ delete: locale.ProEditTable.delete,
18
+ mulDelete: locale.ProEditTable.mulDelete,
19
+ save: locale.ProEditTable.save,
20
+ cancel: locale.ProEditTable.cancel,
21
+ custom: locale.ProEditTable.custom
20
22
  };
21
23
  // 默认按钮配置
22
24
  export var iconMap = {
@@ -62,7 +64,7 @@ export var actions = {
62
64
  },
63
65
  save: function () {
64
66
  var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
65
- var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys;
67
+ var record, editingKeys, setState, form, rowName, virtualRowName, result, updateData, nextEditingKeys, values;
66
68
  return _regeneratorRuntime().wrap(function _callee$(_context) {
67
69
  while (1) switch (_context.prev = _context.next) {
68
70
  case 0:
@@ -80,11 +82,14 @@ export var actions = {
80
82
  } else {
81
83
  delete record.isEditing;
82
84
  }
83
- form.setFieldValue(rowName, record);
85
+ // 防止value引用不变, 值不更新 - (自定义组件)
86
+ values = form.getFieldsValue();
87
+ set(values, rowName, record);
88
+ form.setFieldsValue(values);
84
89
  setState({
85
90
  editingKeys: nextEditingKeys
86
91
  });
87
- case 8:
92
+ case 10:
88
93
  case "end":
89
94
  return _context.stop();
90
95
  }
@@ -124,7 +129,10 @@ export var actions = {
124
129
  selectedRowKeys: [record.rowKey]
125
130
  });
126
131
  } else {
127
- form.setFieldValue(virtualRowName, record);
132
+ // 防止value引用不变, 值不更新 - (自定义组件)
133
+ var values = form.getFieldsValue();
134
+ set(values, virtualRowName, record);
135
+ form.setFieldsValue(values);
128
136
  }
129
137
  },
130
138
  delete: function _delete(_ref4) {
@@ -22,6 +22,7 @@ import { customValidate, getNamePath, splitNames } from './tools';
22
22
  import ProTooltip from '../../ProTooltip';
23
23
  import { RenderField, ActionButton } from '../components';
24
24
  import tipSvg from '../../assets/tip.svg';
25
+ import locale from '../../locale';
25
26
  // 渲染操作栏
26
27
  var getActionColumn = function getActionColumn(config) {
27
28
  var disabled = config.disabled,
@@ -141,7 +142,7 @@ var getActionColumn = function getActionColumn(config) {
141
142
  return action;
142
143
  });
143
144
  return {
144
- title: '操作',
145
+ title: locale.ProEditTable.operation,
145
146
  key: 'action',
146
147
  fixed: 'right',
147
148
  width: actionWidth || (virtualKey ? '120px' : '60px'),
@@ -341,7 +342,7 @@ export var transformColumns = function transformColumns() {
341
342
  if (disabled || isView) {
342
343
  // 查看模式下过滤操作栏
343
344
  _columns = _columns.filter(function (item) {
344
- return item.title !== '操作';
345
+ return item.title !== locale.ProEditTable.operation;
345
346
  });
346
347
  } else {
347
348
  var validateKeys = _columns.filter(function (i) {