@spacego/fe-components 0.2.3 → 0.3.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.
- package/README.md +37 -37
- package/lib/fe-form/fe-form-select/index.js +26 -30
- package/lib/fe-layouts/auth-layout/index.js +4 -4
- package/lib/fe-layouts/basics-layout/components/utils/index.js +8 -8
- package/lib/fe-layouts/basics-layout/index.js +5 -3
- package/lib/fe-layouts/layout.js +25 -23
- package/lib/fe-table/fe-edit-table-cell/index.js +4 -4
- package/lib/fe-table/fe-normal-table/index.js +3 -3
- package/lib/fe-table/fe-table-link/index.js +3 -3
- package/lib/fe-table/fe-table-toolbar/index.js +4 -4
- package/lib/fe-table/use-table/index.js +3 -3
- package/lib/index.css +1 -1
- package/lib/index.js +165 -163
- package/lib/node_modules/.pnpm/@rc-component_pagination@1.2.0_nnrd3gsncyragczmpvfhocinkq/node_modules/@rc-component/pagination/es/locale/zh_CN.js +18 -0
- package/lib/node_modules/.pnpm/@rc-component_picker@1.9.0_xrdeekns7he6t7xjrt27lnhvge/node_modules/@rc-component/picker/es/locale/common.js +9 -0
- package/lib/node_modules/.pnpm/@rc-component_picker@1.9.0_xrdeekns7he6t7xjrt27lnhvge/node_modules/@rc-component/picker/es/locale/zh_CN.js +78 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/calendar/locale/zh_CN.js +4 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/date-picker/locale/zh_CN.js +24 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/locale/zh_CN.js +146 -0
- package/lib/node_modules/.pnpm/antd@6.2.2_nnrd3gsncyragczmpvfhocinkq/node_modules/antd/es/time-picker/locale/zh_CN.js +7 -0
- package/lib/router/utils.js +31 -30
- package/lib/store/modules/layout-config.store.js +4 -4
- package/lib/store/modules/theme.store.js +4 -4
- package/lib/types/fe-auto-complete/auto-complete.d.ts +4 -0
- package/lib/types/fe-auto-complete/index.d.ts +3 -2
- package/lib/types/fe-button/button.d.ts +18 -0
- package/lib/types/fe-button/index.d.ts +3 -16
- package/lib/types/fe-cascader/cascader.d.ts +9 -0
- package/lib/types/fe-cascader/index.d.ts +3 -7
- package/lib/types/fe-checkbox/checkbox.d.ts +8 -0
- package/lib/types/fe-checkbox/index.d.ts +3 -6
- package/lib/types/fe-checkbox-group/checkbox-group.d.ts +7 -0
- package/lib/types/fe-checkbox-group/index.d.ts +3 -5
- package/lib/types/fe-date-picker/date-picker.d.ts +5 -0
- package/lib/types/fe-date-picker/index.d.ts +3 -3
- package/lib/types/fe-description-render/description-render.d.ts +33 -0
- package/lib/types/fe-description-render/index.d.ts +8 -31
- package/lib/types/fe-descriptions/descriptions.d.ts +4 -0
- package/lib/types/fe-descriptions/index.d.ts +3 -2
- package/lib/types/fe-empty/empty.d.ts +4 -0
- package/lib/types/fe-empty/index.d.ts +3 -2
- package/lib/types/fe-error-block/error-block.d.ts +8 -0
- package/lib/types/fe-error-block/index.d.ts +3 -6
- package/lib/types/fe-form/fe-form/form.d.ts +356 -0
- package/lib/types/fe-form/fe-form/index.d.ts +3 -354
- package/lib/types/fe-form/fe-form-auto-complete/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-btn-group/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-cascader/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-checkbox-group/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-date-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-date-range-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input-input/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-input-number/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-item/form-item.d.ts +68 -0
- package/lib/types/fe-form/fe-form-item/index.d.ts +3 -66
- package/lib/types/fe-form/fe-form-label/form-label.d.ts +45 -0
- package/lib/types/fe-form/fe-form-label/index.d.ts +3 -43
- package/lib/types/fe-form/fe-form-radio/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-render/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-rich-text/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-select/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-switch/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-text/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-text-area/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-time-picker/index.d.ts +1 -1
- package/lib/types/fe-form/fe-form-upload/index.d.ts +1 -1
- package/lib/types/fe-form/index.d.ts +4 -4
- package/lib/types/fe-form/utils/index.d.ts +1 -1
- package/lib/types/fe-input/index.d.ts +3 -12
- package/lib/types/fe-input/input.d.ts +14 -0
- package/lib/types/fe-input-number/index.d.ts +3 -2
- package/lib/types/fe-input-number/input-number.d.ts +4 -0
- package/lib/types/fe-layouts/basics-layout/components/utils/index.d.ts +7 -6
- package/lib/types/fe-layouts/context/global-context.d.ts +240 -238
- package/lib/types/fe-link/index.d.ts +3 -6
- package/lib/types/fe-link/link.d.ts +8 -0
- package/lib/types/fe-loading/index.d.ts +1 -1
- package/lib/types/fe-map/index.d.ts +3 -73
- package/lib/types/fe-map/map.d.ts +73 -0
- package/lib/types/fe-modal/index.d.ts +3 -20
- package/lib/types/fe-modal/modal.d.ts +22 -0
- package/lib/types/fe-pagination/index.d.ts +3 -2
- package/lib/types/fe-pagination/pagination.d.ts +4 -0
- package/lib/types/fe-panel/index.d.ts +3 -61
- package/lib/types/fe-panel/panel-toolbar.d.ts +6 -4
- package/lib/types/fe-panel/panel.d.ts +63 -0
- package/lib/types/fe-permission/index.d.ts +3 -10
- package/lib/types/fe-permission/permission.d.ts +12 -0
- package/lib/types/fe-permission-provider/index.d.ts +3 -8
- package/lib/types/fe-permission-provider/permission-provider.d.ts +10 -0
- package/lib/types/fe-radio/index.d.ts +3 -2
- package/lib/types/fe-radio/radio.d.ts +4 -0
- package/lib/types/fe-radio-group/index.d.ts +3 -2
- package/lib/types/fe-radio-group/radio-group.d.ts +4 -0
- package/lib/types/fe-rich-text/index.d.ts +3 -167
- package/lib/types/fe-rich-text/rich-text.d.ts +169 -0
- package/lib/types/fe-select/index.d.ts +3 -8
- package/lib/types/fe-select/select.d.ts +10 -0
- package/lib/types/fe-switch/index.d.ts +3 -2
- package/lib/types/fe-switch/switch.d.ts +4 -0
- package/lib/types/fe-table/fe-table-link/index.d.ts +3 -10
- package/lib/types/fe-table/fe-table-link/table-link.d.ts +12 -0
- package/lib/types/fe-table/fe-table-render/index.d.ts +3 -11
- package/lib/types/fe-table/fe-table-render/table-render.d.ts +13 -0
- package/lib/types/fe-table/fe-table-toolbar/index.d.ts +3 -16
- package/lib/types/fe-table/fe-table-toolbar/table-toolbar.d.ts +18 -0
- package/lib/types/fe-table/type/table-context.d.ts +60 -60
- package/lib/types/fe-table/type/table.d.ts +789 -787
- package/lib/types/fe-text-area/index.d.ts +3 -4
- package/lib/types/fe-text-area/text-area.d.ts +6 -0
- package/lib/types/fe-time-picker/index.d.ts +3 -3
- package/lib/types/fe-time-picker/time-picker.d.ts +5 -0
- package/lib/types/fe-upload/index.d.ts +3 -85
- package/lib/types/fe-upload/upload.d.ts +87 -0
- package/lib/types/fe-upload-atomic/index.d.ts +3 -2
- package/lib/types/fe-upload-atomic/upload-atomic.d.ts +4 -0
- package/lib/types/fe-upload-crop/index.d.ts +2 -2
- package/lib/types/hooks/index.d.ts +1 -0
- package/lib/types/hooks/{use-descriptions → use-descriptions.hook}/index.d.ts +1 -1
- package/lib/types/hooks/use-descriptions.hook/use-descriptions.d.ts +153 -0
- package/lib/types/hooks/use-form.hook/index.d.ts +3 -0
- package/lib/types/hooks/{use-form/index.d.ts → use-form.hook/use-form.d.ts} +14 -12
- package/lib/types/hooks/use-permission.hook/index.d.ts +10 -10
- package/lib/types/hooks/use-permission.hook/use-permission.d.ts +10 -0
- package/lib/types/index.d.ts +30 -1
- package/lib/types/router/utils.d.ts +2 -1
- package/lib/types/typings/index.d.ts +98 -98
- package/lib/types/typings/shims-axios.d.ts +38 -38
- package/package.json +3 -3
- /package/lib/hooks/{use-form → use-form.hook}/index.js +0 -0
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* @name 是否可见
|
|
6
|
-
*/
|
|
7
|
-
isVisible: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* @name 内容区域样式
|
|
10
|
-
*/
|
|
11
|
-
bodyStyle?: React.CSSProperties;
|
|
12
|
-
/**
|
|
13
|
-
* @name 设置是否可见
|
|
14
|
-
*/
|
|
15
|
-
setIsVisible: (isVisible: boolean) => void;
|
|
16
|
-
/**
|
|
17
|
-
* @name 关闭回调
|
|
18
|
-
*/
|
|
19
|
-
onClose?: (e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
|
|
20
|
-
}
|
|
1
|
+
import { FeModalProps } from './modal.d';
|
|
2
|
+
declare const FeModal: (props: FeModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeModal;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ModalProps } from 'antd';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface FeModalProps extends ModalProps {
|
|
6
|
+
/**
|
|
7
|
+
* @name 是否可见
|
|
8
|
+
*/
|
|
9
|
+
isVisible: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @name 内容区域样式
|
|
12
|
+
*/
|
|
13
|
+
bodyStyle?: React.CSSProperties;
|
|
14
|
+
/**
|
|
15
|
+
* @name 设置是否可见
|
|
16
|
+
*/
|
|
17
|
+
setIsVisible: (isVisible: boolean) => void;
|
|
18
|
+
/**
|
|
19
|
+
* @name 关闭回调
|
|
20
|
+
*/
|
|
21
|
+
onClose?: (e: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent<Element>) => void;
|
|
22
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FePaginationProps } from './pagination.d';
|
|
2
|
+
declare const FePagination: (props: FePaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FePagination;
|
|
@@ -1,61 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface IToolBarConfig extends Pick<IPermissionProps, 'btnPermission'> {
|
|
5
|
-
/**
|
|
6
|
-
* @name 按钮类型
|
|
7
|
-
* @default primary
|
|
8
|
-
*/
|
|
9
|
-
type?: 'primary' | 'default';
|
|
10
|
-
/**
|
|
11
|
-
* @name 按钮文案
|
|
12
|
-
*/
|
|
13
|
-
label: string;
|
|
14
|
-
/**
|
|
15
|
-
* @name 按钮禁用文案
|
|
16
|
-
*/
|
|
17
|
-
disabledText?: string;
|
|
18
|
-
/**
|
|
19
|
-
* @name 是否需要二次确认
|
|
20
|
-
*/
|
|
21
|
-
needConfirm?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* @name 确认文案
|
|
24
|
-
* @default 确定{$label}吗?
|
|
25
|
-
*/
|
|
26
|
-
confirmText?: string;
|
|
27
|
-
/**
|
|
28
|
-
* @name 工具栏属性
|
|
29
|
-
*/
|
|
30
|
-
tooltipAttributes?: Partial<TooltipProps>;
|
|
31
|
-
/**
|
|
32
|
-
* @name 按钮属性
|
|
33
|
-
*/
|
|
34
|
-
btnAttributes?: Partial<ButtonProps>;
|
|
35
|
-
/**
|
|
36
|
-
* @name 按钮点击事件
|
|
37
|
-
*/
|
|
38
|
-
onClick: () => void;
|
|
39
|
-
/**
|
|
40
|
-
* @name 是否禁用
|
|
41
|
-
*/
|
|
42
|
-
disabled?: () => boolean;
|
|
43
|
-
/**
|
|
44
|
-
* @name 是否隐藏
|
|
45
|
-
*/
|
|
46
|
-
hidden?: () => boolean;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface FePanelProps {
|
|
50
|
-
isSticky?: boolean;
|
|
51
|
-
wrapperClassName?: string;
|
|
52
|
-
children?: React.ReactNode;
|
|
53
|
-
title?: React.ReactNode;
|
|
54
|
-
subTitle?: React.ReactNode;
|
|
55
|
-
toolBarRender?: React.ReactNode;
|
|
56
|
-
toolBarConfig?: IToolBarConfig[];
|
|
57
|
-
wrapperStyle?: React.CSSProperties;
|
|
58
|
-
type?: 'default' | 'search';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
declare const FePanel: React.ForwardRefExoticComponent<FePanelProps>;
|
|
1
|
+
import { FePanelProps } from './panel.d';
|
|
2
|
+
declare const FePanel: (props: FePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FePanel;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ButtonProps, TooltipProps } from 'antd';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { IPermissionProps } from '../typings';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export interface IToolBarConfig extends Pick<IPermissionProps, 'btnPermission'> {
|
|
7
|
+
/**
|
|
8
|
+
* @name 按钮类型
|
|
9
|
+
* @default primary
|
|
10
|
+
*/
|
|
11
|
+
type?: 'primary' | 'default';
|
|
12
|
+
/**
|
|
13
|
+
* @name 按钮文案
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* @name 按钮禁用文案
|
|
18
|
+
*/
|
|
19
|
+
disabledText?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @name 是否需要二次确认
|
|
22
|
+
*/
|
|
23
|
+
needConfirm?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @name 确认文案
|
|
26
|
+
* @default 确定{$label}吗?
|
|
27
|
+
*/
|
|
28
|
+
confirmText?: string;
|
|
29
|
+
/**
|
|
30
|
+
* @name 工具栏属性
|
|
31
|
+
*/
|
|
32
|
+
tooltipAttributes?: Partial<TooltipProps>;
|
|
33
|
+
/**
|
|
34
|
+
* @name 按钮属性
|
|
35
|
+
*/
|
|
36
|
+
btnAttributes?: Partial<ButtonProps>;
|
|
37
|
+
/**
|
|
38
|
+
* @name 按钮点击事件
|
|
39
|
+
*/
|
|
40
|
+
onClick: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* @name 是否禁用
|
|
43
|
+
*/
|
|
44
|
+
disabled?: () => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @name 是否隐藏
|
|
47
|
+
*/
|
|
48
|
+
hidden?: () => boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface FePanelProps {
|
|
52
|
+
isSticky?: boolean;
|
|
53
|
+
wrapperClassName?: string;
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
title?: React.ReactNode;
|
|
56
|
+
subTitle?: React.ReactNode;
|
|
57
|
+
toolBarRender?: React.ReactNode;
|
|
58
|
+
toolBarConfig?: IToolBarConfig[];
|
|
59
|
+
wrapperStyle?: React.CSSProperties;
|
|
60
|
+
type?: 'default' | 'search';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare const FePanel: React.ForwardRefExoticComponent<FePanelProps>;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export interface FePermissionProps extends IPermissionProps, Pick<IBasicProps, 'children'> {
|
|
6
|
-
/**
|
|
7
|
-
* @name 权限字符串
|
|
8
|
-
*/
|
|
9
|
-
permission?: string;
|
|
10
|
-
}
|
|
1
|
+
import { FePermissionProps } from './permission.d';
|
|
2
|
+
export declare const FePermission: (props: FePermissionProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FePermission;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
/**
|
|
5
|
-
* @name 按钮权限字符串
|
|
6
|
-
*/
|
|
7
|
-
btnPermissionList?: IPermissionStore['btnPermissionList'];
|
|
8
|
-
}
|
|
1
|
+
import { FePermissionProviderProps } from './permission-provider.d';
|
|
2
|
+
declare const FePermissionProvider: (props: FePermissionProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FePermissionProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPermissionStore } from '../hooks/use-permission.hook/use-permission.d';
|
|
2
|
+
import { IBasicProps } from '../typings';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface FePermissionProviderProps extends Pick<IBasicProps, 'children'> {
|
|
6
|
+
/**
|
|
7
|
+
* @name 按钮权限字符串
|
|
8
|
+
*/
|
|
9
|
+
btnPermissionList?: IPermissionStore['btnPermissionList'];
|
|
10
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FeRadioProps } from './radio.d';
|
|
2
|
+
declare const FeRadio: (props: FeRadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeRadio;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FeRadioGroupProps } from './radio-group.d';
|
|
2
|
+
declare const FeRadioGroup: (props: FeRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeRadioGroup;
|
|
@@ -1,167 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type Range = RangeStatic | null;
|
|
5
|
-
|
|
6
|
-
export interface FeRichTextRef {
|
|
7
|
-
focus: () => void;
|
|
8
|
-
blur: () => void;
|
|
9
|
-
getEditor: () => Quill | null;
|
|
10
|
-
getUnprivilegedEditor: () => UnprivilegedEditor | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface UnprivilegedEditor {
|
|
14
|
-
getLength(): number;
|
|
15
|
-
getText(index?: number, length?: number): string;
|
|
16
|
-
getHTML(): string;
|
|
17
|
-
getDisplayHTML(): string;
|
|
18
|
-
getBounds(index: number, length?: number): BoundsStatic;
|
|
19
|
-
getSelection(focus?: boolean): RangeStatic;
|
|
20
|
-
getContents(index?: number, length?: number): DeltaStatic;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
type uploadToolConfig = {
|
|
24
|
-
imageConfig?: any;
|
|
25
|
-
uploadFn: any;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export interface FeRichTextProps {
|
|
29
|
-
/**
|
|
30
|
-
* 编辑器的内容
|
|
31
|
-
*/
|
|
32
|
-
value?: Value;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* 非受控模式的默认值
|
|
36
|
-
*/
|
|
37
|
-
defaultValue?: Value;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 内容变化时的回调函数
|
|
41
|
-
*/
|
|
42
|
-
onChange?: (value: string, delta: DeltaStatic, source: Sources, editor: UnprivilegedEditor) => void;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 选择变化时的回调函数
|
|
46
|
-
*/
|
|
47
|
-
onChangeSelection?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 编辑器获取焦点回调
|
|
51
|
-
*/
|
|
52
|
-
onFocus?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 编辑器失去焦点回调
|
|
56
|
-
*/
|
|
57
|
-
onBlur?: (previousSelection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 编辑器高度
|
|
61
|
-
*/
|
|
62
|
-
height?: number | string;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 是否只读
|
|
66
|
-
*/
|
|
67
|
-
readOnly?: boolean;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 占位符文本
|
|
71
|
-
*/
|
|
72
|
-
placeholder?: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 编辑区域边界
|
|
76
|
-
*/
|
|
77
|
-
bounds?: string | HTMLElement;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 格式白名单
|
|
81
|
-
*/
|
|
82
|
-
formats?: string[];
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 自定义模块配置
|
|
86
|
-
*/
|
|
87
|
-
modules?: Record<string, any>;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 自定义样式
|
|
91
|
-
*/
|
|
92
|
-
style?: CSSProperties;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 自定义类名
|
|
96
|
-
*/
|
|
97
|
-
className?: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* HTML ID
|
|
101
|
-
*/
|
|
102
|
-
id?: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Tab索引
|
|
106
|
-
*/
|
|
107
|
-
tabIndex?: number;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Tab键对应的空格数量
|
|
111
|
-
*/
|
|
112
|
-
tabSize?: number;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* 自定义主题
|
|
116
|
-
*/
|
|
117
|
-
theme?: 'snow' | 'bubble' | string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* 滚动容器
|
|
121
|
-
*/
|
|
122
|
-
scrollingContainer?: string | HTMLElement;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* 键盘事件
|
|
126
|
-
*/
|
|
127
|
-
onKeyPress?: React.KeyboardEventHandler;
|
|
128
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
129
|
-
onKeyUp?: React.KeyboardEventHandler;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* 保留空白符
|
|
133
|
-
*/
|
|
134
|
-
preserveWhitespace?: boolean;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* 自定义子元素
|
|
138
|
-
*/
|
|
139
|
-
children?: ReactElement;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* 上传配置
|
|
143
|
-
*/
|
|
144
|
-
uploadToolConfig?: uploadToolConfig;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Quill Delta格式类型
|
|
149
|
-
*/
|
|
150
|
-
export interface Delta {
|
|
151
|
-
ops?: {
|
|
152
|
-
insert?: any;
|
|
153
|
-
delete?: number;
|
|
154
|
-
retain?: number;
|
|
155
|
-
attributes?: Record<string, any>;
|
|
156
|
-
}[];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* 工具栏配置选项
|
|
161
|
-
*/
|
|
162
|
-
export interface ToolbarOptions {
|
|
163
|
-
container?: string | string[][] | HTMLElement;
|
|
164
|
-
handlers?: Record<string, any>;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
declare const FeRichText: React.FC<FeRichTextProps>;
|
|
1
|
+
import { FeRichTextProps, FeRichTextRef } from './rich-text.d';
|
|
2
|
+
declare const FeRichText: import('react').ForwardRefExoticComponent<FeRichTextProps & import('react').RefAttributes<FeRichTextRef>>;
|
|
3
|
+
export default FeRichText;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { default as Quill, BoundsStatic, DeltaStatic, RangeStatic, Sources } from 'quill';
|
|
2
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export type Value = string | DeltaStatic;
|
|
6
|
+
export type Range = RangeStatic | null;
|
|
7
|
+
|
|
8
|
+
export interface FeRichTextRef {
|
|
9
|
+
focus: () => void;
|
|
10
|
+
blur: () => void;
|
|
11
|
+
getEditor: () => Quill | null;
|
|
12
|
+
getUnprivilegedEditor: () => UnprivilegedEditor | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface UnprivilegedEditor {
|
|
16
|
+
getLength(): number;
|
|
17
|
+
getText(index?: number, length?: number): string;
|
|
18
|
+
getHTML(): string;
|
|
19
|
+
getDisplayHTML(): string;
|
|
20
|
+
getBounds(index: number, length?: number): BoundsStatic;
|
|
21
|
+
getSelection(focus?: boolean): RangeStatic;
|
|
22
|
+
getContents(index?: number, length?: number): DeltaStatic;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type uploadToolConfig = {
|
|
26
|
+
imageConfig?: any;
|
|
27
|
+
uploadFn: any;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export interface FeRichTextProps {
|
|
31
|
+
/**
|
|
32
|
+
* 编辑器的内容
|
|
33
|
+
*/
|
|
34
|
+
value?: Value;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 非受控模式的默认值
|
|
38
|
+
*/
|
|
39
|
+
defaultValue?: Value;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 内容变化时的回调函数
|
|
43
|
+
*/
|
|
44
|
+
onChange?: (value: string, delta: DeltaStatic, source: Sources, editor: UnprivilegedEditor) => void;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 选择变化时的回调函数
|
|
48
|
+
*/
|
|
49
|
+
onChangeSelection?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 编辑器获取焦点回调
|
|
53
|
+
*/
|
|
54
|
+
onFocus?: (selection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 编辑器失去焦点回调
|
|
58
|
+
*/
|
|
59
|
+
onBlur?: (previousSelection: Range, source: Sources, editor: UnprivilegedEditor) => void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 编辑器高度
|
|
63
|
+
*/
|
|
64
|
+
height?: number | string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 是否只读
|
|
68
|
+
*/
|
|
69
|
+
readOnly?: boolean;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 占位符文本
|
|
73
|
+
*/
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 编辑区域边界
|
|
78
|
+
*/
|
|
79
|
+
bounds?: string | HTMLElement;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 格式白名单
|
|
83
|
+
*/
|
|
84
|
+
formats?: string[];
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 自定义模块配置
|
|
88
|
+
*/
|
|
89
|
+
modules?: Record<string, any>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 自定义样式
|
|
93
|
+
*/
|
|
94
|
+
style?: CSSProperties;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 自定义类名
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* HTML ID
|
|
103
|
+
*/
|
|
104
|
+
id?: string;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Tab索引
|
|
108
|
+
*/
|
|
109
|
+
tabIndex?: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Tab键对应的空格数量
|
|
113
|
+
*/
|
|
114
|
+
tabSize?: number;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 自定义主题
|
|
118
|
+
*/
|
|
119
|
+
theme?: 'snow' | 'bubble' | string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 滚动容器
|
|
123
|
+
*/
|
|
124
|
+
scrollingContainer?: string | HTMLElement;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* 键盘事件
|
|
128
|
+
*/
|
|
129
|
+
onKeyPress?: React.KeyboardEventHandler;
|
|
130
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
131
|
+
onKeyUp?: React.KeyboardEventHandler;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 保留空白符
|
|
135
|
+
*/
|
|
136
|
+
preserveWhitespace?: boolean;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 自定义子元素
|
|
140
|
+
*/
|
|
141
|
+
children?: ReactElement;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 上传配置
|
|
145
|
+
*/
|
|
146
|
+
uploadToolConfig?: uploadToolConfig;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Quill Delta格式类型
|
|
151
|
+
*/
|
|
152
|
+
export interface Delta {
|
|
153
|
+
ops?: {
|
|
154
|
+
insert?: any;
|
|
155
|
+
delete?: number;
|
|
156
|
+
retain?: number;
|
|
157
|
+
attributes?: Record<string, any>;
|
|
158
|
+
}[];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 工具栏配置选项
|
|
163
|
+
*/
|
|
164
|
+
export interface ToolbarOptions {
|
|
165
|
+
container?: string | string[][] | HTMLElement;
|
|
166
|
+
handlers?: Record<string, any>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare const FeRichText: React.FC<FeRichTextProps>;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @name minWidth 最小宽度
|
|
5
|
-
* @default `200px`
|
|
6
|
-
*/
|
|
7
|
-
minWidth?: string;
|
|
8
|
-
}
|
|
1
|
+
import { FeSelectProps } from './select.d';
|
|
2
|
+
declare const FeSelect: (props: FeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeSelect;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FeSwitchProps } from './switch.d';
|
|
2
|
+
declare const FeSwitch: (props: FeSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeSwitch;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export interface FeTableLinkProps<T> {
|
|
6
|
-
config: Array<TFeTableLinkConfig<T>>;
|
|
7
|
-
modal?: {
|
|
8
|
-
confirm: (config: { title?: string; content?: React.ReactNode; onOk?: () => void; onCancel?: () => void }) => void;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
1
|
+
import { FeTableLinkProps } from './table-link.d';
|
|
2
|
+
declare const FeTableLink: <T extends Record<string, any>>(props: FeTableLinkProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default FeTableLink;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IColumnsHandleConfig } from '../type/table.d';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export type TFeTableLinkConfig<T> = IColumnsHandleConfig & { record: T; index: number };
|
|
6
|
+
|
|
7
|
+
export interface FeTableLinkProps<T> {
|
|
8
|
+
config: Array<TFeTableLinkConfig<T>>;
|
|
9
|
+
modal?: {
|
|
10
|
+
confirm: (config: { title?: string; content?: React.ReactNode; onOk?: () => void; onCancel?: () => void }) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|