Skip to content

Commit

Permalink
Merge branch 'main' into find/tree-json
Browse files Browse the repository at this point in the history
  • Loading branch information
pointhalo authored Dec 12, 2024
2 parents f366098 + aacf173 commit 2d0c5d0
Show file tree
Hide file tree
Showing 944 changed files with 16,318 additions and 6,652 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ module.exports = {
"space-infix-ops": ["error", { "int32Hint": false }],
'space-before-blocks': ['error', 'always'],
"space-infix-ops": "error",
'@typescript-eslint/prefer-as-const': 'off',
'@typescript-eslint/no-namespace': 'off',
"@typescript-eslint/type-annotation-spacing": ['error', {"after": true}],
"@typescript-eslint/member-delimiter-style": [
"error",
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/banner/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 78
order: 80
category: Feedback
title: Banner
subTitle: Banner
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/banner/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 78
order: 80
category: 反馈类
title: Banner 通知横幅
icon: doc-banner
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/notification/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 79
order: 81
category: Feedback
title: Notification
subTitle: Notification
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/notification/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 79
order: 81
category: 反馈类
title: Notification 通知
icon: doc-notification
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/popconfirm/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 80
order: 82
category: Feedback
title: Popconfirm
subTitle: Popconfirm
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/popconfirm/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 80
order: 82
category: 反馈类
title: Popconfirm 气泡确认框
icon: doc-popconfirm
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/progress/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 81
order: 83
category: Feedback
title: Progress
subTitle: Progress
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/progress/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 81
order: 83
category: 反馈类
title: Progress 进度条
icon: doc-progress
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/skeleton/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 82
order: 84
category: Feedback
title: Skeleton
subTitle: Skeleton
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/skeleton/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 82
order: 84
category: 反馈类
title: Skeleton 骨架屏
icon: doc-skeleton
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/spin/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 83
order: 85
category: Feedback
title: Spin
subTitle: Spin
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/spin/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 83
order: 85
category: 反馈类
title: Spin 加载器
icon: doc-spin
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/toast/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 84
order: 86
category: Feedback
title: Toast
subTitle: Toast
Expand Down
2 changes: 1 addition & 1 deletion content/feedback/toast/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 84
order: 86
category: 反馈类
title: Toast 提示
icon: doc-toast
Expand Down
2 changes: 1 addition & 1 deletion content/input/autocomplete/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 28
order: 30
category: Input
title: AutoComplete
icon: doc-autocomplete
Expand Down
2 changes: 1 addition & 1 deletion content/input/autocomplete/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 28
order: 30
category: 输入类
title: AutoComplete 自动完成
icon: doc-autocomplete
Expand Down
60 changes: 59 additions & 1 deletion content/input/cascader/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 29
order: 31
category: Input
title: Cascader
subTitle: Cascade
Expand Down Expand Up @@ -1537,6 +1537,63 @@ import { Cascader } from '@douyinfe/semi-ui';
};
```
### Checked RelationShip
Version: >= 2.71.0
In multiple, `checkRelation` can be used to set the type of node selection relationship, optional: 'related' (default), 'unRelated'. When the selection relationship is 'unRelated', it means that selections between nodes do not affect each other.
```jsx live=true
import React from 'react';
import { Cascader } from '@douyinfe/semi-ui';
() => {
const treeData = [
{
label: 'Asia',
value: 'Asia',
key: '0',
children: [
{
label: 'China',
value: 'China',
key: '0-0',
children: [
{
label: 'Beijing',
value: 'Beijing',
key: '0-0-0',
},
{
label: 'Shanghai',
value: 'Shanghai',
key: '0-0-1',
},
],
},
],
},
{
label: 'North America',
value: 'North America',
key: '1',
}
];

return (
<Cascader
multiple
defaultValue={[
['Asia'],
['Asia', 'China', 'Beijing']
]}
checkRelation='unRelated'
style={{ width: 300 }}
treeData={treeData}
/>
);
};
```
### Dynamic Update of Data
```jsx live=true
Expand Down Expand Up @@ -1895,6 +1952,7 @@ function Demo() {
| borderless | borderless mode >=2.33.0 | boolean | |
| bottomSlot | bottom slot | ReactNode | - | 1.27.0 |
| changeOnSelect | Toggle whether non-leaf nodes are selectable | boolean | false | - |
| checkRelation | In multiple, the relationship between the checked states of the nodes, optional: 'related'、'unRelated'. | string | 'related' | v2.71.0 |
| className | ClassName | string | - | - |
| clearIcon | Can be used to customize the clear button, valid when showClear is true | ReactNode | - | 2.25.0 |
| defaultOpen | Set whether to open the dropDown by default | boolean | false | - |
Expand Down
53 changes: 52 additions & 1 deletion content/input/cascader/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 29
order: 31
category: 输入类
title: Cascader 级联选择
icon: doc-cascader
Expand Down Expand Up @@ -1516,6 +1516,56 @@ import { Cascader } from '@douyinfe/semi-ui';
};
```

### 节点选中关系

版本:>= 2.71.0

多选时,可以使用 `checkRelation` 来设置节点之间选中关系的类型,可选:'related'(默认)、'unRelated'。当选中关系为 'unRelated' 时,意味着节点之间的选中互不影响。

```jsx live=true
import React from 'react';
import { Cascader } from '@douyinfe/semi-ui';
() => {
const treeData = [
{
label: '亚洲',
value: 'Asia',
children: [
{
label: '中国',
value: 'China',
children: [
{
label: '北京',
value: 'Beijing',
},
{
label: '上海',
value: 'Shanghai',
},
],
},
],
},
{
label: '北美洲',
value: 'North America',
}
];
return (
<Cascader
multiple
defaultValue={[
['Asia'],
['Asia', 'China', 'Beijing']
]}
checkRelation='unRelated'
style={{ width: 300 }}
treeData={treeData}
/>
);
};
```

### 动态更新数据

Expand Down Expand Up @@ -1872,6 +1922,7 @@ function Demo() {
| bottomSlot | 底部插槽 | ReactNode | - | 1.27.0 |
| borderless | 无边框模式 >=2.33.0 | boolean | |
| changeOnSelect | 是否允许选择非叶子节点 | boolean | false | - |
| checkRelation | 多选时,节点之间选中状态的关系,可选:'related'、'unRelated'。 | string | 'related' | v2.71.0 |
| className | 选择框的 className 属性 | string | - | - |
| clearIcon | 可用于自定义清除按钮, showClear为true时有效 | ReactNode | - | 2.25.0 |
| defaultOpen | 设置是否默认打开下拉菜单 | boolean | false | - |
Expand Down
2 changes: 1 addition & 1 deletion content/input/checkbox/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 30
order: 32
category: Input
title: Checkbox
subTitle: Checkbox
Expand Down
2 changes: 1 addition & 1 deletion content/input/checkbox/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 30
order: 32
category: 输入类
title: Checkbox 复选框
icon: doc-checkbox
Expand Down
2 changes: 1 addition & 1 deletion content/input/colorpicker/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 31
order: 33
category: Input
title: ColorPicker
icon: doc-colorPlatteNew
Expand Down
2 changes: 1 addition & 1 deletion content/input/colorpicker/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 31
order: 33
category: 输入类
title: ColorPicker 颜色选择器
icon: doc-colorPlatteNew
Expand Down
5 changes: 3 additions & 2 deletions content/input/datepicker/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 32
order: 34
category: Input
title: DatePicker
subTitle: Date Selector
Expand Down Expand Up @@ -965,7 +965,8 @@ function Demo() {
const ref = useRef();
// Typescript
// const ref = useRef<BaseDatePicker>();
// Why not import the DatePicker exported by the entry? -> The entry component is a forwardRef component, and the ref is transparently passed to this component
// Why not import the DatePicker exported by the entry?
// The entry component is a forwardRef component, and the ref is transparently passed to this component

const handleClickOutside = () => {
console.log('click outside');
Expand Down
2 changes: 1 addition & 1 deletion content/input/datepicker/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 32
order: 34
category: 输入类
title: DatePicker 日期选择器
icon: doc-datepicker
Expand Down
2 changes: 1 addition & 1 deletion content/input/form/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 33
order: 35
category: Input
title: Form
subTitle: Form
Expand Down
2 changes: 1 addition & 1 deletion content/input/form/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 33
order: 35
category: 输入类
title: Form 表单
icon: doc-form
Expand Down
2 changes: 1 addition & 1 deletion content/input/input/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 34
order: 36
category: Input
title: Input
subTitle: Input
Expand Down
2 changes: 1 addition & 1 deletion content/input/input/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 34
order: 36
category: 输入类
title: Input 输入框
icon: doc-input
Expand Down
2 changes: 1 addition & 1 deletion content/input/inputnumber/index-en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: en-US
order: 35
order: 37
category: Input
title: InputNumber
subTitle: InputNumber
Expand Down
2 changes: 1 addition & 1 deletion content/input/inputnumber/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
localeCode: zh-CN
order: 35
order: 37
category: 输入类
title: InputNumber 数字输入框
icon: doc-inputnumber
Expand Down
Loading

0 comments on commit 2d0c5d0

Please sign in to comment.