@vtx/modals2 6.0.0-beta.1 → 6.0.0-beta.2
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.
|
@@ -9,15 +9,14 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
10
|
import { Calendar, Progress } from 'antd';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
|
-
import dayjs from "../../_util/setupDayjs";
|
|
13
12
|
import useSettings from "../../_hooks/useSettings";
|
|
14
13
|
import "./style";
|
|
15
|
-
import zhCN from 'antd/es/calendar/locale/zh_CN.js';
|
|
16
14
|
import enUS from 'antd/es/calendar/locale/en_US.js';
|
|
17
|
-
import
|
|
15
|
+
import zhCN from 'antd/es/calendar/locale/zh_CN.js';
|
|
18
16
|
import BlockA from "../../_imgs/block_alarm.png";
|
|
19
17
|
import BlockN from "../../_imgs/block_normal.png";
|
|
20
18
|
import { transformRgb } from "../../_util";
|
|
19
|
+
import { getRuntimeLanguage } from "./../../hooks/useTranslation.js";
|
|
21
20
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
21
|
var prefix = 'vm-calendar';
|
|
23
22
|
function VmCalendar(props) {
|
|
@@ -40,7 +39,7 @@ function VmCalendar(props) {
|
|
|
40
39
|
'--height': height + 'px'
|
|
41
40
|
}),
|
|
42
41
|
children: /*#__PURE__*/_jsx(Calendar, _objectSpread({
|
|
43
|
-
locale:
|
|
42
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS,
|
|
44
43
|
headerRender: function headerRender() {
|
|
45
44
|
return null;
|
|
46
45
|
},
|
|
@@ -13,14 +13,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
13
13
|
import { SearchOutlined } from '@ant-design/icons';
|
|
14
14
|
import { useDebounce } from 'ahooks';
|
|
15
15
|
import { DatePicker, Input, Select } from 'antd';
|
|
16
|
-
import zhCN from 'antd/es/date-picker/locale/zh_CN';
|
|
17
16
|
import enUS from 'antd/es/date-picker/locale/en_US';
|
|
18
|
-
import
|
|
19
|
-
import "
|
|
17
|
+
import zhCN from 'antd/es/date-picker/locale/zh_CN';
|
|
18
|
+
import { getRuntimeLanguage, translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
20
19
|
import { useEffect, useState } from 'react';
|
|
21
20
|
import useSettings from "../../_hooks/useSettings";
|
|
22
|
-
import "
|
|
21
|
+
import "../../_util/setupDayjs";
|
|
23
22
|
import VmEmpty from "../vm-empty";
|
|
23
|
+
import "./style";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
var RangePicker = DatePicker.RangePicker,
|
|
26
26
|
MonthPicker = DatePicker.MonthPicker,
|
|
@@ -42,7 +42,7 @@ export var VMRangePicker = function VMRangePicker(props) {
|
|
|
42
42
|
},
|
|
43
43
|
allowClear: false
|
|
44
44
|
}, props), {}, {
|
|
45
|
-
locale:
|
|
45
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS
|
|
46
46
|
}));
|
|
47
47
|
};
|
|
48
48
|
export var VMDatePicker = function VMDatePicker(props) {
|
|
@@ -57,7 +57,7 @@ export var VMDatePicker = function VMDatePicker(props) {
|
|
|
57
57
|
},
|
|
58
58
|
allowClear: false
|
|
59
59
|
}, props), {}, {
|
|
60
|
-
locale:
|
|
60
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS
|
|
61
61
|
}));
|
|
62
62
|
};
|
|
63
63
|
export var VMMonthPicker = function VMMonthPicker(props) {
|
|
@@ -72,7 +72,7 @@ export var VMMonthPicker = function VMMonthPicker(props) {
|
|
|
72
72
|
},
|
|
73
73
|
allowClear: false
|
|
74
74
|
}, props), {}, {
|
|
75
|
-
locale:
|
|
75
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS
|
|
76
76
|
}));
|
|
77
77
|
};
|
|
78
78
|
export var VMYearPicker = function VMYearPicker(props) {
|
|
@@ -87,7 +87,7 @@ export var VMYearPicker = function VMYearPicker(props) {
|
|
|
87
87
|
},
|
|
88
88
|
allowClear: false
|
|
89
89
|
}, props), {}, {
|
|
90
|
-
locale:
|
|
90
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS
|
|
91
91
|
}));
|
|
92
92
|
};
|
|
93
93
|
export var VMSelect = function VMSelect(props) {
|
|
@@ -21,12 +21,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
21
21
|
import { DownOutlined, ExportOutlined } from '@ant-design/icons';
|
|
22
22
|
import { useMemoizedFn, useSetState } from 'ahooks';
|
|
23
23
|
import { Button, ConfigProvider, Dropdown, Table } from 'antd';
|
|
24
|
-
import zhCN from 'antd/es/locale/zh_CN';
|
|
25
24
|
import enUS from 'antd/es/locale/en_US';
|
|
25
|
+
import zhCN from 'antd/es/locale/zh_CN';
|
|
26
26
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
27
27
|
import useSettings from "../../_hooks/useSettings";
|
|
28
28
|
import "./style";
|
|
29
|
-
import {
|
|
29
|
+
import { getRuntimeLanguage, translateLocaleText } from "./../../hooks/useTranslation.js";
|
|
30
30
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
31
|
var VMTable = function VMTable(props) {
|
|
32
32
|
var _props$rowKey = props.rowKey,
|
|
@@ -136,7 +136,7 @@ var VMTable = function VMTable(props) {
|
|
|
136
136
|
}
|
|
137
137
|
}, [JSON.stringify(dataSource), JSON.stringify(currentLayer)]);
|
|
138
138
|
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
139
|
-
locale:
|
|
139
|
+
locale: getRuntimeLanguage() === 'zh-CN' ? zhCN : enUS,
|
|
140
140
|
children: /*#__PURE__*/_jsx(Table, _objectSpread({
|
|
141
141
|
className: "vm-table ".concat(isDark ? 'dark' : ''),
|
|
142
142
|
ref: tableRef,
|