@ccs-ui/rc-pro 1.1.19 → 1.1.21-beta-1

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.
@@ -0,0 +1,18 @@
1
+ import { CSSProperties } from 'react';
2
+ import { RGBColor } from 'react-color';
3
+ import './index.less';
4
+ export type PropsType = {
5
+ /** 指定选中项 */
6
+ value?: RGBColor;
7
+ /** 占位 */
8
+ placeholder?: string;
9
+ /** 内部样式 */
10
+ style?: CSSProperties;
11
+ /** 选择完成后的回调 */
12
+ onChange?: (value: RGBColor) => void;
13
+ };
14
+ /**
15
+ * 颜色选择组件
16
+ */
17
+ declare const ColorPicker: ({ onChange, value, style }: PropsType) => import("react/jsx-runtime").JSX.Element;
18
+ export default ColorPicker;
@@ -0,0 +1,20 @@
1
+ import { DatePickerProps } from 'antd';
2
+ import { PickerPanelDateProps } from 'antd/es/calendar/generateCalendar';
3
+ import { RangePickerProps } from 'antd/es/date-picker';
4
+ import { Dayjs } from 'dayjs';
5
+ type CcsDatePickerProps = {
6
+ value?: string;
7
+ picker?: 'year' | 'month' | 'date';
8
+ onChange?: (e: string) => void;
9
+ } & Omit<PickerPanelDateProps<Dayjs>, 'value' | 'onChange' | 'picker'> & Omit<DatePickerProps, 'value' | 'onChange' | 'picker'>;
10
+ type CcsRangePickerProps = {
11
+ showTime?: boolean;
12
+ value?: [string, string];
13
+ picker?: 'year' | 'month' | 'date';
14
+ onChange?: (e: [string, string]) => void;
15
+ } & Omit<RangePickerProps, 'value' | 'onChange'>;
16
+ declare function CcsDatePicker({ value, onChange, ...restProps }: CcsDatePickerProps): import("react/jsx-runtime").JSX.Element;
17
+ declare namespace CcsDatePicker {
18
+ var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => import("react/jsx-runtime").JSX.Element;
19
+ }
20
+ export default CcsDatePicker;
@@ -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, "request" | "auth" | "onRequestBefore" | "onCancel"> & {
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;
@@ -0,0 +1,16 @@
1
+ import { FormInstance, FormProps } from 'antd';
2
+ import React, { CSSProperties, ReactNode } from 'react';
3
+ type PropsType = {
4
+ children: ReactNode;
5
+ formProps: FormProps;
6
+ styles?: CSSProperties;
7
+ };
8
+ export type DialogFormRef = {
9
+ formInstance: FormInstance;
10
+ };
11
+ /**
12
+ * 添加form实例
13
+ * @returns
14
+ */
15
+ declare const DialogForm: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<DialogFormRef>>;
16
+ export default DialogForm;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export default function usePatchElement(): [
3
+ React.ReactElement[],
4
+ (element: React.ReactElement) => Function
5
+ ];
@@ -0,0 +1,10 @@
1
+ export declare class EventInstance<T = any, ActionType = any> {
2
+ private subscriptions;
3
+ emit: (val: T, actionType?: ActionType) => void;
4
+ useSubscription: (callback: (val: T) => void, actionType?: ActionType) => T;
5
+ }
6
+ /**
7
+ * 组件消息订阅方式传值
8
+ * @returns
9
+ */
10
+ export default function Event<T = void, ActionType = any>(): EventInstance<T, ActionType>;
@@ -0,0 +1,2 @@
1
+ declare const useOnceEvent: (fn: (...params: any) => void) => (...args: any) => void;
2
+ export default useOnceEvent;
@@ -0,0 +1,11 @@
1
+ type CcsLoadingProps = {
2
+ /**
3
+ * loading 状态
4
+ * @default false
5
+ */
6
+ loading?: boolean;
7
+ /** loading 文字说明 */
8
+ loadingTip?: string;
9
+ };
10
+ declare const Loading: ({ loading, loadingTip }: CcsLoadingProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export default Loading;
@@ -6,17 +6,16 @@ type ClassProps = {
6
6
  style?: CSSProperties;
7
7
  };
8
8
  type CcsProGridProps = ClassProps & {
9
- bordered?: boolean;
9
+ gutter?: number;
10
10
  children?: ReactNode;
11
11
  };
12
12
  type ColProps = CardProps & {
13
- colSpan?: string | number;
14
- colStyle?: CSSProperties;
15
- colClassName?: string;
13
+ colWidth?: number;
14
+ children?: ReactNode;
16
15
  };
17
16
  type GridInstance = FC<CcsProGridProps> & {
18
17
  Col: typeof GridCol;
19
18
  };
20
- declare const GridCol: ({ colSpan, colClassName, colStyle, ...otherProps }: ColProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const GridCol: ({ children, colWidth, style, className, ...restProps }: ColProps) => import("react/jsx-runtime").JSX.Element;
21
20
  declare const ProGrid: GridInstance;
22
21
  export default ProGrid;
@@ -1,6 +1,6 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["colSpan", "colClassName", "colStyle"],
3
- _excluded2 = ["bordered", "children"];
2
+ var _excluded = ["children", "colWidth", "style", "className"],
3
+ _excluded2 = ["children", "gutter"];
4
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
  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; }
@@ -8,48 +8,51 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import { Card } from 'antd';
12
- import classNames from 'classnames';
11
+ import React from 'react';
13
12
  import "./index.less";
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
15
14
  import { Fragment as _Fragment } from "react/jsx-runtime";
16
15
  var GridCol = function GridCol(_ref) {
17
- var colSpan = _ref.colSpan,
18
- colClassName = _ref.colClassName,
19
- colStyle = _ref.colStyle,
20
- otherProps = _objectWithoutProperties(_ref, _excluded);
21
- return /*#__PURE__*/_jsx(_Fragment, {
22
- children: /*#__PURE__*/_jsx("div", {
23
- className: classNames('ccs-pg-col', colClassName),
24
- style: colSpan ? _objectSpread({
25
- width: colSpan,
26
- flexShrink: 0
27
- }, colStyle) : _objectSpread({
28
- display: 'flex',
29
- width: 0,
30
- flex: 'auto',
31
- flexDirection: 'column'
32
- }, colStyle),
33
- children: /*#__PURE__*/_jsx(Card, _objectSpread({
34
- bodyStyle: {
35
- padding: 0
36
- }
37
- }, otherProps))
38
- })
16
+ var children = _ref.children,
17
+ colWidth = _ref.colWidth,
18
+ style = _ref.style,
19
+ className = _ref.className,
20
+ restProps = _objectWithoutProperties(_ref, _excluded);
21
+ console.log('restProps', restProps);
22
+ var styles = _objectSpread({}, style);
23
+ if (colWidth) {
24
+ styles.width = colWidth;
25
+ styles.flex = "0 0 ".concat(colWidth, "px");
26
+ } else {
27
+ styles.flex = "1 1 auto";
28
+ }
29
+ var _ref2 = restProps,
30
+ gutter = _ref2.gutter;
31
+ if (gutter) {
32
+ styles.marginLeft = gutter;
33
+ }
34
+ return /*#__PURE__*/_jsx("div", {
35
+ style: styles,
36
+ className: className,
37
+ children: children
39
38
  });
40
39
  };
41
- var Grid = function Grid(_ref2) {
42
- var bordered = _ref2.bordered,
43
- children = _ref2.children,
44
- restProps = _objectWithoutProperties(_ref2, _excluded2);
45
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, restProps), {}, {
46
- className: classNames({
47
- 'ccs-pg-border': bordered
48
- }),
49
- children: /*#__PURE__*/_jsx("div", {
50
- className: "ccs-pl-table-content",
51
- children: children
52
- })
40
+ var Grid = function Grid(_ref3) {
41
+ var children = _ref3.children,
42
+ gutter = _ref3.gutter,
43
+ restProps = _objectWithoutProperties(_ref3, _excluded2);
44
+ return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
45
+ style: {
46
+ display: 'flex'
47
+ }
48
+ }, restProps), {}, {
49
+ children: gutter ? React.Children.map(children, function (child, index) {
50
+ return /*#__PURE__*/_jsx(_Fragment, {
51
+ children: /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.cloneElement(child, {
52
+ gutter: index !== 0 ? gutter : 0
53
+ })
54
+ });
55
+ }) : children
53
56
  }));
54
57
  };
55
58
  var ProGrid = Grid;
@@ -1,9 +1,4 @@
1
1
  .ccs-pg {
2
- &-col:not(:first-child) {
3
- // border-right: 1px solid #f0f0f0;
4
- margin-left: 10px;
5
- }
6
-
7
2
  &-col-title {
8
3
  font-size: 15px;
9
4
  }
@@ -88,7 +88,13 @@ function SearchComponent(_ref) {
88
88
  });
89
89
 
90
90
  // 所有都是主条件
91
- if (hasMain.length === formItems.length) return false;
91
+ if (hasMain.length === formItems.length) {
92
+ // 收起已展开
93
+ if (isShowMore === true) {
94
+ setIsShowMore(false);
95
+ }
96
+ return false;
97
+ }
92
98
 
93
99
  // 条件数大于1,有更多
94
100
  return formItems.length > 1;
@@ -28,12 +28,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
28
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
29
29
  // 判断组件所处dom
30
30
  var onIsInModalOrDrawer = function onIsInModalOrDrawer(node) {
31
- var _parent$classList, _parent$classList2, _parent$classList3, _parent$classList4;
31
+ var _parent$classList, _parent$classList2, _parent$classList3, _parent$classList4, _parent$classList5;
32
32
  var parent = node.parentNode;
33
33
  if (!parent) return false;
34
34
  if (
35
35
  // 通过指定dom吸顶
36
- (_parent$classList = parent.classList) !== null && _parent$classList !== void 0 && _parent$classList.contains('ccs-trigger-container') || (_parent$classList2 = parent.classList) !== null && _parent$classList2 !== void 0 && _parent$classList2.contains('ccs-drawer-content')) {
36
+ (_parent$classList = parent.classList) !== null && _parent$classList !== void 0 && _parent$classList.contains('ccs-trigger-container') || (_parent$classList2 = parent.classList) !== null && _parent$classList2 !== void 0 && _parent$classList2.contains('ccs-drawer-content') || (_parent$classList3 = parent.classList) !== null && _parent$classList3 !== void 0 && _parent$classList3.contains('ant-drawer-body')) {
37
37
  return {
38
38
  getContainer: function getContainer() {
39
39
  return parent;
@@ -41,7 +41,7 @@ var onIsInModalOrDrawer = function onIsInModalOrDrawer(node) {
41
41
  };
42
42
  }
43
43
  // 在弹出框中吸顶top
44
- if ((_parent$classList3 = parent.classList) !== null && _parent$classList3 !== void 0 && _parent$classList3.contains('ant-modal') || (_parent$classList4 = parent.classList) !== null && _parent$classList4 !== void 0 && _parent$classList4.contains('ant-drawer')) {
44
+ if ((_parent$classList4 = parent.classList) !== null && _parent$classList4 !== void 0 && _parent$classList4.contains('ant-modal') || (_parent$classList5 = parent.classList) !== null && _parent$classList5 !== void 0 && _parent$classList5.contains('ant-drawer')) {
45
45
  return {
46
46
  offsetHeader: 0
47
47
  };
@@ -299,6 +299,7 @@ var InternalProTable = function InternalProTable(props) {
299
299
  useEffect(function () {
300
300
  // 判断当前dom所处的滚动区域
301
301
  var inMd = onIsInModalOrDrawer(tableRef.current);
302
+ console.log('inMd', inMd);
302
303
  if (inMd) stickyRef.current = inMd;
303
304
 
304
305
  // // 监听resize
@@ -0,0 +1,9 @@
1
+ export type CcsStatusTagProps = {
2
+ value: any;
3
+ options: {
4
+ value: any;
5
+ label: string;
6
+ tag: string[];
7
+ }[];
8
+ };
9
+ export default function CcsStatusTag({ value, options, }: CcsStatusTagProps): any;
package/es/table/index.js CHANGED
@@ -25,7 +25,7 @@ var ResizableTitle = function ResizableTitle(props) {
25
25
  var onResize = props.onResize,
26
26
  width = props.width,
27
27
  restProps = _objectWithoutProperties(props, _excluded);
28
- if (!width) {
28
+ if (!width || typeof width !== 'number') {
29
29
  return /*#__PURE__*/_jsx("th", _objectSpread({}, restProps));
30
30
  }
31
31
  return /*#__PURE__*/_jsx(Resizable, {
@@ -175,7 +175,7 @@ var CustomTable = function CustomTable(props) {
175
175
  children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
176
176
  rowKey: rowKey,
177
177
  dataSource: result,
178
- pagination: pagination !== null && pagination !== void 0 ? pagination : _objectSpread({
178
+ pagination: pagination === false ? false : _objectSpread({
179
179
  total: totalNum,
180
180
  pageSize: pageSize,
181
181
  current: pageNo,
@@ -187,7 +187,7 @@ var CustomTable = function CustomTable(props) {
187
187
  pageSizeOptions: ['10', '20', '30', '50', '100'],
188
188
  size: restProps.size === 'small' ? 'small' : 'default',
189
189
  simple: restProps.size === 'small'
190
- }, pagination || {}),
190
+ }, pagination),
191
191
  rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
192
192
  columnWidth: 60
193
193
  }) : undefined,
@@ -0,0 +1,16 @@
1
+ import { TimePickerProps } from 'antd';
2
+ import { RangePickerTimeProps } from 'antd/es/date-picker/generatePicker';
3
+ import { Dayjs } from 'dayjs';
4
+ type CcsTimePickerProps = {
5
+ value?: string;
6
+ onChange?: (e: string) => void;
7
+ } & Omit<TimePickerProps, 'value' | 'onChange'>;
8
+ type CcsRangePickerProps = {
9
+ value?: [string, string];
10
+ onChange?: (e: [string, string]) => void;
11
+ } & Omit<RangePickerTimeProps<Dayjs>, 'value' | 'onChange' | 'picker'>;
12
+ declare function CcsDatePicker({ value, onChange, ...restProps }: CcsTimePickerProps): import("react/jsx-runtime").JSX.Element;
13
+ declare namespace CcsDatePicker {
14
+ var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => import("react/jsx-runtime").JSX.Element;
15
+ }
16
+ export default CcsDatePicker;
@@ -0,0 +1,48 @@
1
+ import { CSSProperties, ReactElement } from 'react';
2
+ import { SizeType } from 'antd/es/config-provider/SizeContext';
3
+ import './index.less';
4
+ export type CcsTriggerProps = {
5
+ /** 下拉框宽度 */
6
+ width?: number;
7
+ /** 下拉框高度 */
8
+ height?: number;
9
+ /**
10
+ * @description input size:'small' | 'middle' | 'large'
11
+ * @default 'middle'
12
+ */
13
+ size?: SizeType;
14
+ /**
15
+ * @description 禁用选择
16
+ * @default false
17
+ */
18
+ disabled?: boolean;
19
+ /** 选择内容 */
20
+ children?: ReactElement;
21
+ /** Form.Item value */
22
+ value?: any;
23
+ /** style */
24
+ style?: CSSProperties;
25
+ /** class */
26
+ className?: string;
27
+ /** input placeholder */
28
+ placeholder?: string;
29
+ /**
30
+ * 是否在首次显示前渲染弹出内容
31
+ * @default false
32
+ */
33
+ forceRender?: boolean;
34
+ /**
35
+ * @description popup挂载的html节点,默认:document.body、true:当前dom
36
+ * @default document.body
37
+ */
38
+ popupContainer?: boolean;
39
+ /** Form.Item onChange */
40
+ onChange?: (value?: any) => void;
41
+ };
42
+ /**
43
+ * 适用于Form.Item中的 trigger组件,其内容自行定义,遵循ant form 自定义组件规范
44
+ * @param CcsTriggerPropsType
45
+ * @returns
46
+ */
47
+ declare const TriggerComponent: (props: CcsTriggerProps) => import("react/jsx-runtime").JSX.Element;
48
+ export default TriggerComponent;
package/es/types.d.ts ADDED
File without changes
@@ -0,0 +1,105 @@
1
+ import dayjs from 'dayjs';
2
+ type DayjsType = dayjs.Dayjs & {
3
+ fromNow(withoutSuffix?: boolean): string;
4
+ from(compared: dayjs.ConfigType, withoutSuffix?: boolean): string;
5
+ toNow(withoutSuffix?: boolean): string;
6
+ to(compared: dayjs.ConfigType, withoutSuffix?: boolean): string;
7
+ };
8
+ export default class utils {
9
+ /**
10
+ * 是函数?
11
+ * @param obj
12
+ * @returns
13
+ */
14
+ static isFunction(obj: any): obj is Function;
15
+ /**
16
+ * 获取stroage
17
+ * @param key
18
+ * @returns
19
+ */
20
+ static getStroage(key: string): Promise<unknown>;
21
+ /**
22
+ * 设置stroage
23
+ * @param key
24
+ * @param value
25
+ * @returns
26
+ */
27
+ static setStroage(key: string, value: any): Promise<any>;
28
+ /** 删除stroage */
29
+ static removeStroage(key: string): Promise<void>;
30
+ static showLogWarning(message: string): void;
31
+ /**
32
+ * 开发环境抛警告
33
+ * @param valid
34
+ * @param message
35
+ */
36
+ static showWarning(valid: boolean, message: string): void;
37
+ /** nodejs 环境 */
38
+ static isNode: boolean;
39
+ /**
40
+ * 浏览器环境
41
+ * @returns
42
+ */
43
+ static isBrowser(): boolean;
44
+ /**
45
+ * 格式化成dayjs
46
+ * @param date
47
+ * @returns
48
+ */
49
+ static dayjs(date?: string | number | Date | dayjs.Dayjs | null | undefined): DayjsType;
50
+ /**
51
+ * 空判断
52
+ * @param val
53
+ * @returns
54
+ */
55
+ static isEmpty: (val: unknown) => boolean;
56
+ /**
57
+ * 非空
58
+ * @param val
59
+ * @returns
60
+ */
61
+ static isNotEmpty: (val: unknown) => boolean;
62
+ /**
63
+ * json转base64
64
+ * @param value
65
+ * @returns
66
+ */
67
+ static jsonToBase64(value: any): string;
68
+ /**
69
+ * base64转json
70
+ * @param value
71
+ * @returns
72
+ */
73
+ static base64ToJson<T = any>(value: string): T | null;
74
+ /**
75
+ * JSON.parse
76
+ * @param value
77
+ * @returns
78
+ */
79
+ static jsonParse<T = any>(value: string): T;
80
+ /**
81
+ * string to HEX
82
+ * @param {*} str
83
+ */
84
+ static stringToHex(str: string): string;
85
+ /**
86
+ * string to dayjs
87
+ * @param val
88
+ * @param formartType // YYYY-MM-DD HH:mm:ss https://dayjs.fenxianglu.cn/category/display.html#%E6%A0%BC%E5%BC%8F%E5%8C%96
89
+ * @returns
90
+ */
91
+ static dayjsFmt(val: string | undefined, formartType?: string): dayjs.Dayjs | undefined;
92
+ /**
93
+ * 空对象?
94
+ * @param obj
95
+ * @returns
96
+ */
97
+ static objIsEmpty(obj: any): boolean;
98
+ /**
99
+ * 判断值不为空
100
+ * @param str string,object,array
101
+ * @returns
102
+ */
103
+ static isNil(str: any): boolean;
104
+ }
105
+ export {};
@@ -0,0 +1,52 @@
1
+ import { CSSProperties, ReactNode, RefObject } from 'react';
2
+ type Position = {
3
+ left: number;
4
+ top: number;
5
+ };
6
+ export type RowRendererProps = {
7
+ rowHeight: number;
8
+ index: number;
9
+ };
10
+ export type VirtualInstance = {
11
+ scrollTop: (top: number) => void;
12
+ };
13
+ export type VirtualListProps = {
14
+ /** 容器高度 */
15
+ height?: number;
16
+ /** 记录条数 */
17
+ rowCount: number;
18
+ /** 行高 */
19
+ rowHeight: number;
20
+ /**
21
+ * 自动隐藏滚动条
22
+ * @default true
23
+ */
24
+ autoHideScroll?: boolean;
25
+ /** 显示条数 */
26
+ overscanRowCount: number;
27
+ /** 条数改变定位顶部 */
28
+ rowCountChangeScrollTop?: boolean;
29
+ /** instance */
30
+ virtualRef?: RefObject<VirtualInstance>;
31
+ style?: CSSProperties;
32
+ className?: string;
33
+ /** 渲染row */
34
+ rowRenderer: ({ rowHeight, index }: RowRendererProps) => ReactNode;
35
+ /** scroll event */
36
+ onScroll?: (position: Position) => void;
37
+ };
38
+ export type VirtualListItemProps = Pick<VirtualListProps, 'rowHeight' | 'rowRenderer'> & {
39
+ index: number;
40
+ };
41
+ export type ListItemProps = {
42
+ prefix: ReactNode;
43
+ title: ReactNode;
44
+ extra?: ReactNode;
45
+ extraIcon?: ReactNode;
46
+ height: number;
47
+ className?: string;
48
+ description?: ReactNode;
49
+ onClick?: () => void;
50
+ };
51
+ declare const VirtualList: ({ height, rowCount, rowHeight, className, style, virtualRef, onScroll, rowRenderer, autoHideScroll, overscanRowCount, rowCountChangeScrollTop, }: VirtualListProps) => import("react/jsx-runtime").JSX.Element;
52
+ export default VirtualList;
@@ -0,0 +1,69 @@
1
+ import React, { ReactNode } from 'react';
2
+ export type WaterMarkProps = {
3
+ /** 水印文字内容 */
4
+ content?: string;
5
+ /** 类名 */
6
+ className?: string;
7
+ /** 样式 */
8
+ style?: React.CSSProperties;
9
+ /** 水印样式 */
10
+ markStyle?: React.CSSProperties;
11
+ /** 水印类名 */
12
+ markClassName?: string;
13
+ /** 水印之间的水平间距 */
14
+ gapX?: number;
15
+ /** 水印之间的垂直间距 */
16
+ gapY?: number;
17
+ /** 追加的水印元素的z-index */
18
+ zIndex?: number;
19
+ /** 水印的宽度 */
20
+ width?: number;
21
+ /** 水印的高度 */
22
+ height?: number;
23
+ /** 水印在canvas 画布上绘制的垂直偏移量,正常情况下,水印绘制在中间位置, 即 offsetTop = gapY / 2 */
24
+ offsetTop?: number;
25
+ /** 水印在canvas 画布上绘制的水平偏移量, 正常情况下,水印绘制在中间位置, 即 offsetTop = gapX / 2 */
26
+ offsetLeft?: number;
27
+ /** 水印绘制时,旋转的角度,单位 ° */
28
+ rotate?: number;
29
+ /** ClassName 前缀 */
30
+ prefixCls?: string;
31
+ /** 高清印图片源, 为了高清屏幕显示,建议使用 2倍或3倍图,优先使用图片渲染水印。 */
32
+ image?: string;
33
+ /**
34
+ * @description 文字颜色
35
+ * @default rgba(0,0,0,.15)
36
+ */
37
+ fontColor?: string;
38
+ /**
39
+ * @description 文字样式
40
+ * @default normal
41
+ */
42
+ fontStyle?: 'none' | 'normal' | 'italic' | 'oblique';
43
+ /**
44
+ * @description 文字族
45
+ * @default sans-serif
46
+ */
47
+ fontFamily?: string;
48
+ /**
49
+ * @description 文字粗细
50
+ * @default normal
51
+ */
52
+ fontWeight?: 'normal' | 'light' | 'weight' | number;
53
+ /**
54
+ * @description 文字大小
55
+ * @default 16
56
+ */
57
+ fontSize?: number | string;
58
+ /**
59
+ * 组件 children
60
+ */
61
+ children?: ReactNode;
62
+ };
63
+ /**
64
+ * 水印组件
65
+ * @param WaterMarkProps
66
+ * @returns
67
+ */
68
+ declare const WaterMarkComponent: (props: WaterMarkProps) => import("react/jsx-runtime").JSX.Element;
69
+ export default WaterMarkComponent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.1.19",
4
- "description": " ProTable支持拖拽改变宽度,需设置列宽",
3
+ "version": "1.1.21-beta-1",
4
+ "description": "ProTable在抽屉中吸顶异常",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Hong",
@@ -68,6 +68,7 @@
68
68
  "react-color": "^2.19.3",
69
69
  "react-custom-scrollbars": "^4.2.1",
70
70
  "react-draggable": "^4.4.5",
71
+ "react-error-overlay": "^6.0.11",
71
72
  "react-resizable": "^3.0.5",
72
73
  "react-router": "^6.11.2",
73
74
  "react-router-dom": "^6.11.2",