Skip to content

Commit

Permalink
fix: [cli] 左侧菜单导航更新 数据展示 =\> 展示
Browse files Browse the repository at this point in the history
  • Loading branch information
haohao_peng authored and albyben committed Jun 17, 2024
1 parent 92d64d1 commit 9d497e0
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 28 deletions.
2 changes: 1 addition & 1 deletion COMPONENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ KDesign 组件库采用的测试框架是 `jest-enzyme`, [文档地址](https://
### 4. 组件demo说明
模板的 `index.md` 是组件的文档说明。下面是对文档字段的一些说明
- type: 组件的归类
- 目前组件分为基础、布局、导航、表单、数据展示、反馈、筛选7个类别。模板默认归类到 `基础`,大家根据要求进行调整。
- 目前组件分为基础、布局、导航、表单、展示、反馈、筛选7个类别。模板默认归类到 `基础`,大家根据要求进行调整。
- order: 组件在归类列表中的排列顺序
- 目前此字段已经废弃,排列顺序会自动按照组件英文名首字母进行排序
- title: 组件的英文名
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
subtitle: 头像
title: Avatar
order: 0
Expand Down
2 changes: 1 addition & 1 deletion components/badge/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
title: Badge
subtitle: 徽标数
order: 1
Expand Down
2 changes: 1 addition & 1 deletion components/card/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 2
title: Card
subtitle: 卡片
Expand Down
2 changes: 1 addition & 1 deletion components/carousel/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
category: Components
order: 4
type: 数据展示
type: 展示
title: Carousel
subtitle: 走马灯
---
Expand Down
2 changes: 1 addition & 1 deletion components/collapse/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 3
title: Collapse
subtitle: 折叠面板
Expand Down
2 changes: 1 addition & 1 deletion components/drawer/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 5
title: Drawer
subtitle: 抽屉
Expand Down
2 changes: 1 addition & 1 deletion components/image-cropper/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 1
title: ImageCropper
subtitle: 图片裁剪
Expand Down
2 changes: 1 addition & 1 deletion components/image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
category: Components
subtitle: 图片
order: 6
type: 数据展示
type: 展示
title: Image
---

Expand Down
2 changes: 1 addition & 1 deletion components/split-panel/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 8
title: SplitPanel
subtitle: 分割容器
Expand Down
24 changes: 9 additions & 15 deletions components/table/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 11
title: Table
subtitle: 表格
Expand Down Expand Up @@ -288,38 +288,32 @@ interface columnSize { [key: string]: number } interface ChangedColumnSize { cod
属性`rangeSelection`为`{}`或设置`TableRangeSelection`时表体内部可范围选中表格
```ts
interface TableRangeSelection { /** 范围选中回调函数 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ rangeSelectedChange?(params: any): void; /** 是否阻止 keydown 的默认行为 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ preventkDefaultOfKeyDownEvent?: boolean; }
interface TableRangeSelection { /** 范围选中回调函数 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ rangeSelectedChange?(params: any): void; /** 是否阻止 keydown 的默认行为 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ preventkDefaultOfKeyDownEvent?: boolean; }
```

### 组件替换
属性`components`可替换表格内部的一些子组件,如:加载动画图标、数据为空的展现效果。

```ts
interface Components { /** 表格加载时的加载图标 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ LoadingIcon?: React.ComponentType; /** 数据为空时,表格的展示内容。 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ EmptyContent?: React.ComponentType; }
interface Components { /** 表格加载时的加载图标 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ LoadingIcon?: React.ComponentType; /** 数据为空时,表格的展示内容。 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \*/ EmptyContent?: React.ComponentType; }
```

### rowDrag
属性`rowDrag``{}`或设置`TableRowDrag`时可以开启表格拖拽功能
```ts
interface TableRowDrag {

/** 拖拽开始事件 */
onDragStart?:(event:RowDragEvent) => void,
/\*_ 拖拽开始事件 _/ onDragStart?:(event:RowDragEvent) => void,

/** 拖拽移动事件 */
onDragMove?:(event:RowDragEvent) => void,
/\*_ 拖拽移动事件 _/ onDragMove?:(event:RowDragEvent) => void,

/** 拖拽结束事件 */
onDragEnd?:(event:RowDragEvent) => void,
/\*_ 拖拽结束事件 _/ onDragEnd?:(event:RowDragEvent) => void,

/** 判断一行是否要禁用拖拽 */
isDisabled?:(row: any, rowIndex: number) => boolean,
/\*_ 判断一行是否要禁用拖拽 _/ isDisabled?:(row: any, rowIndex: number) => boolean,

/** 拖拽列定义 */
rowDragColumn?: ArtColumn,
/\*_ 拖拽列定义 _/ rowDragColumn?: ArtColumn,

/** 行高 */
rowHeight?: number
/\*_ 行高 _/ rowHeight?: number

}
```
2 changes: 1 addition & 1 deletion components/tag/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 4
title: Tag
subtitle: 标签
Expand Down
2 changes: 1 addition & 1 deletion components/timeline/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
category: Components
type: 数据展示
type: 展示
order: 9
title: Timeline
subtitle: 时间轴
Expand Down
2 changes: 1 addition & 1 deletion site/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const typeOrder: Record<string, number> = {
布局: 1,
导航: 2,
表单: 3,
数据展示: 4,
展示: 4,
反馈: 5,
筛选: 6,
}

0 comments on commit 9d497e0

Please sign in to comment.