* fix(vc-tree-select): `showSearch=false` is invalid #4119 * style: remove debugger * style: update * refactor: updatepull/4171/head
parent
f091582e03
commit
b91659e4f7
|
@ -26,7 +26,6 @@ const TreeSelect = defineComponent({
|
||||||
props: initDefaultProps(TreeSelectProps(), {
|
props: initDefaultProps(TreeSelectProps(), {
|
||||||
transitionName: 'slide-up',
|
transitionName: 'slide-up',
|
||||||
choiceTransitionName: '',
|
choiceTransitionName: '',
|
||||||
showSearch: false,
|
|
||||||
}),
|
}),
|
||||||
setup() {
|
setup() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -21,6 +21,7 @@ const SearchInput = {
|
||||||
needAlign: PropTypes.looseBool,
|
needAlign: PropTypes.looseBool,
|
||||||
ariaId: PropTypes.string,
|
ariaId: PropTypes.string,
|
||||||
isMultiple: PropTypes.looseBool.def(true),
|
isMultiple: PropTypes.looseBool.def(true),
|
||||||
|
showSearch: PropTypes.looseBool,
|
||||||
},
|
},
|
||||||
emits: ['mirrorSearchValueChange'],
|
emits: ['mirrorSearchValueChange'],
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
@ -126,6 +127,7 @@ const SearchInput = {
|
||||||
open,
|
open,
|
||||||
ariaId,
|
ariaId,
|
||||||
isMultiple,
|
isMultiple,
|
||||||
|
showSearch,
|
||||||
} = this.$props;
|
} = this.$props;
|
||||||
const {
|
const {
|
||||||
vcTreeSelect: { onSearchInputKeyDown },
|
vcTreeSelect: { onSearchInputKeyDown },
|
||||||
|
@ -146,6 +148,7 @@ const SearchInput = {
|
||||||
onKeydown={onSearchInputKeyDown}
|
onKeydown={onSearchInputKeyDown}
|
||||||
value={searchValue}
|
value={searchValue}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
readonly={!showSearch}
|
||||||
class={`${prefixCls}-selection-search-input`}
|
class={`${prefixCls}-selection-search-input`}
|
||||||
aria-label="filter select"
|
aria-label="filter select"
|
||||||
aria-autocomplete="list"
|
aria-autocomplete="list"
|
||||||
|
|
Loading…
Reference in New Issue