fat-design 0.0.1-beta.20251016214453 → 0.0.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 +285 -285
- package/index.browser.js +1 -1
- package/libs/config-16.js +7 -7
- package/libs/config-17.js +7 -7
- package/libs/config-18.js +9 -9
- package/libs/config-19.js +9 -9
- package/libs/theme/theme-blue1.css +58 -58
- package/libs/theme/theme-blue2.css +63 -63
- package/libs/theme/theme-blue3.css +73 -73
- package/libs/theme/theme-blue4.css +53 -53
- package/libs/theme/theme-default.css +60 -60
- package/libs/theme/theme-green.css +96 -96
- package/libs/theme/theme-green2.css +96 -96
- package/libs/theme/theme-orange.css +58 -58
- package/libs/theme/theme-pink.css +53 -53
- package/libs/theme/theme-purple.css +53 -53
- package/libs/theme/theme-red.css +55 -55
- package/package.json +2 -2
- package/types/0buildTypes/config-provider/constants.d.ts +3 -3
- package/types/0buildTypes/config-provider/index.d.ts +4 -4
- package/types/0buildTypes/config-provider/v2/consumer.d.ts +3 -3
- package/types/0buildTypes/config-provider/v2/context.d.ts +6 -6
- package/types/0buildTypes/config-provider/v2/error-boundary.d.ts +27 -27
- package/types/0buildTypes/config-provider/v2/functions.d.ts +66 -66
- package/types/0buildTypes/config-provider/v2/index.d.ts +36 -36
- package/types/0buildTypes/config-provider/v2/provider.d.ts +4 -4
- package/types/0buildTypes/config-provider/v2/types.d.ts +22 -22
- package/types/0buildTypes/dependencies.d.ts +2 -2
- package/types/0buildTypes/empty/empty.d.ts +22 -22
- package/types/0buildTypes/empty/index.d.ts +2 -2
- package/types/0buildTypes/filter/filter-types.d.ts +21 -21
- package/types/0buildTypes/filter/filter.d.ts +10 -10
- package/types/0buildTypes/filter/index.d.ts +9 -9
- package/types/0buildTypes/form2/deps.d.ts +10 -10
- package/types/0buildTypes/form2/form-actions.d.ts +36 -36
- package/types/0buildTypes/form2/form-buttons.d.ts +28 -28
- package/types/0buildTypes/form2/form-context.d.ts +4 -4
- package/types/0buildTypes/form2/form-error.d.ts +3 -3
- package/types/0buildTypes/form2/form-item-card.d.ts +4 -4
- package/types/0buildTypes/form2/form-item-comp.d.ts +4 -4
- package/types/0buildTypes/form2/form-item-label.d.ts +4 -4
- package/types/0buildTypes/form2/form-item-preview.d.ts +4 -4
- package/types/0buildTypes/form2/form-item.d.ts +7 -7
- package/types/0buildTypes/form2/form-layout.d.ts +3 -3
- package/types/0buildTypes/form2/form-rules.d.ts +3 -3
- package/types/0buildTypes/form2/form-section.d.ts +25 -25
- package/types/0buildTypes/form2/form-types.d.ts +396 -396
- package/types/0buildTypes/form2/form.d.ts +36 -36
- package/types/0buildTypes/form2/helper/buildParams.d.ts +5 -5
- package/types/0buildTypes/form2/helper/constants.d.ts +24 -24
- package/types/0buildTypes/form2/helper/fixItemProps.d.ts +16 -16
- package/types/0buildTypes/form2/helper/fnInheritProps.d.ts +2 -2
- package/types/0buildTypes/form2/helper/linkageFormState.d.ts +16 -16
- package/types/0buildTypes/form2/helper/useDataSource.d.ts +14 -14
- package/types/0buildTypes/form2/helper/useFormChildren.d.ts +5 -5
- package/types/0buildTypes/form2/helper/useFormItemState.d.ts +3 -3
- package/types/0buildTypes/form2/helper/useGetXProps.d.ts +3 -3
- package/types/0buildTypes/form2/index.d.ts +20 -20
- package/types/0buildTypes/form2/layout/from-float-layout.d.ts +3 -3
- package/types/0buildTypes/hooks/index.d.ts +25 -25
- package/types/0buildTypes/hooks/useComparedState.d.ts +2 -2
- package/types/0buildTypes/hooks/useCurrentState.d.ts +11 -11
- package/types/0buildTypes/hooks/useOnKeyPressSave.d.ts +12 -12
- package/types/0buildTypes/hooks/usePersistFn.d.ts +3 -3
- package/types/0buildTypes/hooks/usePreciseStore.d.ts +53 -53
- package/types/0buildTypes/hooks/useSize.d.ts +6 -6
- package/types/0buildTypes/hooks/useUniqueId.d.ts +2 -2
- package/types/0buildTypes/hooks/useValueOnChange.d.ts +2 -2
- package/types/0buildTypes/image/Image.d.ts +42 -42
- package/types/0buildTypes/image/Operations.d.ts +25 -25
- package/types/0buildTypes/image/Preview.d.ts +64 -64
- package/types/0buildTypes/image/PreviewGroup.d.ts +32 -32
- package/types/0buildTypes/image/common.d.ts +2 -2
- package/types/0buildTypes/image/context.d.ts +7 -7
- package/types/0buildTypes/image/getFixScaleEleTransPosition.d.ts +17 -17
- package/types/0buildTypes/image/hooks/useImageTransform.d.ts +28 -28
- package/types/0buildTypes/image/hooks/useMouseEvent.d.ts +9 -9
- package/types/0buildTypes/image/hooks/usePreviewItems.d.ts +7 -7
- package/types/0buildTypes/image/hooks/useRegisterImage.d.ts +2 -2
- package/types/0buildTypes/image/hooks/useStatus.d.ts +14 -14
- package/types/0buildTypes/image/hooks/useTouchEvent.d.ts +8 -8
- package/types/0buildTypes/image/index.d.ts +6 -6
- package/types/0buildTypes/image/interface.d.ts +14 -14
- package/types/0buildTypes/image/previewConfig.d.ts +4 -4
- package/types/0buildTypes/image/util.d.ts +1 -1
- package/types/0buildTypes/image/utils/KeyCode.d.ts +23 -23
- package/types/0buildTypes/image/utils/addEventListener.d.ts +4 -4
- package/types/0buildTypes/image/utils/buildIcons.d.ts +2 -2
- package/types/0buildTypes/image/utils/css.d.ts +8 -8
- package/types/0buildTypes/image/utils/isEqual.d.ts +8 -8
- package/types/0buildTypes/image/utils/raf.d.ts +6 -6
- package/types/0buildTypes/image/utils/useEvent.d.ts +1 -1
- package/types/0buildTypes/image/utils/useLayoutEffect.d.ts +4 -4
- package/types/0buildTypes/image/utils/useMergedState.d.ts +12 -12
- package/types/0buildTypes/image/utils/useSafeState.d.ts +14 -14
- package/types/0buildTypes/index.d.ts +4 -4
- package/types/0buildTypes/libs.d.ts +67 -67
- package/types/0buildTypes/nav/group.d.ts +30 -30
- package/types/0buildTypes/nav/index.d.ts +4 -4
- package/types/0buildTypes/nav/item.d.ts +30 -30
- package/types/0buildTypes/nav/nav.d.ts +2 -2
- package/types/0buildTypes/nav/popup-item.d.ts +24 -24
- package/types/0buildTypes/nav/sub-nav.d.ts +30 -30
- package/types/0buildTypes/nav/types.d.ts +375 -375
- package/types/0buildTypes/others.d.ts +10 -10
- package/types/0buildTypes/pages/deps.d.ts +5 -5
- package/types/0buildTypes/pages/detail-page/detail-page-card-form.d.ts +12 -12
- package/types/0buildTypes/pages/detail-page/detail-page-form-item.d.ts +9 -9
- package/types/0buildTypes/pages/detail-page/detail-page-section.d.ts +19 -19
- package/types/0buildTypes/pages/detail-page/detail-page-summary.d.ts +9 -9
- package/types/0buildTypes/pages/detail-page/detail-page.d.ts +14 -14
- package/types/0buildTypes/pages/detail-page/index.d.ts +2 -2
- package/types/0buildTypes/pages/detail-page/types.d.ts +29 -29
- package/types/0buildTypes/pages/page-card/types.d.ts +6 -6
- package/types/0buildTypes/previews/renderFileImage.d.ts +34 -34
- package/types/0buildTypes/query-form/index.d.ts +2 -2
- package/types/0buildTypes/query-form/query-form-items.d.ts +4 -4
- package/types/0buildTypes/query-form/query-form-layout.d.ts +2 -2
- package/types/0buildTypes/query-form/query-form.d.ts +20 -20
- package/types/0buildTypes/query-form/types.d.ts +12 -12
- package/types/0buildTypes/sortable-list/helpers.d.ts +8 -8
- package/types/0buildTypes/sortable-list/hooks.d.ts +24 -24
- package/types/0buildTypes/sortable-list/index.d.ts +14 -14
- package/types/0buildTypes/sortable-list/sortable-editable-table.d.ts +2 -2
- package/types/0buildTypes/sortable-list/sortable-list.d.ts +560 -560
- package/types/0buildTypes/sortable-list/sortable-table.d.ts +2 -2
- package/types/0buildTypes/sortable-list/types.d.ts +15 -15
- package/types/0buildTypes/table-pro/index.d.ts +26 -26
- package/types/0buildTypes/table-pro/table-pro.d.ts +17 -17
- package/types/0buildTypes/table-pro/types.d.ts +95 -95
- package/types/0buildTypes/table-pro/useTablePro.d.ts +10 -10
- package/types/0buildTypes/table-pro/utils/formatQueryRes.d.ts +1 -1
- package/types/0buildTypes/table-pro/widget/column-setting.d.ts +5 -5
- package/types/0buildTypes/table-pro/widget/deps.d.ts +2 -2
- package/types/0buildTypes/table-pro/widget/index.d.ts +25 -25
- package/types/0buildTypes/table-pro/widget/operations.d.ts +5 -5
- package/types/0buildTypes/table-pro/widget/operationsActions.d.ts +2 -2
- package/types/0buildTypes/table-pro/widget/renderFormats.d.ts +17 -17
- package/types/0buildTypes/table-pro/widget/renderMultiFieldCell.d.ts +4 -4
- package/types/0buildTypes/table-pro/widget/renderOperationCell.d.ts +4 -4
- package/types/0buildTypes/table-pro/widget/renderToolbar.d.ts +6 -6
- package/types/0buildTypes/table-pro/widget/table-utils-types.d.ts +40 -40
- package/types/0buildTypes/util/comp.d.ts +16 -16
- package/types/0buildTypes/util/component.d.ts +1 -1
- package/types/0buildTypes/util/constants.d.ts +4 -4
- package/types/0buildTypes/util/dom.d.ts +116 -116
- package/types/0buildTypes/util/env.d.ts +7 -7
- package/types/0buildTypes/util/func-wrapper.d.ts +1 -1
- package/types/0buildTypes/util/func.d.ts +73 -73
- package/types/0buildTypes/util/guid.d.ts +11 -11
- package/types/0buildTypes/util/isStateEquals.d.ts +4 -4
- package/types/0buildTypes/util/localforage.d.ts +11 -11
- package/types/0buildTypes/util/log.d.ts +18 -18
- package/types/0buildTypes/util/pick-res-data.d.ts +28 -28
- package/types/0buildTypes/util/react-dom.d.ts +27 -27
- package/types/0buildTypes/util/shallowEqual.d.ts +3 -3
- package/types/0buildTypes/util/string.d.ts +32 -32
- package/types/0buildTypes/util/tiny-emitter.d.ts +10 -10
- package/types/0buildTypes/util/toMap.d.ts +7 -7
- package/types/affix/index.d.ts +33 -33
- package/types/animate/index.d.ts +80 -80
- package/types/avatar/index.d.ts +41 -41
- package/types/badge/index.d.ts +38 -38
- package/types/balloon/index.d.ts +254 -254
- package/types/balloon-confirm/index.d.ts +119 -119
- package/types/batch-input/index.d.ts +152 -152
- package/types/box/index.d.ts +25 -25
- package/types/breadcrumb/index.d.ts +60 -60
- package/types/button/index.d.ts +179 -179
- package/types/calendar/index.d.ts +76 -76
- package/types/card/index.d.ts +147 -147
- package/types/cascader/index.d.ts +135 -135
- package/types/cascader-select/index.d.ts +230 -230
- package/types/checkbox/index.d.ts +175 -175
- package/types/collapse/index.d.ts +96 -96
- package/types/comments/index.d.ts +278 -278
- package/types/config-provider/index.d.ts +3 -3
- package/types/date-picker/index.d.ts +123 -123
- package/types/dialog/index.d.ts +328 -328
- package/types/divider/index.d.ts +21 -21
- package/types/drawer/index.d.ts +121 -121
- package/types/dropdown/index.d.ts +198 -198
- package/types/editable-table/index.d.ts +121 -121
- package/types/empty/index.d.ts +78 -78
- package/types/field/index.d.ts +33 -33
- package/types/filter/index.d.ts +2 -2
- package/types/form/index.d.ts +5 -5
- package/types/grid/index.d.ts +142 -142
- package/types/hooks/index.d.ts +2 -2
- package/types/icon/index.d.ts +29 -29
- package/types/image/index.d.ts +3 -3
- package/types/index.d.ts +69 -69
- package/types/input/index.d.ts +458 -458
- package/types/list/index.d.ts +69 -69
- package/types/loading/index.d.ts +100 -100
- package/types/locale/default.d.ts +143 -143
- package/types/locale/en-us.d.ts +1 -1
- package/types/locale/id-id.d.ts +1 -1
- package/types/locale/it-it.d.ts +1 -1
- package/types/locale/ja-jp.d.ts +1 -1
- package/types/locale/ko-kr.d.ts +1 -1
- package/types/locale/ms-my.d.ts +1 -1
- package/types/locale/pt-pt.d.ts +1 -1
- package/types/locale/th-th.d.ts +1 -1
- package/types/locale/vi-vn.d.ts +1 -1
- package/types/locale/zh-cn.d.ts +1 -1
- package/types/locale/zh-hk.d.ts +1 -1
- package/types/locale/zh-tw.d.ts +1 -1
- package/types/menu/index.d.ts +336 -336
- package/types/menu-button/index.d.ts +100 -100
- package/types/message/index.d.ts +165 -165
- package/types/nav/index.d.ts +313 -313
- package/types/notification/index.d.ts +35 -35
- package/types/number-picker/index.d.ts +161 -161
- package/types/overlay/index.d.ts +363 -363
- package/types/pagination/index.d.ts +115 -115
- package/types/paragraph/index.d.ts +23 -23
- package/types/progress/index.d.ts +53 -53
- package/types/query-form/index.d.ts +3 -3
- package/types/radio/index.d.ts +180 -180
- package/types/range/index.d.ts +120 -120
- package/types/rating/index.d.ts +84 -84
- package/types/responsive-grid/index.d.ts +30 -30
- package/types/search/index.d.ts +219 -219
- package/types/select/index.d.ts +479 -479
- package/types/shell/index.d.ts +53 -53
- package/types/slider/index.d.ts +172 -172
- package/types/sortable-list/index.d.ts +165 -165
- package/types/split-button/index.d.ts +134 -134
- package/types/step/index.d.ts +108 -108
- package/types/switch/index.d.ts +85 -85
- package/types/tab/index.d.ts +170 -170
- package/types/table/index.d.ts +407 -407
- package/types/table-pro/index.d.ts +3 -3
- package/types/tag/index.d.ts +142 -142
- package/types/time-picker/index.d.ts +193 -193
- package/types/timeline/index.d.ts +95 -95
- package/types/transfer/index.d.ts +199 -199
- package/types/tree/index.d.ts +421 -421
- package/types/tree-select/index.d.ts +251 -251
- package/types/typography/index.d.ts +28 -28
- package/types/upload/index.d.ts +711 -711
- package/types/util.d.ts +80 -80
- package/types/virtual-list/index.d.ts +44 -44
|
@@ -1,375 +1,375 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
type MenuGroupProps = any;
|
|
3
|
-
type MenuItemProps = any;
|
|
4
|
-
type MenuPopupItemProps = any;
|
|
5
|
-
type MenuItem = any;
|
|
6
|
-
type PopupProps = any;
|
|
7
|
-
type SubMenuProps = any;
|
|
8
|
-
type SelectableItem = any;
|
|
9
|
-
type CommonProps = any;
|
|
10
|
-
type SelectExtra = any;
|
|
11
|
-
/**
|
|
12
|
-
* @api Nav.Group
|
|
13
|
-
* @order 2
|
|
14
|
-
*/
|
|
15
|
-
export interface GroupProps extends MenuGroupProps {
|
|
16
|
-
/**
|
|
17
|
-
* 标签内容
|
|
18
|
-
* @en Content of label
|
|
19
|
-
*/
|
|
20
|
-
label?: React.ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* 导航项和子导航
|
|
23
|
-
* @en Navigation item and sub navigation
|
|
24
|
-
*/
|
|
25
|
-
children: React.ReactChild | React.ReactChild[];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @api Nav.Item
|
|
29
|
-
* @order 3
|
|
30
|
-
*/
|
|
31
|
-
export interface ItemProps extends MenuItemProps {
|
|
32
|
-
/**
|
|
33
|
-
* 是否禁用
|
|
34
|
-
* @en whether is disabled
|
|
35
|
-
* @skip
|
|
36
|
-
*/
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* 帮助文本
|
|
40
|
-
* @en Help text
|
|
41
|
-
* @skip
|
|
42
|
-
*/
|
|
43
|
-
helper?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* 自定义图标
|
|
46
|
-
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
47
|
-
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
48
|
-
*/
|
|
49
|
-
icon?: string | React.ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* 导航内容
|
|
52
|
-
* @en Content of navigation check item
|
|
53
|
-
*/
|
|
54
|
-
children?: React.ReactNode;
|
|
55
|
-
/**
|
|
56
|
-
* 导航项打开方式
|
|
57
|
-
* @en Navigation item open mode
|
|
58
|
-
* @skip
|
|
59
|
-
*/
|
|
60
|
-
parentMode?: 'inline' | 'popup';
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* @api Nav.PopupItem
|
|
64
|
-
* @order 4
|
|
65
|
-
*/
|
|
66
|
-
export interface PopupItemProps extends MenuPopupItemProps {
|
|
67
|
-
/**
|
|
68
|
-
* 标签内容
|
|
69
|
-
* @en Content of label
|
|
70
|
-
*/
|
|
71
|
-
label?: React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* 弹出内容
|
|
74
|
-
* @en Content of popup
|
|
75
|
-
*/
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
/**
|
|
78
|
-
* 自定义图标
|
|
79
|
-
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
80
|
-
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
81
|
-
*/
|
|
82
|
-
icon?: string | React.ReactNode;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* @api Nav.SubNav
|
|
86
|
-
* @order 5
|
|
87
|
-
*/
|
|
88
|
-
export interface SubNavProps extends SubMenuProps {
|
|
89
|
-
/**
|
|
90
|
-
* 自定义图标
|
|
91
|
-
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
92
|
-
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
93
|
-
*/
|
|
94
|
-
icon?: string | React.ReactNode;
|
|
95
|
-
/**
|
|
96
|
-
* 标签内容
|
|
97
|
-
* @en Content of label
|
|
98
|
-
*/
|
|
99
|
-
label?: React.ReactNode;
|
|
100
|
-
/**
|
|
101
|
-
* 是否可选
|
|
102
|
-
* @en Whether is selectable
|
|
103
|
-
* @defaultValue false
|
|
104
|
-
*/
|
|
105
|
-
selectable?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* 导航项和子导航
|
|
108
|
-
* @en Navigation item and sub navigation
|
|
109
|
-
*/
|
|
110
|
-
children?: React.ReactNode;
|
|
111
|
-
/**
|
|
112
|
-
* 是否需要提示当前项可展开的 icon,默认是有的
|
|
113
|
-
* @en Whether to show the icon of current item
|
|
114
|
-
*/
|
|
115
|
-
noIcon?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* 导航层级
|
|
118
|
-
* @skip
|
|
119
|
-
*/
|
|
120
|
-
level?: number;
|
|
121
|
-
}
|
|
122
|
-
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'>;
|
|
123
|
-
export interface NavRef extends React.RefObject<NavProps> {
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @api Nav
|
|
127
|
-
* @order 1
|
|
128
|
-
*/
|
|
129
|
-
export interface NavProps extends HTMLAttributesWeak, CommonProps {
|
|
130
|
-
/**
|
|
131
|
-
* 导航项和子导航
|
|
132
|
-
* @en Navigation item and sub navigation
|
|
133
|
-
*/
|
|
134
|
-
children?: React.ReactNode;
|
|
135
|
-
/**
|
|
136
|
-
* 点击菜单项触发的回调函数
|
|
137
|
-
* @en Callback function when menu item is clicked
|
|
138
|
-
* @param key - 点击的菜单项的 key 值 - Key value of clicked menu item
|
|
139
|
-
* @param item - 点击的菜单项 - Clicked menu item
|
|
140
|
-
* @param event - 点击事件 - Click event
|
|
141
|
-
* @skip
|
|
142
|
-
*/
|
|
143
|
-
onItemClick?: (key: string, item: MenuItem, event: React.MouseEvent) => void;
|
|
144
|
-
/**
|
|
145
|
-
* 当前展开的子菜单的 key 值
|
|
146
|
-
* @en Current open sub navigation key
|
|
147
|
-
* @skip
|
|
148
|
-
*/
|
|
149
|
-
openKeys?: string | Array<string>;
|
|
150
|
-
/**
|
|
151
|
-
* 初始打开的子菜单的 key 值
|
|
152
|
-
* @en Initial open sub navigation key
|
|
153
|
-
* @skip
|
|
154
|
-
*/
|
|
155
|
-
defaultOpenKeys?: string | Array<string>;
|
|
156
|
-
/**
|
|
157
|
-
* 初始展开所有的子导航
|
|
158
|
-
* @en Open all subnavs default, only when mode is set to 'inline' and openMode is set to 'multiple'
|
|
159
|
-
* @defaultValue false
|
|
160
|
-
* @remarks 只在 mode 设置为 'inline' 以及 openMode 设置为 'multiple' 下生效
|
|
161
|
-
*/
|
|
162
|
-
defaultOpenAll?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
* 打开或关闭子菜单触发的回调函数
|
|
165
|
-
* @en Callback function when submenu is opened or closed
|
|
166
|
-
* @param key - 打开或关闭的子菜单的 key 值 - Key value of opened or closed submenu
|
|
167
|
-
* @param extra - 扩展参数 - Extra parameters
|
|
168
|
-
* @skip
|
|
169
|
-
*/
|
|
170
|
-
onOpen?: (key: string[], extra: {
|
|
171
|
-
key: string;
|
|
172
|
-
open: boolean;
|
|
173
|
-
}) => void;
|
|
174
|
-
/**
|
|
175
|
-
* 子导航打开的模式
|
|
176
|
-
* @en Sub navigation open mode (horizontal navigation only supports pop up)
|
|
177
|
-
* @defaultValue 'inline'
|
|
178
|
-
* @remarks 水平导航只支持弹出
|
|
179
|
-
*/
|
|
180
|
-
mode?: 'inline' | 'popup';
|
|
181
|
-
/**
|
|
182
|
-
* 子导航打开的触发方式
|
|
183
|
-
* @en Sub navigation open trigger
|
|
184
|
-
* @defaultValue 'click'
|
|
185
|
-
*/
|
|
186
|
-
triggerType?: 'click' | 'hover';
|
|
187
|
-
/**
|
|
188
|
-
* 内联子导航的展开模式,同时可以展开一个同级子导航还是多个同级子导航
|
|
189
|
-
* @en The open mode of inline sub navigation, expand a peer navigation or multiple navigations at the same level at same time, it only works in inline mode
|
|
190
|
-
* @defaultValue 'multiple'
|
|
191
|
-
* @remarks 仅在 mode 为 inline 时生效
|
|
192
|
-
*/
|
|
193
|
-
openMode?: 'single' | 'multiple';
|
|
194
|
-
/**
|
|
195
|
-
* 内联子导航缩进距离
|
|
196
|
-
* @en Inline sub navigation indent distance
|
|
197
|
-
* @defaultValue 20
|
|
198
|
-
*/
|
|
199
|
-
inlineIndent?: number;
|
|
200
|
-
/**
|
|
201
|
-
* 是否自动让弹层的宽度和菜单项保持一致
|
|
202
|
-
* @en Whether to keep the width of the popup consistent with the navigation item
|
|
203
|
-
* @remarks 如果弹层的宽度比菜单项小则和菜单项保持一致,如果宽度大于菜单项则不做处理
|
|
204
|
-
* @skip
|
|
205
|
-
*/
|
|
206
|
-
popupAutoWidth?: boolean;
|
|
207
|
-
/**
|
|
208
|
-
* 弹出子导航的对齐方式
|
|
209
|
-
* @en Pop up sub navigation alignment (horizontal navigation only supports follow)
|
|
210
|
-
* @defaultValue 'follow'
|
|
211
|
-
* @remarks 水平导航只支持 follow
|
|
212
|
-
*/
|
|
213
|
-
popupAlign?: 'follow' | 'outside';
|
|
214
|
-
/**
|
|
215
|
-
* 弹层自定义 props
|
|
216
|
-
* @en Pop up navigation custom props
|
|
217
|
-
* @skip
|
|
218
|
-
*/
|
|
219
|
-
popupProps?: PopupProps | (() => void);
|
|
220
|
-
/**
|
|
221
|
-
* 弹出子导航的自定义类名
|
|
222
|
-
* @en Pop up navigation custom class name
|
|
223
|
-
*/
|
|
224
|
-
popupClassName?: string;
|
|
225
|
-
/**
|
|
226
|
-
* 弹出子菜单自定义 style
|
|
227
|
-
* @en Pop up navigation custom style
|
|
228
|
-
* @skip
|
|
229
|
-
*/
|
|
230
|
-
popupStyle?: React.CSSProperties;
|
|
231
|
-
/**
|
|
232
|
-
* 当前选中导航项的 key 值
|
|
233
|
-
* @en Keys of selected nav item currently
|
|
234
|
-
*/
|
|
235
|
-
selectedKeys?: string | Array<string>;
|
|
236
|
-
/**
|
|
237
|
-
* 初始选中导航项的 key 值
|
|
238
|
-
* @en Keys of selected nav item in default
|
|
239
|
-
* @defaultValue []
|
|
240
|
-
*/
|
|
241
|
-
defaultSelectedKeys?: string | Array<string>;
|
|
242
|
-
/**
|
|
243
|
-
* 选中或取消选中导航项触发的回调函数
|
|
244
|
-
* @en Callback function triggered when select or unselect nav item
|
|
245
|
-
* @param selectedKeys - 选中的导航项的 key 值 - Keys of selected nav item
|
|
246
|
-
* @param item - 选中的导航项 - Current operation nav item
|
|
247
|
-
* @param extra - 扩展参数 - Extra parameters
|
|
248
|
-
*/
|
|
249
|
-
onSelect?: (selectedKeys: string[], item: SelectableItem, extra: SelectExtra) => void;
|
|
250
|
-
/**
|
|
251
|
-
* 选中模式,单选还是多选,默认无值,不可选
|
|
252
|
-
* @en Select mode, single or multiple, no value by default, not selectable
|
|
253
|
-
* @skip
|
|
254
|
-
*/
|
|
255
|
-
selectMode?: 'single' | 'multiple';
|
|
256
|
-
/**
|
|
257
|
-
* 是否只能选择第一层菜单项
|
|
258
|
-
* @en Whether you can only select the first level menu item (you cannot select the menu item in the submenu)
|
|
259
|
-
* @remarks 不能选择子菜单中的菜单项
|
|
260
|
-
* @skip
|
|
261
|
-
*/
|
|
262
|
-
shallowSelect?: boolean;
|
|
263
|
-
/**
|
|
264
|
-
* 是否显示选中图标
|
|
265
|
-
* @en whether to show the selected icon, if it is set to false, it needs to match the background color when the configuration platform setting is selected to distinguish between
|
|
266
|
-
* @remarks 如果设置为 false 需配合配置平台设置选中时的背景色以示区分
|
|
267
|
-
* @skip
|
|
268
|
-
*/
|
|
269
|
-
hasSelectedIcon?: boolean;
|
|
270
|
-
/**
|
|
271
|
-
* 是否将选中图标居右,仅当 hasSelectedIcon 为 true 时生效。
|
|
272
|
-
* @en Whether to set the selected icon on right side of menu, this only works when hasSelectedIcon is true. Attention:select icon on SubMenu always lie on left of menu
|
|
273
|
-
* @remarks 注意:SubMenu 上的选中图标一直居左,不受此 API 控制
|
|
274
|
-
* @skip
|
|
275
|
-
*/
|
|
276
|
-
isSelectIconRight?: boolean;
|
|
277
|
-
/**
|
|
278
|
-
* 导航布局
|
|
279
|
-
* @en Layout of navigation
|
|
280
|
-
* @defaultValue 'ver'
|
|
281
|
-
*/
|
|
282
|
-
direction?: 'hoz' | 'ver';
|
|
283
|
-
/**
|
|
284
|
-
* 横向导航条 items 和 footer 的对齐方向
|
|
285
|
-
* @en Alignment of items in the horizontal nav bar, only works when direction is set to 'hoz' and the header exists
|
|
286
|
-
* @defaultValue 'left'
|
|
287
|
-
* @remarks 在 direction 设置为 'hoz' 并且 header 存在时生效
|
|
288
|
-
*/
|
|
289
|
-
hozAlign?: 'left' | 'right';
|
|
290
|
-
/**
|
|
291
|
-
* 自定义导航头部
|
|
292
|
-
* @en Custom navigation head
|
|
293
|
-
*/
|
|
294
|
-
header?: React.ReactNode;
|
|
295
|
-
/**
|
|
296
|
-
* 自定义导航尾部
|
|
297
|
-
* @en Custom navigation footer
|
|
298
|
-
*/
|
|
299
|
-
footer?: React.ReactNode;
|
|
300
|
-
/**
|
|
301
|
-
* 是否自动获得焦点
|
|
302
|
-
* @en Whether to focus on the first element of popup on appearing
|
|
303
|
-
* @skip
|
|
304
|
-
*/
|
|
305
|
-
autoFocus?: boolean;
|
|
306
|
-
/**
|
|
307
|
-
* 当前获得焦点的子菜单或菜单项 key 值
|
|
308
|
-
* @en Current focused submenu or menu item key
|
|
309
|
-
* @skip
|
|
310
|
-
*/
|
|
311
|
-
focusedKey?: string;
|
|
312
|
-
/**
|
|
313
|
-
* 是否开启嵌入式模式
|
|
314
|
-
* @en Whether to enable embedded mode
|
|
315
|
-
* @defaultValue false
|
|
316
|
-
* @remarks 一般用于 Layout 的布局中,开启后没有默认背景、外层 border、box-shadow,可以配合`<Nav style={{lineHeight: '100px'}}>` 自定义高度
|
|
317
|
-
* @version 1.18
|
|
318
|
-
*/
|
|
319
|
-
embeddable?: boolean;
|
|
320
|
-
/**
|
|
321
|
-
* 导航类型
|
|
322
|
-
* @en Type of navigation
|
|
323
|
-
* @defaultValue 'normal'
|
|
324
|
-
*/
|
|
325
|
-
type?: 'normal' | 'primary' | 'secondary' | 'line';
|
|
326
|
-
/**
|
|
327
|
-
* 设置组件选中状态的 active 边方向
|
|
328
|
-
* @en The active border direction of the selected item
|
|
329
|
-
* @remarks 当 direction 为 'hoz' 时,默认值为 'bottom',当 direction 为 'ver' 时,默认值为 'left'
|
|
330
|
-
*/
|
|
331
|
-
activeDirection?: null | 'top' | 'bottom' | 'left' | 'right';
|
|
332
|
-
/**
|
|
333
|
-
* 是否只显示图标
|
|
334
|
-
* @en Whether to show only icons
|
|
335
|
-
*/
|
|
336
|
-
iconOnly?: boolean;
|
|
337
|
-
/**
|
|
338
|
-
* iconOnly 模式下是否展示文字
|
|
339
|
-
* @en Whether to show text in iconOnly mode (only works when iconOnly=true)
|
|
340
|
-
* @remarks 仅在 iconOnly = true 时生效
|
|
341
|
-
*/
|
|
342
|
-
iconTextOnly?: boolean;
|
|
343
|
-
/**
|
|
344
|
-
* iconOnly 模式下的宽度
|
|
345
|
-
* @en iconOnly mode width (only works when iconOnly=true)
|
|
346
|
-
* @remarks 仅在 iconOnly = true 时生效
|
|
347
|
-
*/
|
|
348
|
-
iconOnlyWidth?: number | string;
|
|
349
|
-
/**
|
|
350
|
-
* 是否显示右侧的箭头
|
|
351
|
-
* @en Whether to show arrow (only works when iconOnly=true)
|
|
352
|
-
* @defaultValue true
|
|
353
|
-
* @remarks 仅在 iconOnly = true 时生效
|
|
354
|
-
*/
|
|
355
|
-
hasArrow?: boolean;
|
|
356
|
-
/**
|
|
357
|
-
* 是否有 ToolTips
|
|
358
|
-
* @en Whether to show tooltip (only works when iconOnly=true)
|
|
359
|
-
* @defaultValue false
|
|
360
|
-
* @remarks 仅在 iconOnly = true 时生效
|
|
361
|
-
*/
|
|
362
|
-
hasTooltip?: boolean;
|
|
363
|
-
/**
|
|
364
|
-
* 横向菜单模式下,是否维持在一行,即超出一行折叠成 SubMenu 显示
|
|
365
|
-
* @en Whether to keep in one line
|
|
366
|
-
* @skip
|
|
367
|
-
*/
|
|
368
|
-
hozInLine?: boolean;
|
|
369
|
-
/**
|
|
370
|
-
* 是否开启 pure 模式
|
|
371
|
-
* @skip
|
|
372
|
-
*/
|
|
373
|
-
pure?: boolean;
|
|
374
|
-
}
|
|
375
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type MenuGroupProps = any;
|
|
3
|
+
type MenuItemProps = any;
|
|
4
|
+
type MenuPopupItemProps = any;
|
|
5
|
+
type MenuItem = any;
|
|
6
|
+
type PopupProps = any;
|
|
7
|
+
type SubMenuProps = any;
|
|
8
|
+
type SelectableItem = any;
|
|
9
|
+
type CommonProps = any;
|
|
10
|
+
type SelectExtra = any;
|
|
11
|
+
/**
|
|
12
|
+
* @api Nav.Group
|
|
13
|
+
* @order 2
|
|
14
|
+
*/
|
|
15
|
+
export interface GroupProps extends MenuGroupProps {
|
|
16
|
+
/**
|
|
17
|
+
* 标签内容
|
|
18
|
+
* @en Content of label
|
|
19
|
+
*/
|
|
20
|
+
label?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* 导航项和子导航
|
|
23
|
+
* @en Navigation item and sub navigation
|
|
24
|
+
*/
|
|
25
|
+
children: React.ReactChild | React.ReactChild[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @api Nav.Item
|
|
29
|
+
* @order 3
|
|
30
|
+
*/
|
|
31
|
+
export interface ItemProps extends MenuItemProps {
|
|
32
|
+
/**
|
|
33
|
+
* 是否禁用
|
|
34
|
+
* @en whether is disabled
|
|
35
|
+
* @skip
|
|
36
|
+
*/
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 帮助文本
|
|
40
|
+
* @en Help text
|
|
41
|
+
* @skip
|
|
42
|
+
*/
|
|
43
|
+
helper?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* 自定义图标
|
|
46
|
+
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
47
|
+
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
48
|
+
*/
|
|
49
|
+
icon?: string | React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* 导航内容
|
|
52
|
+
* @en Content of navigation check item
|
|
53
|
+
*/
|
|
54
|
+
children?: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* 导航项打开方式
|
|
57
|
+
* @en Navigation item open mode
|
|
58
|
+
* @skip
|
|
59
|
+
*/
|
|
60
|
+
parentMode?: 'inline' | 'popup';
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @api Nav.PopupItem
|
|
64
|
+
* @order 4
|
|
65
|
+
*/
|
|
66
|
+
export interface PopupItemProps extends MenuPopupItemProps {
|
|
67
|
+
/**
|
|
68
|
+
* 标签内容
|
|
69
|
+
* @en Content of label
|
|
70
|
+
*/
|
|
71
|
+
label?: React.ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* 弹出内容
|
|
74
|
+
* @en Content of popup
|
|
75
|
+
*/
|
|
76
|
+
children?: React.ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* 自定义图标
|
|
79
|
+
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
80
|
+
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
81
|
+
*/
|
|
82
|
+
icon?: string | React.ReactNode;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @api Nav.SubNav
|
|
86
|
+
* @order 5
|
|
87
|
+
*/
|
|
88
|
+
export interface SubNavProps extends SubMenuProps {
|
|
89
|
+
/**
|
|
90
|
+
* 自定义图标
|
|
91
|
+
* @en Custom icon, can use Icon's type or `<Icon type="your type" />`
|
|
92
|
+
* @remarks 可以使用 Icon 的 type,也可以使用组件 `<Icon type="your type" />`
|
|
93
|
+
*/
|
|
94
|
+
icon?: string | React.ReactNode;
|
|
95
|
+
/**
|
|
96
|
+
* 标签内容
|
|
97
|
+
* @en Content of label
|
|
98
|
+
*/
|
|
99
|
+
label?: React.ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* 是否可选
|
|
102
|
+
* @en Whether is selectable
|
|
103
|
+
* @defaultValue false
|
|
104
|
+
*/
|
|
105
|
+
selectable?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* 导航项和子导航
|
|
108
|
+
* @en Navigation item and sub navigation
|
|
109
|
+
*/
|
|
110
|
+
children?: React.ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* 是否需要提示当前项可展开的 icon,默认是有的
|
|
113
|
+
* @en Whether to show the icon of current item
|
|
114
|
+
*/
|
|
115
|
+
noIcon?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* 导航层级
|
|
118
|
+
* @skip
|
|
119
|
+
*/
|
|
120
|
+
level?: number;
|
|
121
|
+
}
|
|
122
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'>;
|
|
123
|
+
export interface NavRef extends React.RefObject<NavProps> {
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* @api Nav
|
|
127
|
+
* @order 1
|
|
128
|
+
*/
|
|
129
|
+
export interface NavProps extends HTMLAttributesWeak, CommonProps {
|
|
130
|
+
/**
|
|
131
|
+
* 导航项和子导航
|
|
132
|
+
* @en Navigation item and sub navigation
|
|
133
|
+
*/
|
|
134
|
+
children?: React.ReactNode;
|
|
135
|
+
/**
|
|
136
|
+
* 点击菜单项触发的回调函数
|
|
137
|
+
* @en Callback function when menu item is clicked
|
|
138
|
+
* @param key - 点击的菜单项的 key 值 - Key value of clicked menu item
|
|
139
|
+
* @param item - 点击的菜单项 - Clicked menu item
|
|
140
|
+
* @param event - 点击事件 - Click event
|
|
141
|
+
* @skip
|
|
142
|
+
*/
|
|
143
|
+
onItemClick?: (key: string, item: MenuItem, event: React.MouseEvent) => void;
|
|
144
|
+
/**
|
|
145
|
+
* 当前展开的子菜单的 key 值
|
|
146
|
+
* @en Current open sub navigation key
|
|
147
|
+
* @skip
|
|
148
|
+
*/
|
|
149
|
+
openKeys?: string | Array<string>;
|
|
150
|
+
/**
|
|
151
|
+
* 初始打开的子菜单的 key 值
|
|
152
|
+
* @en Initial open sub navigation key
|
|
153
|
+
* @skip
|
|
154
|
+
*/
|
|
155
|
+
defaultOpenKeys?: string | Array<string>;
|
|
156
|
+
/**
|
|
157
|
+
* 初始展开所有的子导航
|
|
158
|
+
* @en Open all subnavs default, only when mode is set to 'inline' and openMode is set to 'multiple'
|
|
159
|
+
* @defaultValue false
|
|
160
|
+
* @remarks 只在 mode 设置为 'inline' 以及 openMode 设置为 'multiple' 下生效
|
|
161
|
+
*/
|
|
162
|
+
defaultOpenAll?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* 打开或关闭子菜单触发的回调函数
|
|
165
|
+
* @en Callback function when submenu is opened or closed
|
|
166
|
+
* @param key - 打开或关闭的子菜单的 key 值 - Key value of opened or closed submenu
|
|
167
|
+
* @param extra - 扩展参数 - Extra parameters
|
|
168
|
+
* @skip
|
|
169
|
+
*/
|
|
170
|
+
onOpen?: (key: string[], extra: {
|
|
171
|
+
key: string;
|
|
172
|
+
open: boolean;
|
|
173
|
+
}) => void;
|
|
174
|
+
/**
|
|
175
|
+
* 子导航打开的模式
|
|
176
|
+
* @en Sub navigation open mode (horizontal navigation only supports pop up)
|
|
177
|
+
* @defaultValue 'inline'
|
|
178
|
+
* @remarks 水平导航只支持弹出
|
|
179
|
+
*/
|
|
180
|
+
mode?: 'inline' | 'popup';
|
|
181
|
+
/**
|
|
182
|
+
* 子导航打开的触发方式
|
|
183
|
+
* @en Sub navigation open trigger
|
|
184
|
+
* @defaultValue 'click'
|
|
185
|
+
*/
|
|
186
|
+
triggerType?: 'click' | 'hover';
|
|
187
|
+
/**
|
|
188
|
+
* 内联子导航的展开模式,同时可以展开一个同级子导航还是多个同级子导航
|
|
189
|
+
* @en The open mode of inline sub navigation, expand a peer navigation or multiple navigations at the same level at same time, it only works in inline mode
|
|
190
|
+
* @defaultValue 'multiple'
|
|
191
|
+
* @remarks 仅在 mode 为 inline 时生效
|
|
192
|
+
*/
|
|
193
|
+
openMode?: 'single' | 'multiple';
|
|
194
|
+
/**
|
|
195
|
+
* 内联子导航缩进距离
|
|
196
|
+
* @en Inline sub navigation indent distance
|
|
197
|
+
* @defaultValue 20
|
|
198
|
+
*/
|
|
199
|
+
inlineIndent?: number;
|
|
200
|
+
/**
|
|
201
|
+
* 是否自动让弹层的宽度和菜单项保持一致
|
|
202
|
+
* @en Whether to keep the width of the popup consistent with the navigation item
|
|
203
|
+
* @remarks 如果弹层的宽度比菜单项小则和菜单项保持一致,如果宽度大于菜单项则不做处理
|
|
204
|
+
* @skip
|
|
205
|
+
*/
|
|
206
|
+
popupAutoWidth?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* 弹出子导航的对齐方式
|
|
209
|
+
* @en Pop up sub navigation alignment (horizontal navigation only supports follow)
|
|
210
|
+
* @defaultValue 'follow'
|
|
211
|
+
* @remarks 水平导航只支持 follow
|
|
212
|
+
*/
|
|
213
|
+
popupAlign?: 'follow' | 'outside';
|
|
214
|
+
/**
|
|
215
|
+
* 弹层自定义 props
|
|
216
|
+
* @en Pop up navigation custom props
|
|
217
|
+
* @skip
|
|
218
|
+
*/
|
|
219
|
+
popupProps?: PopupProps | (() => void);
|
|
220
|
+
/**
|
|
221
|
+
* 弹出子导航的自定义类名
|
|
222
|
+
* @en Pop up navigation custom class name
|
|
223
|
+
*/
|
|
224
|
+
popupClassName?: string;
|
|
225
|
+
/**
|
|
226
|
+
* 弹出子菜单自定义 style
|
|
227
|
+
* @en Pop up navigation custom style
|
|
228
|
+
* @skip
|
|
229
|
+
*/
|
|
230
|
+
popupStyle?: React.CSSProperties;
|
|
231
|
+
/**
|
|
232
|
+
* 当前选中导航项的 key 值
|
|
233
|
+
* @en Keys of selected nav item currently
|
|
234
|
+
*/
|
|
235
|
+
selectedKeys?: string | Array<string>;
|
|
236
|
+
/**
|
|
237
|
+
* 初始选中导航项的 key 值
|
|
238
|
+
* @en Keys of selected nav item in default
|
|
239
|
+
* @defaultValue []
|
|
240
|
+
*/
|
|
241
|
+
defaultSelectedKeys?: string | Array<string>;
|
|
242
|
+
/**
|
|
243
|
+
* 选中或取消选中导航项触发的回调函数
|
|
244
|
+
* @en Callback function triggered when select or unselect nav item
|
|
245
|
+
* @param selectedKeys - 选中的导航项的 key 值 - Keys of selected nav item
|
|
246
|
+
* @param item - 选中的导航项 - Current operation nav item
|
|
247
|
+
* @param extra - 扩展参数 - Extra parameters
|
|
248
|
+
*/
|
|
249
|
+
onSelect?: (selectedKeys: string[], item: SelectableItem, extra: SelectExtra) => void;
|
|
250
|
+
/**
|
|
251
|
+
* 选中模式,单选还是多选,默认无值,不可选
|
|
252
|
+
* @en Select mode, single or multiple, no value by default, not selectable
|
|
253
|
+
* @skip
|
|
254
|
+
*/
|
|
255
|
+
selectMode?: 'single' | 'multiple';
|
|
256
|
+
/**
|
|
257
|
+
* 是否只能选择第一层菜单项
|
|
258
|
+
* @en Whether you can only select the first level menu item (you cannot select the menu item in the submenu)
|
|
259
|
+
* @remarks 不能选择子菜单中的菜单项
|
|
260
|
+
* @skip
|
|
261
|
+
*/
|
|
262
|
+
shallowSelect?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* 是否显示选中图标
|
|
265
|
+
* @en whether to show the selected icon, if it is set to false, it needs to match the background color when the configuration platform setting is selected to distinguish between
|
|
266
|
+
* @remarks 如果设置为 false 需配合配置平台设置选中时的背景色以示区分
|
|
267
|
+
* @skip
|
|
268
|
+
*/
|
|
269
|
+
hasSelectedIcon?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* 是否将选中图标居右,仅当 hasSelectedIcon 为 true 时生效。
|
|
272
|
+
* @en Whether to set the selected icon on right side of menu, this only works when hasSelectedIcon is true. Attention:select icon on SubMenu always lie on left of menu
|
|
273
|
+
* @remarks 注意:SubMenu 上的选中图标一直居左,不受此 API 控制
|
|
274
|
+
* @skip
|
|
275
|
+
*/
|
|
276
|
+
isSelectIconRight?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* 导航布局
|
|
279
|
+
* @en Layout of navigation
|
|
280
|
+
* @defaultValue 'ver'
|
|
281
|
+
*/
|
|
282
|
+
direction?: 'hoz' | 'ver';
|
|
283
|
+
/**
|
|
284
|
+
* 横向导航条 items 和 footer 的对齐方向
|
|
285
|
+
* @en Alignment of items in the horizontal nav bar, only works when direction is set to 'hoz' and the header exists
|
|
286
|
+
* @defaultValue 'left'
|
|
287
|
+
* @remarks 在 direction 设置为 'hoz' 并且 header 存在时生效
|
|
288
|
+
*/
|
|
289
|
+
hozAlign?: 'left' | 'right';
|
|
290
|
+
/**
|
|
291
|
+
* 自定义导航头部
|
|
292
|
+
* @en Custom navigation head
|
|
293
|
+
*/
|
|
294
|
+
header?: React.ReactNode;
|
|
295
|
+
/**
|
|
296
|
+
* 自定义导航尾部
|
|
297
|
+
* @en Custom navigation footer
|
|
298
|
+
*/
|
|
299
|
+
footer?: React.ReactNode;
|
|
300
|
+
/**
|
|
301
|
+
* 是否自动获得焦点
|
|
302
|
+
* @en Whether to focus on the first element of popup on appearing
|
|
303
|
+
* @skip
|
|
304
|
+
*/
|
|
305
|
+
autoFocus?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* 当前获得焦点的子菜单或菜单项 key 值
|
|
308
|
+
* @en Current focused submenu or menu item key
|
|
309
|
+
* @skip
|
|
310
|
+
*/
|
|
311
|
+
focusedKey?: string;
|
|
312
|
+
/**
|
|
313
|
+
* 是否开启嵌入式模式
|
|
314
|
+
* @en Whether to enable embedded mode
|
|
315
|
+
* @defaultValue false
|
|
316
|
+
* @remarks 一般用于 Layout 的布局中,开启后没有默认背景、外层 border、box-shadow,可以配合`<Nav style={{lineHeight: '100px'}}>` 自定义高度
|
|
317
|
+
* @version 1.18
|
|
318
|
+
*/
|
|
319
|
+
embeddable?: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* 导航类型
|
|
322
|
+
* @en Type of navigation
|
|
323
|
+
* @defaultValue 'normal'
|
|
324
|
+
*/
|
|
325
|
+
type?: 'normal' | 'primary' | 'secondary' | 'line';
|
|
326
|
+
/**
|
|
327
|
+
* 设置组件选中状态的 active 边方向
|
|
328
|
+
* @en The active border direction of the selected item
|
|
329
|
+
* @remarks 当 direction 为 'hoz' 时,默认值为 'bottom',当 direction 为 'ver' 时,默认值为 'left'
|
|
330
|
+
*/
|
|
331
|
+
activeDirection?: null | 'top' | 'bottom' | 'left' | 'right';
|
|
332
|
+
/**
|
|
333
|
+
* 是否只显示图标
|
|
334
|
+
* @en Whether to show only icons
|
|
335
|
+
*/
|
|
336
|
+
iconOnly?: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* iconOnly 模式下是否展示文字
|
|
339
|
+
* @en Whether to show text in iconOnly mode (only works when iconOnly=true)
|
|
340
|
+
* @remarks 仅在 iconOnly = true 时生效
|
|
341
|
+
*/
|
|
342
|
+
iconTextOnly?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* iconOnly 模式下的宽度
|
|
345
|
+
* @en iconOnly mode width (only works when iconOnly=true)
|
|
346
|
+
* @remarks 仅在 iconOnly = true 时生效
|
|
347
|
+
*/
|
|
348
|
+
iconOnlyWidth?: number | string;
|
|
349
|
+
/**
|
|
350
|
+
* 是否显示右侧的箭头
|
|
351
|
+
* @en Whether to show arrow (only works when iconOnly=true)
|
|
352
|
+
* @defaultValue true
|
|
353
|
+
* @remarks 仅在 iconOnly = true 时生效
|
|
354
|
+
*/
|
|
355
|
+
hasArrow?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* 是否有 ToolTips
|
|
358
|
+
* @en Whether to show tooltip (only works when iconOnly=true)
|
|
359
|
+
* @defaultValue false
|
|
360
|
+
* @remarks 仅在 iconOnly = true 时生效
|
|
361
|
+
*/
|
|
362
|
+
hasTooltip?: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* 横向菜单模式下,是否维持在一行,即超出一行折叠成 SubMenu 显示
|
|
365
|
+
* @en Whether to keep in one line
|
|
366
|
+
* @skip
|
|
367
|
+
*/
|
|
368
|
+
hozInLine?: boolean;
|
|
369
|
+
/**
|
|
370
|
+
* 是否开启 pure 模式
|
|
371
|
+
* @skip
|
|
372
|
+
*/
|
|
373
|
+
pure?: boolean;
|
|
374
|
+
}
|
|
375
|
+
export {};
|