@flatbiz/antd 4.2.85 → 4.2.86

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.
Files changed (56) hide show
  1. package/esm/button-operate/index.js +2 -1
  2. package/esm/button-operate/index.js.map +1 -1
  3. package/esm/button-wrapper/index.js +2 -1
  4. package/esm/button-wrapper/index.js.map +1 -1
  5. package/esm/card-wrapper/index.css +1 -0
  6. package/esm/card-wrapper/index.js +5 -0
  7. package/esm/card-wrapper/index.js.map +1 -0
  8. package/esm/config-provider-wrapper/index.js +2 -1
  9. package/esm/config-provider-wrapper/index.js.map +1 -1
  10. package/esm/create-drawer-wrapper-model/index.js.map +1 -1
  11. package/esm/create-modal-wrapper-model/index.js.map +1 -1
  12. package/esm/dialog-alert/index.js +2 -1
  13. package/esm/dialog-alert/index.js.map +1 -1
  14. package/esm/dialog-confirm/index.js +2 -1
  15. package/esm/dialog-confirm/index.js.map +1 -1
  16. package/esm/dialog-drawer/index.js +2 -1
  17. package/esm/dialog-drawer/index.js.map +1 -1
  18. package/esm/dialog-drawer-content/index.js +2 -1
  19. package/esm/dialog-drawer-content/index.js.map +1 -1
  20. package/esm/dialog-loading/index.js.map +1 -1
  21. package/esm/dialog-modal/index.js +2 -1
  22. package/esm/dialog-modal/index.js.map +1 -1
  23. package/esm/drawer-wrapper/index.js.map +1 -1
  24. package/esm/dropdown-menu-wrapper/index.js +2 -1
  25. package/esm/dropdown-menu-wrapper/index.js.map +1 -1
  26. package/esm/easy-table/index.js +2 -1
  27. package/esm/easy-table/index.js.map +1 -1
  28. package/esm/editable-table/index.js +10 -1
  29. package/esm/editable-table/index.js.map +1 -1
  30. package/esm/fba-app/index.css +1 -1
  31. package/esm/fba-app/index.js +3 -1
  32. package/esm/fba-app/index.js.map +1 -1
  33. package/esm/index-ac189a77.js +3 -0
  34. package/esm/index-ac189a77.js.map +1 -0
  35. package/esm/index.js +6 -5
  36. package/esm/label-value-layout/index.css +1 -1
  37. package/esm/label-value-layout/index.js +1 -1
  38. package/esm/label-value-layout/index.js.map +1 -1
  39. package/esm/local-loading/index.js.map +1 -1
  40. package/esm/pre-defined-class-name/index.css +1 -1
  41. package/esm/selector-wrapper/index.js +1 -1
  42. package/esm/selector-wrapper/index.js.map +1 -1
  43. package/esm/simple-layout/index.css +1 -1
  44. package/esm/simple-layout/index.js.map +1 -1
  45. package/esm/table-cell-render/index.js +2 -1
  46. package/esm/table-cell-render/index.js.map +1 -1
  47. package/esm/tag-list-select/index.js +1 -1
  48. package/esm/tag-list-select/index.js.map +1 -1
  49. package/esm/text-overflow-render/index.js +2 -1
  50. package/esm/text-overflow-render/index.js.map +1 -1
  51. package/esm/tips-title/index.css +1 -1
  52. package/esm/tree-wrapper/index.js +2 -1
  53. package/esm/tree-wrapper/index.js.map +1 -1
  54. package/esm/types/index.js.map +1 -1
  55. package/index.d.ts +144 -105
  56. package/package.json +4 -3
package/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { API, ModelType } from '@dimjs/model';
6
6
  import { PlainObject } from '@dimjs/utils';
7
7
  import { DateFormatType, TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
8
8
  import { IAllProps } from '@tinymce/tinymce-react';
9
- import { ButtonProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
9
+ import { ButtonProps, CardProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
10
10
  import { ConfigProviderProps } from 'antd/es/config-provider';
11
11
  import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
12
12
  import { FormListProps } from 'antd/es/form';
@@ -73,8 +73,21 @@ export type ButtonWrapperProps = Omit<ButtonProps, "onClick"> & {
73
73
  * @returns
74
74
  */
75
75
  export declare const ButtonWrapper: (props: ButtonWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
76
+ export type FormItemNamePath = string | number | Array<string | number>;
77
+ export type TLocale = "en" | "zh-cn";
78
+ export type TFbaLocale = {
79
+ TreeWrapper?: {
80
+ /** 数据加载异常默认文案 */
81
+ requestError?: string;
82
+ };
83
+ FbaDialogModal?: {
84
+ cancelText?: string;
85
+ };
86
+ };
76
87
  export type ConfigProviderWrapperProps = Omit<ConfigProviderProps, "locale"> & {
77
- locale?: "en" | "zh-cn";
88
+ locale?: TLocale;
89
+ /** 自定义国际化数据 */
90
+ customLocaleMessage?: Partial<TFbaLocale>;
78
91
  };
79
92
  export declare const ConfigProviderWrapper: (props: ConfigProviderWrapperProps) => import("react/jsx-runtime").JSX.Element;
80
93
  export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContainer" | "open" | "open" | "okButtonProps" | "cancelButtonProps"> & {
@@ -99,33 +112,16 @@ export type DialogModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
99
112
  titleExtra?: ReactElement;
100
113
  };
101
114
  /**
102
- * 函数式调用弹框;初始化后,内容无法更新
103
- *```
104
- * 1. 基础使用方式
105
- * dialogModal.open({
106
- * title: '我是弹框',
107
- * content: <div>我是内容</div>,
108
- * });
109
- * ```
110
- * ```
111
- * ***************************
112
- * 2. 结合内置form使用,可在onOK、onCancel获取form对象
113
- * dialogModal.open({
114
- * title: '我是弹框',
115
- * content: (form, operate) => {
116
- * return (
117
- * <Form form={form}>
118
- * <Form.Item name="useName">
119
- * <Input placeholder="请输入" />
120
- * </Form.Item>
121
- * </Form>
122
- * );
123
- * },
124
- * onOK: (form) => {
125
- * console.log('content form数据', form.getFieldsValue());
126
- * return Promise.resolve();
127
- * },
128
- * });
115
+ *
116
+ * @deprecated 已过期
117
+ * ```
118
+ * 1. 为什么过期
119
+ * dialogModal.open 打开的内容无法适配兼容自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
120
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
121
+ * 2. 请使用
122
+ * const { appDialogModal } = FbaApp.useDialogModal();
123
+ * appDialogModal.open({})
124
+ *
129
125
  * ```
130
126
  */
131
127
  export declare const dialogModal: {
@@ -217,6 +213,14 @@ export declare const ButtonOperateItemContent: (props: Pick<ButtonOperateItem, "
217
213
  * ```
218
214
  */
219
215
  export declare const ButtonOperate: FC<ButtonOperateProps>;
216
+ /**
217
+ * ```
218
+ * 主要为了解决,标题固定,内容滚动
219
+ * ```
220
+ * @param props
221
+ * @returns
222
+ */
223
+ export declare const CardWrapper: (props: CardProps) => import("react/jsx-runtime").JSX.Element;
220
224
  export type TRequestStatus = "request-init" | "request-progress" | "request-success" | "request-error" | "no-dependencies-params";
221
225
  export type TRequestStatusProps = {
222
226
  status?: TRequestStatus;
@@ -365,7 +369,7 @@ export interface DrawerActionsParamType {
365
369
  * drawer弹窗模型
366
370
  * @param key 唯一值必传
367
371
  * @returns
368
- * @deprecated 废弃 DrawerWrapper 4.3.0版本移除, 请使用 dialogDrawer
372
+ * @deprecated 废弃 DrawerWrapper 4.3.0版本移除, 请使用 const { appDialogModal } = FbaApp.useDialogModal();
369
373
  */
370
374
  export declare const createDrawerWrapperModel: (key: string) => API<ModelType<DrawerStateType, DrawerActionsParamType, any>>;
371
375
  export interface ModalStateType {
@@ -389,7 +393,7 @@ export interface ModalActionsParamType {
389
393
  /**
390
394
  * modal弹窗模型
391
395
  * @param key 唯一值必传
392
- * @deprecated 废弃 ModalWrapper 4.3.0版本移除,请使用 dialogModal
396
+ * @deprecated 废弃 ModalWrapper 4.3.0版本移除,请使用 const { appDialogModal } = FbaApp.useDialogModal();
393
397
  */
394
398
  export declare const createModalWrapperModel: (key: string) => API<ModelType<ModalStateType, ModalActionsParamType, any>>;
395
399
  export type CssHoverProps = {
@@ -503,7 +507,6 @@ export type DateRangePickerWrapperProps = Omit<RangePickerDateProps<TAny>, "valu
503
507
  * ```
504
508
  */
505
509
  export declare const DateRangePickerWrapper: (props: DateRangePickerWrapperProps) => import("react/jsx-runtime").JSX.Element;
506
- export type FormItemNamePath = string | number | Array<string | number>;
507
510
  export type DateRangePickerWrapperFormItemProps = Omit<FormItemProps, "name"> & {
508
511
  /**
509
512
  * 开始的时间name
@@ -530,11 +533,33 @@ export declare const DateRangePickerWrapperFormItem: (props: DateRangePickerWrap
530
533
  export type DialogAlertProps = Omit<DialogModalProps, "onOk" | "cancelHidden" | "cancelButtonProps" | "onCancel" | "onClick"> & {
531
534
  onClick?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
532
535
  };
536
+ /**
537
+ * @deprecated 已过期
538
+ * ```
539
+ * 1. 为什么过期
540
+ * dialogAlert.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
541
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
542
+ * 2. 请使用
543
+ * const { appDialogModal } = FbaApp.useDialogModal();
544
+ * appDialogModal.open({})
545
+ * ```
546
+ */
533
547
  export declare const dialogAlert: {
534
548
  open: (props: DialogAlertProps) => {
535
549
  close: () => void;
536
550
  };
537
551
  };
552
+ /**
553
+ * @deprecated 已过期
554
+ * ```
555
+ * 1. 为什么过期
556
+ * dialogConfirm.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
557
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
558
+ * 2. 请使用
559
+ * const { appDialogModal } = FbaApp.useDialogModal();
560
+ * appDialogModal.open({})
561
+ * ```
562
+ */
538
563
  export declare const dialogConfirm: {
539
564
  open: (props: DialogModalProps) => {
540
565
  close: () => void;
@@ -558,36 +583,16 @@ export type DialogDrawerProps = Omit<DrawerProps, "onOk" | "onCancel" | "getCont
558
583
  extra?: ReactNode | ((form: FormInstance) => ReactElement);
559
584
  };
560
585
  /**
561
- * 函数式调用弹框;初始化后,内容无法更新
562
- *```
563
- * 1. 基础使用方式
564
- * dialogDrawer.open({
565
- * title: '我是标题',
566
- * content: <div>我是内容</div>,
567
- * });
568
- * ```
569
- * ```
570
- * ***************************
571
- * 2. 结合内置form使用,可在onOK、onCancel获取form对象
572
- * dialogDrawer.open({
573
- * title: '我是标题',
574
- * content: (form, operate) => {
575
- * return (
576
- * <Form form={form}>
577
- * <Form.Item name="useName">
578
- * <Input placeholder="请输入" />
579
- * </Form.Item>
580
- * </Form>
581
- * );
582
- * },
583
- * onOk: (form) => {
584
- * console.log('content form数据', form.getFieldsValue());
585
- * return Promise.resolve();
586
- * },
587
- * });
588
586
  *
589
- * 注意:
590
- * 1. 设置operateRender后,需要自定义操作按钮,onOk、onCancel、okText、cancelText、okButtonExtraProps、cancelButtonExtraProps配置失效
587
+ * @deprecated 已过期
588
+ * ```
589
+ * 1. 为什么过期
590
+ * dialogConfirm.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
591
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
592
+ * 2. 请使用
593
+ * const { appDialogModal } = FbaApp.useDialogModal();
594
+ * appDialogModal.open({})
595
+ *
591
596
  * ```
592
597
  */
593
598
  export declare const dialogDrawer: {
@@ -629,6 +634,19 @@ export type DialogLoadingProps = {
629
634
  message?: string;
630
635
  mask?: boolean;
631
636
  };
637
+ /**
638
+ *
639
+ * @deprecated 已过期
640
+ * ```
641
+ * 1. 为什么过期
642
+ * dialogLoading.open 打开的内容无法配兼自定义主题、无法适配兼容旧版浏览器、无法兼容国际化
643
+ * 适配兼容旧版浏览器(https://ant-design.antgroup.com/docs/react/compatible-style-cn)
644
+ * 2. 请使用
645
+ * const { appDialogModal } = FbaApp.useDialogModal();
646
+ * appDialogModal.open({})
647
+ *
648
+ * ```
649
+ */
632
650
  export declare const dialogLoading: {
633
651
  open: (props?: DialogLoadingProps) => {
634
652
  close: () => void;
@@ -871,7 +889,7 @@ declare const DrawerWrapperContent: (props: {
871
889
  declare const DrawerWrapperFooter: (props: any) => import("react/jsx-runtime").JSX.Element;
872
890
  /**
873
891
  * 弹窗机制
874
- * @deprecated 已过时 4.3.0版本移除;请使用 dialogDrawer.open
892
+ * @deprecated 已过时 4.3.0版本移除;请使用 const { appDialogModal } = FbaApp.useDialogModal();
875
893
  * ```
876
894
  * 1. 默认 destroyOnClose = true
877
895
  * 2. 默认 forceRender = false
@@ -1300,15 +1318,17 @@ export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundConte
1300
1318
  /**
1301
1319
  * 参数Key映射
1302
1320
  * ```
1303
- * 1. list 为 onRequest 返回数据中列表key值,可多级取值,例如: 'a.b.c'
1304
- * 2. 配置 serviceConfig.onRequestResultAdapter后,fieldNames.list配置失效
1321
+ * 1. 默认值:value=value、label=label、disabled=disabled
1322
+ * 2. list 为 onRequest 返回数据中列表key值,可多级取值,例如: 'a.b.c'
1323
+ * 3. 配置 serviceConfig.onRequestResultAdapter后,fieldNames.list配置失效
1324
+ * 4. 如果没有配置list,可说明接口返回为数组
1305
1325
  * ```
1306
1326
  */
1307
1327
  fieldNames?: {
1308
- label: string;
1309
- value: string;
1310
- disabled?: string;
1311
1328
  list?: string;
1329
+ label?: string;
1330
+ value?: string;
1331
+ disabled?: string;
1312
1332
  };
1313
1333
  /**
1314
1334
  * 请求服务需求的数据
@@ -1373,6 +1393,37 @@ export type SelectorWrapperProps = Omit<SelectProps, "onSearch" | "notFoundConte
1373
1393
  * ```
1374
1394
  */
1375
1395
  export declare const SelectorWrapper: (props: SelectorWrapperProps) => import("react/jsx-runtime").JSX.Element;
1396
+ export type SwitchWrapperValue = string | number | boolean;
1397
+ export type SwitchWrapperProps = Omit<SwitchProps, "checked" | "defaultChecked" | "onChange"> & {
1398
+ value?: SwitchWrapperValue;
1399
+ checkedValue: SwitchWrapperValue;
1400
+ unCheckedValue: SwitchWrapperValue;
1401
+ onChange?: (value: SwitchWrapperValue) => void;
1402
+ tooltipProps?: Omit<TooltipProps, "title">;
1403
+ tooltipTitle?: string | ((value?: SwitchWrapperValue) => string | undefined);
1404
+ serviceConfig?: {
1405
+ onRequest: (value: SwitchWrapperValue) => TAny;
1406
+ message?: {
1407
+ success?: string;
1408
+ defaultError?: string;
1409
+ };
1410
+ };
1411
+ };
1412
+ /**
1413
+ * 解决Switch只能接收boolean的限制,与Form.Item结合使用最佳
1414
+ * ```
1415
+ * 1. value 为状态值,不局限于boolean,可以为 [string | number | boolean]
1416
+ * 2. checkedValue 选中值
1417
+ * 3. unCheckedValue 未选中值
1418
+ * 4. 与 Form.Item 结合使用,不再需要配置 valuePropName
1419
+ * <Form.Item name="fieldName">
1420
+ * <SwitchWrapper checkedValue={2} unCheckedValue={1} />
1421
+ * </Form.Item>
1422
+ * 5. 可设置tooltip效果数据显示
1423
+ * 6. 可设置 serviceConfig 配置服务调用交互
1424
+ * ```
1425
+ */
1426
+ export declare const SwitchWrapper: (props: SwitchWrapperProps) => import("react/jsx-runtime").JSX.Element;
1376
1427
  export type UploadWrapperFileItem = {
1377
1428
  uid: string;
1378
1429
  name: string;
@@ -1464,6 +1515,10 @@ export type EditableFileUploadConfig = {
1464
1515
  type: "uploadWrapper";
1465
1516
  editableComptProps: UploadWrapperProps;
1466
1517
  };
1518
+ export type EditableSwitchWrapperConfig = {
1519
+ type: "switchWrapper";
1520
+ editableComptProps: SwitchWrapperProps;
1521
+ };
1467
1522
  /**
1468
1523
  * 自定义编辑组件
1469
1524
  * ```
@@ -1490,7 +1545,7 @@ export type EditableCustomConfig = {
1490
1545
  tableRowIndex: number;
1491
1546
  }) => ReactElement;
1492
1547
  };
1493
- export type EditableTypeConfig = EditableCustomConfig | EditableInputConfig | EditableSelectWrapperConfig | EditableDatePickerWrapperConfig | EditableDateRangePickerWrapperConfig | EditableCheckboxGroupConfig | EditableTextareaConfig | EditableInputNumberConfig | EditableRadioGroupConfig | EditableFileUploadConfig;
1548
+ export type EditableTypeConfig = EditableCustomConfig | EditableInputConfig | EditableSelectWrapperConfig | EditableDatePickerWrapperConfig | EditableDateRangePickerWrapperConfig | EditableCheckboxGroupConfig | EditableTextareaConfig | EditableInputNumberConfig | EditableRadioGroupConfig | EditableFileUploadConfig | EditableSwitchWrapperConfig;
1494
1549
  export type FieldSingleConfig = {
1495
1550
  editable?: boolean | ((data: {
1496
1551
  tableRowIndex: number;
@@ -1692,6 +1747,7 @@ export type FbaAppModalProps = Omit<ModalProps, "onOk" | "onCancel" | "getContai
1692
1747
  * ```
1693
1748
  */
1694
1749
  bodyHeightPercent?: number;
1750
+ titleExtra?: ReactElement;
1695
1751
  };
1696
1752
  export type FbaAppAlertProps = Omit<FbaAppModalProps, "onOk" | "cancelHidden" | "cancelButtonProps" | "onCancel" | "onClick"> & {
1697
1753
  onClick?: (e: React.MouseEvent<HTMLElement>) => void | Promise<void>;
@@ -2100,14 +2156,14 @@ export type InputWrapperProps = Omit<InputProps, "defaultValue"> & {
2100
2156
  export declare const InputWrapper: (props: InputWrapperProps) => import("react/jsx-runtime").JSX.Element;
2101
2157
  export type LabelValueLayoutProps = {
2102
2158
  options: {
2103
- key?: string | number;
2104
2159
  label: string | ReactElement;
2105
- value?: string | number | ReactElement;
2160
+ value?: string | number | ReactElement | null;
2106
2161
  span?: number;
2107
2162
  hidden?: boolean;
2108
2163
  }[];
2109
2164
  labelWidth?: number | "auto";
2110
2165
  column?: number;
2166
+ /** 添加边框 */
2111
2167
  bordered?: boolean;
2112
2168
  className?: string;
2113
2169
  style?: CSSProperties;
@@ -2118,7 +2174,7 @@ export type LabelValueLayoutProps = {
2118
2174
  */
2119
2175
  export declare const LabelValueLayout: (props: LabelValueLayoutProps) => import("react/jsx-runtime").JSX.Element;
2120
2176
  export type LocalLoadingServiceConfig = {
2121
- onRequest: (params?: TAny) => Promise<TPlainObject>;
2177
+ onRequest: (params?: TAny) => Promise<TAny>;
2122
2178
  params?: TPlainObject;
2123
2179
  /** 标记serviceConfig.params中无效参数,被设置的params key 不传入服务接口入参 */
2124
2180
  invalidParamKey?: string[];
@@ -2617,6 +2673,9 @@ export type SimpleLayoutProps = {
2617
2673
  style?: CSSProperties;
2618
2674
  title?: string | ReactElement;
2619
2675
  desc?: string | ReactElement | string[] | ReactElement[];
2676
+ /**
2677
+ * @deprecated 已过期,请使用form className 属性 preDefinedClassName.form.xxx
2678
+ */
2620
2679
  formLabelAlign?: "left" | "right";
2621
2680
  /**
2622
2681
  * layoutType 布局类型
@@ -2750,37 +2809,6 @@ export type SwitchConfirmWrapperProps = Omit<SwitchProps, "defaultChecked" | "on
2750
2809
  * ```
2751
2810
  */
2752
2811
  export declare const SwitchConfirmWrapper: (props: SwitchConfirmWrapperProps) => import("react/jsx-runtime").JSX.Element;
2753
- export type SwitchWrapperValue = string | number | boolean;
2754
- export type SwitchWrapperProps = Omit<SwitchProps, "checked" | "defaultChecked" | "onChange"> & {
2755
- value?: SwitchWrapperValue;
2756
- checkedValue: SwitchWrapperValue;
2757
- unCheckedValue: SwitchWrapperValue;
2758
- onChange?: (value: SwitchWrapperValue) => void;
2759
- tooltipProps?: Omit<TooltipProps, "title">;
2760
- tooltipTitle?: string | ((value?: SwitchWrapperValue) => string | undefined);
2761
- serviceConfig?: {
2762
- onRequest: (value: SwitchWrapperValue) => TAny;
2763
- message?: {
2764
- success?: string;
2765
- defaultError?: string;
2766
- };
2767
- };
2768
- };
2769
- /**
2770
- * 解决Switch只能接收boolean的限制,与Form.Item结合使用最佳
2771
- * ```
2772
- * 1. value 为状态值,不局限于boolean,可以为 [string | number | boolean]
2773
- * 2. checkedValue 选中值
2774
- * 3. unCheckedValue 未选中值
2775
- * 4. 与 Form.Item 结合使用,不再需要配置 valuePropName
2776
- * <Form.Item name="fieldName">
2777
- * <SwitchWrapper checkedValue={2} unCheckedValue={1} />
2778
- * </Form.Item>
2779
- * 5. 可设置tooltip效果数据显示
2780
- * 6. 可设置 serviceConfig 配置服务调用交互
2781
- * ```
2782
- */
2783
- export declare const SwitchWrapper: (props: SwitchWrapperProps) => import("react/jsx-runtime").JSX.Element;
2784
2812
  export type TagListSelectValue = string | number | boolean;
2785
2813
  export type TagListSelectDataItem = {
2786
2814
  label: string;
@@ -2791,7 +2819,7 @@ export type TagListSelectProps = {
2791
2819
  dataList: TagListSelectDataItem[];
2792
2820
  /** 颜色配置数据,例如:{ 1:'red', 2: 'blue'} key值与 dataList中value相同 */
2793
2821
  colorMap?: Record<string | number, string>;
2794
- value?: TagListSelectValue;
2822
+ value?: TagListSelectValue | TagListSelectValue[];
2795
2823
  /** 是否强制匹配,默认值false */
2796
2824
  forceMatch?: boolean;
2797
2825
  };
@@ -2911,9 +2939,11 @@ export declare const tableCellRender: {
2911
2939
  * render: (value) => {
2912
2940
  * return tableCellRender.selectorCell([{ label: '已开启', value: 1 ])(value)
2913
2941
  * }
2942
+ *
2943
+ * 其中value值可以是单个值或者数组;例如:'1' 或者 ['1', '2']
2914
2944
  * ```
2915
2945
  */
2916
- selectorCell: (selectorList: TagListSelectProps["dataList"], colorMap?: TagListSelectProps["colorMap"]) => (value: string | number) => import("react/jsx-runtime").JSX.Element;
2946
+ selectorCell: (selectorList: TagListSelectProps["dataList"], colorMap?: TagListSelectProps["colorMap"]) => (value?: TAny) => import("react/jsx-runtime").JSX.Element | null;
2917
2947
  /**
2918
2948
  * 单元格对象数据处理,支持多级处理
2919
2949
  * ```
@@ -2963,7 +2993,7 @@ export declare const tableCellRender: {
2963
2993
  label: string;
2964
2994
  value: TagListSelectValue;
2965
2995
  color?: string;
2966
- }[], colorMap?: Record<string | string, string>) => (value: string | number) => string | number | import("react/jsx-runtime").JSX.Element;
2996
+ }[], colorMap?: Record<string | string, string>) => (value?: TAny) => any;
2967
2997
  };
2968
2998
  export type TableScrollProps = {
2969
2999
  children: React.ReactNode;
@@ -3331,6 +3361,15 @@ export type TreeWrapperMenuItem = {
3331
3361
  };
3332
3362
  export type TreeWrapperProps = Omit<TreeProps, "treeData" | "onExpand" | "selectedKeys" | "checkedKeys" | "onCheck" | "onSelect" | "fieldNames" | "multiple" | "loadData" | "icon" | "defaultCheckedKeys" | "defaultExpandParent" | "defaultSelectedKeys"> & {
3333
3363
  modelKey: string;
3364
+ /**
3365
+ * 字段映射
3366
+ * ```
3367
+ * 默认值:
3368
+ * label = 'label'
3369
+ * value = 'value'
3370
+ * children = 'children'
3371
+ * ```
3372
+ */
3334
3373
  fieldNames?: {
3335
3374
  label?: string;
3336
3375
  value?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.2.85",
3
+ "version": "4.2.86",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "@dimjs/model": ">=1.2.1",
32
32
  "@dimjs/model-react": ">=1.2.1",
33
33
  "@dimjs/utils": ">=1.4.4",
34
- "@flatbiz/utils": ">=4.0.16",
34
+ "@flatbiz/utils": ">=4.0.17",
35
35
  "@wove/react": ">=1.2.23",
36
36
  "antd": ">=5.5.1",
37
37
  "dayjs": ">=1.11.9",
@@ -62,7 +62,8 @@
62
62
  "@dnd-kit/core": "^6.0.8",
63
63
  "@dnd-kit/modifiers": "^6.0.1",
64
64
  "@dnd-kit/sortable": "^7.0.2",
65
- "@dnd-kit/utilities": "^3.2.1"
65
+ "@dnd-kit/utilities": "^3.2.1",
66
+ "use-intl": "3.0.0-rc.6"
66
67
  },
67
68
  "gitHead": "4378d433b73ee28fd7cb4c64bed8571f993eb5a9"
68
69
  }