@flatbiz/antd 3.2.20 → 3.2.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
@@ -655,6 +655,7 @@ export type FormColProps = {
655
655
  /** 强制单独一行 */
656
656
  forceAloneRow?: boolean;
657
657
  children?: ReactNode | ReactNode[];
658
+ hidden?: boolean;
658
659
  };
659
660
  /**
660
661
  * 网格响应式布局,默认值:{ xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 }
@@ -670,7 +671,7 @@ export type FormColProps = {
670
671
  * ```
671
672
  */
672
673
  export declare const FormCol: {
673
- (props: FormColProps): JSX.Element;
674
+ (props: FormColProps): JSX.Element | null;
674
675
  domTypeName: string;
675
676
  };
676
677
  export type FormOperateColProps = {
@@ -680,6 +681,7 @@ export type FormOperateColProps = {
680
681
  justify?: RowProps["justify"];
681
682
  /** 强制单独一行 */
682
683
  forceAloneRow?: boolean;
684
+ hidden?: boolean;
683
685
  };
684
686
  /**
685
687
  * FormOperateCol 布局说明
@@ -691,7 +693,7 @@ export type FormOperateColProps = {
691
693
  * ```
692
694
  */
693
695
  export declare const FormOperateCol: {
694
- (props: FormOperateColProps): JSX.Element;
696
+ (props: FormOperateColProps): JSX.Element | null;
695
697
  domTypeName: string;
696
698
  };
697
699
  export type FormRowProps = RowProps & {
@@ -1699,13 +1701,28 @@ export type TRelationTreeOperate = {
1699
1701
  onChange: (name: string, value: any) => void;
1700
1702
  };
1701
1703
  export declare const RelationTree: (props: RelationTreeProps) => JSX.Element;
1702
- export interface RichTextEditorProps extends Omit<IAllProps, "onChange"> {
1704
+ export interface RichTextEditorProps extends Omit<IAllProps, "onChange" | "init"> {
1703
1705
  onChange?: (data?: string) => void;
1704
1706
  /** 上传图片服务 */
1705
1707
  onUploadImage?: (file: File) => Promise<string>;
1706
1708
  className?: string;
1707
1709
  /** 图片点击预览 */
1708
1710
  imgPreview?: boolean;
1711
+ init?: IAllProps["init"] & {
1712
+ /**
1713
+ * 通过粘贴图片创建的img标签,显示压缩比例,此处min、max是和指图片宽度
1714
+ * 1. 默认值值:[{ min: 0, max: 1000, ratio: 0.5 }, { min: 1000, ratio: 0.3 }]
1715
+ */
1716
+ img_ratio?: {
1717
+ min: number;
1718
+ max?: number;
1719
+ ratio: number;
1720
+ }[];
1721
+ /** 插件添加;自定义plugins后失效 */
1722
+ plugins_append?: string;
1723
+ /** 工具栏添加;自定义toolbar后失效 */
1724
+ toolbar_append?: string;
1725
+ };
1709
1726
  }
1710
1727
  /**
1711
1728
  * 富文本编辑器,配置参考tinymce https://www.tiny.cloud/docs/tinymce/6
@@ -1713,25 +1730,33 @@ export interface RichTextEditorProps extends Omit<IAllProps, "onChange"> {
1713
1730
  * @returns
1714
1731
  * ```
1715
1732
  * 1. 如果需要粘贴上传图片服务,需要提供 onUploadImage 上传图片接口
1716
- * 2. 如果不需要粘贴上传图片,可配置 init.paste_data_images = false
1717
- * 3. 获取富文本实例,通过onInit(_, editor)函数获取
1718
- * 5. 预览富文本数据,使用 RichTextViewer 组件
1733
+ * 2. 获取富文本实例,通过onInit(_, editor)函数获取
1734
+ * 3. 预览富文本数据,使用 RichTextViewer 组件
1735
+ * 4. 添加其他插件使用方式,配置 init.plugins_append、init.toolbar_append
1736
+ * <RichTextEditor init={{ plugins_append: 'codesample', toolbar_append: 'codesample' }} />
1737
+ * 5. 可通过设置 init.plugins、init.toolbar 完全自定义插件、工具栏
1738
+ * 6. 其他插件
1739
+ * emoticons 表情插件
1740
+ * 7. 可通过设置 init.img_ratio 设置通过粘贴上传的图片压缩显示比例
1741
+ * 默认比例:[{ min: 0, max: 1000, ratio: 0.5 }, { min: 1000, ratio: 0.3 }]
1719
1742
  * ```
1720
1743
  */
1721
1744
  export declare const RichTextEditor: (props: RichTextEditorProps) => JSX.Element;
1722
1745
  export type RichTextViewerProps = {
1723
- data: string;
1746
+ value: string;
1724
1747
  className?: string;
1748
+ style?: CSSProperties;
1725
1749
  fullscreen?: boolean;
1726
1750
  onInit?: (editor: TinyMCEEditor) => void;
1727
1751
  children?: ReactElement;
1728
- style?: CSSProperties;
1729
1752
  fullscreenIconTips?: string;
1730
1753
  };
1731
1754
  /**
1732
1755
  * 预览 RichTextEditor 生成的富文本数据
1733
1756
  * ```
1734
- * 1. 如果高度发生变更,可执行 editor.execCommand('mceAutoResize');
1757
+ * 1. 通过 onInit 属性可获取实例:editor
1758
+ * 2. 如果高度发生变更,可执行 editor.execCommand('mceAutoResize');
1759
+ *
1735
1760
  * ```
1736
1761
  * @param props
1737
1762
  * @returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "3.2.20",
3
+ "version": "3.2.22",
4
4
  "description": "flat-biz oss ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",