@ccs-ui/rc-pro 1.1.21-beta-4 → 1.1.21-beta-6

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.
@@ -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: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onCancel" | "onRequestBefore"> & {
5
+ export declare const DialogSelfButton: ({ auth, formRef, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "request" | "auth" | "onRequestBefore" | "onCancel"> & {
6
6
  formRef: React.RefObject<DialogFormRef>;
7
7
  formInitialValues: FormProps['initialValues'];
8
8
  }) => import("react/jsx-runtime").JSX.Element;
@@ -56,6 +56,8 @@ export type CcsProTableProps<T> = {
56
56
  watermark?: string;
57
57
  /** ref 回调方法 */
58
58
  proRef?: CCS.TableInstanceRef<T>;
59
+ /** 显示序号 */
60
+ showNumber?: boolean;
59
61
  /** class */
60
62
  className?: string;
61
63
  /** style */
@@ -466,7 +466,8 @@ var InternalProTable = function InternalProTable(props) {
466
466
  }, table), {}, {
467
467
  columns: columns,
468
468
  showSorterTooltip: true,
469
- loading: table.loading || data.loading || false
469
+ loading: table.loading || data.loading || false,
470
+ showNumber: props.showNumber
470
471
  }));
471
472
  };
472
473
  var isDark = token._appTheme === 'dark';
@@ -1,5 +1,5 @@
1
- import { CcsTableProps } from '../pro-table/table';
1
+ import { CcsProTableProps, CcsTableProps } from '../pro-table/table';
2
2
  import './index.less';
3
- type TableProps<T> = Omit<CcsTableProps<T>, 'request' | 'requestParam'>;
3
+ type TableProps<T> = Omit<CcsTableProps<T>, 'request' | 'requestParam'> & Pick<CcsProTableProps<T>, 'showNumber'>;
4
4
  declare const CustomTable: <T extends object = any>(props: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
5
5
  export default CustomTable;
package/es/table/index.js CHANGED
@@ -161,6 +161,16 @@ var CustomTable = function CustomTable(props) {
161
161
  };
162
162
  };
163
163
  });
164
+ if (restProps.showNumber) {
165
+ cls === null || cls === void 0 ? void 0 : cls.unshift({
166
+ title: '序号',
167
+ ellipsis: true,
168
+ width: 60,
169
+ render: function render(_value, _record, index) {
170
+ return index + 1 + ((pageNo || 1) - 1) * (pageSize || 10);
171
+ }
172
+ });
173
+ }
164
174
  return cls;
165
175
  };
166
176
  var _theme$useToken = theme.useToken(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.1.21-beta-4",
4
- "description": "ProTable在抽屉中吸顶异常;table排序参数修改保持与后端一致",
3
+ "version": "1.1.21-beta-6",
4
+ "description": "ProTable在抽屉中吸顶异常;table排序参数修改保持与后端一致;table添加序号",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Hong",