@next-bricks/nav 1.26.1 → 1.26.3
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/dist/bricks.json +19 -19
- package/dist/chunks/6128.a4b25bfc.js +2 -0
- package/dist/chunks/6128.a4b25bfc.js.map +1 -0
- package/dist/chunks/6302.d5563d52.js +3 -0
- package/dist/chunks/6302.d5563d52.js.map +1 -0
- package/dist/chunks/easyops-navbar-alerts.6c3ef359.js.map +1 -1
- package/dist/chunks/eo-directory-tree-internal-node.e1fd8680.js.map +1 -1
- package/dist/chunks/eo-directory-tree-leaf.315a4f71.js.map +1 -1
- package/dist/chunks/eo-directory-tree.80158b6f.js.map +1 -1
- package/dist/chunks/eo-directory.c305cd88.js.map +1 -1
- package/dist/chunks/eo-frame-breadcrumb.964ca57e.js +2 -0
- package/dist/chunks/eo-frame-breadcrumb.964ca57e.js.map +1 -0
- package/dist/chunks/eo-launchpad-button-v2.a28af14a.js.map +1 -1
- package/dist/chunks/eo-launchpad-quick-access.fa1ab0e2.js.map +1 -1
- package/dist/chunks/eo-launchpad-recent-visits.1a7c6e2c.js.map +1 -1
- package/dist/chunks/eo-nav-menu.2a1e5781.js.map +1 -1
- package/dist/chunks/eo-sidebar-sub-menu.ccc5b812.js.map +1 -1
- package/dist/chunks/launchpad-config.053def2c.js.map +1 -1
- package/dist/chunks/{main.cf330528.js → main.595062c2.js} +2 -2
- package/dist/chunks/{main.cf330528.js.map → main.595062c2.js.map} +1 -1
- package/dist/chunks/poll-announce.225cde90.js.map +1 -1
- package/dist/chunks/query-search.da4f15d3.js.map +1 -1
- package/dist/examples.json +31 -19
- package/dist/index.5bee1101.js +2 -0
- package/dist/index.5bee1101.js.map +1 -0
- package/dist/manifest.json +96 -82
- package/dist/types.json +23 -23
- package/dist-types/directory/index.d.ts +4 -0
- package/dist-types/directory-tree/directory-tree-internal-node/index.d.ts +3 -1
- package/dist-types/directory-tree/directory-tree-leaf/index.d.ts +2 -0
- package/dist-types/directory-tree/index.d.ts +4 -0
- package/dist-types/easyops-navbar-alerts/index.d.ts +1 -1
- package/dist-types/launchpad-button-v2/index.d.ts +1 -1
- package/dist-types/launchpad-config/index.d.ts +7 -0
- package/dist-types/launchpad-quick-access/index.d.ts +6 -0
- package/dist-types/launchpad-recent-visits/index.d.ts +3 -0
- package/dist-types/nav-menu/index.d.ts +3 -0
- package/dist-types/poll-announce/index.d.ts +4 -0
- package/dist-types/query-search/index.d.ts +1 -1
- package/dist-types/sidebar-sub-menu/index.d.ts +1 -1
- package/docs/easyops-navbar-alerts.md +23 -0
- package/docs/easyops-navbar-alerts.react.md +29 -0
- package/docs/eo-app-bar-wrapper.md +57 -1
- package/docs/eo-app-bar-wrapper.react.md +71 -0
- package/docs/eo-directory-tree-internal-node.md +72 -1
- package/docs/eo-directory-tree-internal-node.react.md +116 -0
- package/docs/eo-directory-tree-leaf.md +82 -1
- package/docs/eo-directory-tree-leaf.react.md +85 -0
- package/docs/eo-directory-tree.md +101 -1
- package/docs/eo-directory-tree.react.md +153 -0
- package/docs/eo-directory.md +100 -1
- package/docs/eo-directory.react.md +123 -0
- package/docs/eo-frame-breadcrumb.md +53 -1
- package/docs/eo-frame-breadcrumb.react.md +62 -0
- package/docs/eo-launchpad-quick-access.md +41 -0
- package/docs/eo-launchpad-quick-access.react.md +42 -0
- package/docs/eo-launchpad-recent-visits.md +37 -0
- package/docs/eo-launchpad-recent-visits.react.md +41 -0
- package/docs/eo-nav-menu.md +33 -252
- package/docs/eo-nav-menu.react.md +138 -0
- package/docs/eo-search-launchpad.md +29 -1
- package/docs/eo-search-launchpad.react.md +41 -0
- package/docs/eo-sidebar-menu-group.md +60 -1
- package/docs/eo-sidebar-menu-group.react.md +98 -0
- package/docs/eo-sidebar-menu-item.md +77 -1
- package/docs/eo-sidebar-menu-item.react.md +91 -0
- package/docs/eo-sidebar-menu-submenu.md +57 -1
- package/docs/eo-sidebar-menu-submenu.react.md +74 -0
- package/docs/eo-sidebar-menu.md +19 -1
- package/docs/eo-sidebar-menu.react.md +124 -0
- package/docs/eo-sidebar-sub-menu.md +19 -1
- package/docs/eo-sidebar-sub-menu.react.md +140 -0
- package/docs/eo-sidebar.md +66 -1
- package/docs/eo-sidebar.react.md +142 -0
- package/docs/launchpad-button-v2.md +23 -0
- package/docs/launchpad-button-v2.react.md +29 -0
- package/docs/launchpad-button.md +23 -0
- package/docs/launchpad-button.react.md +29 -0
- package/docs/launchpad-config.md +130 -0
- package/docs/launchpad-config.react.md +161 -0
- package/docs/nav-logo.md +15 -3
- package/docs/nav-logo.react.md +27 -0
- package/docs/poll-announce.md +46 -1
- package/docs/poll-announce.react.md +61 -0
- package/docs/query-search.md +13 -1
- package/docs/query-search.react.md +34 -0
- package/package.json +2 -2
- package/dist/chunks/6128.642f8e42.js +0 -2
- package/dist/chunks/6128.642f8e42.js.map +0 -1
- package/dist/chunks/6302.f681cebd.js +0 -3
- package/dist/chunks/6302.f681cebd.js.map +0 -1
- package/dist/chunks/eo-frame-breadcrumb.b50289ff.js +0 -2
- package/dist/chunks/eo-frame-breadcrumb.b50289ff.js.map +0 -1
- package/dist/index.555c6810.js +0 -2
- package/dist/index.555c6810.js.map +0 -1
- /package/dist/chunks/{6302.f681cebd.js.LICENSE.txt → 6302.d5563d52.js.LICENSE.txt} +0 -0
|
@@ -6,7 +6,7 @@ import type { Link, LinkProps } from "@next-bricks/basic/link";
|
|
|
6
6
|
export declare const WrappedIcon: import("@next-core/react-element").WrappedBrick<GeneralIcon, GeneralIconProps>;
|
|
7
7
|
export declare const WrappedLink: import("@next-core/react-element").WrappedBrick<Link, LinkProps>;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* 导航栏告警提示组件,用于显示 License 到期提醒和页面性能问题警告。
|
|
10
10
|
* @insider
|
|
11
11
|
*/
|
|
12
12
|
export declare class EasyopsNavbarAlerts extends ReactNextElement {
|
|
@@ -3,7 +3,7 @@ import { ReactNextElement } from "@next-core/react-element";
|
|
|
3
3
|
import "@next-core/theme";
|
|
4
4
|
import "./host-context.css";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Launchpad 启动台按钮(v2),点击后展开 Launchpad 面板,支持快捷键 Alt+L 开关、Esc 关闭。
|
|
7
7
|
* @insider
|
|
8
8
|
*/
|
|
9
9
|
export declare class EoLaunchpadButtonV2 extends ReactNextElement {
|
|
@@ -12,10 +12,13 @@ import { MenuGroupProps } from "./MenuGroup";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class LaunchpadConfig extends ReactNextElement implements LaunchpadConfigProps {
|
|
14
14
|
#private;
|
|
15
|
+
/** Launchpad 配置菜单分组数据 */
|
|
15
16
|
accessor menuGroups: ConfigMenuGroup[] | undefined;
|
|
17
|
+
/** 菜单操作按钮配置列表 */
|
|
16
18
|
accessor actions: MenuAction[] | undefined;
|
|
17
19
|
/**
|
|
18
20
|
* @default "launchpad-config"
|
|
21
|
+
* @description 显示变体:launchpad-config(Launchpad 配置)、factory-launchpad-config(工厂配置)、menu-config(菜单配置)、blacklist-config(黑名单配置)
|
|
19
22
|
*/
|
|
20
23
|
accessor variant: ConfigVariant | undefined;
|
|
21
24
|
/**
|
|
@@ -44,6 +47,10 @@ export interface LaunchpadConfigProps extends Pick<MenuGroupProps, "actions" | "
|
|
|
44
47
|
menuGroups?: ConfigMenuGroup[];
|
|
45
48
|
blacklist?: string[];
|
|
46
49
|
}
|
|
50
|
+
export interface LaunchpadConfigEventsMapping {
|
|
51
|
+
onMenuItemClick: "menu-item.click";
|
|
52
|
+
onActionClick: "action.click";
|
|
53
|
+
}
|
|
47
54
|
export interface LaunchpadConfigComponentProps extends LaunchpadConfigProps, Pick<MenuGroupProps, "onMenuItemClick" | "onActionClick"> {
|
|
48
55
|
}
|
|
49
56
|
export declare function LaunchpadConfigComponent({ menuGroups, actions, variant, urlTemplate, customUrlTemplate, blacklist, onMenuItemClick, onActionClick, }: LaunchpadConfigComponentProps): React.JSX.Element;
|
|
@@ -7,7 +7,13 @@ import { Target } from "@next-bricks/basic/link";
|
|
|
7
7
|
* @insider
|
|
8
8
|
*/
|
|
9
9
|
export declare class EoLaunchpadQuickAccess extends ReactNextElement {
|
|
10
|
+
/**
|
|
11
|
+
* 是否为只读模式(隐藏收藏切换按钮)
|
|
12
|
+
*/
|
|
10
13
|
accessor readonly: boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* 菜单项链接打开的目标
|
|
16
|
+
*/
|
|
11
17
|
accessor target: Target | undefined;
|
|
12
18
|
render(): React.JSX.Element;
|
|
13
19
|
}
|
|
@@ -7,6 +7,9 @@ import type { Target } from "@next-bricks/basic/link";
|
|
|
7
7
|
* @insider
|
|
8
8
|
*/
|
|
9
9
|
export declare class EoLaunchpadRecentVisits extends ReactNextElement {
|
|
10
|
+
/**
|
|
11
|
+
* 菜单项链接打开的目标(仅对应用类型的访问项生效,自定义链接类型始终在新标签打开)
|
|
12
|
+
*/
|
|
10
13
|
accessor target: Target | undefined;
|
|
11
14
|
render(): React.JSX.Element;
|
|
12
15
|
}
|
|
@@ -4,7 +4,7 @@ import "@next-core/theme";
|
|
|
4
4
|
import type { GeneralSearch, SearchProps, SearchEvents, SearchEventsMap } from "@next-bricks/form/search";
|
|
5
5
|
export declare const WrappedSearch: import("@next-core/react-element").WrappedBrickWithEventsMap<GeneralSearch, SearchProps, SearchEvents, SearchEventsMap>;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* 综合搜索入口,支持全文检索、IP 搜索、工单搜索等多种查询模式,带搜索历史记录功能
|
|
8
8
|
*/
|
|
9
9
|
export declare class QuerySearch extends ReactNextElement {
|
|
10
10
|
render(): React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: nav.easyops-navbar-alerts
|
|
3
|
+
displayName: WrappedNavEasyopsNavbarAlerts
|
|
4
|
+
description: 导航栏告警提示组件,用于显示 License 到期提醒和页面性能问题警告。
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# nav.easyops-navbar-alerts
|
|
10
|
+
|
|
11
|
+
> 导航栏告警提示组件,用于显示 License 到期提醒和页面性能问题警告。
|
|
12
|
+
|
|
13
|
+
此构件为内部构件(@insider),主要在导航栏中使用,自动检测 License 剩余天数(不足 15 天时显示提示)和页面渲染性能问题,无需传入任何属性。
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
### Basic
|
|
18
|
+
|
|
19
|
+
在导航栏中嵌入告警提示组件,自动展示 License 到期和性能问题告警。
|
|
20
|
+
|
|
21
|
+
```yaml preview
|
|
22
|
+
brick: nav.easyops-navbar-alerts
|
|
23
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: nav.easyops-navbar-alerts
|
|
3
|
+
displayName: WrappedNavEasyopsNavbarAlerts
|
|
4
|
+
description: 导航栏告警提示组件,用于显示 License 到期提醒和页面性能问题警告。
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedNavEasyopsNavbarAlerts
|
|
10
|
+
|
|
11
|
+
> 导航栏告警提示组件,用于显示 License 到期提醒和页面性能问题警告。
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedNavEasyopsNavbarAlerts } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
此构件为内部构件(@insider),主要在导航栏中使用,自动检测 License 剩余天数(不足 15 天时显示提示)和页面渲染性能问题,无需传入任何属性。
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### Basic
|
|
24
|
+
|
|
25
|
+
在导航栏中嵌入告警提示组件,自动展示 License 到期和性能问题告警。
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<WrappedNavEasyopsNavbarAlerts />
|
|
29
|
+
```
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-app-bar-wrapper
|
|
3
|
+
displayName: WrappedEoAppBarWrapper
|
|
4
|
+
description: 应用顶部容器
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# eo-app-bar-wrapper
|
|
10
|
+
|
|
11
|
+
> 应用顶部容器
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ----------------------- | ---------------------------------- | ---- | --------- | ------------------------------------------------------------ |
|
|
17
|
+
| isFixed | `boolean \| undefined` | 否 | `true` | 是否固定定位。已废弃,使用 `position` 属性代替 |
|
|
18
|
+
| position | `"static" \| "fixed" \| undefined` | 否 | `"fixed"` | 设置定位方式:静态定位或固定定位。设置时优先级高于 `isFixed` |
|
|
19
|
+
| displayCenter | `boolean \| undefined` | 否 | `false` | 居中显示 |
|
|
20
|
+
| extraAppBarContentStyle | `React.CSSProperties \| undefined` | 否 | — | 自定义样式 |
|
|
21
|
+
|
|
22
|
+
## Slots
|
|
23
|
+
|
|
24
|
+
| 名称 | 说明 |
|
|
25
|
+
| ----- | ---------- |
|
|
26
|
+
| left | 左侧内容区 |
|
|
27
|
+
| right | 右侧内容区 |
|
|
2
28
|
|
|
3
29
|
## Examples
|
|
4
30
|
|
|
5
31
|
### Basic
|
|
6
32
|
|
|
33
|
+
展示基础的顶部容器,左右区域分别放置内容。
|
|
34
|
+
|
|
7
35
|
```yaml preview
|
|
8
36
|
- brick: eo-app-bar-wrapper
|
|
9
37
|
properties:
|
|
@@ -25,6 +53,8 @@
|
|
|
25
53
|
|
|
26
54
|
### DisplayCenter
|
|
27
55
|
|
|
56
|
+
将内容区域居中对齐显示。
|
|
57
|
+
|
|
28
58
|
```yaml preview
|
|
29
59
|
- brick: eo-app-bar-wrapper
|
|
30
60
|
properties:
|
|
@@ -44,3 +74,29 @@
|
|
|
44
74
|
textContent: Right Content
|
|
45
75
|
type: bricks
|
|
46
76
|
```
|
|
77
|
+
|
|
78
|
+
### Custom Style
|
|
79
|
+
|
|
80
|
+
通过 extraAppBarContentStyle 自定义内容区域样式。
|
|
81
|
+
|
|
82
|
+
```yaml preview
|
|
83
|
+
- brick: eo-app-bar-wrapper
|
|
84
|
+
properties:
|
|
85
|
+
position: static
|
|
86
|
+
extraAppBarContentStyle:
|
|
87
|
+
background: "#f5f5f5"
|
|
88
|
+
padding: 8px 16px
|
|
89
|
+
slots:
|
|
90
|
+
left:
|
|
91
|
+
bricks:
|
|
92
|
+
- brick: div
|
|
93
|
+
properties:
|
|
94
|
+
textContent: Left Content
|
|
95
|
+
type: bricks
|
|
96
|
+
right:
|
|
97
|
+
bricks:
|
|
98
|
+
- brick: div
|
|
99
|
+
properties:
|
|
100
|
+
textContent: Right Content
|
|
101
|
+
type: bricks
|
|
102
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-app-bar-wrapper
|
|
3
|
+
displayName: WrappedEoAppBarWrapper
|
|
4
|
+
description: 应用顶部容器
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedEoAppBarWrapper
|
|
10
|
+
|
|
11
|
+
> 应用顶部容器
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedEoAppBarWrapper } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| ----------------------- | ---------------------------------- | ---- | --------- | ------------------------------------------------------------ |
|
|
23
|
+
| isFixed | `boolean \| undefined` | 否 | `true` | 是否固定定位。已废弃,使用 `position` 属性代替 |
|
|
24
|
+
| position | `"static" \| "fixed" \| undefined` | 否 | `"fixed"` | 设置定位方式:静态定位或固定定位。设置时优先级高于 `isFixed` |
|
|
25
|
+
| displayCenter | `boolean \| undefined` | 否 | `false` | 居中显示 |
|
|
26
|
+
| extraAppBarContentStyle | `React.CSSProperties \| undefined` | 否 | — | 自定义样式 |
|
|
27
|
+
|
|
28
|
+
## Slots
|
|
29
|
+
|
|
30
|
+
| 名称 | 说明 |
|
|
31
|
+
| ----- | ---------- |
|
|
32
|
+
| left | 左侧内容区 |
|
|
33
|
+
| right | 右侧内容区 |
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### Basic
|
|
38
|
+
|
|
39
|
+
展示基础的顶部容器,左右区域分别放置内容。
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<WrappedEoAppBarWrapper position="static">
|
|
43
|
+
<div slot="left">Left Content</div>
|
|
44
|
+
<div slot="right">Right Content</div>
|
|
45
|
+
</WrappedEoAppBarWrapper>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### DisplayCenter
|
|
49
|
+
|
|
50
|
+
将内容区域居中对齐显示。
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<WrappedEoAppBarWrapper position="static" displayCenter={true}>
|
|
54
|
+
<div slot="left">Left Content</div>
|
|
55
|
+
<div slot="right">Right Content</div>
|
|
56
|
+
</WrappedEoAppBarWrapper>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Custom Style
|
|
60
|
+
|
|
61
|
+
通过 extraAppBarContentStyle 自定义内容区域样式。
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<WrappedEoAppBarWrapper
|
|
65
|
+
position="static"
|
|
66
|
+
extraAppBarContentStyle={{ background: "#f5f5f5", padding: "8px 16px" }}
|
|
67
|
+
>
|
|
68
|
+
<div slot="left">Left Content</div>
|
|
69
|
+
<div slot="right">Right Content</div>
|
|
70
|
+
</WrappedEoAppBarWrapper>
|
|
71
|
+
```
|
|
@@ -1,9 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-directory-tree-internal-node
|
|
3
|
+
displayName: WrappedEoDirectoryTreeInternalNode
|
|
4
|
+
description: 目录树中间节点
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# eo-directory-tree-internal-node
|
|
10
|
+
|
|
11
|
+
> 目录树中间节点
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| ---------- | ------------------------------- | ---- | ------ | ---------------- |
|
|
17
|
+
| depth | `number` | 是 | `0` | 深度 |
|
|
18
|
+
| expanded | `boolean \| undefined` | 否 | — | 是否展开 |
|
|
19
|
+
| selectable | `boolean \| undefined` | 否 | — | 可选择 |
|
|
20
|
+
| selected | `boolean \| undefined` | 否 | — | 是否选中 |
|
|
21
|
+
| icon | `GeneralIconProps \| undefined` | 否 | — | 节点图标 |
|
|
22
|
+
| faded | `boolean \| undefined` | 否 | — | 节点是否淡化显示 |
|
|
23
|
+
|
|
24
|
+
## Events
|
|
25
|
+
|
|
26
|
+
| 事件 | detail | 说明 |
|
|
27
|
+
| ------ | --------------------------------------------------------- | ------------------- |
|
|
28
|
+
| expand | `boolean` — 展开后的状态(true 表示展开,false 表示收起) | 节点展开/收起时触发 |
|
|
29
|
+
| select | `void` | 节点被选中时触发 |
|
|
30
|
+
|
|
31
|
+
## Slots
|
|
32
|
+
|
|
33
|
+
| 名称 | 说明 |
|
|
34
|
+
| -------- | ------------ |
|
|
35
|
+
| label | 节点标签内容 |
|
|
36
|
+
| suffix | 节点后缀内容 |
|
|
37
|
+
| (默认) | 子节点内容 |
|
|
2
38
|
|
|
3
39
|
## Examples
|
|
4
40
|
|
|
5
41
|
### Basic
|
|
6
42
|
|
|
43
|
+
展示包含标签和后缀内容的可展开目录树节点。
|
|
44
|
+
|
|
7
45
|
```yaml preview
|
|
8
46
|
brick: eo-directory-tree-internal-node
|
|
9
47
|
events:
|
|
@@ -49,6 +87,8 @@ children:
|
|
|
49
87
|
|
|
50
88
|
### Selectable
|
|
51
89
|
|
|
90
|
+
展示节点可选中的目录树节点,支持独立点击展开和选中。
|
|
91
|
+
|
|
52
92
|
```yaml preview
|
|
53
93
|
brick: eo-directory-tree-internal-node
|
|
54
94
|
events:
|
|
@@ -96,3 +136,34 @@ children:
|
|
|
96
136
|
properties:
|
|
97
137
|
textContent: 第二层级-3
|
|
98
138
|
```
|
|
139
|
+
|
|
140
|
+
### With Icon
|
|
141
|
+
|
|
142
|
+
展示带有节点图标的目录树中间节点,以及 faded 淡化状态效果。
|
|
143
|
+
|
|
144
|
+
```yaml preview
|
|
145
|
+
brick: eo-directory-tree-internal-node
|
|
146
|
+
properties:
|
|
147
|
+
style:
|
|
148
|
+
width: 200px
|
|
149
|
+
icon:
|
|
150
|
+
lib: antd
|
|
151
|
+
icon: folder
|
|
152
|
+
theme: outlined
|
|
153
|
+
expanded: true
|
|
154
|
+
selected: true
|
|
155
|
+
faded: false
|
|
156
|
+
children:
|
|
157
|
+
- brick: span
|
|
158
|
+
slot: label
|
|
159
|
+
properties:
|
|
160
|
+
textContent: 文件夹节点
|
|
161
|
+
- brick: eo-directory-tree-leaf
|
|
162
|
+
properties:
|
|
163
|
+
depth: 1
|
|
164
|
+
faded: true
|
|
165
|
+
children:
|
|
166
|
+
- brick: span
|
|
167
|
+
properties:
|
|
168
|
+
textContent: 子文件1(淡化)
|
|
169
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-directory-tree-internal-node
|
|
3
|
+
displayName: WrappedEoDirectoryTreeInternalNode
|
|
4
|
+
description: 目录树中间节点
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# WrappedEoDirectoryTreeInternalNode
|
|
10
|
+
|
|
11
|
+
> 目录树中间节点
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { WrappedEoDirectoryTreeInternalNode } from "@easyops/wrapped-components";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
22
|
+
| ---------- | ------------------------------- | ---- | ------ | ---------------- |
|
|
23
|
+
| depth | `number` | 是 | `0` | 深度 |
|
|
24
|
+
| expanded | `boolean \| undefined` | 否 | — | 是否展开 |
|
|
25
|
+
| selectable | `boolean \| undefined` | 否 | — | 可选择 |
|
|
26
|
+
| selected | `boolean \| undefined` | 否 | — | 是否选中 |
|
|
27
|
+
| icon | `GeneralIconProps \| undefined` | 否 | — | 节点图标 |
|
|
28
|
+
| faded | `boolean \| undefined` | 否 | — | 节点是否淡化显示 |
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
|
|
32
|
+
| 事件 | detail | 说明 |
|
|
33
|
+
| -------- | --------------------------------------------------------- | ------------------- |
|
|
34
|
+
| onExpand | `boolean` — 展开后的状态(true 表示展开,false 表示收起) | 节点展开/收起时触发 |
|
|
35
|
+
| onSelect | `void` | 节点被选中时触发 |
|
|
36
|
+
|
|
37
|
+
## Slots
|
|
38
|
+
|
|
39
|
+
| 名称 | 说明 |
|
|
40
|
+
| -------- | ------------ |
|
|
41
|
+
| label | 节点标签内容 |
|
|
42
|
+
| suffix | 节点后缀内容 |
|
|
43
|
+
| (默认) | 子节点内容 |
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
### Basic
|
|
48
|
+
|
|
49
|
+
展示包含标签和后缀内容的可展开目录树节点。
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<WrappedEoDirectoryTreeInternalNode
|
|
53
|
+
style={{ width: 200 }}
|
|
54
|
+
onExpand={(e) => console.log(e.detail)}
|
|
55
|
+
>
|
|
56
|
+
<span slot="label">第一层级</span>
|
|
57
|
+
<WrappedEoTag slot="suffix" color="red">
|
|
58
|
+
suffixBrick
|
|
59
|
+
</WrappedEoTag>
|
|
60
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
61
|
+
<span>第二层级-1</span>
|
|
62
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
63
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
64
|
+
<span>第二层级-2</span>
|
|
65
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
66
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
67
|
+
<span>第二层级-3</span>
|
|
68
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
69
|
+
</WrappedEoDirectoryTreeInternalNode>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Selectable
|
|
73
|
+
|
|
74
|
+
展示节点可选中的目录树节点,支持独立点击展开和选中。
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
<WrappedEoDirectoryTreeInternalNode
|
|
78
|
+
style={{ width: 200 }}
|
|
79
|
+
selectable={true}
|
|
80
|
+
onExpand={(e) => console.log(e.detail)}
|
|
81
|
+
onSelect={(e) => console.log(e.detail)}
|
|
82
|
+
>
|
|
83
|
+
<span slot="label">第一层级</span>
|
|
84
|
+
<WrappedEoTag slot="suffix" color="red">
|
|
85
|
+
suffixBrick
|
|
86
|
+
</WrappedEoTag>
|
|
87
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
88
|
+
<span>第二层级-1</span>
|
|
89
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
90
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
91
|
+
<span>第二层级-2</span>
|
|
92
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
93
|
+
<WrappedEoDirectoryTreeLeaf depth={1}>
|
|
94
|
+
<span>第二层级-3</span>
|
|
95
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
96
|
+
</WrappedEoDirectoryTreeInternalNode>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### With Icon
|
|
100
|
+
|
|
101
|
+
展示带有节点图标的目录树中间节点,以及 faded 淡化状态效果。
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
<WrappedEoDirectoryTreeInternalNode
|
|
105
|
+
style={{ width: 200 }}
|
|
106
|
+
icon={{ lib: "antd", icon: "folder", theme: "outlined" }}
|
|
107
|
+
expanded={true}
|
|
108
|
+
selected={true}
|
|
109
|
+
faded={false}
|
|
110
|
+
>
|
|
111
|
+
<span slot="label">文件夹节点</span>
|
|
112
|
+
<WrappedEoDirectoryTreeLeaf depth={1} faded={true}>
|
|
113
|
+
<span>子文件1(淡化)</span>
|
|
114
|
+
</WrappedEoDirectoryTreeLeaf>
|
|
115
|
+
</WrappedEoDirectoryTreeInternalNode>
|
|
116
|
+
```
|
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
tagName: eo-directory-tree-leaf
|
|
3
|
+
displayName: WrappedEoDirectoryTreeLeaf
|
|
4
|
+
description: 目录树叶子节点
|
|
5
|
+
category: ""
|
|
6
|
+
source: "@next-bricks/nav"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# eo-directory-tree-leaf
|
|
10
|
+
|
|
11
|
+
> 目录树叶子节点
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
| 属性 | 类型 | 必填 | 默认值 | 说明 |
|
|
16
|
+
| -------- | ------------------------------- | ---- | ------ | ---------------- |
|
|
17
|
+
| depth | `number` | 是 | `0` | 深度 |
|
|
18
|
+
| selected | `boolean \| undefined` | 否 | — | 是否选中 |
|
|
19
|
+
| icon | `GeneralIconProps \| undefined` | 否 | — | 节点图标 |
|
|
20
|
+
| faded | `boolean \| undefined` | 否 | — | 节点是否淡化显示 |
|
|
21
|
+
|
|
22
|
+
## Events
|
|
23
|
+
|
|
24
|
+
| 事件 | detail | 说明 |
|
|
25
|
+
| ------ | ------ | ---------------- |
|
|
26
|
+
| select | `void` | 节点被选中时触发 |
|
|
27
|
+
|
|
28
|
+
## Slots
|
|
29
|
+
|
|
30
|
+
| 名称 | 说明 |
|
|
31
|
+
| -------- | ------------ |
|
|
32
|
+
| (默认) | 节点标签内容 |
|
|
33
|
+
| suffix | 节点后缀内容 |
|
|
2
34
|
|
|
3
35
|
## Examples
|
|
4
36
|
|
|
5
37
|
### Basic
|
|
6
38
|
|
|
39
|
+
展示基础叶子节点,包含标签和后缀内容,点击可触发选择事件。
|
|
40
|
+
|
|
7
41
|
```yaml preview
|
|
8
42
|
brick: eo-directory-tree-leaf
|
|
9
43
|
events:
|
|
@@ -22,3 +56,50 @@ children:
|
|
|
22
56
|
textContent: suffixBrick
|
|
23
57
|
color: red
|
|
24
58
|
```
|
|
59
|
+
|
|
60
|
+
### With Icon
|
|
61
|
+
|
|
62
|
+
展示带有节点图标的叶子节点。
|
|
63
|
+
|
|
64
|
+
```yaml preview
|
|
65
|
+
brick: eo-directory-tree-leaf
|
|
66
|
+
events:
|
|
67
|
+
select:
|
|
68
|
+
- action: console.log
|
|
69
|
+
args:
|
|
70
|
+
- <% EVENT.detail %>
|
|
71
|
+
properties:
|
|
72
|
+
style:
|
|
73
|
+
width: 200px
|
|
74
|
+
icon:
|
|
75
|
+
lib: antd
|
|
76
|
+
icon: file
|
|
77
|
+
theme: outlined
|
|
78
|
+
selected: true
|
|
79
|
+
children:
|
|
80
|
+
- brick: span
|
|
81
|
+
properties:
|
|
82
|
+
textContent: 文件节点
|
|
83
|
+
- brick: eo-tag
|
|
84
|
+
slot: suffix
|
|
85
|
+
properties:
|
|
86
|
+
textContent: 已选中
|
|
87
|
+
color: green
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Faded State
|
|
91
|
+
|
|
92
|
+
展示淡化显示的叶子节点,用于表示禁用或不可用状态。
|
|
93
|
+
|
|
94
|
+
```yaml preview
|
|
95
|
+
brick: eo-directory-tree-leaf
|
|
96
|
+
properties:
|
|
97
|
+
style:
|
|
98
|
+
width: 200px
|
|
99
|
+
faded: true
|
|
100
|
+
depth: 0
|
|
101
|
+
children:
|
|
102
|
+
- brick: span
|
|
103
|
+
properties:
|
|
104
|
+
textContent: 淡化节点
|
|
105
|
+
```
|