@cloudtower/eagle 0.34.20 → 0.34.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/core/ConfigProvider/index.js +3 -1
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +4 -3
- package/dist/cjs/hooks/useAntdPatchEnLocales.js +35 -0
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3011 -3011
- package/dist/esm/core/ConfigProvider/index.js +3 -1
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +2 -1
- package/dist/esm/hooks/useAntdPatchEnLocales.js +29 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +3326 -3326
- package/dist/src/hooks/useAntdPatchEnLocales.d.ts +431 -0
- package/dist/style.css +3011 -3011
- package/package.json +4 -4
|
@@ -8,6 +8,7 @@ import antd5zhCN from 'antd5/lib/locale/zh_CN';
|
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import moment from 'moment';
|
|
10
10
|
import React__default, { createContext, useContext, useEffect } from 'react';
|
|
11
|
+
import { useAntdPatchEnLocales } from '../../hooks/useAntdPatchEnLocales.js';
|
|
11
12
|
|
|
12
13
|
var __defProp = Object.defineProperty;
|
|
13
14
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -44,6 +45,7 @@ const ConfigProvider = ({
|
|
|
44
45
|
i18n.on("languageChanged", adjustDateLocale);
|
|
45
46
|
adjustDateLocale(i18n.language);
|
|
46
47
|
}, [i18n]);
|
|
48
|
+
const patchEnLocale = useAntdPatchEnLocales(enUS);
|
|
47
49
|
return /* @__PURE__ */ React__default.createElement(ConfigProviderContext.Provider, { value: config }, /* @__PURE__ */ React__default.createElement(
|
|
48
50
|
ConfigProvider$1,
|
|
49
51
|
__spreadValues({
|
|
@@ -54,7 +56,7 @@ const ConfigProvider = ({
|
|
|
54
56
|
ConfigProvider$2,
|
|
55
57
|
__spreadValues({
|
|
56
58
|
autoInsertSpaceInButton: false,
|
|
57
|
-
locale: i18n.language === "zh-CN" ? zhCN :
|
|
59
|
+
locale: i18n.language === "zh-CN" ? zhCN : patchEnLocale
|
|
58
60
|
}, antd4Configs),
|
|
59
61
|
children
|
|
60
62
|
)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import TimePicker from '../../TimePicker/index.js';
|
|
3
|
+
import { ConfigProvider } from '../../ConfigProvider/index.js';
|
|
3
4
|
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __defProps = Object.defineProperties;
|
|
@@ -40,7 +41,7 @@ const FieldsTimePicker = (_a) => {
|
|
|
40
41
|
"input",
|
|
41
42
|
"meta"
|
|
42
43
|
]);
|
|
43
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
44
|
+
return /* @__PURE__ */ React__default.createElement(ConfigProvider, null, /* @__PURE__ */ React__default.createElement(
|
|
44
45
|
TimePicker,
|
|
45
46
|
__spreadValues(__spreadProps(__spreadValues({}, input), {
|
|
46
47
|
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import merge from 'lodash/merge';
|
|
3
|
+
|
|
4
|
+
const PatchEnLocale = {
|
|
5
|
+
Modal: {
|
|
6
|
+
okText: "OK",
|
|
7
|
+
justOkText: "OK"
|
|
8
|
+
},
|
|
9
|
+
Popconfirm: {
|
|
10
|
+
okText: "OK"
|
|
11
|
+
// ← 需要修改
|
|
12
|
+
},
|
|
13
|
+
DatePicker: {
|
|
14
|
+
lang: {
|
|
15
|
+
ok: "OK"
|
|
16
|
+
// ← 需要修改
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
Calendar: {
|
|
20
|
+
lang: {
|
|
21
|
+
ok: "OK"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const useAntdPatchEnLocales = (enLocale) => {
|
|
26
|
+
return useMemo(() => merge(enLocale, PatchEnLocale), [enLocale]);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { useAntdPatchEnLocales };
|