Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Tencent/tdesign-vue into main
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Mar 26, 2022
2 parents 44c9728 + eb23596 commit 42ddaa7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ toc: false
docClass: timeline
---

## 0.38.1 `2022-03-26`
### Features
* SelectInput: 实现 `enter` 事件 [pr #642](https://github.com/Tencent/tdesign-vue/pull/642)[@pengYYYYY](https://github.com/pengYYYYY)

## Bug Fixes
* SelectInput: 修复单选可输入状态下的 focus 时 input value 的错误 [pr #642](https://github.com/Tencent/tdesign-vue/pull/642)[@pengYYYYY](https://github.com/pengYYYYY)

## 0.38.0 `2022-03-25`
### BREAKING CHANGES
* Input/Textarea: Input 外部传入样式挂载至 `t-input__wrap` 层级的 DOM 节点,不再传入到 `t-input` 层级;Textarea 去除 `t-textarea__wrap`[pr #276](https://github.com/Tencent/tdesign-vue/pull/627)[@pengYYYYY](https://github.com/pengYYYYY)
Expand Down
1 change: 1 addition & 0 deletions examples/select-input/demos/collapsed-items.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export default {
.tdesign-demo__panel-options-collapsed-items {
width: 100%;
padding: 4px 0;
display: inline-block;
}
.tdesign-demo__panel-options-collapsed-items .t-checkbox {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions examples/select-input/demos/excess-tags-display-type.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default {
.tdesign-demo__panel-options-excess-tags-display-type {
width: 100%;
padding: 4px 0;
display: inline-block;
}
.tdesign-demo__panel-options-excess-tags-display-type .t-checkbox {
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions examples/select-input/demos/multiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export default {
.tdesign-demo__panel-options-multiple {
width: 100%;
padding: 4px 0;
display: inline-block;
}
.tdesign-demo__panel-options-multiple .t-checkbox {
display: flex;
border-radius: 3px;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-vue",
"purename": "tdesign",
"version": "0.38.0",
"version": "0.38.1",
"description": "tdesign-vue",
"title": "tdesign-vue",
"keywords": [
Expand Down Expand Up @@ -186,4 +186,4 @@
"npm run lint:fix"
]
}
}
}
6 changes: 5 additions & 1 deletion src/select-input/useSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ export default function useSingle(props: TdSelectInputProps, context: SetupConte
onBlur={(val: InputValue, context: { e: MouseEvent }) => {
props.onBlur?.(value.value, { ...context, inputValue: val });
instance.emit('blur', value.value, { ...context, inputValue: val });
inputValue.value = getInputValue(value.value, keys.value);
}}
onEnter={(val: InputValue, context: { e: KeyboardEvent }) => {
props.onEnter?.(value.value, { ...context, inputValue: val });
instance.emit('enter', value.value, { ...context, inputValue: val });
}}
onFocus={(val: InputValue, context: { e: MouseEvent }) => {
props.onFocus?.(value.value, { ...context, inputValue: val });
instance.emit('focus', value.value, { ...context, tagInputValue: val });
!popupVisible && setInputValue(getInputValue(value.value, keys.value), { ...context, trigger: 'input' }); // 聚焦时拿到value
}}
/>
);
Expand Down

0 comments on commit 42ddaa7

Please sign in to comment.