@flatbiz/antd 4.1.7 → 4.1.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.
package/index.d.ts CHANGED
@@ -18,6 +18,10 @@ import { CSSProperties, DependencyList, Dispatch, EffectCallback, FC, ReactEleme
18
18
 
19
19
  export declare const styles: () => void;
20
20
  export interface ButtonOperateItem extends ButtonProps {
21
+ /** hover 提示文字 */
22
+ hoverTips?: string | React.ReactElement;
23
+ /** hover 提示类型 默认:'tooltip' */
24
+ tipsType?: "popover" | "tooltip";
21
25
  text: string | ReactElement;
22
26
  color?: string;
23
27
  onClick?: (event: React.MouseEvent<HTMLElement>) => void | Promise<void>;
@@ -44,6 +48,9 @@ export interface ButtonOperateProps {
44
48
  split?: boolean;
45
49
  spaceProps?: SpaceProps;
46
50
  }
51
+ export declare const ButtonOperateItemContent: (props: Pick<ButtonOperateItem, "hoverTips" | "tipsType"> & {
52
+ children?: ReactNode;
53
+ }) => JSX.Element;
47
54
  export declare const ButtonOperate: FC<ButtonOperateProps>;
48
55
  export type TAny = any;
49
56
  export type TPlainObject<T = TAny> = Record<string, T>;
@@ -168,7 +175,7 @@ export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
168
175
  };
169
176
  export declare const ConfigProviderWrapper: (props: ConfigProviderWrapperProps) => JSX.Element;
170
177
  export type CssHoverProps = {
171
- children: ReactElement;
178
+ children: ReactElement | ReactElement[];
172
179
  } & Pick<CommonPropsWithChildren<{
173
180
  "--v-css-hover-bgcolor": CSSProperties["backgroundColor"];
174
181
  "--v-css-hover-opacity": CSSProperties["opacity"];
@@ -575,6 +582,8 @@ export type EasyTableProps = {
575
582
  /** 初始化是否请求,默认值:true */
576
583
  initRequest?: boolean;
577
584
  onDataSourceChange?: (dataSource: TAny) => void;
585
+ /** 如果自定义查询按钮,可设置 Form onFinish */
586
+ onFormFinish?: (values?: TPlainObject) => void;
578
587
  };
579
588
  /**
580
589
  * 对 查询条件+表格数据 进行深度封装,内置数据交互处理
@@ -720,7 +729,7 @@ export interface EditableFieldProps {
720
729
  value?: TAny;
721
730
  onChange?: (data?: TAny) => void;
722
731
  placeholderValue?: string;
723
- /** edit 区域是否铺满,editableIcon=false 无效 */
732
+ /** edit 区域是否铺满,showEditableIcon=false 无效 */
724
733
  isEditFull?: boolean;
725
734
  /** 是否可编辑 */
726
735
  editable?: boolean;
@@ -1071,7 +1080,7 @@ export type EditorWrapperProps = {
1071
1080
  * @param props
1072
1081
  * @returns
1073
1082
  */
1074
- export declare const EditorWrapper: (props: any) => JSX.Element;
1083
+ export declare const EditorWrapper: (props: EditorWrapperProps) => JSX.Element;
1075
1084
  export type FileImportProps = {
1076
1085
  onImportFinish: (data?: any) => void;
1077
1086
  buttonName?: string | ReactElement;
@@ -1180,6 +1189,10 @@ export declare const useEffectCustom: (fn: EffectCallback, deps: DependencyList)
1180
1189
  export declare const useEffectCustomAsync: (fn: () => Promise<void>, deps: DependencyList) => void;
1181
1190
  export type ShouldUpdateFunc<T> = (prev: T | undefined, next: T) => boolean;
1182
1191
  export declare function usePrevious<T>(state: T, shouldUpdate?: ShouldUpdateFunc<T>): T | undefined;
1192
+ /**
1193
+ * 获取响应式节点
1194
+ */
1195
+ export declare const useResponsivePoint: () => string | undefined;
1183
1196
  export declare const useSafeState: <S extends unknown>(initialState?: S | (() => S) | undefined) => [
1184
1197
  S,
1185
1198
  Dispatch<SetStateAction<S>>
@@ -1514,6 +1527,31 @@ export type TRelationTreeOperate = {
1514
1527
  onChange: (name: string, value: any) => void;
1515
1528
  };
1516
1529
  export declare const RelationTree: (props: RelationTreeProps) => JSX.Element;
1530
+ export type RollLocationCenterProps = {
1531
+ renderList: {
1532
+ activeKey: string;
1533
+ render: ReactElement;
1534
+ }[];
1535
+ activeKey?: string;
1536
+ behavior?: ScrollBehavior;
1537
+ direction?: "horizontal" | "vertical";
1538
+ style?: CSSProperties;
1539
+ className?: string;
1540
+ };
1541
+ export declare const RollLocationCenter: (props: RollLocationCenterProps) => JSX.Element;
1542
+ export type RollLocationInViewProps = {
1543
+ renderList: {
1544
+ activeKey: string;
1545
+ render: ReactElement;
1546
+ }[];
1547
+ activeKey?: string;
1548
+ behavior?: ScrollBehavior;
1549
+ activeOffset?: number;
1550
+ direction?: "horizontal" | "vertical";
1551
+ style?: CSSProperties;
1552
+ className?: string;
1553
+ };
1554
+ export declare const RollLocationInView: (props: RollLocationInViewProps) => JSX.Element;
1517
1555
  export type RuleDataItem = {
1518
1556
  title?: string | ReactElement;
1519
1557
  desc?: string | ReactElement;
@@ -1748,8 +1786,21 @@ export declare const tableCellRender: {
1748
1786
  extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => any;
1749
1787
  /**
1750
1788
  * table 索引展示,如果存在pageSize、pageNo参数可分页展示索引,否则每页都从1开始
1789
+ * @deprecated 已过时,请使用 serialNumberCell
1751
1790
  */
1752
- indexCell: (pageNo?: number, pageSize?: number) => (_value: string | number, _record: TPlainObject, index: number) => number;
1791
+ indexCell: (pageNo?: number, pageSize?: number) => (_value: any, _record: any, index: number) => number;
1792
+ /**
1793
+ * table 序号展示,如果存在pageSize、pageNo参数可分页展示累加序号,否则每页都从1开始
1794
+ * ```
1795
+ * render: tableCellRender.serialNumberCell(() => {
1796
+ * return { pageNo,pageSize };
1797
+ * }),
1798
+ * ```
1799
+ */
1800
+ serialNumberCell: (method?: () => {
1801
+ pageNo?: number;
1802
+ pageSize?: number;
1803
+ }) => (_value: any, _record: any, index: number) => number;
1753
1804
  /**
1754
1805
  * 表格日期格式数据渲染,默认格式:YYYY-MM-DD
1755
1806
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.1.7",
3
+ "version": "4.1.8",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -36,7 +36,8 @@
36
36
  "antd": ">=5.2.1",
37
37
  "dayjs": ">=1.11.7",
38
38
  "react": ">=18.2.0",
39
- "react-dom": ">=18.2.0"
39
+ "react-dom": ">=18.2.0",
40
+ "ahooks": "^3.7.5"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@ant-design/icons": "^4.8.0",
@@ -50,7 +51,8 @@
50
51
  "dayjs": "1.11.7",
51
52
  "dequal": "^2.0.3",
52
53
  "react": "18.2.0",
53
- "react-dom": "18.2.0"
54
+ "react-dom": "18.2.0",
55
+ "ahooks": "^3.7.5"
54
56
  },
55
57
  "dependencies": {
56
58
  "dequal": "^2.0.3",