@vtx/components 4.0.0-beta.71 → 4.0.0-beta.72
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/README.md +19 -19
- package/es/utils/components/LabelIconTip/index.js +7 -7
- package/es/utils/conversionMomentValue/index.js +25 -25
- package/es/utils/filterSpecialCharacters.js +6 -6
- package/es/utils/genCopyable/index.js +6 -6
- package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/es/utils/hooks/useDebounceFn/index.js +4 -4
- package/es/utils/hooks/useDebounceValue/index.js +6 -6
- package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +5 -5
- package/es/utils/isBrowser/index.js +7 -7
- package/es/utils/isUrl/index.js +4 -4
- package/es/utils/merge/index.js +4 -4
- package/es/utils/nanoid/index.js +4 -4
- package/es/utils/omitBoolean/index.js +4 -4
- package/es/utils/parseValueToMoment/index.js +4 -4
- package/es/utils/proFieldParsingText/index.js +10 -10
- package/es/utils/transformKeySubmitValue/index.js +57 -57
- package/es/utils/useEditableArray/index.js +46 -46
- package/es/utils/useEditableMap/index.js +22 -22
- package/es/utils/useMediaQuery/index.js +5 -5
- package/es/vtx-datagrid/Store/Provide.js +3 -10
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/es/vtx-datagrid/columnState.js +28 -1
- package/es/vtx-datagrid/index.js +26 -8
- package/es/vtx-datagrid/style/index.less +242 -242
- package/es/vtx-date-picker/style/index.less +39 -39
- package/es/vtx-export/index.js +8 -8
- package/es/vtx-icon/index.js1 +90 -90
- package/es/vtx-import/index.js +57 -29
- package/es/vtx-import/result.js +22 -24
- package/es/vtx-modal/index.js +2 -2
- package/es/vtx-page-layout/Basic.js +2 -2
- package/es/vtx-page-layout/TabLayout.js +6 -6
- package/es/vtx-page-layout/TableLayout.js +10 -10
- package/es/vtx-page-layout/TreeLayout.js +6 -6
- package/es/vtx-page-layout/container.js +2 -2
- package/es/vtx-provider/index.js +30 -30
- package/es/vtx-provider/intl.js +9 -9
- package/es/vtx-provider/locale/en_US.js +2 -0
- package/es/vtx-provider/locale/zh_CN.js +2 -0
- package/es/vtx-provider/useStyle/index.js +17 -17
- package/es/vtx-wang-editor/style/index.less +12 -12
- package/lib/utils/components/LabelIconTip/index.js +7 -7
- package/lib/utils/conversionMomentValue/index.js +25 -25
- package/lib/utils/filterSpecialCharacters.js +6 -6
- package/lib/utils/genCopyable/index.js +6 -6
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/lib/utils/hooks/useDebounceFn/index.js +4 -4
- package/lib/utils/hooks/useDebounceValue/index.js +6 -6
- package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/lib/utils/hooks/useLatest/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +5 -5
- package/lib/utils/isBrowser/index.js +7 -7
- package/lib/utils/isUrl/index.js +4 -4
- package/lib/utils/merge/index.js +4 -4
- package/lib/utils/nanoid/index.js +4 -4
- package/lib/utils/omitBoolean/index.js +4 -4
- package/lib/utils/parseValueToMoment/index.js +4 -4
- package/lib/utils/proFieldParsingText/index.js +10 -10
- package/lib/utils/transformKeySubmitValue/index.js +57 -57
- package/lib/utils/useEditableArray/index.js +46 -46
- package/lib/utils/useEditableMap/index.js +22 -22
- package/lib/utils/useMediaQuery/index.js +5 -5
- package/lib/vtx-datagrid/Store/Provide.js +2 -9
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +4 -4
- package/lib/vtx-datagrid/columnState.js +28 -1
- package/lib/vtx-datagrid/index.js +26 -8
- package/lib/vtx-datagrid/style/index.less +242 -242
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-export/index.js +8 -8
- package/lib/vtx-icon/index.js1 +90 -90
- package/lib/vtx-import/index.js +56 -28
- package/lib/vtx-import/result.js +23 -25
- package/lib/vtx-modal/index.js +2 -2
- package/lib/vtx-page-layout/Basic.js +2 -2
- package/lib/vtx-page-layout/TabLayout.js +6 -6
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TreeLayout.js +6 -6
- package/lib/vtx-page-layout/container.js +2 -2
- package/lib/vtx-provider/index.js +30 -30
- package/lib/vtx-provider/intl.js +9 -9
- package/lib/vtx-provider/locale/en_US.js +2 -0
- package/lib/vtx-provider/locale/zh_CN.js +2 -0
- package/lib/vtx-provider/useStyle/index.js +17 -17
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/package.json +238 -238
package/lib/vtx-icon/index.js1
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { lazy, memo, Suspense, useMemo } from 'react';
|
|
2
|
-
import AlignRightOutlined from './svg/alignRightOutlined.js';
|
|
3
|
-
import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
|
|
4
|
-
import DownOutlined from './svg/downOutlined.js';
|
|
5
|
-
import Fullscreen from './svg/fullscreen.js';
|
|
6
|
-
import RedoOutlined from './svg/redoOutlined.js';
|
|
7
|
-
import RightOutlined from './svg/rightOutlined.js';
|
|
8
|
-
import SettingOutlined from './svg/settingOutlined.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const iconComponents = {
|
|
12
|
-
alignRightOutlined: AlignRightOutlined,
|
|
13
|
-
columnHeightOutlined: ColumnHeightOutlined,
|
|
14
|
-
downOutlined: DownOutlined,
|
|
15
|
-
fullscreen: Fullscreen,
|
|
16
|
-
redoOutlined: RedoOutlined,
|
|
17
|
-
rightOutlined: RightOutlined,
|
|
18
|
-
settingOutlined: SettingOutlined,
|
|
19
|
-
// 低频图标如果确实需要,可以再考虑 lazy
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// const iconComponents = {
|
|
23
|
-
// // 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
24
|
-
// alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
|
|
25
|
-
// columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
|
|
26
|
-
// downOutlined: lazy(() => import('./svg/downOutlined.js')),
|
|
27
|
-
// fullscreen: lazy(() => import('./svg/fullscreen.js')),
|
|
28
|
-
// redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
|
|
29
|
-
// rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
|
|
30
|
-
// settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
|
|
31
|
-
// // 新增其他图标...
|
|
32
|
-
// };
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const VtxIcon = memo(({
|
|
36
|
-
type,
|
|
37
|
-
size = 16,
|
|
38
|
-
className = '',
|
|
39
|
-
style = {},
|
|
40
|
-
color,
|
|
41
|
-
fileType = 'webp',
|
|
42
|
-
...props
|
|
43
|
-
}) => {
|
|
44
|
-
const width = props.width || size;
|
|
45
|
-
const height = props.height || size;
|
|
46
|
-
if (!type) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
// const SvgComponent = useMemo(() => {
|
|
50
|
-
// // 动态导入并缓存结果
|
|
51
|
-
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
52
|
-
// }, [type]);
|
|
53
|
-
|
|
54
|
-
const SvgComponent = useMemo(() => {
|
|
55
|
-
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
56
|
-
return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
|
|
57
|
-
}, [type, width, height]);
|
|
58
|
-
|
|
59
|
-
// 默认返回空元素
|
|
60
|
-
if (fileType == 'svg') {
|
|
61
|
-
try {
|
|
62
|
-
// const SvgComponent = lazy(() => import(`./svg/${type}.js`));
|
|
63
|
-
return (
|
|
64
|
-
<Suspense fallback={<div style={{ width, height, ...style }} />}>
|
|
65
|
-
<SvgComponent
|
|
66
|
-
className={className}
|
|
67
|
-
style={{ width, height, ...style }}
|
|
68
|
-
fill={color}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
</Suspense>
|
|
72
|
-
);
|
|
73
|
-
} catch (error) {
|
|
74
|
-
// 如果动态导入失败,返回空的 SVG 元素
|
|
75
|
-
return (
|
|
76
|
-
<svg width={width} height={height} style={style} className={className} {...props} />
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
return (
|
|
81
|
-
// <img
|
|
82
|
-
// src={require(`./assets/${type}.${fileType}`)}
|
|
83
|
-
// style={{ width, height, ...style }}
|
|
84
|
-
// />
|
|
85
|
-
<></>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
export { VtxIcon }
|
|
90
|
-
export default VtxIcon;
|
|
1
|
+
import { lazy, memo, Suspense, useMemo } from 'react';
|
|
2
|
+
import AlignRightOutlined from './svg/alignRightOutlined.js';
|
|
3
|
+
import ColumnHeightOutlined from './svg/columnHeightOutlined.js';
|
|
4
|
+
import DownOutlined from './svg/downOutlined.js';
|
|
5
|
+
import Fullscreen from './svg/fullscreen.js';
|
|
6
|
+
import RedoOutlined from './svg/redoOutlined.js';
|
|
7
|
+
import RightOutlined from './svg/rightOutlined.js';
|
|
8
|
+
import SettingOutlined from './svg/settingOutlined.js';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const iconComponents = {
|
|
12
|
+
alignRightOutlined: AlignRightOutlined,
|
|
13
|
+
columnHeightOutlined: ColumnHeightOutlined,
|
|
14
|
+
downOutlined: DownOutlined,
|
|
15
|
+
fullscreen: Fullscreen,
|
|
16
|
+
redoOutlined: RedoOutlined,
|
|
17
|
+
rightOutlined: RightOutlined,
|
|
18
|
+
settingOutlined: SettingOutlined,
|
|
19
|
+
// 低频图标如果确实需要,可以再考虑 lazy
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// const iconComponents = {
|
|
23
|
+
// // 核心:添加你需要的所有图标, 动态导入有的组件会失败
|
|
24
|
+
// alignRightOutlined: lazy(() => import('./svg/alignRightOutlined.js')),
|
|
25
|
+
// columnHeightOutlined: lazy(() => import('./svg/columnHeightOutlined.js')),
|
|
26
|
+
// downOutlined: lazy(() => import('./svg/downOutlined.js')),
|
|
27
|
+
// fullscreen: lazy(() => import('./svg/fullscreen.js')),
|
|
28
|
+
// redoOutlined: lazy(() => import('./svg/redoOutlined.js')),
|
|
29
|
+
// rightOutlined: lazy(() => import('./svg/rightOutlined.js')),
|
|
30
|
+
// settingOutlined: lazy(() => import('./svg/settingOutlined.js')),
|
|
31
|
+
// // 新增其他图标...
|
|
32
|
+
// };
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
const VtxIcon = memo(({
|
|
36
|
+
type,
|
|
37
|
+
size = 16,
|
|
38
|
+
className = '',
|
|
39
|
+
style = {},
|
|
40
|
+
color,
|
|
41
|
+
fileType = 'webp',
|
|
42
|
+
...props
|
|
43
|
+
}) => {
|
|
44
|
+
const width = props.width || size;
|
|
45
|
+
const height = props.height || size;
|
|
46
|
+
if (!type) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
// const SvgComponent = useMemo(() => {
|
|
50
|
+
// // 动态导入并缓存结果
|
|
51
|
+
// return lazy(() => import(/* @vite-ignore */`./svg/${type}.js`));
|
|
52
|
+
// }, [type]);
|
|
53
|
+
|
|
54
|
+
const SvgComponent = useMemo(() => {
|
|
55
|
+
// 兜底:找不到对应图标时,返回一个空组件(避免报错)
|
|
56
|
+
return iconComponents[type] || lazy(() => Promise.resolve({ default: () => <svg width={width} height={height} /> }));
|
|
57
|
+
}, [type, width, height]);
|
|
58
|
+
|
|
59
|
+
// 默认返回空元素
|
|
60
|
+
if (fileType == 'svg') {
|
|
61
|
+
try {
|
|
62
|
+
// const SvgComponent = lazy(() => import(`./svg/${type}.js`));
|
|
63
|
+
return (
|
|
64
|
+
<Suspense fallback={<div style={{ width, height, ...style }} />}>
|
|
65
|
+
<SvgComponent
|
|
66
|
+
className={className}
|
|
67
|
+
style={{ width, height, ...style }}
|
|
68
|
+
fill={color}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
</Suspense>
|
|
72
|
+
);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
// 如果动态导入失败,返回空的 SVG 元素
|
|
75
|
+
return (
|
|
76
|
+
<svg width={width} height={height} style={style} className={className} {...props} />
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
return (
|
|
81
|
+
// <img
|
|
82
|
+
// src={require(`./assets/${type}.${fileType}`)}
|
|
83
|
+
// style={{ width, height, ...style }}
|
|
84
|
+
// />
|
|
85
|
+
<></>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export { VtxIcon }
|
|
90
|
+
export default VtxIcon;
|
package/lib/vtx-import/index.js
CHANGED
|
@@ -21,19 +21,23 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
28
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
30
25
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
26
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
32
27
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
33
28
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
34
29
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
30
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
34
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
35
35
|
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); }
|
|
36
36
|
function VtxImport(props) {
|
|
37
|
+
var templateURL = props.templateURL,
|
|
38
|
+
uploadURL = props.uploadURL,
|
|
39
|
+
afterUpload = props.afterUpload,
|
|
40
|
+
beforeUpload = props.beforeUpload;
|
|
37
41
|
var token = (0, _getToken.default)();
|
|
38
42
|
if (props.token) {
|
|
39
43
|
props.token, _readOnlyError("token");
|
|
@@ -45,6 +49,22 @@ function VtxImport(props) {
|
|
|
45
49
|
var _useStyle = (0, _index.useStyle)(prefixCls),
|
|
46
50
|
wrapSSR = _useStyle.wrapSSR,
|
|
47
51
|
hashId = _useStyle.hashId;
|
|
52
|
+
var TextEnum = _objectSpread({
|
|
53
|
+
rowNumberText: intl.getMessage('import.rowNumber', '行号'),
|
|
54
|
+
errorMessageText: intl.getMessage('import.errorMessage', '错误说明'),
|
|
55
|
+
resultTitleText: intl.getMessage('import.result', '导入结果'),
|
|
56
|
+
btnCloseText: intl.getMessage('switch.close', '关闭'),
|
|
57
|
+
operationText: intl.getMessage('import.operation', '导入'),
|
|
58
|
+
uploadFailedText: intl.getMessage('import.error', '上传失败'),
|
|
59
|
+
parseResponseFailedText: intl.getMessage('import.error', '解析响应失败'),
|
|
60
|
+
uploadSuccessText: intl.getMessage('import.success', '上传成功'),
|
|
61
|
+
parseResponseDataFailedText: intl.getMessage('import.error', '解析响应数据失败'),
|
|
62
|
+
downloadTemplateText: intl.getMessage('import.downloadTemplate', '下载模板'),
|
|
63
|
+
pleaseSelectFileText: intl.getMessage('import.pleaseSelectFile', '请选择需要上传的文件'),
|
|
64
|
+
uploadText: intl.getMessage('import.upload', '上传'),
|
|
65
|
+
selectFileText: intl.getMessage('import.selectFile', '选择文件'),
|
|
66
|
+
noFileSelectedText: intl.getMessage('import.noFileSelected', '未选择任何文件')
|
|
67
|
+
}, props.customEnumText);
|
|
48
68
|
|
|
49
69
|
// 用 useRef 管理 DOM 引用,而不是 state
|
|
50
70
|
var fileInputRef = (0, _react.useRef)(null);
|
|
@@ -71,13 +91,22 @@ function VtxImport(props) {
|
|
|
71
91
|
// 导入结果查看
|
|
72
92
|
modalWidth: props.modalWidth || 800,
|
|
73
93
|
columns: props.columns || [{
|
|
74
|
-
title:
|
|
94
|
+
title: TextEnum.rowNumberText,
|
|
75
95
|
dataIndex: 'lineNum',
|
|
76
96
|
key: 'lineNum'
|
|
77
97
|
}, {
|
|
78
|
-
title:
|
|
98
|
+
title: TextEnum.errorMessageText,
|
|
79
99
|
dataIndex: 'messages',
|
|
80
|
-
key: 'messages'
|
|
100
|
+
key: 'messages',
|
|
101
|
+
render: function render(val) {
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
103
|
+
style: {
|
|
104
|
+
display: 'flex',
|
|
105
|
+
width: 600
|
|
106
|
+
},
|
|
107
|
+
children: [" ", val]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
81
110
|
}],
|
|
82
111
|
step: 1,
|
|
83
112
|
chunkSize: props.chunkSize || 10 * 1024 * 1024,
|
|
@@ -85,7 +114,7 @@ function VtxImport(props) {
|
|
|
85
114
|
currentIndex: 0,
|
|
86
115
|
chunkId: '',
|
|
87
116
|
chunks: [],
|
|
88
|
-
operation: props.operation ||
|
|
117
|
+
operation: props.operation || TextEnum.operationText,
|
|
89
118
|
fileName: ''
|
|
90
119
|
}),
|
|
91
120
|
_useSet2 = _slicedToArray(_useSet, 2),
|
|
@@ -142,7 +171,7 @@ function VtxImport(props) {
|
|
|
142
171
|
}
|
|
143
172
|
};
|
|
144
173
|
xhr.onerror = function () {
|
|
145
|
-
_antd.message.error(
|
|
174
|
+
_antd.message.error(TextEnum.uploadFailedText);
|
|
146
175
|
};
|
|
147
176
|
// 发送请求
|
|
148
177
|
xhr.open('POST', '/cloudFile/common/uploadChunk', true);
|
|
@@ -164,23 +193,23 @@ function VtxImport(props) {
|
|
|
164
193
|
try {
|
|
165
194
|
res = JSON.parse(xhr.responseText);
|
|
166
195
|
} catch (e) {
|
|
167
|
-
_antd.message.error(
|
|
196
|
+
_antd.message.error(TextEnum.parseResponseFailedText);
|
|
168
197
|
setState({
|
|
169
198
|
uploading: false
|
|
170
199
|
});
|
|
171
200
|
return;
|
|
172
201
|
}
|
|
173
202
|
if (((_res = res) === null || _res === void 0 ? void 0 : _res.result) == 0) {
|
|
174
|
-
_antd.message.success(
|
|
203
|
+
_antd.message.success(TextEnum.uploadSuccessText);
|
|
175
204
|
chunkUpload(res.data);
|
|
176
205
|
} else {
|
|
177
206
|
var _res2;
|
|
178
|
-
_antd.message.error(((_res2 = res) === null || _res2 === void 0 ? void 0 : _res2.msg) ||
|
|
207
|
+
_antd.message.error(((_res2 = res) === null || _res2 === void 0 ? void 0 : _res2.msg) || TextEnum.uploadFailedText);
|
|
179
208
|
}
|
|
180
209
|
}
|
|
181
210
|
};
|
|
182
211
|
xhr.onerror = function () {
|
|
183
|
-
_antd.message.error(
|
|
212
|
+
_antd.message.error(TextEnum.uploadFailedText);
|
|
184
213
|
};
|
|
185
214
|
// 发送请求
|
|
186
215
|
xhr.open('POST', '/cloudFile/common/mergeChunk', true);
|
|
@@ -307,7 +336,7 @@ function VtxImport(props) {
|
|
|
307
336
|
try {
|
|
308
337
|
parseData = JSON.parse(data);
|
|
309
338
|
} catch (e) {
|
|
310
|
-
_antd.message.error(
|
|
339
|
+
_antd.message.error(TextEnum.parseResponseDataFailedText);
|
|
311
340
|
return;
|
|
312
341
|
}
|
|
313
342
|
if (typeof props.afterUpload === 'function') {
|
|
@@ -329,18 +358,14 @@ function VtxImport(props) {
|
|
|
329
358
|
// 新增其他错误提示
|
|
330
359
|
if (parseData.result !== 0) {
|
|
331
360
|
var _parseData2;
|
|
332
|
-
_antd.message.error(((_parseData2 = parseData) === null || _parseData2 === void 0 ? void 0 : _parseData2.msg) ||
|
|
361
|
+
_antd.message.error(((_parseData2 = parseData) === null || _parseData2 === void 0 ? void 0 : _parseData2.msg) || TextEnum.uploadSuccessText);
|
|
333
362
|
}
|
|
334
363
|
}
|
|
335
364
|
};
|
|
336
|
-
var templateURL = props.templateURL,
|
|
337
|
-
uploadURL = props.uploadURL,
|
|
338
|
-
afterUpload = props.afterUpload,
|
|
339
|
-
beforeUpload = props.beforeUpload;
|
|
340
365
|
var modalProps = {
|
|
341
366
|
className: "".concat(prefixCls, "-modal"),
|
|
342
367
|
open: state.visible,
|
|
343
|
-
title:
|
|
368
|
+
title: TextEnum.operationText,
|
|
344
369
|
onCancel: function onCancel() {
|
|
345
370
|
return closeModal();
|
|
346
371
|
},
|
|
@@ -352,7 +377,7 @@ function VtxImport(props) {
|
|
|
352
377
|
onClick: function onClick() {
|
|
353
378
|
window.open(templateURL);
|
|
354
379
|
},
|
|
355
|
-
children:
|
|
380
|
+
children: TextEnum.downloadTemplateText
|
|
356
381
|
}, "downloadTemple") : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
357
382
|
type: "primary",
|
|
358
383
|
loading: state.uploading,
|
|
@@ -391,15 +416,15 @@ function VtxImport(props) {
|
|
|
391
416
|
// request.send(fmd);
|
|
392
417
|
// }
|
|
393
418
|
} else {
|
|
394
|
-
_antd.message.info(
|
|
419
|
+
_antd.message.info(TextEnum.pleaseSelectFileText);
|
|
395
420
|
}
|
|
396
421
|
},
|
|
397
|
-
children:
|
|
422
|
+
children: TextEnum.uploadText
|
|
398
423
|
}, "uploadSubmit"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
|
|
399
424
|
onClick: function onClick() {
|
|
400
425
|
closeModal();
|
|
401
426
|
},
|
|
402
|
-
children:
|
|
427
|
+
children: TextEnum.btnCloseText
|
|
403
428
|
}, "closeWindow")],
|
|
404
429
|
width: 520
|
|
405
430
|
};
|
|
@@ -412,7 +437,8 @@ function VtxImport(props) {
|
|
|
412
437
|
resultVisible: false
|
|
413
438
|
});
|
|
414
439
|
},
|
|
415
|
-
modalWidth: state.modalWidth
|
|
440
|
+
modalWidth: state.modalWidth,
|
|
441
|
+
TextEnum: TextEnum
|
|
416
442
|
};
|
|
417
443
|
|
|
418
444
|
// 组件卸载时清理
|
|
@@ -486,7 +512,7 @@ function VtxImport(props) {
|
|
|
486
512
|
onClick: handleSelectFile,
|
|
487
513
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
488
514
|
className: "".concat(prefixCls, "-label"),
|
|
489
|
-
children:
|
|
515
|
+
children: TextEnum.selectFileText
|
|
490
516
|
})
|
|
491
517
|
}), state.fileName ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
492
518
|
title: state.fileName,
|
|
@@ -496,7 +522,7 @@ function VtxImport(props) {
|
|
|
496
522
|
})
|
|
497
523
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
498
524
|
className: "".concat(prefixCls, "-file-name"),
|
|
499
|
-
children:
|
|
525
|
+
children: TextEnum.noFileSelectedText
|
|
500
526
|
})]
|
|
501
527
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
502
528
|
type: "file",
|
|
@@ -524,11 +550,13 @@ VtxImport.propTypes = {
|
|
|
524
550
|
postData: _propTypes.default.object,
|
|
525
551
|
fileKey: _propTypes.default.string,
|
|
526
552
|
accept: _propTypes.default.string,
|
|
553
|
+
token: _propTypes.default.string,
|
|
527
554
|
operation: _propTypes.default.string,
|
|
528
555
|
close: _propTypes.default.func,
|
|
529
556
|
afterUpload: _propTypes.default.func,
|
|
530
557
|
modalWidth: _propTypes.default.number,
|
|
531
558
|
columns: _propTypes.default.array,
|
|
559
|
+
customEnumText: _propTypes.default.object,
|
|
532
560
|
children: _propTypes.default.object,
|
|
533
561
|
beforeUpload: _propTypes.default.func,
|
|
534
562
|
chunkSize: _propTypes.default.number
|
package/lib/vtx-import/result.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,23 +9,26 @@ var _antd = require("antd");
|
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
10
|
var _useSet3 = _interopRequireDefault(require("../utils/useSet"));
|
|
12
11
|
var _vtxDatagrid = _interopRequireDefault(require("../vtx-datagrid"));
|
|
13
|
-
var _vtxProvider = require("../vtx-provider");
|
|
14
12
|
var _vtxModal = _interopRequireDefault(require("../vtx-modal"));
|
|
15
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function
|
|
18
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
22
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
17
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
18
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
26
20
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
27
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
26
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
27
|
function VtxImportResult(props) {
|
|
29
|
-
var
|
|
28
|
+
var TextEnum = _objectSpread({
|
|
29
|
+
resultTitleText: '导入结果',
|
|
30
|
+
btnCloseText: '关闭'
|
|
31
|
+
}, props.TextEnum);
|
|
30
32
|
var _useSet = (0, _useSet3.default)({
|
|
31
33
|
visible: props.visible || false,
|
|
32
34
|
dataSource: props.dataSource || [],
|
|
@@ -36,11 +38,9 @@ function VtxImportResult(props) {
|
|
|
36
38
|
_useSet2 = _slicedToArray(_useSet, 1),
|
|
37
39
|
state = _useSet2[0];
|
|
38
40
|
var modalProps = {
|
|
39
|
-
bodyStyle: {
|
|
40
|
-
backgroundColor: '#f8f8f8'
|
|
41
|
-
},
|
|
41
|
+
bodyStyle: {},
|
|
42
42
|
open: state.visible,
|
|
43
|
-
title:
|
|
43
|
+
title: TextEnum.resultTitleText,
|
|
44
44
|
onCancel: function onCancel() {
|
|
45
45
|
if (typeof props.hideVisible === 'function') {
|
|
46
46
|
props.hideVisible();
|
|
@@ -57,29 +57,26 @@ function VtxImportResult(props) {
|
|
|
57
57
|
props.hideVisible();
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
children:
|
|
60
|
+
children: TextEnum.btnCloseText
|
|
61
61
|
}, "closeWindow")]
|
|
62
62
|
};
|
|
63
63
|
var newTableProps = {
|
|
64
|
+
toolba: false,
|
|
64
65
|
columns: state.columns,
|
|
65
66
|
dataSource: state.dataSource,
|
|
66
67
|
startIndex: 1,
|
|
67
68
|
size: 'small',
|
|
68
69
|
headFootHeight: 50,
|
|
69
70
|
pagination: false,
|
|
70
|
-
autoFit: false
|
|
71
|
+
autoFit: false,
|
|
72
|
+
scroll: {
|
|
73
|
+
y: 550
|
|
74
|
+
}
|
|
71
75
|
};
|
|
72
76
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxModal.default, _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
73
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
width: '100%',
|
|
77
|
-
overflow: 'auto'
|
|
78
|
-
},
|
|
79
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxDatagrid.default, _objectSpread({
|
|
80
|
-
toolbar: false
|
|
81
|
-
}, newTableProps))
|
|
82
|
-
})
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vtxDatagrid.default, _objectSpread({
|
|
78
|
+
toolbar: false
|
|
79
|
+
}, newTableProps))
|
|
83
80
|
}));
|
|
84
81
|
}
|
|
85
82
|
VtxImportResult.propTypes = {
|
|
@@ -87,6 +84,7 @@ VtxImportResult.propTypes = {
|
|
|
87
84
|
dataSource: _propTypes.default.array,
|
|
88
85
|
columns: _propTypes.default.array,
|
|
89
86
|
modalWidth: _propTypes.default.number,
|
|
90
|
-
hideVisible: _propTypes.default.func
|
|
87
|
+
hideVisible: _propTypes.default.func,
|
|
88
|
+
TextEnum: _propTypes.default.object
|
|
91
89
|
};
|
|
92
90
|
var _default = exports.default = VtxImportResult;
|
package/lib/vtx-modal/index.js
CHANGED
|
@@ -10,8 +10,8 @@ var _style = require("./style");
|
|
|
10
10
|
var _vtxProvider = require("../vtx-provider");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
/**
|
|
14
|
-
* 基础布局
|
|
13
|
+
/**
|
|
14
|
+
* 基础布局
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
function Basic(props) {
|
|
@@ -12,9 +12,9 @@ var _style = require("./style");
|
|
|
12
12
|
var _vtxProvider = require("../vtx-provider");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
/**
|
|
16
|
-
* 页面
|
|
17
|
-
* @param {*} props
|
|
15
|
+
/**
|
|
16
|
+
* 页面
|
|
17
|
+
* @param {*} props
|
|
18
18
|
*/var Page = function Page(props) {
|
|
19
19
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
20
20
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -34,9 +34,9 @@ Page.propTypes = {
|
|
|
34
34
|
children: _propTypes.default.node
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* 内容
|
|
39
|
-
* @param {*} props
|
|
37
|
+
/**
|
|
38
|
+
* 内容
|
|
39
|
+
* @param {*} props
|
|
40
40
|
*/
|
|
41
41
|
var Content = function Content(props) {
|
|
42
42
|
var className = props.className,
|
|
@@ -33,9 +33,9 @@ var pagePaddingTop = 20;
|
|
|
33
33
|
var searchMarginBottom = 20;
|
|
34
34
|
|
|
35
35
|
// eslint-disable-next-line valid-jsdoc
|
|
36
|
-
/**
|
|
37
|
-
* 页面
|
|
38
|
-
* @param {*} props
|
|
36
|
+
/**
|
|
37
|
+
* 页面
|
|
38
|
+
* @param {*} props
|
|
39
39
|
*/
|
|
40
40
|
var Page = function Page(props) {
|
|
41
41
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
@@ -83,17 +83,17 @@ Page.propTypes = {
|
|
|
83
83
|
onSearchCollapse: _propTypes.default.func
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
-
/**
|
|
87
|
-
* 搜索
|
|
86
|
+
/**
|
|
87
|
+
* 搜索
|
|
88
88
|
*/
|
|
89
89
|
var Search = (0, _container.default)({
|
|
90
90
|
componentClass: 'vtx-page-table-search'
|
|
91
91
|
})(_Basic.default);
|
|
92
92
|
|
|
93
93
|
// eslint-disable-next-line valid-jsdoc
|
|
94
|
-
/**
|
|
95
|
-
* 内容
|
|
96
|
-
* @param {*} props
|
|
94
|
+
/**
|
|
95
|
+
* 内容
|
|
96
|
+
* @param {*} props
|
|
97
97
|
*/
|
|
98
98
|
var Content = function Content(props) {
|
|
99
99
|
var className = props.className,
|
|
@@ -128,8 +128,8 @@ Content.propTypes = {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// eslint-disable-next-line valid-jsdoc
|
|
131
|
-
/**
|
|
132
|
-
* 表格布局
|
|
131
|
+
/**
|
|
132
|
+
* 表格布局
|
|
133
133
|
*/
|
|
134
134
|
var Table = function Table(props) {
|
|
135
135
|
var className = props.className,
|
|
@@ -11,9 +11,9 @@ var _style = require("./style");
|
|
|
11
11
|
var _vtxProvider = require("../vtx-provider");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
/**
|
|
15
|
-
* 页面
|
|
16
|
-
* @param {*} props
|
|
14
|
+
/**
|
|
15
|
+
* 页面
|
|
16
|
+
* @param {*} props
|
|
17
17
|
*/var Page = function Page(props) {
|
|
18
18
|
var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
|
|
19
19
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -33,9 +33,9 @@ Page.propTypes = {
|
|
|
33
33
|
children: _propTypes.default.node
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 内容
|
|
38
|
-
* @param {*} props
|
|
36
|
+
/**
|
|
37
|
+
* 内容
|
|
38
|
+
* @param {*} props
|
|
39
39
|
*/
|
|
40
40
|
var Content = function Content(props) {
|
|
41
41
|
var className = props.className,
|
|
@@ -24,8 +24,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
24
24
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
25
25
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
26
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
27
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
28
|
-
* 高阶组件
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
28
|
+
* 高阶组件
|
|
29
29
|
*/
|
|
30
30
|
function getDisplayName(WrappedComponend) {
|
|
31
31
|
return WrappedComponend.displayName || WrappedComponend.name || 'Component';
|