fix(vc-tree-select): `showSearch=false` is invalid #4119 (#4125)

* fix(vc-tree-select): `showSearch=false` is invalid #4119

* style: remove debugger

* style: update

* refactor: update
pull/4171/head
John 2021-06-07 14:22:46 +08:00 committed by GitHub
parent f091582e03
commit b91659e4f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,6 @@ const TreeSelect = defineComponent({
props: initDefaultProps(TreeSelectProps(), {
transitionName: 'slide-up',
choiceTransitionName: '',
showSearch: false,
}),
setup() {
return {

View File

@ -21,6 +21,7 @@ const SearchInput = {
needAlign: PropTypes.looseBool,
ariaId: PropTypes.string,
isMultiple: PropTypes.looseBool.def(true),
showSearch: PropTypes.looseBool,
},
emits: ['mirrorSearchValueChange'],
setup(props, { emit }) {
@ -126,6 +127,7 @@ const SearchInput = {
open,
ariaId,
isMultiple,
showSearch,
} = this.$props;
const {
vcTreeSelect: { onSearchInputKeyDown },
@ -146,6 +148,7 @@ const SearchInput = {
onKeydown={onSearchInputKeyDown}
value={searchValue}
disabled={disabled}
readonly={!showSearch}
class={`${prefixCls}-selection-search-input`}
aria-label="filter select"
aria-autocomplete="list"