Skip to content

Commit 12e30aa

Browse files
authored
feat(form:transfer): add oneWay (#1896)
1 parent 04fe9f3 commit 12e30aa

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

packages/form/widgets/transfer/index.en-US.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Non-built-in modules need to additionally register `withTransferWidget` in [json
3737
| `[searchPlaceholder]` | Placeholder of search box | `string` | - |
3838
| `[notFoundContent]` | Text to display when a column is empty | `string` | - |
3939
| `[canMove]` | Second verification when transfer choice box | `function` | - |
40-
| `[change]` | Callback function when the transfer between columns is complete | `(options: TransferChange) => void` | - |
41-
| `[searchChange]` | Callback function when search field is changed | `(options: TransferSearchChange) => void` | - |
42-
| `[selectChange]` | Callback function when selected items are changed | `(options: TransferSelectChange) => void` | - |
40+
| `[oneWay]` | Display as single direction | `boolean` | `false` |
41+
| `(change)` | Callback function when the transfer between columns is complete | `(options: TransferChange) => void` | - |
42+
| `(searchChange)` | Callback function when search field is changed | `(options: TransferSearchChange) => void` | - |
43+
| `(selectChange)` | Callback function when selected items are changed | `(options: TransferSelectChange) => void` | - |

packages/form/widgets/transfer/index.zh-CN.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type: Non-built-in widgets
3737
| `[searchPlaceholder]` | 搜索框的默认值 | `string` | - |
3838
| `[notFoundContent]` | 当列表为空时显示的内容 | `string` | - |
3939
| `[canMove]` | 穿梭时二次校验。 | `function` | - |
40-
| `[change]` | 选项在两栏之间转移时的回调函数 | `(options: TransferChange) => void` | - |
41-
| `[searchChange]` | 搜索框内容时改变时的回调函数 | `(options: TransferSearchChange) => void` | - |
42-
| `[selectChange]` | 选中项发生改变时的回调函数 | `(options: TransferSelectChange) => void` | - |
40+
| `[oneWay]` | 展示为单向样式 | `boolean` | `false` |
41+
| `(change)` | 选项在两栏之间转移时的回调函数 | `(options: TransferChange) => void` | - |
42+
| `(searchChange)` | 搜索框内容时改变时的回调函数 | `(options: TransferSearchChange) => void` | - |
43+
| `(selectChange)` | 选中项发生改变时的回调函数 | `(options: TransferSelectChange) => void` | - |

packages/form/widgets/transfer/schema.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ export interface SFTransferWidgetSchema extends SFUISchemaItem {
6161
*/
6262
notFoundContent?: string;
6363

64+
/**
65+
* Display as single direction
66+
*
67+
* 展示为单向样式
68+
*/
69+
oneWay?: boolean;
70+
6471
/**
6572
* 穿梭时二次校验
6673
*/

packages/form/widgets/transfer/widget.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import type { SFTransferWidgetSchema } from './schema';
3636
[nzFilterOption]="ui.filterOption"
3737
[nzSearchPlaceholder]="ui.searchPlaceholder"
3838
[nzNotFoundContent]="ui.notFoundContent"
39+
[nzOneWay]="ui.oneWay"
3940
[nzCanMove]="_canMove"
4041
(nzChange)="_change($event)"
4142
(nzSearchChange)="_searchChange($event)"

0 commit comments

Comments
 (0)