@flatbiz/antd 4.0.20 → 4.0.22

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
@@ -226,7 +226,7 @@ export type DatePickerWrapperProps = Omit<PickerDateProps<dayjs.Dayjs>, "value"
226
226
  * ```
227
227
  */
228
228
  export declare const DatePickerWrapper: (props: DatePickerWrapperProps) => JSX.Element;
229
- export type DateRangePickerWrapperProps = Omit<RangePickerDateProps<Dayjs>, "value" | "onChange" | "onOpenChange" | "onCalendarChange" | "disabledDate" | "format"> & {
229
+ export type DateRangePickerWrapperProps = Omit<RangePickerDateProps<Dayjs>, "value" | "onChange" | "onCalendarChange" | "disabledDate" | "format"> & {
230
230
  value?: [
231
231
  string,
232
232
  string
@@ -546,6 +546,7 @@ export type EasyTableProps = {
546
546
  total?: string;
547
547
  pageNo?: string;
548
548
  pageSize?: string;
549
+ uid?: string;
549
550
  };
550
551
  /** 初始化是否请求,默认值:true */
551
552
  initRequest?: boolean;
@@ -671,8 +672,8 @@ export type EasyTableFilterProps = {
671
672
  export declare const EasyTableFilter: (props: EasyTableFilterProps) => JSX.Element;
672
673
  export type EasyTableTableProps = Omit<TableProps<TAny>, "dataSource" | "loading" | "rowKey"> & {
673
674
  children?: ReactElement;
674
- /** 表格行 key 的取值,可以是字符串或一个函数 */
675
- rowKey: string | ((record: TPlainObject, index?: number) => React.Key);
675
+ /** 表格行 key 的取值 */
676
+ rowKey: string;
676
677
  };
677
678
  /**
678
679
  * 表格渲染
@@ -757,7 +758,7 @@ export type SelectorWrapperProps = Omit<SelectProps, "filterOption" | "onSearch"
757
758
  * selectorList发生变更时触发,第一次不调用
758
759
  */
759
760
  onSelectorListChange?: (dataList: TPlainObject[]) => void;
760
- /** electorList发生变更时触发,每次都会调用 */
761
+ /** selectorList发生变更时触发,每次都会调用 */
761
762
  onSelectorListAllChange?: (dataList: TPlainObject[]) => void;
762
763
  /**
763
764
  * 通过服务获取数据异常回调
@@ -1211,6 +1212,40 @@ export type LabelValueLayoutProps = {
1211
1212
  bordered?: boolean;
1212
1213
  };
1213
1214
  export declare const LabelValueLayout: (props: LabelValueLayoutProps) => JSX.Element;
1215
+ export type LocalLoadingServiceConfig = {
1216
+ onRequest: (params?: TAny) => Promise<TPlainObject>;
1217
+ params?: TPlainObject;
1218
+ };
1219
+ export interface LocalLoadingProps {
1220
+ /** 接口数据配置 */
1221
+ serviceConfig: LocalLoadingServiceConfig;
1222
+ /** children 为函数,参数【respData】为接口返回数据 */
1223
+ children?: (respData?: TAny) => ReactElement;
1224
+ /**
1225
+ * 是否异步,默认:false
1226
+ * ```
1227
+ * true(异步):onRequest、react dom渲染同步执行
1228
+ * false(同步):onRequest有结果了才渲染 react dom
1229
+ * ```
1230
+ */
1231
+ isAsync?: boolean;
1232
+ /** 最小高度 */
1233
+ minHeight?: number;
1234
+ /** 自定义异常渲染处理 */
1235
+ errorRender?: (error?: TAny) => ReactElement;
1236
+ }
1237
+ /**
1238
+ * 局部加载,包含接口数据处理逻辑
1239
+ * ```
1240
+ * 包括
1241
+ * 1. loading显示效果
1242
+ * 2. error显示效果
1243
+ * 3. 正常接口数据渲染
1244
+ * ```
1245
+ * @param props
1246
+ * @returns
1247
+ */
1248
+ export declare const LocalLoading: (props: LocalLoadingProps) => JSX.Element;
1214
1249
  export type onClick = (e?: React.MouseEvent<HTMLElement>) => void;
1215
1250
  export interface ModalActionProps {
1216
1251
  children: ReactElement | ((data: {
@@ -1502,7 +1537,7 @@ export type SimpleLayoutProps = {
1502
1537
  className?: string;
1503
1538
  style?: CSSProperties;
1504
1539
  title?: string | ReactElement;
1505
- desc?: string | ReactElement;
1540
+ desc?: string | ReactElement | string[] | ReactElement[];
1506
1541
  formLabelAlign?: "left" | "right";
1507
1542
  layoutType?: "layer" | "tight";
1508
1543
  titleLeftLine?: boolean;
@@ -1609,24 +1644,27 @@ export type TagListSelectProps = {
1609
1644
  */
1610
1645
  export declare const TagListSelect: FC<TagListSelectProps>;
1611
1646
  export type TableColumnIconRenderProps = {
1612
- /** 额外内容 */
1647
+ /** 额外内容,一般为Icon */
1613
1648
  extra: ReactElement;
1649
+ extraPosition?: "before" | "after";
1614
1650
  onClick?: (e: any) => void;
1651
+ /** 是否显示原单元格数据,默认值:true */
1615
1652
  showData?: boolean;
1653
+ /** 溢出显示【...】, 最大长度(默认:20个字节) */
1616
1654
  showMaxNumber?: number;
1617
- extraPosition?: "before" | "after";
1655
+ /** 未溢出显示【extra】配置,默认值:true */
1656
+ notOverflowShowExtra?: boolean;
1618
1657
  };
1619
1658
  export declare const tableCellRender: {
1620
1659
  /**
1621
1660
  * 表格单元格 拼接额外内容渲染
1622
1661
  * ```
1623
1662
  * 1. extra 额外内容
1624
- * 2. showData 是否显示数据,默认值:true
1625
- * 3. onClick 点击事件,showData != false 有效
1626
- * 4. showMaxNumber 显示最大长度,作用于原单元格字符串数据
1663
+ * 2. showData 是否显示原单元格数据,默认值:true
1664
+ * 3. showMaxNumber 显示最大长度,作用于原单元格字符串数据
1627
1665
  * ```
1628
1666
  */
1629
- extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => JSX.Element;
1667
+ extraContentRender: (handle: (item: TPlainObject) => TableColumnIconRenderProps) => (value: TAny, item: TPlainObject) => any;
1630
1668
  /**
1631
1669
  * table 索引展示,如果存在pageSize、pageNo参数可分页展示索引,否则每页都从1开始
1632
1670
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.0.20",
3
+ "version": "4.0.22",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",