@ccs-ui/rc-pro 1.1.25-beta-27 → 1.2.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.
package/es/ccs.d.ts CHANGED
@@ -83,6 +83,8 @@ type PageQuery<T = any> = {
83
83
  limit?: QueryLimit;
84
84
  /** 排序字段,一般前端不传,由后端指定 */
85
85
  orderProps?: OrderProp[];
86
+ /** 过滤字段 */
87
+ filters?: Record<string, any[]>;
86
88
  /** 页码 */
87
89
  pageNo?: number;
88
90
  /** 页长 */
@@ -1,7 +1,7 @@
1
1
  import { TabPaneProps } from 'antd';
2
2
  import { Store } from 'antd/es/form/interface';
3
- import { Location } from 'history';
4
3
  import React from 'react';
4
+ import { Location } from 'react-router';
5
5
  import CCS from '..';
6
6
  type CcsTabsChangeProps = {
7
7
  /** 当前激活tab面板的key */
@@ -55,5 +55,5 @@ declare const GlobalContext: React.Context<GlobalContextType>;
55
55
  declare const DrawerAndModalContext: React.Context<FnContextType<any>>;
56
56
  declare const PageContext: React.Context<PageContextType>;
57
57
  declare const TabsContext: React.Context<CcsTabsContextType>;
58
- export type { FnContextType, CcsTabsContextType, CcsTabsChangeProps, GlobalContextPropsType, };
59
- export { TabsContext, PageContext, GlobalContext, DrawerAndModalContext };
58
+ export { DrawerAndModalContext, GlobalContext, PageContext, TabsContext };
59
+ export type { CcsTabsChangeProps, CcsTabsContextType, FnContextType, GlobalContextPropsType, };
@@ -3,4 +3,4 @@ var GlobalContext = /*#__PURE__*/createContext({});
3
3
  var DrawerAndModalContext = /*#__PURE__*/createContext({});
4
4
  var PageContext = /*#__PURE__*/createContext({});
5
5
  var TabsContext = /*#__PURE__*/React.createContext({});
6
- export { TabsContext, PageContext, GlobalContext, DrawerAndModalContext };
6
+ export { DrawerAndModalContext, GlobalContext, PageContext, TabsContext };
@@ -1,7 +1,7 @@
1
1
  import { FormProps } from 'antd';
2
2
  import { DialogFormRef } from './form';
3
3
  import { CcsDialogModalProps } from './hook';
4
- declare const DialogRequestButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onRequestBefore" | "onCancel"> & {
4
+ declare const DialogRequestButton: ({ auth, formRef, extraBtn, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onRequestBefore" | "onCancel" | "extraBtn"> & {
5
5
  formRef: React.RefObject<DialogFormRef>;
6
6
  formInitialValues: FormProps['initialValues'];
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
19
19
  var DialogRequestButton = function DialogRequestButton(_ref) {
20
20
  var auth = _ref.auth,
21
21
  formRef = _ref.formRef,
22
+ extraBtn = _ref.extraBtn,
22
23
  _ref$formInitialValue = _ref.formInitialValues,
23
24
  formInitialValues = _ref$formInitialValue === void 0 ? {} : _ref$formInitialValue,
24
25
  request = _ref.request,
@@ -50,7 +51,7 @@ var DialogRequestButton = function DialogRequestButton(_ref) {
50
51
  });
51
52
  };
52
53
  return /*#__PURE__*/_jsxs(_Fragment, {
53
- children: [/*#__PURE__*/_jsx(Button, {
54
+ children: [extraBtn, /*#__PURE__*/_jsx(Button, {
54
55
  onClick: onCancel,
55
56
  children: "\u53D6\u6D88"
56
57
  }), /*#__PURE__*/_jsx(CcsAuth.Button, {
@@ -1,7 +1,7 @@
1
1
  import { FormProps } from 'antd';
2
2
  import { DialogFormRef } from './form';
3
3
  import { CcsDialogModalProps } from './hook';
4
- declare const DialogSelfOkButton: ({ auth, formRef, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "auth" | "onOk" | "onCancel"> & {
4
+ declare const DialogSelfOkButton: ({ auth, formRef, extraBtn, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "auth" | "onCancel" | "extraBtn" | "onOk"> & {
5
5
  formRef: React.RefObject<DialogFormRef>;
6
6
  formInitialValues: FormProps['initialValues'];
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  var DialogSelfOkButton = function DialogSelfOkButton(_ref) {
13
13
  var auth = _ref.auth,
14
14
  formRef = _ref.formRef,
15
+ extraBtn = _ref.extraBtn,
15
16
  _ref$formInitialValue = _ref.formInitialValues,
16
17
  formInitialValues = _ref$formInitialValue === void 0 ? {} : _ref$formInitialValue,
17
18
  onCancel = _ref.onCancel,
@@ -29,7 +30,7 @@ var DialogSelfOkButton = function DialogSelfOkButton(_ref) {
29
30
  });
30
31
  };
31
32
  return /*#__PURE__*/_jsxs(_Fragment, {
32
- children: [/*#__PURE__*/_jsx(Button, {
33
+ children: [extraBtn, /*#__PURE__*/_jsx(Button, {
33
34
  onClick: onCancel,
34
35
  children: "\u53D6\u6D88"
35
36
  }), /*#__PURE__*/_jsx(CcsAuth.Button, {
@@ -19,7 +19,6 @@ import DialogRequestButton from "./DialogRequestButton";
19
19
  import DialogForm from "./form";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  var HookDrawer = function HookDrawer(_ref, ref) {
22
- var _innerConfig$styles;
23
22
  var hookAfterClose = _ref.afterClose,
24
23
  config = _ref.config;
25
24
  var _useState = useState(function () {
@@ -92,26 +91,18 @@ var HookDrawer = function HookDrawer(_ref, ref) {
92
91
  };
93
92
  var isCrInProp = ('getContainer' in innerConfig);
94
93
  var styles = innerConfig.styles || {};
95
- if (form) {
96
- styles.body = {
97
- padding: 0
98
- };
99
- }
100
94
  styles.mask = _objectSpread({
101
95
  background: 'rgba(0, 0, 0, 0.1)'
102
96
  }, styles.mask);
103
97
  var renderExtra = function renderExtra() {
104
98
  if (request) {
105
- return /*#__PURE__*/_jsx("div", {
106
- className: "ccs-dialog-footer",
107
- children: /*#__PURE__*/_jsx(DialogRequestButton, {
108
- auth: auth,
109
- request: request,
110
- onCancel: close,
111
- formRef: formRef,
112
- onRequestBefore: onRequestBefore,
113
- formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
114
- })
99
+ return /*#__PURE__*/_jsx(DialogRequestButton, {
100
+ auth: auth,
101
+ request: request,
102
+ onCancel: close,
103
+ formRef: formRef,
104
+ onRequestBefore: onRequestBefore,
105
+ formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
115
106
  });
116
107
  }
117
108
  return /*#__PURE__*/_jsx(DialogButtonHolder, {
@@ -146,9 +137,6 @@ var HookDrawer = function HookDrawer(_ref, ref) {
146
137
  children: form ? /*#__PURE__*/_jsx(DialogForm, {
147
138
  ref: formRef,
148
139
  formProps: form,
149
- styles: _objectSpread({
150
- padding: 24
151
- }, (_innerConfig$styles = innerConfig.styles) === null || _innerConfig$styles === void 0 ? void 0 : _innerConfig$styles.body),
152
140
  children: content
153
141
  }) : content
154
142
  })
@@ -96,6 +96,7 @@ var HookModal = function HookModal(_ref2, ref) {
96
96
  _innerConfig$styles = innerConfig.styles,
97
97
  styles = _innerConfig$styles === void 0 ? {} : _innerConfig$styles,
98
98
  className = innerConfig.className,
99
+ extraBtn = innerConfig.extraBtn,
99
100
  request = innerConfig.request,
100
101
  onCancel = innerConfig.onCancel,
101
102
  onRequestBefore = innerConfig.onRequestBefore,
@@ -135,32 +136,34 @@ var HookModal = function HookModal(_ref2, ref) {
135
136
  };
136
137
  });
137
138
  var renderFooter = function renderFooter() {
139
+ // 传入接口请求参数
138
140
  if (request) {
139
- return /*#__PURE__*/_jsx("div", {
140
- className: "ccs-dialog-footer",
141
- children: /*#__PURE__*/_jsx(DialogRequestButton, {
142
- auth: auth,
143
- request: request,
144
- onCancel: close,
145
- formRef: formRef,
146
- onRequestBefore: onRequestBefore,
147
- formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
148
- })
141
+ return /*#__PURE__*/_jsx(DialogRequestButton, {
142
+ auth: auth,
143
+ request: request,
144
+ onCancel: close,
145
+ formRef: formRef,
146
+ extraBtn: extraBtn,
147
+ onRequestBefore: onRequestBefore,
148
+ formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
149
149
  });
150
150
  }
151
+
152
+ // 传入onOk参数
151
153
  if (innerConfig.onOk) {
152
- return /*#__PURE__*/_jsx("div", {
153
- className: "ccs-dialog-footer",
154
- children: /*#__PURE__*/_jsx(DialogSelfOkButton, {
155
- auth: auth,
156
- onOk: innerConfig.onOk,
157
- onCancel: close,
158
- formRef: formRef,
159
- formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
160
- })
154
+ return /*#__PURE__*/_jsx(DialogSelfOkButton, {
155
+ auth: auth,
156
+ onCancel: close,
157
+ formRef: formRef,
158
+ extraBtn: extraBtn,
159
+ onOk: innerConfig.onOk,
160
+ formInitialValues: form === null || form === void 0 ? void 0 : form.initialValues
161
161
  });
162
162
  }
163
+
164
+ // 对话框中使用buttons生成按钮
163
165
  return /*#__PURE__*/_jsx(DialogButtonHolder, {
166
+ extraBtn: extraBtn,
164
167
  ref: buttonRef
165
168
  });
166
169
  };
@@ -168,11 +171,7 @@ var HookModal = function HookModal(_ref2, ref) {
168
171
  onCancel: close,
169
172
  afterClose: afterClose
170
173
  }, innerConfig), {}, {
171
- styles: _objectSpread({
172
- footer: !request ? {
173
- padding: 0
174
- } : undefined
175
- }, styles),
174
+ styles: styles,
176
175
  className: classNames('ccs-dialog-modal', className),
177
176
  footer: renderFooter(),
178
177
  title: /*#__PURE__*/_jsx("div", {
@@ -1,15 +1,13 @@
1
1
  import React, { ReactNode } from 'react';
2
- export type DialogButtonsProps = {
3
- okText?: string;
4
- cancelText?: string;
2
+ import { CcsDialogModalProps } from './hook';
3
+ export type DialogButtonsProps = Pick<CcsDialogModalProps, 'okText' | 'cancelText' | 'onOk'> & {
5
4
  okAuth?: string;
6
5
  loading?: boolean;
7
6
  children?: ReactNode;
8
7
  hideCancel?: boolean;
9
- onOk?: (values?: any) => void;
10
8
  };
11
9
  export type DialogButtonRef = {
12
10
  onSetButtons: (e: React.ReactElement) => void;
13
11
  };
14
- export declare const DialogButtonHolder: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<DialogButtonRef>>>;
12
+ export declare const DialogButtonHolder: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<CcsDialogModalProps, "extraBtn"> & React.RefAttributes<DialogButtonRef>>>;
15
13
  export default function CcsDialogButtons({ okText, okAuth, loading, children, hideCancel, cancelText, onOk, }: DialogButtonsProps): import("react/jsx-runtime").JSX.Element;
@@ -12,16 +12,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { CcsAuth, CcsUtils } from "./..";
14
14
  import { Button, Form } from 'antd';
15
- import React, { useEffect, useImperativeHandle, useState } from 'react';
15
+ import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
16
16
  import CcsDialog from '.';
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { Fragment as _Fragment } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
- export var DialogButtonHolder = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (_props, ref) {
20
+ export var DialogButtonHolder = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21
+ var extraBtn = _ref.extraBtn;
21
22
  var _useState = useState(),
22
23
  _useState2 = _slicedToArray(_useState, 2),
23
24
  buttons = _useState2[0],
24
25
  setButtons = _useState2[1];
26
+ var noBtnRef = useRef(null);
25
27
  useImperativeHandle(ref, function () {
26
28
  return {
27
29
  onSetButtons: function onSetButtons(e) {
@@ -29,18 +31,28 @@ export var DialogButtonHolder = /*#__PURE__*/React.memo( /*#__PURE__*/React.forw
29
31
  }
30
32
  };
31
33
  });
32
- return /*#__PURE__*/_jsx(_Fragment, {
33
- children: buttons
34
+ useEffect(function () {
35
+ if (buttons) {
36
+ noBtnRef.current.parentElement.removeAttribute('style');
37
+ } else {
38
+ // 没有按钮时,ant-modal-footer padding置0。
39
+ noBtnRef.current.parentElement.style.padding = '0px';
40
+ }
41
+ }, [buttons]);
42
+ return /*#__PURE__*/_jsxs(_Fragment, {
43
+ children: [extraBtn, buttons, /*#__PURE__*/_jsx("div", {
44
+ ref: noBtnRef
45
+ })]
34
46
  });
35
47
  }));
36
- export default function CcsDialogButtons(_ref) {
37
- var okText = _ref.okText,
38
- okAuth = _ref.okAuth,
39
- loading = _ref.loading,
40
- children = _ref.children,
41
- hideCancel = _ref.hideCancel,
42
- cancelText = _ref.cancelText,
43
- onOk = _ref.onOk;
48
+ export default function CcsDialogButtons(_ref2) {
49
+ var okText = _ref2.okText,
50
+ okAuth = _ref2.okAuth,
51
+ loading = _ref2.loading,
52
+ children = _ref2.children,
53
+ hideCancel = _ref2.hideCancel,
54
+ cancelText = _ref2.cancelText,
55
+ onOk = _ref2.onOk;
44
56
  var _CcsDialog$useInstanc = CcsDialog.useInstance(),
45
57
  closeDialog = _CcsDialog$useInstanc.closeDialog,
46
58
  buttonRef = _CcsDialog$useInstanc.buttonRef,
@@ -77,8 +89,7 @@ export default function CcsDialogButtons(_ref) {
77
89
  })]
78
90
  });
79
91
  if (buttonType === 'modal') {
80
- btns = /*#__PURE__*/_jsx("div", {
81
- className: "ccs-dialog-footer",
92
+ btns = /*#__PURE__*/_jsx(_Fragment, {
82
93
  children: btns
83
94
  });
84
95
  }
@@ -39,10 +39,7 @@ export default function CcsDrawerFooter(_ref) {
39
39
  useEffect(function () {
40
40
  var _drawerFooterRef$curr;
41
41
  if (!onOk && !children) return;
42
- var btns = /*#__PURE__*/_jsxs("div", {
43
- style: {
44
- padding: '8px 16px'
45
- },
42
+ var btns = /*#__PURE__*/_jsxs(_Fragment, {
46
43
  children: [children, onOk && /*#__PURE__*/_jsxs(_Fragment, {
47
44
  children: [!hideCancel && /*#__PURE__*/_jsx(Button, {
48
45
  onClick: closeDialog,
@@ -1,9 +1,8 @@
1
1
  import { FormInstance, FormProps } from 'antd';
2
- import React, { CSSProperties, ReactNode } from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
  type PropsType = {
4
4
  children: ReactNode;
5
5
  formProps: FormProps;
6
- styles?: CSSProperties;
7
6
  };
8
7
  export type DialogFormRef = {
9
8
  formInstance: FormInstance;
package/es/dialog/form.js CHANGED
@@ -22,7 +22,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
22
22
  */
23
23
  var DialogForm = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
24
24
  var children = _ref.children,
25
- styles = _ref.styles,
26
25
  _ref$formProps = _ref.formProps,
27
26
  labelCol = _ref$formProps.labelCol,
28
27
  wrapperCol = _ref$formProps.wrapperCol,
@@ -45,10 +44,10 @@ var DialogForm = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
45
44
  },
46
45
  preserve: false
47
46
  }, restProps), {}, {
48
- style: _objectSpread(_objectSpread({
47
+ style: _objectSpread({
49
48
  height: '100%',
50
49
  overflow: 'auto'
51
- }, styles), restProps.style),
50
+ }, restProps.style),
52
51
  children: children
53
52
  }));
54
53
  });
@@ -22,12 +22,14 @@ export type CcsDialogModalProps = ModalFuncProps & {
22
22
  form?: FormProps;
23
23
  /** 表单接口请求权限 */
24
24
  auth?: string;
25
+ /** 关闭后销毁组件,默认true */
26
+ destroyOnClose?: boolean;
27
+ /** 通过参数传递的扩展按钮 */
28
+ extraBtn?: ReactNode;
25
29
  /** 表单接口请求 */
26
30
  request?: (values: any) => Promise<CCS.HttpResult>;
27
31
  /** request执行前参数处理 */
28
32
  onRequestBefore?: (values: any) => any;
29
- /** 关闭后销毁组件,默认true */
30
- destroyOnClose?: boolean;
31
33
  /** 通过closeDialog方法关闭dialog */
32
34
  onAfterOk?: (e: any) => void;
33
35
  /** 通过点击关闭按钮或取消按钮关闭 */
@@ -40,6 +42,8 @@ export type CcsDialogDrawerProps = Omit<DrawerProps, 'extra'> & {
40
42
  auth?: string;
41
43
  /** 抽屉内容 */
42
44
  content?: ReactNode;
45
+ /** 通过参数传递的扩展按钮 */
46
+ extraBtn?: ReactNode;
43
47
  /** 表单接口请求 */
44
48
  request?: (values: any) => Promise<CCS.HttpResult>;
45
49
  /** request执行前参数处理 */
package/es/dialog/hook.js CHANGED
@@ -12,6 +12,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
 
13
13
  import _debounce from 'lodash/debounce';
14
14
  import React from 'react';
15
+ import { createRoot } from 'react-dom/client';
16
+ import { CcsUtils } from '..';
15
17
  import HookDrawer from "./HookDrawer";
16
18
  import HookModal from "./HookModal";
17
19
  import usePatchElement from "./usePatchElement";
@@ -53,10 +55,12 @@ export default function useCcsDialog() {
53
55
  }
54
56
  }, [actionQueue]);
55
57
  var getModalFunc = React.useCallback(function (config) {
56
- var _holderRef$current;
57
58
  modalUuid += 1;
58
59
  var modalRef = /*#__PURE__*/React.createRef();
60
+
61
+ // 关闭事件
59
62
  var closeFunc;
63
+ // modal
60
64
  var modal = /*#__PURE__*/_jsx(HookModal, {
61
65
  config: config,
62
66
  afterClose: function afterClose() {
@@ -65,7 +69,24 @@ export default function useCcsDialog() {
65
69
  },
66
70
  ref: modalRef
67
71
  }, "modal-".concat(modalUuid));
68
- closeFunc = (_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.patchElement(modal);
72
+ if (holderRef.current) {
73
+ // 加载了contextHolder
74
+ closeFunc = holderRef.current.patchElement(modal);
75
+ } else {
76
+ CcsUtils.showWarning(true, "\u672A\u5C06contextHolder\u63D2\u5165\u7EC4\u4EF6\u4E2D\uFF0C\u5C06\u65E0\u6CD5\u9002\u914Dantd\u4E3B\u9898\u914D\u7F6E\u548C\u83B7\u53D6context\u3002");
77
+ // 未加载contextHolder,创建dom
78
+ var dialogEle = document.createElement('div');
79
+ document.body.append(dialogEle);
80
+ var root = createRoot(dialogEle);
81
+ root.render( /*#__PURE__*/_jsx(_Fragment, {
82
+ children: modal
83
+ }));
84
+ closeFunc = function closeFunc() {
85
+ setTimeout(function () {
86
+ root.unmount();
87
+ }, 500);
88
+ };
89
+ }
69
90
  if (closeFunc) {
70
91
  destroyFns.push(closeFunc);
71
92
  }
@@ -100,7 +121,6 @@ export default function useCcsDialog() {
100
121
  return instance;
101
122
  }, []);
102
123
  var getDrawerFunc = React.useCallback(function (config) {
103
- var _holderRef$current2;
104
124
  drawerUuid += 1;
105
125
  var modalRef = /*#__PURE__*/React.createRef();
106
126
  var closeFunc;
@@ -112,7 +132,25 @@ export default function useCcsDialog() {
112
132
  },
113
133
  ref: modalRef
114
134
  }, "drawer-".concat(drawerUuid));
115
- closeFunc = (_holderRef$current2 = holderRef.current) === null || _holderRef$current2 === void 0 ? void 0 : _holderRef$current2.patchElement(modal);
135
+ if (holderRef.current) {
136
+ var _holderRef$current;
137
+ // 加载了contextHolder
138
+ closeFunc = (_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.patchElement(modal);
139
+ } else {
140
+ CcsUtils.showWarning(true, "\u672A\u5C06contextHolder\u63D2\u5165\u7EC4\u4EF6\u4E2D\uFF0C\u5C06\u65E0\u6CD5\u9002\u914Dantd\u4E3B\u9898\u914D\u7F6E\u548C\u83B7\u53D6context\u3002");
141
+ // 未加载contextHolder,创建dom
142
+ var dialogEle = document.createElement('div');
143
+ document.body.append(dialogEle);
144
+ var root = createRoot(dialogEle);
145
+ root.render( /*#__PURE__*/_jsx(_Fragment, {
146
+ children: modal
147
+ }));
148
+ closeFunc = function closeFunc() {
149
+ setTimeout(function () {
150
+ root.unmount();
151
+ }, 500);
152
+ };
153
+ }
116
154
  if (closeFunc) {
117
155
  destroyFns.push(closeFunc);
118
156
  }
@@ -14,17 +14,3 @@
14
14
  padding: 0;
15
15
  }
16
16
  }
17
-
18
- .ccs-dialog-modal {
19
- .ant-modal-footer {
20
- padding: 0;
21
- }
22
- }
23
-
24
- .ccs-dialog-footer {
25
- padding: 8px 16px;
26
-
27
- > .ant-btn + .ant-btn {
28
- margin-inline-start: 8px;
29
- }
30
- }
@@ -1,6 +1,6 @@
1
1
  declare const usePage: () => {
2
2
  id: string;
3
- location: import("history").Location;
3
+ location: import("react-router").Location<any>;
4
4
  isActive: boolean;
5
5
  onDestroy: (path: string) => void;
6
6
  onAuth: (code: string) => boolean;
@@ -1,5 +1,5 @@
1
- import { Location } from 'history';
2
1
  import { JSXElementConstructor, ReactElement } from 'react';
2
+ import { Location } from 'react-router';
3
3
  export type CachePageProps = {
4
4
  /** 选中状态 */
5
5
  active: boolean;
@@ -190,28 +190,30 @@
190
190
  }
191
191
 
192
192
  .ant-table-wrapper .ant-table > .ant-table-container {
193
+ border-inline-start: 0;
194
+ border-top: 0;
195
+
193
196
  & > .ant-table-header > table > thead > tr {
194
197
  & > th:last-child {
195
198
  border-inline-end: 0;
196
199
  border-start-start-radius: 0;
197
200
  border-start-end-radius: 0;
198
201
  }
202
+
199
203
  & > th:first-child {
200
204
  border-start-start-radius: 0;
201
205
  }
202
206
  }
207
+
203
208
  & > .ant-table-body > table > tbody > tr > td:last-child {
204
209
  border-inline-end: 0;
205
210
  }
206
211
  }
207
212
 
208
- .ant-table-wrapper .ant-table > .ant-table-container {
209
- border-inline-start: 0;
210
- border-top: 0;
211
- }
212
213
  .ant-table-wrapper table {
213
214
  border-radius: 0;
214
215
  }
216
+
215
217
  .ant-table-wrapper .ant-table .ant-table-header {
216
218
  border-radius: 0;
217
219
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.1.25-beta-27",
4
- "description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;",
3
+ "version": "1.2.0-beta-2",
4
+ "description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;CcsDialog不适应contextHolder也能打开。",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Hong",
@@ -68,6 +68,7 @@
68
68
  "js-base64": "^3.7.5",
69
69
  "localforage": "^1.10.0",
70
70
  "lodash": "^4.17.21",
71
+ "rc-menu": "^9.15.1",
71
72
  "rc-trigger": "^5.3.4",
72
73
  "rc-util": "^5.32.4",
73
74
  "react-color": "^2.19.3",
@@ -102,6 +103,7 @@
102
103
  "prettier": "^2.7.1",
103
104
  "prettier-plugin-organize-imports": "^3.0.0",
104
105
  "prettier-plugin-packagejson": "^2.2.18",
106
+ "rc-table": "^7.47.5",
105
107
  "react": "^18.0.0",
106
108
  "react-dom": "^18.0.0",
107
109
  "stylelint": "^14.9.1"