Skip to content

Commit

Permalink
feat(tree-select): adds arrow slot, closes #3084
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni committed Jun 10, 2022
1 parent 38a9a8d commit 9bd1fdc
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## NEXT_VERSION

### Feats

- `n-tree-select` adds `arrow` slot, closes [#3084](https://github.com/TuSimple/naive-ui/issues/3084).

## 2.30.3

### Fixes
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## NEXT_VERSION

### Feats

- `n-tree-select` 新增 `arrow` slot,关闭 [#3084](https://github.com/TuSimple/naive-ui/issues/3084)

## 2.30.3

### Fixes
Expand Down
9 changes: 5 additions & 4 deletions src/tree-select/demos/enUS/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ debug.vue

### TreeSelect Slots

| Name | Parameters | Description | Version |
| ------ | ---------- | -------------------------------------- | ------- |
| action | `()` | Options menu slot. | 2.22.0 |
| empty | `()` | Empty state slot for the options menu. | 2.22.0 |
| Name | Parameters | Description | Version |
| ------ | ---------- | -------------------------------------- | ------------ |
| action | `()` | Options menu slot. | 2.22.0 |
| arrow | `()` | Arrow icon of trigger. | NEXT_VERSION |
| empty | `()` | Empty state slot for the options menu. | 2.22.0 |
9 changes: 5 additions & 4 deletions src/tree-select/demos/zhCN/index.demo-entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ field-search-debug.vue

### TreeSelect Slots

| 名称 | 参数 | 说明 | 版本 |
| ------ | ---- | ------------------- | ------ |
| action | `()` | 菜单操作区域的 slot | 2.22.0 |
| empty | `()` | 菜单无数据时的 slot | 2.22.0 |
| 名称 | 参数 | 说明 | 版本 |
| ------ | ---- | ------------------- | ------------ |
| action | `()` | 菜单操作区域的 slot | 2.22.0 |
| arrow | `()` | 选择箭头 slot | NEXT_VERSION |
| empty | `()` | 菜单无数据时的 slot | 2.22.0 |
6 changes: 5 additions & 1 deletion src/tree-select/src/TreeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,11 @@ export default defineComponent({
onDeleteOption={this.handleDeleteOption}
onKeydown={this.handleKeydown}
onKeyup={this.handleKeyup}
/>
>
{{
arrow: () => [this.$slots.arrow?.()]
}}
</NInternalSelection>
)
}}
</VTarget>,
Expand Down

0 comments on commit 9bd1fdc

Please sign in to comment.