@ccs-ui/rc-pro 2.5.1 → 2.5.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.
- package/docs-dist/404.html +1 -1
- package/docs-dist/guide/index.html +1 -1
- package/docs-dist/index.html +1 -1
- package/docs-dist/{meta__packages.e5126d73.async.js → meta__packages.f00cbe8b.async.js} +116 -73
- package/docs-dist/plugins/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/enumerations/DataEvent.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomCheckboxApiProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomCheckboxProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomEllipsisProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomFullScreenProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomLoadingProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/AtomMultiStateProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/interfaces/ResizeSize.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomCountdownInstance.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomCountdownProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomFilterInstance.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomFilterProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomFormItem.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomFormItems.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomOperationProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomPageRequestProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomResizeProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/AtomTitleProps.md/index.html +1 -1
- package/docs-dist/rc-pro/atom/_api/type-aliases/TableEventHandle.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/interfaces/ButtonGroupProps.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/interfaces/DropdownProps.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/interfaces/GroupButtonItem.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/type-aliases/ButtonProps.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/type-aliases/DropdownClick.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/type-aliases/DropdownMenuItemType.md/index.html +1 -1
- package/docs-dist/rc-pro/button/_api/type-aliases/GroupClick.md/index.html +1 -1
- package/docs-dist/rc-pro/cascader/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/cascader/_api/type-aliases/ApiCascaderProps.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/type-aliases/AppConfigType.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/type-aliases/AppFieldNames.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/type-aliases/FnContextType.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/type-aliases/PageContextType.md/index.html +1 -1
- package/docs-dist/rc-pro/context/_api/type-aliases/PageFieldNames.md/index.html +1 -1
- package/docs-dist/rc-pro/date-picker/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/date-picker/_api/type-aliases/DatePickerProps.md/index.html +1 -1
- package/docs-dist/rc-pro/date-picker/_api/type-aliases/RangePickerProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/interfaces/DialogContextType.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/interfaces/DialogDrawer.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/interfaces/DialogInterface.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/interfaces/DialogModal.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/interfaces/DialogProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/DialogButtonsProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/DialogDrawerProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/DialogModalProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/OkBtnProps.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/OkEvent.md/index.html +1 -1
- package/docs-dist/rc-pro/dialog/_api/type-aliases/Service.md/index.html +1 -1
- package/docs-dist/rc-pro/editor/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/editor/_api/type-aliases/EditorCodeProps.md/index.html +1 -1
- package/docs-dist/rc-pro/editor/_api/type-aliases/EditorRichProps.md/index.html +1 -1
- package/docs-dist/rc-pro/editor/_api/type-aliases/LexicalEditorBaseProps.md/index.html +1 -1
- package/docs-dist/rc-pro/editor/_api/type-aliases/RichImageUpload.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/FormItem.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/FormItemChildren.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/FormItemProps.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/FormListProps.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/ListItemBtnProps.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/RenderItem.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/RenderItemButton.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/RenderItemProps.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/RuleType.md/index.html +1 -1
- package/docs-dist/rc-pro/form/_api/type-aliases/ShowValidateEvent.md/index.html +1 -1
- package/docs-dist/rc-pro/index.html +1 -1
- package/docs-dist/rc-pro/index.md/index.html +1 -1
- package/docs-dist/rc-pro/page-layout/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/page-layout/_api/interfaces/SinglePageProps.md/index.html +1 -1
- package/docs-dist/rc-pro/page-layout/_api/type-aliases/KeepAliveTabsProps.md/index.html +1 -1
- package/docs-dist/rc-pro/page-layout/_api/type-aliases/MenuType.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/interfaces/ProTableProps.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/interfaces/TableInstance.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/interfaces/TableProps.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/LeafVerify.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TableColumn.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TableColumns.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TableData.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TableFormItems.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TableInstanceRef.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-table/_api/type-aliases/TreeInstance.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-tabs/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-tabs/_api/interfaces/TabsChangeProps.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-tabs/_api/interfaces/TabsContextType.md/index.html +1 -1
- package/docs-dist/rc-pro/pro-tabs/_api/type-aliases/TabProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/interfaces/ApiRequestProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/interfaces/RequestType.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/ApiSelectProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/CacheType.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/CustomizeSelectProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/ModalSelectProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/SelectChildrenProps.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/SelectFieldNames.md/index.html +1 -1
- package/docs-dist/rc-pro/select/_api/type-aliases/SelectProps.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/interfaces/ImageInfo.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/type-aliases/FileUploadList.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/type-aliases/FileValue.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/type-aliases/UploadImageProps.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/type-aliases/UploadProps.md/index.html +1 -1
- package/docs-dist/rc-pro/upload/_api/type-aliases/UploadRequest.md/index.html +1 -1
- package/docs-dist/rc-pro/water-mark/_api/index.md/index.html +1 -1
- package/docs-dist/rc-pro/water-mark/_api/type-aliases/WaterMarkProps.md/index.html +1 -1
- package/docs-dist/rc-pro-ai/aj-captcha/index.html +1 -1
- package/docs-dist/rc-pro-ai/atom/index.html +1 -1
- package/docs-dist/rc-pro-ai/auth/index.html +1 -1
- package/docs-dist/rc-pro-ai/button/index.html +1 -1
- package/docs-dist/rc-pro-ai/cascader/index.html +1 -1
- package/docs-dist/rc-pro-ai/color-picker/index.html +1 -1
- package/docs-dist/rc-pro-ai/context/index.html +1 -1
- package/docs-dist/rc-pro-ai/date-picker/index.html +1 -1
- package/docs-dist/rc-pro-ai/dialog/index.html +1 -1
- package/docs-dist/rc-pro-ai/editor/index.html +1 -1
- package/docs-dist/rc-pro-ai/form/index.html +1 -1
- package/docs-dist/rc-pro-ai/hooks/index.html +1 -1
- package/docs-dist/rc-pro-ai/index.html +1 -1
- package/docs-dist/rc-pro-ai/page-layout/index.html +1 -1
- package/docs-dist/rc-pro-ai/pro-table/index.html +1 -1
- package/docs-dist/rc-pro-ai/pro-tabs/index.html +1 -1
- package/docs-dist/rc-pro-ai/result/index.html +1 -1
- package/docs-dist/rc-pro-ai/select/index.html +1 -1
- package/docs-dist/rc-pro-ai/status-tag/index.html +1 -1
- package/docs-dist/rc-pro-ai/table/index.html +1 -1
- package/docs-dist/rc-pro-ai/time-picker/index.html +1 -1
- package/docs-dist/rc-pro-ai/upload/index.html +1 -1
- package/docs-dist/rc-pro-ai/water-mark/index.html +1 -1
- package/docs-dist/rc-pros/atom/index.html +1 -1
- package/docs-dist/rc-pros/auth/index.html +1 -1
- package/docs-dist/rc-pros/button/index.html +1 -1
- package/docs-dist/rc-pros/cascader/index.html +1 -1
- package/docs-dist/rc-pros/date-picker/index.html +1 -1
- package/docs-dist/rc-pros/dialog/index.html +1 -1
- package/docs-dist/rc-pros/editor/index.html +1 -1
- package/docs-dist/rc-pros/form/index.html +1 -1
- package/docs-dist/rc-pros/index.html +1 -1
- package/docs-dist/rc-pros/page-layout/index.html +1 -1
- package/docs-dist/rc-pros/pro-table/index.html +1 -1
- package/docs-dist/rc-pros/pro-tabs/index.html +1 -1
- package/docs-dist/rc-pros/result/index.html +1 -1
- package/docs-dist/rc-pros/select/index.html +1 -1
- package/docs-dist/rc-pros/time-picker/index.html +1 -1
- package/docs-dist/rc-pros/upload/index.html +1 -1
- package/docs-dist/rc-pros/water-mark/index.html +1 -1
- package/docs-dist/{umi.9f9e62ae.js → umi.dffa2f24.js} +2 -2
- package/docs-dist/upload__demos.dae20716.async.js +1 -0
- package/docs-dist/utils/index.html +1 -1
- package/docs-dist/~demos/:id/index.html +1 -1
- package/docs-dist/~demos/atom-demo-base/index.html +1 -1
- package/docs-dist/~demos/atom-demo-checkbox/index.html +1 -1
- package/docs-dist/~demos/atom-demo-ellipsis/index.html +1 -1
- package/docs-dist/~demos/atom-demo-filter/index.html +1 -1
- package/docs-dist/~demos/atom-demo-state/index.html +1 -1
- package/docs-dist/~demos/auth-demo-basic/index.html +1 -1
- package/docs-dist/~demos/button-demo-button/index.html +1 -1
- package/docs-dist/~demos/button-demo-group/index.html +1 -1
- package/docs-dist/~demos/cascader-demo-basic/index.html +1 -1
- package/docs-dist/~demos/cascader-demo-cache/index.html +1 -1
- package/docs-dist/~demos/date-picker-demo-basic/index.html +1 -1
- package/docs-dist/~demos/date-picker-demo-range/index.html +1 -1
- package/docs-dist/~demos/dialog-demo-demos/index.html +1 -1
- package/docs-dist/~demos/dialog-demo-form/index.html +1 -1
- package/docs-dist/~demos/dialog-demo-prompt/index.html +1 -1
- package/docs-dist/~demos/editor-demo-demos/index.html +1 -1
- package/docs-dist/~demos/editor-demo-rich/index.html +1 -1
- package/docs-dist/~demos/form-demo-demos/index.html +1 -1
- package/docs-dist/~demos/packages-utils-src-demo-demos/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-basic/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-cascade/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-extra/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-filter/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-fixed/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-refresh/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-selection/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-show-depend/index.html +1 -1
- package/docs-dist/~demos/pro-table-demo-tree-async/index.html +1 -1
- package/docs-dist/~demos/pro-tabs-demo-basic/index.html +1 -1
- package/docs-dist/~demos/pro-tabs-demo-tab/index.html +1 -1
- package/docs-dist/~demos/result-demo-basic/index.html +1 -1
- package/docs-dist/~demos/select-demo-api/index.html +1 -1
- package/docs-dist/~demos/select-demo-basic/index.html +1 -1
- package/docs-dist/~demos/select-demo-customize/index.html +1 -1
- package/docs-dist/~demos/select-demo-customize-label/index.html +1 -1
- package/docs-dist/~demos/time-picker-demo-basic/index.html +1 -1
- package/docs-dist/~demos/upload-demo-basic/index.html +1 -1
- package/docs-dist/~demos/upload-demo-image/index.html +1 -1
- package/docs-dist/~demos/water-mark-demo-basic/index.html +1 -1
- package/es/atom/filter.js +47 -29
- package/es/config.js +2 -3
- package/es/page-layout/_api.d.ts +15 -2
- package/es/page-layout/keep-alive/index.d.ts +1 -1
- package/es/page-layout/keep-alive/index.js +20 -7
- package/es/page-layout/keep-alive/page.d.ts +6 -4
- package/es/page-layout/keep-alive/page.js +16 -13
- package/es/page-layout/single-page/index.d.ts +1 -1
- package/es/page-layout/single-page/index.js +28 -6
- package/es/page-layout/single-page/page.d.ts +6 -4
- package/es/page-layout/single-page/page.js +17 -10
- package/es/pro-table/table.js +4 -4
- package/es/table/index.js +4 -4
- package/package.json +1 -1
- package/docs-dist/upload__demos.003b4cc5.async.js +0 -1
|
@@ -17,7 +17,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
17
17
|
import { MoreOutlined } from '@ant-design/icons';
|
|
18
18
|
import CcsUtils from '@ccs-ui/utils';
|
|
19
19
|
import { useMemoizedFn, useUpdate, useUpdateEffect } from 'ahooks';
|
|
20
|
-
import { Button, Dropdown, Tabs } from 'antd';
|
|
20
|
+
import { Breadcrumb, Button, Dropdown, Tabs } from 'antd';
|
|
21
21
|
import classnames from 'classnames';
|
|
22
22
|
import updateHelper from 'immutability-helper';
|
|
23
23
|
import { useCallback, useMemo, useRef } from 'react';
|
|
@@ -126,7 +126,7 @@ export function findMenusByUrl(tree, targetUrl) {
|
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
128
|
function KeepAliveTabs(_ref) {
|
|
129
|
-
var _defaultPage$menu;
|
|
129
|
+
var _defaultPage$menu, _routeProps$meta;
|
|
130
130
|
var _ref$maxLen = _ref.maxLen,
|
|
131
131
|
maxLen = _ref$maxLen === void 0 ? 10 : _ref$maxLen,
|
|
132
132
|
appName = _ref.appName,
|
|
@@ -136,8 +136,11 @@ function KeepAliveTabs(_ref) {
|
|
|
136
136
|
className = _ref.className,
|
|
137
137
|
hideBreadcrumb = _ref.hideBreadcrumb,
|
|
138
138
|
defaultPage = _ref.defaultPage,
|
|
139
|
-
basePath = _ref.basePath
|
|
139
|
+
basePath = _ref.basePath,
|
|
140
|
+
useRouteProps = _ref.useRouteProps,
|
|
141
|
+
breadcrumbStyle = _ref.breadcrumbStyle;
|
|
140
142
|
var location = useLocation();
|
|
143
|
+
var routeProps = (useRouteProps === null || useRouteProps === void 0 ? void 0 : useRouteProps()) || {};
|
|
141
144
|
|
|
142
145
|
// 路由集合、添加默认页
|
|
143
146
|
var routers = useRef(defaultPage ? [{
|
|
@@ -148,7 +151,7 @@ function KeepAliveTabs(_ref) {
|
|
|
148
151
|
urlAuthList: ((_defaultPage$menu = defaultPage.menu) === null || _defaultPage$menu === void 0 || (_defaultPage$menu = _defaultPage$menu.btnAuth) === null || _defaultPage$menu === void 0 ? void 0 : _defaultPage$menu.map(function (b) {
|
|
149
152
|
return b.code;
|
|
150
153
|
})) || [],
|
|
151
|
-
breadcrumb: hideBreadcrumb ||
|
|
154
|
+
breadcrumb: hideBreadcrumb || (_routeProps$meta = routeProps.meta) !== null && _routeProps$meta !== void 0 && _routeProps$meta.hideBreadcrumb ? [] : [{
|
|
152
155
|
key: '-1',
|
|
153
156
|
title: '首页',
|
|
154
157
|
href: basePath || undefined
|
|
@@ -196,6 +199,7 @@ function KeepAliveTabs(_ref) {
|
|
|
196
199
|
|
|
197
200
|
// 当前菜单
|
|
198
201
|
var curMenu = useMemo(function () {
|
|
202
|
+
var _routeProps$meta2;
|
|
199
203
|
// 上下级菜单
|
|
200
204
|
var menus = findMenusByUrl(menuItems, pathname) || [];
|
|
201
205
|
// 当前菜单
|
|
@@ -253,7 +257,7 @@ function KeepAliveTabs(_ref) {
|
|
|
253
257
|
}();
|
|
254
258
|
if (menu) saveHistory();
|
|
255
259
|
var breadcrumb = [];
|
|
256
|
-
if (!hideBreadcrumb && !(
|
|
260
|
+
if (!hideBreadcrumb && !((_routeProps$meta2 = routeProps.meta) !== null && _routeProps$meta2 !== void 0 && _routeProps$meta2.hideBreadcrumb)) {
|
|
257
261
|
// 面包屑数据
|
|
258
262
|
breadcrumb = menus.map(function (m) {
|
|
259
263
|
return {
|
|
@@ -417,17 +421,26 @@ function KeepAliveTabs(_ref) {
|
|
|
417
421
|
}));
|
|
418
422
|
}
|
|
419
423
|
}), routers.current.map(function (_ref4) {
|
|
424
|
+
var _routeProps$meta3;
|
|
420
425
|
var key = _ref4.key,
|
|
421
426
|
urlAuthList = _ref4.urlAuthList,
|
|
422
427
|
outlet = _ref4.outlet,
|
|
423
|
-
breadcrumb = _ref4.breadcrumb,
|
|
428
|
+
_ref4$breadcrumb = _ref4.breadcrumb,
|
|
429
|
+
breadcrumb = _ref4$breadcrumb === void 0 ? [] : _ref4$breadcrumb,
|
|
424
430
|
pageLocation = _ref4.pageLocation;
|
|
425
431
|
return /*#__PURE__*/_jsx(Page, {
|
|
426
432
|
active: pageLocation.pathname === pathname,
|
|
427
433
|
location: pageLocation,
|
|
428
434
|
onDestroy: onDestroy,
|
|
429
435
|
urlAuthList: urlAuthList,
|
|
430
|
-
|
|
436
|
+
isCustomLayout: (_routeProps$meta3 = routeProps.meta) === null || _routeProps$meta3 === void 0 ? void 0 : _routeProps$meta3.isCustomLayout,
|
|
437
|
+
breadcrumb: breadcrumb.length > 0 && /*#__PURE__*/_jsx(Breadcrumb, {
|
|
438
|
+
items: breadcrumb,
|
|
439
|
+
className: "ccs-breadcrumb",
|
|
440
|
+
style: _objectSpread({
|
|
441
|
+
marginTop: -6
|
|
442
|
+
}, breadcrumbStyle)
|
|
443
|
+
}),
|
|
431
444
|
children: outlet
|
|
432
445
|
}, key);
|
|
433
446
|
})]
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { Location } from 'react-router';
|
|
3
3
|
import { CacheRouter } from '.';
|
|
4
|
-
export type CachePageProps = Pick<CacheRouter, '
|
|
4
|
+
export type CachePageProps = Pick<CacheRouter, 'urlAuthList' | 'children'> & {
|
|
5
5
|
/** 选中状态 */
|
|
6
6
|
active: boolean;
|
|
7
7
|
/** router location */
|
|
8
8
|
location: Location;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** 面包屑 */
|
|
10
|
+
breadcrumb?: ReactNode;
|
|
11
|
+
/** 是否自定义布局 */
|
|
12
|
+
isCustomLayout?: boolean;
|
|
11
13
|
/** 销毁页面 */
|
|
12
14
|
onDestroy: (path: string) => void;
|
|
13
15
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
2
7
|
import classNames from 'classnames';
|
|
3
8
|
import { memo, useRef } from 'react';
|
|
4
9
|
import { PageContext } from "../../context";
|
|
@@ -13,7 +18,7 @@ function CachePage(props) {
|
|
|
13
18
|
_props$breadcrumb = props.breadcrumb,
|
|
14
19
|
breadcrumb = _props$breadcrumb === void 0 ? [] : _props$breadcrumb,
|
|
15
20
|
location = props.location,
|
|
16
|
-
|
|
21
|
+
isCustomLayout = props.isCustomLayout;
|
|
17
22
|
var id = "_tab_content_".concat(location.key);
|
|
18
23
|
var dialogHolderRef = useRef(null);
|
|
19
24
|
return /*#__PURE__*/_jsx(PageContext.Provider, {
|
|
@@ -22,7 +27,6 @@ function CachePage(props) {
|
|
|
22
27
|
dialogHolderRef: dialogHolderRef,
|
|
23
28
|
isActive: active,
|
|
24
29
|
location: location,
|
|
25
|
-
breadcrumb: breadcrumb,
|
|
26
30
|
onDestroy: onDestroy,
|
|
27
31
|
onAuth: function onAuth(e) {
|
|
28
32
|
return urlAuthList.includes(e);
|
|
@@ -30,24 +34,23 @@ function CachePage(props) {
|
|
|
30
34
|
},
|
|
31
35
|
children: /*#__PURE__*/_jsx("div", {
|
|
32
36
|
id: id,
|
|
33
|
-
style: {
|
|
37
|
+
style: _objectSpread({
|
|
34
38
|
display: active ? 'block' : 'none'
|
|
35
|
-
},
|
|
39
|
+
}, isCustomLayout ? {
|
|
40
|
+
padding: 0,
|
|
41
|
+
overflow: 'hidden'
|
|
42
|
+
} : {}),
|
|
36
43
|
className: "ccs-tab-item",
|
|
37
44
|
"data-display": active,
|
|
38
45
|
children: /*#__PURE__*/_jsxs("div", {
|
|
39
46
|
className: classNames('ccs-layout-page', {
|
|
40
47
|
'page-avtive': active
|
|
41
48
|
}),
|
|
42
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
43
|
-
className:
|
|
44
|
-
}), breadcrumb
|
|
45
|
-
items: breadcrumb,
|
|
46
|
-
className: "ccs-breadcrumb",
|
|
47
|
-
style: breadcrumbStyle
|
|
48
|
-
}), children, /*#__PURE__*/_jsx(DialogElementsHolder, {
|
|
49
|
+
children: [!isCustomLayout && /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: "page-top-16"
|
|
51
|
+
}), breadcrumb, children, /*#__PURE__*/_jsx(DialogElementsHolder, {
|
|
49
52
|
ref: dialogHolderRef
|
|
50
|
-
}, "modal-drawer-holder"), /*#__PURE__*/_jsx("div", {
|
|
53
|
+
}, "modal-drawer-holder"), !isCustomLayout && /*#__PURE__*/_jsx("div", {
|
|
51
54
|
className: "page-bottom"
|
|
52
55
|
})]
|
|
53
56
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SinglePageProps } from '../_api';
|
|
2
|
-
declare function SinglePage({ appName, menuItems, breadcrumbStyle, hideBreadcrumb, children, basePath, }: SinglePageProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function SinglePage({ appName, menuItems, breadcrumbStyle, hideBreadcrumb, children, basePath, useRouteProps, }: SinglePageProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace SinglePage {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -1,27 +1,43 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
import { useInsertCss } from "../../hooks/use-insert-css";
|
|
8
|
+
import { Breadcrumb } from 'antd';
|
|
1
9
|
import { useMemo } from 'react';
|
|
2
10
|
import { useLocation } from 'react-router';
|
|
3
11
|
import { useOutlet } from 'react-router-dom';
|
|
4
12
|
import CcsResult from "../../result";
|
|
5
13
|
import { findMenusByUrl } from "../keep-alive";
|
|
6
14
|
import Page from "./page";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
18
|
function SinglePage(_ref) {
|
|
19
|
+
var _routeProps$meta2;
|
|
11
20
|
var appName = _ref.appName,
|
|
12
21
|
_ref$menuItems = _ref.menuItems,
|
|
13
22
|
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems,
|
|
14
23
|
breadcrumbStyle = _ref.breadcrumbStyle,
|
|
15
24
|
hideBreadcrumb = _ref.hideBreadcrumb,
|
|
16
25
|
children = _ref.children,
|
|
17
|
-
basePath = _ref.basePath
|
|
26
|
+
basePath = _ref.basePath,
|
|
27
|
+
useRouteProps = _ref.useRouteProps;
|
|
18
28
|
var location = useLocation();
|
|
19
29
|
var pathname = location.pathname;
|
|
20
30
|
var outlet = useOutlet();
|
|
31
|
+
var routeProps = (useRouteProps === null || useRouteProps === void 0 ? void 0 : useRouteProps()) || {};
|
|
32
|
+
|
|
33
|
+
// 添加额外样式
|
|
34
|
+
useInsertCss('single-page', function (prefixCls) {
|
|
35
|
+
return [".ccs-tabs-auto-height > .".concat(prefixCls, "-tabs-content-holder,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content,\n .ccs-tabs-auto-height > .").concat(prefixCls, "-tabs-content-holder > .").concat(prefixCls, "-tabs-content > div,\n .ccs-tabs-auto-height> .").concat(prefixCls, "-tabs-content-holder> .").concat(prefixCls, "-tabs-content> div> .ccs-pl { height: 100%;}")];
|
|
36
|
+
});
|
|
21
37
|
|
|
22
38
|
// 当前菜单
|
|
23
39
|
var menuInfo = useMemo(function () {
|
|
24
|
-
var _menu$btnAuth;
|
|
40
|
+
var _routeProps$meta, _menu$btnAuth;
|
|
25
41
|
var menus = findMenusByUrl(menuItems, pathname) || [];
|
|
26
42
|
var menu = menus === null || menus === void 0 ? void 0 : menus.at(-1);
|
|
27
43
|
if (!menu) return undefined;
|
|
@@ -31,7 +47,7 @@ function SinglePage(_ref) {
|
|
|
31
47
|
document.title = "".concat((menu === null || menu === void 0 ? void 0 : menu.label) || (menu === null || menu === void 0 ? void 0 : menu.url), " - ").concat(appName);
|
|
32
48
|
}, 10);
|
|
33
49
|
var breadcrumb = [];
|
|
34
|
-
if (!hideBreadcrumb && !(
|
|
50
|
+
if (!hideBreadcrumb && !((_routeProps$meta = routeProps.meta) !== null && _routeProps$meta !== void 0 && _routeProps$meta.hideBreadcrumb)) {
|
|
35
51
|
breadcrumb = menus.map(function (m) {
|
|
36
52
|
return {
|
|
37
53
|
key: m.key,
|
|
@@ -56,8 +72,14 @@ function SinglePage(_ref) {
|
|
|
56
72
|
children: menuInfo !== null && menuInfo !== void 0 && menuInfo.auth ? /*#__PURE__*/_jsx(Page, {
|
|
57
73
|
location: location,
|
|
58
74
|
urlAuthList: menuInfo.auth,
|
|
59
|
-
breadcrumb: menuInfo.breadcrumb,
|
|
60
|
-
|
|
75
|
+
breadcrumb: menuInfo.breadcrumb.length > 0 && /*#__PURE__*/_jsx(Breadcrumb, {
|
|
76
|
+
items: menuInfo.breadcrumb,
|
|
77
|
+
className: "ccs-breadcrumb",
|
|
78
|
+
style: _objectSpread({
|
|
79
|
+
marginTop: -6
|
|
80
|
+
}, breadcrumbStyle)
|
|
81
|
+
}),
|
|
82
|
+
isCustomLayout: (_routeProps$meta2 = routeProps.meta) === null || _routeProps$meta2 === void 0 ? void 0 : _routeProps$meta2.isCustomLayout,
|
|
61
83
|
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
62
84
|
children: [outlet, children]
|
|
63
85
|
})
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JSXElementConstructor, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Location } from 'react-router';
|
|
3
3
|
import { CacheRouter } from '../keep-alive';
|
|
4
|
-
export type PageProps = Pick<CacheRouter, '
|
|
4
|
+
export type PageProps = Pick<CacheRouter, 'urlAuthList'> & {
|
|
5
5
|
/** router location */
|
|
6
6
|
location: Location;
|
|
7
|
+
/** 面包屑 */
|
|
8
|
+
breadcrumb?: ReactNode;
|
|
9
|
+
/** 是否自定义布局 */
|
|
10
|
+
isCustomLayout?: boolean;
|
|
7
11
|
/** children */
|
|
8
12
|
children: ReactElement<any, string | JSXElementConstructor<any>> | null;
|
|
9
|
-
/** 语义化style */
|
|
10
|
-
breadcrumbStyle?: CSSProperties;
|
|
11
13
|
};
|
|
12
14
|
declare const _default: import("react").MemoExoticComponent<(props: PageProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
15
|
export default _default;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
2
7
|
import { memo, useRef } from 'react';
|
|
3
8
|
import { PageContext } from "../../context";
|
|
4
9
|
import { DialogElementsHolder } from "../../dialog/hook";
|
|
@@ -10,7 +15,9 @@ export default /*#__PURE__*/memo(function (props) {
|
|
|
10
15
|
_props$urlAuthList = props.urlAuthList,
|
|
11
16
|
urlAuthList = _props$urlAuthList === void 0 ? [] : _props$urlAuthList,
|
|
12
17
|
_props$breadcrumb = props.breadcrumb,
|
|
13
|
-
breadcrumb = _props$breadcrumb === void 0 ? [] : _props$breadcrumb
|
|
18
|
+
breadcrumb = _props$breadcrumb === void 0 ? [] : _props$breadcrumb,
|
|
19
|
+
_props$isCustomLayout = props.isCustomLayout,
|
|
20
|
+
isCustomLayout = _props$isCustomLayout === void 0 ? false : _props$isCustomLayout;
|
|
14
21
|
var dialogHolderRef = useRef(null);
|
|
15
22
|
return /*#__PURE__*/_jsx(PageContext.Provider, {
|
|
16
23
|
value: {
|
|
@@ -27,15 +34,15 @@ export default /*#__PURE__*/memo(function (props) {
|
|
|
27
34
|
},
|
|
28
35
|
children: /*#__PURE__*/_jsxs("div", {
|
|
29
36
|
className: "ccs-layout-page single-page",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}), children, /*#__PURE__*/_jsx(DialogElementsHolder, {
|
|
37
|
+
style: _objectSpread({}, isCustomLayout ? {
|
|
38
|
+
padding: 0,
|
|
39
|
+
overflow: 'hidden'
|
|
40
|
+
} : {}),
|
|
41
|
+
children: [!isCustomLayout && /*#__PURE__*/_jsx("div", {
|
|
42
|
+
className: "page-top-16"
|
|
43
|
+
}), breadcrumb, children, /*#__PURE__*/_jsx(DialogElementsHolder, {
|
|
37
44
|
ref: dialogHolderRef
|
|
38
|
-
}, "modal-drawer-holder"), /*#__PURE__*/_jsx("div", {
|
|
45
|
+
}, "modal-drawer-holder"), !isCustomLayout && /*#__PURE__*/_jsx("div", {
|
|
39
46
|
className: "page-bottom"
|
|
40
47
|
})]
|
|
41
48
|
})
|
package/es/pro-table/table.js
CHANGED
|
@@ -90,10 +90,13 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
90
90
|
onEvent = props.onEvent;
|
|
91
91
|
// antd config
|
|
92
92
|
var config = useContext(ConfigContext);
|
|
93
|
+
// antd theme token
|
|
94
|
+
var _antTheme$useToken = antTheme.useToken(),
|
|
95
|
+
token = _antTheme$useToken.token;
|
|
93
96
|
|
|
94
97
|
// 添加额外样式
|
|
95
98
|
useInsertCss('table', function (prefixCls) {
|
|
96
|
-
return [".ccs-pl .".concat(prefixCls, "-table-title {padding: 0 !important;} ")];
|
|
99
|
+
return [".ccs-pl .".concat(prefixCls, "-table-title {padding: 0 !important;} "), ".ccs-pl .ant-table .ant-table-container .ant-table-body {scrollbar-width: thin;scrollbar-color: ".concat(token.colorBorder, " transparent;scrollbar-gutter: stable;} ")];
|
|
97
100
|
});
|
|
98
101
|
|
|
99
102
|
// table 参数
|
|
@@ -131,9 +134,6 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
131
134
|
// CCS 组件上下文配置
|
|
132
135
|
var _useAppConfig = useAppConfig(),
|
|
133
136
|
theme = _useAppConfig.theme;
|
|
134
|
-
// antd theme token
|
|
135
|
-
var _antTheme$useToken = antTheme.useToken(),
|
|
136
|
-
token = _antTheme$useToken.token;
|
|
137
137
|
var _usePageRequest = usePageRequest({
|
|
138
138
|
auth: auth,
|
|
139
139
|
rowKey: rowKey,
|
package/es/table/index.js
CHANGED
|
@@ -94,18 +94,18 @@ var CustomTable = function CustomTable(props) {
|
|
|
94
94
|
if (node.classList.contains("".concat(prefixCls, "-table-body"))) {
|
|
95
95
|
antTablebody = node;
|
|
96
96
|
} else {
|
|
97
|
-
childHeights.push(node.
|
|
97
|
+
childHeights.push(node.offsetHeight || 0);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
} else {
|
|
101
|
-
childHeights.push(e.
|
|
101
|
+
childHeights.push(e.offsetHeight || 0);
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
|
|
105
105
|
// 分页高度
|
|
106
106
|
var pagination = tableTarget.getElementsByClassName("".concat(prefixCls, "-pagination"));
|
|
107
107
|
if (pagination && pagination.length > 0) {
|
|
108
|
-
childHeights.push(pagination[0].
|
|
108
|
+
childHeights.push(pagination[0].offsetHeight);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// 计算body滚动高度
|
|
@@ -230,7 +230,7 @@ var CustomTable = function CustomTable(props) {
|
|
|
230
230
|
simple: restProps.size === 'small',
|
|
231
231
|
className: 'ccs-table-pagination',
|
|
232
232
|
style: {
|
|
233
|
-
|
|
233
|
+
boxShadow: "0 -1px 0 ".concat(token.colorBorderSecondary)
|
|
234
234
|
}
|
|
235
235
|
}, pagination),
|
|
236
236
|
rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkccs_ui=self.webpackChunkccs_ui||[]).push([[43],{90828:function(D,t,u){u.r(t),u.d(t,{default:function(){return f}});var a=u(48305),d=u.n(a),m=u(80882),e=u(80729),c=u(8984),_=u(18466),n=u(52676),E=function(){return new Promise(function(s){setTimeout(function(){s({success:!0,data:"fileid-".concat(Date.now()),message:"\u4E0A\u4F20\u6210\u529F"})},1500)})};function f(){var i=e.Z.useForm(),s=d()(i,1),o=s[0];return(0,n.jsxs)(e.Z,{form:o,onFinish:function(l){console.log("onFinish values",l),alert(JSON.stringify(l))},initialValues:{fileData:{uid:"1",name:"\u6587\u4EF61",url:"https://www.baidu.com"}},children:[(0,n.jsx)(e.Z.Item,{name:"fileData",label:"\u6587\u4EF6\u4E0A\u4F20",children:(0,n.jsx)(m.default,{uploadRequest:E,uploadText:"\u4E0A\u4F20\u6587\u4EF6",maxCount:3,valueFormat:"id"})}),(0,n.jsx)(e.Z.Item,{wrapperCol:{offset:3},children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(_.ZP,{type:"primary",htmlType:"submit",children:"\u67E5\u770B\u4E0A\u4F20\u7ED3\u679C"}),(0,n.jsx)(_.ZP,{onClick:function(){return o.resetFields()},children:"\u91CD\u7F6E"}),(0,n.jsx)(_.ZP,{onClick:function(){return o.setFieldsValue({fileData:[]})},children:"\u6E05\u7A7A"})]})})]})}},22946:function(D,t,u){u.r(t),u.d(t,{default:function(){return f}});var a=u(48305),d=u.n(a),m=u(80882),e=u(80729),c=u(8984),_=u(18466),n=u(52676),E=function(){return new Promise(function(s){setTimeout(function(){s({success:!0,data:"fileid-".concat(Date.now()),message:"\u4E0A\u4F20\u6210\u529F"})},1500)})};function f(){var i=e.Z.useForm(),s=d()(i,1),o=s[0];return(0,n.jsxs)(e.Z,{form:o,onFinish:function(l){console.log("onFinish values",l),alert(JSON.stringify(l))},initialValues:{imageData:[{uid:"1",name:"\u6587\u4EF61",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"2",name:"\u6587\u4EF62",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"}]},children:[(0,n.jsx)(e.Z.Item,{name:"imageData",label:"\u56FE\u7247\u4E0A\u4F20",children:(0,n.jsx)(m.default.Image,{uploadRequest:E,uploadText:"\u4E0A\u4F20\u56FE\u7247",valueFormat:"arrayId",maxCount:3})}),(0,n.jsx)(e.Z.Item,{wrapperCol:{offset:3},children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(_.ZP,{type:"primary",htmlType:"submit",children:"\u67E5\u770B\u4E0A\u4F20\u7ED3\u679C"}),(0,n.jsx)(_.ZP,{onClick:function(){return o.resetFields()},children:"\u91CD\u7F6E"})]})})]})}}}]);
|