@infinilabs/ui-web-cli 0.0.3 → 0.0.5
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-zh_CN.md +71 -0
- package/README.md +16 -0
- package/dist/webCli.cjs +146 -420
- package/dist/webCli.iife.js +158 -432
- package/dist/webCli.js +32082 -76056
- package/dist/webCli.umd.cjs +158 -432
- package/package.json +1 -1
package/README-zh_CN.md
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<h1 align="center">UI-WEB-CLI</h1>
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
自定义 WEB-CLI 组件
|
|
6
|
+
|
|
7
|
+
## 截图
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm i @infinilabs/ui-web-cli
|
|
13
|
+
|
|
14
|
+
# or
|
|
15
|
+
cnpm i @infinilabs/ui-web-cli
|
|
16
|
+
|
|
17
|
+
# or
|
|
18
|
+
yarn add @infinilabs/ui-web-cli
|
|
19
|
+
|
|
20
|
+
# or
|
|
21
|
+
pnpm add @infinilabs/ui-web-cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 使用示例
|
|
25
|
+
|
|
26
|
+
```jsx
|
|
27
|
+
// ...
|
|
28
|
+
import ConsoleUI from "@infinilabs/ui-web-cli";
|
|
29
|
+
//...
|
|
30
|
+
|
|
31
|
+
//...
|
|
32
|
+
return (
|
|
33
|
+
<ConsoleUI
|
|
34
|
+
{...props}
|
|
35
|
+
minimize={true}
|
|
36
|
+
resizeable={true}
|
|
37
|
+
DataSourceSelector={ClusterSelect}
|
|
38
|
+
newTabClick={newTabClick}
|
|
39
|
+
renderTabBarItemIcon={(props) => {
|
|
40
|
+
return (
|
|
41
|
+
<SearchEngineIcon
|
|
42
|
+
distribution={props.cluster.distribution}
|
|
43
|
+
width="14px"
|
|
44
|
+
height="14px"
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}}
|
|
48
|
+
tabData={localState}
|
|
49
|
+
addTab={addTab}
|
|
50
|
+
updateTabData={updateTabData}
|
|
51
|
+
sendRequestToES={sendRequestToES}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
//...
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 参数
|
|
58
|
+
|
|
59
|
+
| Property | Description | Type | Default | Version |
|
|
60
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------- | ------- |
|
|
61
|
+
| minimize | 组件是否可以缩小 | boolean | false | 1.0.0 |
|
|
62
|
+
| resizeable | 组件是否可以调整大小 | boolean | false | 1.0.0 |
|
|
63
|
+
| height | 组件高度 | string | "50vh" | 1.0.0 |
|
|
64
|
+
| DataSourceSelector | 数据源组件 | DOM | - | 1.0.0 |
|
|
65
|
+
| tabData | 数据 | object | {activeKey: "", panes: []} | 1.0.0 |
|
|
66
|
+
| renderTabBarItemIcon | 标题组件的 Icon | DOM | - | 1.0.0 |
|
|
67
|
+
| addTab | 增加 tab 数据的方法 | function | - | 1.0.0 |
|
|
68
|
+
| onMinimizeClick | 组件缩小按钮点击事件 | function | - | 1.0.0 |
|
|
69
|
+
| newTabClick | 组件新增数据源按钮点击事件 | function | - | 1.0.0 |
|
|
70
|
+
| updateTabData | 组件更新 tabData 数据方法 | function | - | 1.0.0 |
|
|
71
|
+
| sendRequestToES | 组件点击执行按钮的事件 | function | - | 1.0.0 |
|
package/README.md
CHANGED
|
@@ -56,3 +56,19 @@ return (
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## Props
|
|
59
|
+
|
|
60
|
+
Here’s the English translation of the table:
|
|
61
|
+
|
|
62
|
+
| Property | Description | Type | Default | Version |
|
|
63
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------- | ------- |
|
|
64
|
+
| minimize | Whether the component can be minimized | boolean | false | 1.0.0 |
|
|
65
|
+
| resizeable | Whether the component can be resized | boolean | false | 1.0.0 |
|
|
66
|
+
| height | Component height | string | "50vh" | 1.0.0 |
|
|
67
|
+
| DataSourceSelector | Data source component | DOM | - | 1.0.0 |
|
|
68
|
+
| tabData | Data for the component | object | {activeKey: "", panes: []} | 1.0.0 |
|
|
69
|
+
| renderTabBarItemIcon | Icon for the tab title component | DOM | - | 1.0.0 |
|
|
70
|
+
| addTab | Method to add tab data | function | - | 1.0.0 |
|
|
71
|
+
| onMinimizeClick | Event handler for minimize button click | function | - | 1.0.0 |
|
|
72
|
+
| newTabClick | Event handler for adding a new data source | function | - | 1.0.0 |
|
|
73
|
+
| updateTabData | Method to update the `tabData` | function | - | 1.0.0 |
|
|
74
|
+
| sendRequestToES | Event handler for the execute button click | function | - | 1.0.0 |
|