@ccs-ui/rc-pro 1.1.3 → 1.1.4

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.
@@ -101,11 +101,12 @@ var HookDrawer = function HookDrawer(_ref, ref) {
101
101
  position: 'absolute'
102
102
  } : {}), innerConfig.rootStyle),
103
103
  getContainer: isCrInProp ? innerConfig.getContainer : onGetContainer,
104
- extra: innerConfig.request ? /*#__PURE__*/_jsx(DialogSelfButton, {
105
- request: innerConfig.request,
104
+ extra: config.request ? /*#__PURE__*/_jsx(DialogSelfButton, {
105
+ request: config.request,
106
106
  onCancel: close,
107
107
  formRef: formRef,
108
- onRequestBefore: innerConfig.onRequestBefore,
108
+ onRequestBefore: config.onRequestBefore,
109
+ auth: config.auth,
109
110
  formInitialValues: (_config$form = config.form) === null || _config$form === void 0 ? void 0 : _config$form.initialValues
110
111
  }) : /*#__PURE__*/_jsx(DialogButtonHolder, {
111
112
  ref: buttonRef
@@ -2,7 +2,7 @@
2
2
  import { FormProps } from 'antd';
3
3
  import { DialogFormRef } from './form';
4
4
  import { CcsDialogModal, CcsDialogModalProps } from './hook';
5
- export declare const DialogSelfButton: ({ formInitialValues, formRef, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "request" | "onCancel" | "onRequestBefore"> & {
5
+ export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onCancel" | "onRequestBefore"> & {
6
6
  formRef: React.RefObject<DialogFormRef>;
7
7
  formInitialValues: FormProps['initialValues'];
8
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -14,7 +14,7 @@ import { Button, Modal } from 'antd';
14
14
  import classNames from 'classnames';
15
15
  import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
16
16
  import Draggable from 'react-draggable';
17
- import { CcsDialog, CcsUtils } from '..';
17
+ import { CcsAuth, CcsDialog, CcsUtils } from '..';
18
18
  import { DialogButtonHolder } from "./button";
19
19
  import { DialogContentContext } from "./context";
20
20
  import DialogForm from "./form";
@@ -59,9 +59,10 @@ var DragModal = function DragModal(_ref) {
59
59
  });
60
60
  };
61
61
  export var DialogSelfButton = function DialogSelfButton(_ref2) {
62
- var _ref2$formInitialValu = _ref2.formInitialValues,
63
- formInitialValues = _ref2$formInitialValu === void 0 ? {} : _ref2$formInitialValu,
62
+ var auth = _ref2.auth,
64
63
  formRef = _ref2.formRef,
64
+ _ref2$formInitialValu = _ref2.formInitialValues,
65
+ formInitialValues = _ref2$formInitialValu === void 0 ? {} : _ref2$formInitialValu,
65
66
  request = _ref2.request,
66
67
  onCancel = _ref2.onCancel,
67
68
  onRequestBefore = _ref2.onRequestBefore;
@@ -94,7 +95,8 @@ export var DialogSelfButton = function DialogSelfButton(_ref2) {
94
95
  children: [/*#__PURE__*/_jsx(Button, {
95
96
  onClick: onCancel,
96
97
  children: "\u53D6\u6D88"
97
- }), /*#__PURE__*/_jsx(Button, {
98
+ }), /*#__PURE__*/_jsx(CcsAuth.Button, {
99
+ auth: auth || '',
98
100
  type: "primary",
99
101
  onClick: onOk,
100
102
  loading: loading,
@@ -185,10 +187,11 @@ var HookModal = function HookModal(_ref3, ref) {
185
187
  padding: '8px 16px'
186
188
  },
187
189
  children: /*#__PURE__*/_jsx(DialogSelfButton, {
188
- request: innerConfig.request,
190
+ auth: config.auth,
191
+ request: config.request,
189
192
  onCancel: close,
190
193
  formRef: formRef,
191
- onRequestBefore: innerConfig.onRequestBefore,
194
+ onRequestBefore: config.onRequestBefore,
192
195
  formInitialValues: (_config$form = config.form) === null || _config$form === void 0 ? void 0 : _config$form.initialValues
193
196
  })
194
197
  }) : /*#__PURE__*/_jsx(DialogButtonHolder, {
@@ -20,6 +20,8 @@ type DrawerFunc = (props: DrawerProps) => {
20
20
  export type CcsDialogModalProps = ModalFuncProps & {
21
21
  /** antd form */
22
22
  form?: FormProps;
23
+ /** 表单接口请求权限 */
24
+ auth?: string;
23
25
  /** 表单接口请求 */
24
26
  request?: (values: any) => Promise<CCS.HttpResult>;
25
27
  /** request执行前参数处理 */
@@ -34,6 +36,8 @@ export type CcsDialogModalProps = ModalFuncProps & {
34
36
  export type CcsDialogDrawerProps = Omit<DrawerProps, 'extra'> & {
35
37
  /** antd form */
36
38
  form?: FormProps;
39
+ /** 表单接口请求权限 */
40
+ auth?: string;
37
41
  /** 抽屉内容 */
38
42
  content?: ReactNode;
39
43
  /** 表单接口请求 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "A react pro components",
5
5
  "license": "MIT",
6
6
  "module": "es/index.js",