@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
@@ -3,85 +3,86 @@
3
3
 
4
4
  /* 兼容IE11 默认会生成2个值,默认值,var值。IE11下读取默认值 */
5
5
  :root {
6
- --zaui-global-bg: #ffffff;
7
- --zaui-base-bg: #ffffff;
8
- --zaui-brand: #006aff;
9
- --zaui-brand-hover: #3387ff;
10
- --zaui-brand-active: #005ad9;
11
- --zaui-brand-disabled: #99c3ff;
12
- --zaui-text: #343434;
13
- --zaui-text-weak: #616161;
14
- --zaui-aide-text: #909090;
15
- --zaui-placeholder: #a0a0a0;
16
- --zaui-link: var(--zaui-brand);
17
- --zaui-link-light-active: var(--zaui-brand-active);
18
- --zaui-line: #dcdcdc;
19
- --zaui-dividing-line: #dcdcdc;
20
- --zaui-area: #fafafa;
21
- --zaui-shadow: rgba(56, 56, 56, 0.15);
22
- --zaui-form-control-line: var(--zaui-line);
23
- --zaui-form-control-line-hover: var(--zaui-brand-hover);
24
- --zaui-form-control-line-active: var(--zaui-brand-active);
25
- --zaui-list-item-active-bg: var(--zaui-brand);
26
- --zaui-list-item-active-hover-bg: var(--zaui-brand);
27
- --zaui-list-item-selected-bg: var(--zaui-brand);
6
+ --zaui-global-bg : #ffffff;
7
+ --zaui-base-bg : #ffffff;
8
+ --zaui-brand : #006aff;
9
+ --zaui-brand-hover : #3387ff;
10
+ --zaui-brand-active : #005ad9;
11
+ --zaui-brand-disabled : #99c3ff;
12
+ --zaui-text : #343434;
13
+ --zaui-text-weak : #616161;
14
+ --zaui-aide-text : #909090;
15
+ --zaui-placeholder : #a0a0a0;
16
+ --zaui-link : var(--zaui-brand);
17
+ --zaui-link-light-active : var(--zaui-brand-active);
18
+ --zaui-line : #dcdcdc;
19
+ --zaui-dividing-line : #dcdcdc;
20
+ --zaui-area : #fafafa;
21
+ --zaui-shadow : rgba(56, 56, 56, 0.15);
22
+ --zaui-form-control-line : var(--zaui-line);
23
+ --zaui-form-control-line-hover : var(--zaui-brand-hover);
24
+ --zaui-form-control-line-active : var(--zaui-brand-active);
25
+ --zaui-list-item-active-bg : var(--zaui-brand);
26
+ --zaui-list-item-active-hover-bg : var(--zaui-brand);
27
+ --zaui-list-item-selected-bg : var(--zaui-brand);
28
28
  --zaui-list-item-selected-hover-bg: var(--zaui-brand);
29
- --zaui-disabled-bg: #f2f2f2;
30
- --zaui-disabled-text: #333333;
31
- --zaui-feedback-overlay-bg: rgba(0, 0, 0, 0.7);
32
- --zaui-feedback-overlay-text: #343434;
33
- --zaui-primary: var(--zaui-brand);
34
- --zaui-primary-hover: var(--zaui-brand-hover);
35
- --zaui-primary-active: var(--zaui-brand-active);
36
- --zaui-danger-line: var(--zaui-line);
37
- --zaui-danger-bg: #fff2f0;
38
- --zaui-warning-line: var(--zaui-line);
39
- --zaui-warning-bg: #fffbe6;
40
- --zaui-info-line: var(--zaui-line);
41
- --zaui-info-bg: #e6f7ff;
42
- --zaui-success-line: var(--zaui-line);
43
- --zaui-success-bg: #f6ffed;
44
- --zaui-danger: #ff5050;
45
- --zaui-warning: #ec9131;
46
- --zaui-success: #00ae4d;
47
- --zaui-menu-top-bg: #ffffff;
48
- --zaui-menu-left-bg: #1a202d;
49
- --zaui-menu-second-bg: #ffffff;
50
- --zaui-form-align: left;
51
- --zaui-table-header-bg: #f2f3f5;
52
- --zaui-table-strip-bg: #fafafa;
53
- --zaui-table-hover-bg: #fafafa;
54
- --zaui-table-selected-bg: var(--zaui-table-hover-bg); // 默认同悬停
55
- --zaui-table-selected-hover-bg: var(--zaui-table-hover-bg); // 默认同悬停
56
- --zaui-table-nested-bg: #fafcfe;
57
- --zaui-form-label-width: 130px; // 8个全角字符宽度
58
- --zaui-border-radius: 4px;
59
- --zaui-border-radius-card: 2px;
60
- --zaui-font-size-title: 16px;
61
- --zaui-font-size-card-title: var(--zaui-font-size-title);
62
- --zaui-font-size: 14px;
63
- --zaui-font-size-sm: 12px;
64
- --zaui-font-size-md: var(--zaui-font-size);
65
- --zaui-font-size-lg: 16px;
66
- --zaui-font-size-xl: 18px;
67
- --zaui-font-size-xxl: 20px;
68
- --zaui-font-size-lg-title: 24px;
69
- --zaui-height-border: var(--zaui-height-size-md);
70
- --zaui-height-card: var(--zaui-height-size-lg);
71
- --zaui-height-size-xs: 4px;
72
- --zaui-height-size-sm: 8px;
73
- --zaui-height-size-md: 16px;
74
- --zaui-height-size-lg: 32px;
75
- --zaui-height-size-xl: 64px;
76
- --zaui-space-border: var(--zaui-space-size-md); // 兼容1.1.35一下版本 变量
77
- --zaui-space-card: var(--zaui-space-size-lg);
78
- --zaui-space-size-xs: 4px;
79
- --zaui-space-size-sm: 8px;
80
- --zaui-space-size-md: 16px;
81
- --zaui-space-size-lg: 32px;
82
- --zaui-space-size-xl: 64px;
29
+ --zaui-disabled-bg : #f2f2f2;
30
+ --zaui-disabled-text : #333333;
31
+ --zaui-feedback-overlay-bg : rgba(0, 0, 0, 0.7);
32
+ --zaui-feedback-overlay-text : #343434;
33
+ --zaui-primary : var(--zaui-brand);
34
+ --zaui-primary-hover : var(--zaui-brand-hover);
35
+ --zaui-primary-active : var(--zaui-brand-active);
36
+ --zaui-danger-line : var(--zaui-line);
37
+ --zaui-danger-bg : #fff2f0;
38
+ --zaui-warning-line : var(--zaui-line);
39
+ --zaui-warning-bg : #fffbe6;
40
+ --zaui-info-line : var(--zaui-line);
41
+ --zaui-info-bg : #e6f7ff;
42
+ --zaui-success-line : var(--zaui-line);
43
+ --zaui-success-bg : #f6ffed;
44
+ --zaui-danger : #ff5050;
45
+ --zaui-warning : #ec9131;
46
+ --zaui-success : #00ae4d;
47
+ --zaui-menu-top-bg : #ffffff;
48
+ --zaui-menu-left-bg : #1a202d;
49
+ --zaui-menu-second-bg : #ffffff;
50
+ --zaui-form-align : left;
51
+ --zaui-table-header-bg : #f2f3f5;
52
+ --zaui-table-strip-bg : #fafafa;
53
+ --zaui-table-hover-bg : #fafafa;
54
+ --zaui-table-selected-bg : var(--zaui-table-hover-bg); // 默认同悬停
55
+ --zaui-table-selected-hover-bg : var(--zaui-table-hover-bg); // 默认同悬停
56
+ --zaui-table-nested-bg : #fafcfe;
57
+ --zaui-contract-bg : #fffaa1; // 对比背景色
58
+ --zaui-form-label-width : 130px; // 8个全角字符宽度
59
+ --zaui-border-radius : 4px;
60
+ --zaui-border-radius-card : 2px;
61
+ --zaui-font-size-title : 16px;
62
+ --zaui-font-size-card-title : var(--zaui-font-size-title);
63
+ --zaui-font-size : 14px;
64
+ --zaui-font-size-sm : 12px;
65
+ --zaui-font-size-md : var(--zaui-font-size);
66
+ --zaui-font-size-lg : 16px;
67
+ --zaui-font-size-xl : 18px;
68
+ --zaui-font-size-xxl : 20px;
69
+ --zaui-font-size-lg-title : 24px;
70
+ --zaui-height-border : var(--zaui-height-size-md);
71
+ --zaui-height-card : var(--zaui-height-size-lg);
72
+ --zaui-height-size-xs : 4px;
73
+ --zaui-height-size-sm : 8px;
74
+ --zaui-height-size-md : 16px;
75
+ --zaui-height-size-lg : 32px;
76
+ --zaui-height-size-xl : 64px;
77
+ --zaui-space-border : var(--zaui-space-size-md); // 兼容1.1.35一下版本 变量
78
+ --zaui-space-card : var(--zaui-space-size-lg);
79
+ --zaui-space-size-xs : 4px;
80
+ --zaui-space-size-sm : 8px;
81
+ --zaui-space-size-md : 16px;
82
+ --zaui-space-size-lg : 32px;
83
+ --zaui-space-size-xl : 64px;
83
84
 
84
85
  --zaui-line-height-base: 1.5;
85
- --zaui-size: 1;
86
- --zaui-base-font-size: 0px;
87
- }
86
+ --zaui-size : 1;
87
+ --zaui-base-font-size : 0px;
88
+ }
@@ -52,6 +52,7 @@
52
52
  @zaui-table-selected-bg: var(--zaui-table-hover-bg #fafafa);
53
53
  @zaui-table-selected-hover-bg: var(--zaui-table-hover-bg #fafafa);
54
54
  @zaui-table-nested-bg: var(--zaui-table-nested-bg #FAFCFE);
55
+ @zaui-contract-bg: var(--zaui-contract-bg; #fffaa1); // 对比背景色
55
56
  @zaui-form-required-after: var(--zaui-form-required-after; inline);
56
57
  @zaui-form-required-before: var(--zaui-form-required-before; none);
57
58
  @zaui-form-label-width: var(--zaui-form-label-width; 130px);
@@ -15,9 +15,10 @@ var _ahooks = require("ahooks");
15
15
  var _antd = require("antd");
16
16
  var _lodash = require("lodash");
17
17
  var _index = require("../index");
18
+ var _locale = _interopRequireDefault(require("../locale"));
18
19
  require("./index.less");
19
20
  var ProAction = function ProAction(props) {
20
- var _config$, _config$2, _config$index;
21
+ var _config$, _config$2, _locale$ProAction2, _config$index;
21
22
  var children = props.children,
22
23
  config = props.config;
23
24
  var _Form$useForm = _antd.Form.useForm(),
@@ -33,7 +34,8 @@ var ProAction = function ProAction(props) {
33
34
  state = _useSetState2[0],
34
35
  setState = _useSetState2[1];
35
36
  if (!config || !Array.isArray(config)) {
36
- console.error('ProAction 配置 config 必须为数据');
37
+ var _locale$ProAction;
38
+ console.error(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProAction = _locale.default.ProAction) === null || _locale$ProAction === void 0 ? void 0 : _locale$ProAction.errorMessage);
37
39
  return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
38
40
  children: children
39
41
  });
@@ -70,7 +72,7 @@ var ProAction = function ProAction(props) {
70
72
  options = _ref2.options;
71
73
  transformResponse = _ref2.transformResponse;
72
74
  _context.next = 14;
73
- return service === null || service === void 0 ? void 0 : service(options);
75
+ return service === null || service === void 0 ? void 0 : service(options === null || options === void 0 ? void 0 : options.defaultParams);
74
76
  case 14:
75
77
  _context.t1 = _context.sent;
76
78
  if (_context.t1) {
@@ -96,7 +98,7 @@ var ProAction = function ProAction(props) {
96
98
  newServicesArray[currentIndex] = res.data;
97
99
  }
98
100
  case 26:
99
- 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);
101
+ 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);
100
102
  if (!service) {
101
103
  newServicesArray[currentIndex] = null;
102
104
  }
@@ -170,7 +172,7 @@ var ProAction = function ProAction(props) {
170
172
  onConfirm: function onConfirm() {
171
173
  return onActionRun(0, []);
172
174
  },
173
- title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || '确认删除吗?',
175
+ title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProAction2 = _locale.default.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
174
176
  children: children
175
177
  }) : ChildContent, state.open ? (0, _jsxRuntime.jsx)(_index.ProDrawerForm, {
176
178
  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;
@@ -11,8 +11,12 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  var _react = _interopRequireWildcard(require("react"));
14
+ var _antd = require("antd");
15
+ var _zh_CN = _interopRequireDefault(require("antd/es/locale/zh_CN"));
16
+ var _en_US = _interopRequireDefault(require("antd/es/locale/en_US"));
14
17
  var _merge = _interopRequireDefault(require("lodash/merge"));
15
18
  var _useEnumRequest = _interopRequireDefault(require("../ProEnum/hooks/useEnumRequest"));
19
+ var _locale = require("../locale");
16
20
  var ProConfigContext = exports.ProConfigContext = /*#__PURE__*/_react.default.createContext({
17
21
  state: {
18
22
  ProEnum: {
@@ -26,6 +30,11 @@ function useProConfig(name) {
26
30
  var config = (0, _react.useContext)(ProConfigContext);
27
31
  return name ? config.state[name] : config;
28
32
  }
33
+ var antdLangMap = {
34
+ 'zh-CN': _zh_CN.default,
35
+ 'en-US': _en_US.default // en-US
36
+ };
37
+
29
38
  var reducer = function reducer(state, action) {
30
39
  var _state$ProEnum;
31
40
  switch (action.type) {
@@ -52,13 +61,24 @@ var ProConfigProvider = exports.ProConfigProvider = function ProConfigProvider(p
52
61
  state = _useReducer2[0],
53
62
  dispatch = _useReducer2[1];
54
63
  (0, _useEnumRequest.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, 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);
64
+ var cacheLang = localStorage.getItem('locale');
65
+ // 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
66
+ var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
67
+ // 如果缓存里没有语言,那么将配置的语言设置为当前系统语言
68
+ if (!(state === null || state === void 0 ? void 0 : state.locale) && !cacheLang && (props === null || props === void 0 ? void 0 : props.locale)) {
69
+ // 设置默认语言
70
+ (0, _locale.setLanguage)(props === null || props === void 0 ? void 0 : props.locale);
71
+ }
55
72
  return (0, _jsxRuntime.jsx)(ProConfigContext.Provider, {
56
73
  value: {
57
74
  state: (0, _merge.default)(state, props.value),
58
75
  dispatch: dispatch
59
76
  },
60
- children: (0, _jsxRuntime.jsxs)("div", {
61
- children: [" ", props.children]
77
+ children: (0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
78
+ locale: antdLangMap[lang],
79
+ children: (0, _jsxRuntime.jsxs)("div", {
80
+ children: [" ", props.children]
81
+ })
62
82
  })
63
83
  });
64
84
  };
@@ -13,6 +13,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
13
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
14
14
  var _antd = require("antd");
15
15
  var _lodash = require("lodash");
16
+ var _locale = _interopRequireDefault(require("../locale"));
16
17
  /* eslint-disable no-empty */
17
18
  /* eslint-disable prefer-promise-reject-errors */
18
19
 
@@ -120,8 +121,8 @@ var DownloadRequest = exports.DownloadRequest = /*#__PURE__*/function () {
120
121
  _context.next = 7;
121
122
  break;
122
123
  }
123
- _antd.message.error('请求失败!');
124
- return _context.abrupt("return", Promise.reject('请求失败!'));
124
+ _antd.message.error("".concat(_locale.default.ProDownload.errorMessage));
125
+ return _context.abrupt("return", Promise.reject("".concat(_locale.default.ProDownload.errorMessage)));
125
126
  case 7:
126
127
  if (!((_data === null || _data === void 0 ? void 0 : _data.status) > 200 || (_data === null || _data === void 0 ? void 0 : _data.code) === 401)) {
127
128
  _context.next = 11;
@@ -149,7 +150,7 @@ var DownloadRequest = exports.DownloadRequest = /*#__PURE__*/function () {
149
150
  }
150
151
  return _context.abrupt("return", Promise.resolve(response));
151
152
  case 20:
152
- return _context.abrupt("return", Promise.reject('请求失败!'));
153
+ return _context.abrupt("return", Promise.reject("".concat(_locale.default.ProDownload.errorMessage)));
153
154
  case 21:
154
155
  case "end":
155
156
  return _context.stop();
@@ -17,6 +17,7 @@ var _ahooks = require("ahooks");
17
17
  var _lodash = require("lodash");
18
18
  var _reactSvg = require("react-svg");
19
19
  var _close = _interopRequireDefault(require("../../../assets/close.svg"));
20
+ var _locale = _interopRequireDefault(require("../../../locale"));
20
21
  /**
21
22
  * 抽屉组件
22
23
  */
@@ -49,6 +50,7 @@ var ProDrawer = function ProDrawer(_ref) {
49
50
  toggleLoading = _useState2[1];
50
51
  var noRenderFooter = isView || footer === false || footer === null;
51
52
  var onConfirm = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
53
+ var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3, _locale$ProDrawerForm4;
52
54
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
53
55
  while (1) switch (_context.prev = _context.next) {
54
56
  case 0:
@@ -57,10 +59,10 @@ var ProDrawer = function ProDrawer(_ref) {
57
59
  } else if (!modalRef.current) {
58
60
  modalRef.current = _antd.Modal.confirm((0, _objectSpread2.default)({
59
61
  className: 'width430',
60
- title: '确认关闭当前页面',
61
- okText: '确定',
62
- cancelText: '取消',
63
- content: '关闭当前页面内容不会被保存,需要点击“保存”按钮进行保存',
62
+ title: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.isSureClose,
63
+ okText: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm2 = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.confirm,
64
+ cancelText: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm3 = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.cancel,
65
+ content: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm4 = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm4 === void 0 ? void 0 : _locale$ProDrawerForm4.secondTipsWhenSave,
64
66
  onOk: function onOk() {
65
67
  onCancel && onCancel();
66
68
  },
@@ -12,8 +12,10 @@ var _react = require("react");
12
12
  var _components = require("./components");
13
13
  var _ProForm = _interopRequireDefault(require("../ProForm"));
14
14
  var _utils = require("./utils");
15
+ var _locale = _interopRequireDefault(require("../locale"));
16
+ var _locale$ProDrawerForm3;
15
17
  var ProDrawerForm = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
16
- var _okText;
18
+ var _okText, _locale$ProDrawerForm, _locale$ProDrawerForm2;
17
19
  var visible = props.visible,
18
20
  showType = props.showType,
19
21
  okText = props.okText,
@@ -28,7 +30,7 @@ var ProDrawerForm = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
28
30
  children = props.children;
29
31
  showType = mode || showType;
30
32
  isView = isView || disabled;
31
- okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ? '保存' : '确定';
33
+ okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ? _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.save : _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm2 = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.confirm;
32
34
  visible = open !== null && open !== void 0 ? open : visible;
33
35
  var width = props.width;
34
36
  if (!width && size) {
@@ -90,7 +92,7 @@ ProDrawerForm.defaultProps = {
90
92
  size: 'middle',
91
93
  isConfirmClose: true,
92
94
  maskClosable: false,
93
- cancelText: '取消',
95
+ cancelText: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProDrawerForm3 = _locale.default.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.cancel,
94
96
  proFormProps: {}
95
97
  };
96
98
  var _default = exports.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 {
@@ -11,6 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
  var _antd = require("antd");
12
12
  var _lodash = require("lodash");
13
13
  var _config = require("../../utils/config");
14
+ var _locale = _interopRequireDefault(require("../../../locale"));
14
15
  // 渲染操作按钮
15
16
  var ActionButton = function ActionButton(_ref) {
16
17
  var _editingKeys$includes, _btnConfig$buttonProp, _btnConfig$buttonProp2, _btnConfig$buttonProp3, _btnConfig$icon;
@@ -83,8 +84,8 @@ var ActionButton = function ActionButton(_ref) {
83
84
  btnConfig.onEvent(record, index);
84
85
  },
85
86
  disabled: isDisabled,
86
- okText: "\u786E\u8BA4",
87
- cancelText: "\u53D6\u6D88",
87
+ okText: _locale.default.ProEditTable.confirm,
88
+ cancelText: _locale.default.ProEditTable.cancel,
88
89
  children: /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
89
90
  record: record,
90
91
  index: index,
@@ -24,7 +24,10 @@ var _transformNames = _interopRequireDefault(require("../../../ProForm/utils/tra
24
24
  var _useFieldProps = require("../../../ProForm/utils/useFieldProps");
25
25
  var _useRules = _interopRequireDefault(require("../../../ProForm/utils/useRules"));
26
26
  var _utils = require("../../../ProForm/utils");
27
+ var _locale = _interopRequireDefault(require("../../../locale"));
27
28
  var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules"];
29
+ /* eslint-disable prefer-destructuring */
30
+ /* eslint-disable prefer-const */
28
31
  var RenderField = function RenderField(_ref) {
29
32
  var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4;
30
33
  var value = _ref.text,
@@ -223,7 +226,7 @@ var RenderField = function RenderField(_ref) {
223
226
  TargetComponent = viewRender;
224
227
  }
225
228
  }
226
- var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "\u8BF7\u9009\u62E9".concat((0, _lodash.isString)(label) ? label || title : '') : "\u8BF7\u8F93\u5165".concat((0, _lodash.isString)(label) ? label || title : '');
229
+ var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "".concat(_locale.default.ProEditTable.select).concat((0, _lodash.isString)(label) ? label || title : '') : "".concat(_locale.default.ProEditTable.enter).concat((0, _lodash.isString)(label) ? label || title : '');
227
230
  var _placeholder = (_formItemChildProps$p = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.placeholder) !== null && _formItemChildProps$p !== void 0 ? _formItemChildProps$p : defaultPlaceholder;
228
231
  var onChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onChange;
229
232
  var onFieldChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onFieldChange;
@@ -21,6 +21,7 @@ var _utils = require("./utils");
21
21
  var _tools = require("./utils/tools");
22
22
  var _components = require("./components");
23
23
  var _empty = _interopRequireDefault(require("../assets/empty.png"));
24
+ var _locale = _interopRequireDefault(require("../locale"));
24
25
  var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination"];
25
26
  var ProEditTable = function ProEditTable(_ref, ref) {
26
27
  var _resetProps$id, _resetProps$id$split, _value$2;
@@ -173,8 +174,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
173
174
  src: _empty.default
174
175
  }), (0, _jsxRuntime.jsx)("div", {
175
176
  className: "content",
176
- children: disabled || isForbiddenBtn('add') ? '暂无数据' : (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
177
- children: ["\u6682\u65E0\u6570\u636E\uFF0C", (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
177
+ children: disabled || isForbiddenBtn('add') ? _locale.default.ProEditTable.noData : (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
178
+ children: [_locale.default.ProEditTable.noData, "\uFF0C", (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
178
179
  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) {
179
180
  return item.type === 'add';
180
181
  }),
@@ -323,9 +324,9 @@ ForwardProEditTable.defaultProps = {
323
324
  disabled: false,
324
325
  draggable: false,
325
326
  stripe: true,
326
- emptyBtnText: '点击添加',
327
- onlyOneLineMsg: '请先保存数据',
328
- deletePoConfirmMsg: '您确定要删除该行数据吗?',
329
- mulDeletePoConfirmMsg: '您确定要删除选中的数据吗?'
327
+ emptyBtnText: _locale.default.ProEditTable.clickAdd,
328
+ onlyOneLineMsg: _locale.default.ProEditTable.onlyOneLineMsg,
329
+ deletePoConfirmMsg: _locale.default.ProEditTable.deletePoConfirmMsg,
330
+ mulDeletePoConfirmMsg: _locale.default.ProEditTable.mulDeletePoConfirmMsg
330
331
  };
331
332
  var _default = exports.default = ForwardProEditTable;