Skip to content

Commit

Permalink
fix(Select): 修复多选数据回显后,删除一个数据,会把所有数据都删除的问题 (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyan95 authored Mar 27, 2024
1 parent 0f8bb19 commit db83658
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/devui-vue/devui/select/src/use-select.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref, computed, Ref, inject, watch } from 'vue';
import { ref, computed, Ref, inject, watch, onMounted, nextTick } from 'vue';
import type { SetupContext } from 'vue';
import { SelectProps, OptionObjectItem, UseSelectReturnType } from './select-types';
import { className, KeyType } from './utils';
Expand Down Expand Up @@ -362,6 +362,10 @@ export default function useSelect(
{ flush: 'post' }
);

onMounted(() => {
nextTick(updateInjectOptionsStatus);
});

return {
selectDisabled,
selectSize,
Expand Down
2 changes: 1 addition & 1 deletion packages/devui-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-devui",
"version": "1.6.4-markdown.1",
"version": "1.6.4-select.0",
"license": "MIT",
"description": "DevUI components based on Vite and Vue3",
"keywords": [
Expand Down

0 comments on commit db83658

Please sign in to comment.