@ccs-ui/rc-pro 1.2.0-beta-6 → 1.2.0-beta-8

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.
@@ -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, extraBtn, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "onCancel" | "extraBtn" | "request" | "onRequestBefore"> & {
4
+ declare const DialogRequestButton: ({ auth, formRef, extraBtn, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "onCancel" | "auth" | "request" | "extraBtn" | "onRequestBefore"> & {
5
5
  formRef: React.RefObject<DialogFormRef>;
6
6
  formInitialValues: FormProps['initialValues'];
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -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, extraBtn, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "auth" | "onOk" | "onCancel" | "extraBtn"> & {
4
+ declare const DialogSelfOkButton: ({ auth, formRef, extraBtn, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "onCancel" | "auth" | "onOk" | "extraBtn"> & {
5
5
  formRef: React.RefObject<DialogFormRef>;
6
6
  formInitialValues: FormProps['initialValues'];
7
7
  }) => import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import { DownOutlined, UpOutlined } from '@ant-design/icons';
8
8
  import { useUpdateEffect } from 'ahooks';
9
- import { Button, Card, Form } from 'antd';
9
+ import { Button, Card, Form, theme } from 'antd';
10
10
  import _debounce from 'lodash.debounce';
11
11
  import React, { useEffect, useMemo, useRef, useState } from 'react';
12
12
  import { CcsResizeObserver } from '..';
@@ -161,6 +161,8 @@ function HeadComponent(_ref) {
161
161
  var formStyles = {
162
162
  flexWrap: isExpand ? 'wrap' : 'nowrap'
163
163
  };
164
+ var _theme$useToken = theme.useToken(),
165
+ token = _theme$useToken.token;
164
166
  return /*#__PURE__*/_jsxs(_Fragment, {
165
167
  children: [hasItem && /*#__PURE__*/_jsxs(_Fragment, {
166
168
  children: [/*#__PURE__*/_jsx(CcsResizeObserver.Target, {
@@ -188,7 +190,7 @@ function HeadComponent(_ref) {
188
190
  children: [/*#__PURE__*/_jsxs("div", {
189
191
  style: {
190
192
  justifyContent: isExpand && hasMore ? 'flex-start' : 'flex-end',
191
- height: isExpand ? 'auto' : 32
193
+ height: isExpand ? 'auto' : token.controlHeight
192
194
  },
193
195
  className: "ccs-pl-adaptation-form",
194
196
  ref: formItemsRef,
@@ -35,6 +35,7 @@ export type CcsTableProps<T> = Omit<TableProps<T>, 'columns' | 'title'> & {
35
35
  className?: string;
36
36
  /** style */
37
37
  style?: CSSProperties;
38
+ isEnableToolbar?: boolean;
38
39
  /** 列配置 */
39
40
  columns?: TableColumns<T>;
40
41
  /** table title */
@@ -30,6 +30,7 @@ import TableTree from "./tree";
30
30
 
31
31
  // 同 antd FormLayout; adaptation为自适应布局
32
32
  import { jsx as _jsx } from "react/jsx-runtime";
33
+ import { Fragment as _Fragment } from "react/jsx-runtime";
33
34
  import { jsxs as _jsxs } from "react/jsx-runtime";
34
35
  export var classPrefix = 'ccs-pl';
35
36
  export var TableSelectionContext = /*#__PURE__*/React.createContext({
@@ -531,7 +532,7 @@ var InternalProTable = function InternalProTable(props) {
531
532
  formItemLayout: props.formItemLayout,
532
533
  formItemCol: props.formItemCol,
533
534
  onSearch: _onSearch,
534
- tableOperation: /*#__PURE__*/_jsx(TableOperation, {
535
+ tableOperation: (table === null || table === void 0 ? void 0 : table.isEnableToolbar) !== false ? /*#__PURE__*/_jsx(TableOperation, {
535
536
  tableRowSize: tableRowSize,
536
537
  columns: columns,
537
538
  tableRef: tableRef,
@@ -540,7 +541,7 @@ var InternalProTable = function InternalProTable(props) {
540
541
  onChangeRowSize: function onChangeRowSize(e) {
541
542
  return setTableRowSize(e);
542
543
  }
543
- }),
544
+ }) : /*#__PURE__*/_jsx(_Fragment, {}),
544
545
  children: newToolbarExtra
545
546
  }) : /*#__PURE__*/_jsx(HeadComponent, {
546
547
  form: form,
@@ -550,7 +551,7 @@ var InternalProTable = function InternalProTable(props) {
550
551
  formInitValues: formInitValues,
551
552
  formItemLabelWidth: props.formItemLabelWidth,
552
553
  onSearch: _onSearch,
553
- tableOperation: /*#__PURE__*/_jsx(TableOperation, {
554
+ tableOperation: (table === null || table === void 0 ? void 0 : table.isEnableToolbar) !== false ? /*#__PURE__*/_jsx(TableOperation, {
554
555
  isInModalOrDrawer: isInModalOrDrawer,
555
556
  onChangeRowSize: function onChangeRowSize(e) {
556
557
  return setTableRowSize(e);
@@ -559,7 +560,7 @@ var InternalProTable = function InternalProTable(props) {
559
560
  onReset: _onReset,
560
561
  columns: columns,
561
562
  tableRef: tableRef
562
- }),
563
+ }) : /*#__PURE__*/_jsx(_Fragment, {}),
563
564
  children: newToolbarExtra
564
565
  }), /*#__PURE__*/_jsxs("div", {
565
566
  className: "".concat(classPrefix, "-table-content ").concat(props.formItemLayout),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.2.0-beta-6",
4
- "description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;CcsDialog不适应contextHolder也能打开;移除utils,独立存在@ccs-ui/utils",
3
+ "version": "1.2.0-beta-8",
4
+ "description": "验证码组件兼容暗黑模式;proTable封装rowselection代码;proTable添加自适应布局模式;CcsDialog不适应contextHolder也能打开;移除utils,独立存在@ccs-ui/utils;添加属性isEnableToolbar,table可以隐藏toolbar; ",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Hong",