@@ -438,6 +438,7 @@ export default defineComponent({
438
438
439
439
// KeyDown
440
440
const onInternalKeyDown : KeyboardEventHandler = ( event , ...rest ) => {
441
+ event . preventDefault ( ) ;
441
442
const clearLock = getClearLock ( ) ;
442
443
const { which } = event ;
443
444
@@ -809,68 +810,76 @@ export default defineComponent({
809
810
810
811
// >>> Selector
811
812
const selectorNode = (
812
- < SelectTrigger
813
- ref = { triggerRef }
814
- disabled = { disabled }
815
- prefixCls = { prefixCls }
816
- visible = { triggerOpen . value }
817
- popupElement = { optionList }
818
- containerWidth = { containerWidth . value }
819
- animation = { animation }
820
- transitionName = { transitionName }
821
- dropdownStyle = { dropdownStyle }
822
- dropdownClassName = { dropdownClassName }
823
- direction = { direction }
824
- dropdownMatchSelectWidth = { dropdownMatchSelectWidth }
825
- dropdownRender = { dropdownRender }
826
- dropdownAlign = { dropdownAlign }
827
- placement = { placement }
828
- getPopupContainer = { getPopupContainer }
829
- empty = { emptyOptions }
830
- getTriggerDOMNode = { ( ) => selectorDomRef . current }
831
- onPopupVisibleChange = { onTriggerVisibleChange }
832
- onPopupMouseEnter = { onPopupMouseEnter }
833
- onPopupFocusin = { onPopupFocusin }
834
- onPopupFocusout = { onPopupFocusout }
835
- v-slots = { {
836
- default : ( ) => {
837
- return customizeRawInputElement ? (
838
- isValidElement ( customizeRawInputElement ) &&
839
- cloneElement (
840
- customizeRawInputElement ,
841
- {
842
- ref : selectorDomRef ,
843
- } ,
844
- false ,
845
- true ,
846
- )
847
- ) : (
848
- < Selector
849
- { ...props }
850
- domRef = { selectorDomRef }
851
- prefixCls = { prefixCls }
852
- inputElement = { customizeInputElement }
853
- ref = { selectorRef }
854
- id = { id }
855
- showSearch = { mergedShowSearch . value }
856
- mode = { mode }
857
- activeDescendantId = { activeDescendantId }
858
- tagRender = { tagRender }
859
- optionLabelRender = { optionLabelRender }
860
- values = { displayValues }
861
- open = { mergedOpen . value }
862
- onToggleOpen = { onToggleOpen }
863
- activeValue = { activeValue }
864
- searchValue = { mergedSearchValue . value }
865
- onSearch = { onInternalSearch }
866
- onSearchSubmit = { onInternalSearchSubmit }
867
- onRemove = { onSelectorRemove }
868
- tokenWithEnter = { tokenWithEnter . value }
869
- />
870
- ) ;
871
- } ,
872
- } }
873
- > </ SelectTrigger >
813
+ < div
814
+ { ...domProps }
815
+ class = { mergedClassName }
816
+ onMousedown = { onInternalMouseDown }
817
+ onKeydown = { onInternalKeyDown }
818
+ onKeyup = { onInternalKeyUp }
819
+ >
820
+ < SelectTrigger
821
+ ref = { triggerRef }
822
+ disabled = { disabled }
823
+ prefixCls = { prefixCls }
824
+ visible = { triggerOpen . value }
825
+ popupElement = { optionList }
826
+ containerWidth = { containerWidth . value }
827
+ animation = { animation }
828
+ transitionName = { transitionName }
829
+ dropdownStyle = { dropdownStyle }
830
+ dropdownClassName = { dropdownClassName }
831
+ direction = { direction }
832
+ dropdownMatchSelectWidth = { dropdownMatchSelectWidth }
833
+ dropdownRender = { dropdownRender }
834
+ dropdownAlign = { dropdownAlign }
835
+ placement = { placement }
836
+ getPopupContainer = { getPopupContainer }
837
+ empty = { emptyOptions }
838
+ getTriggerDOMNode = { ( ) => selectorDomRef . current }
839
+ onPopupVisibleChange = { onTriggerVisibleChange }
840
+ onPopupMouseEnter = { onPopupMouseEnter }
841
+ onPopupFocusin = { onPopupFocusin }
842
+ onPopupFocusout = { onPopupFocusout }
843
+ v-slots = { {
844
+ default : ( ) => {
845
+ return customizeRawInputElement ? (
846
+ isValidElement ( customizeRawInputElement ) &&
847
+ cloneElement (
848
+ customizeRawInputElement ,
849
+ {
850
+ ref : selectorDomRef ,
851
+ } ,
852
+ false ,
853
+ true ,
854
+ )
855
+ ) : (
856
+ < Selector
857
+ { ...props }
858
+ domRef = { selectorDomRef }
859
+ prefixCls = { prefixCls }
860
+ inputElement = { customizeInputElement }
861
+ ref = { selectorRef }
862
+ id = { id }
863
+ showSearch = { mergedShowSearch . value }
864
+ mode = { mode }
865
+ activeDescendantId = { activeDescendantId }
866
+ tagRender = { tagRender }
867
+ optionLabelRender = { optionLabelRender }
868
+ values = { displayValues }
869
+ open = { mergedOpen . value }
870
+ onToggleOpen = { onToggleOpen }
871
+ activeValue = { activeValue }
872
+ searchValue = { mergedSearchValue . value }
873
+ onSearch = { onInternalSearch }
874
+ onSearchSubmit = { onInternalSearchSubmit }
875
+ onRemove = { onSelectorRemove }
876
+ tokenWithEnter = { tokenWithEnter . value }
877
+ />
878
+ ) ;
879
+ } ,
880
+ } }
881
+ > </ SelectTrigger >
882
+ </ div >
874
883
) ;
875
884
// >>> Render
876
885
let renderNode : VueNode ;
@@ -910,7 +919,6 @@ export default defineComponent({
910
919
</ span >
911
920
) }
912
921
{ selectorNode }
913
-
914
922
{ arrowNode }
915
923
{ clearNode }
916
924
</ div >
0 commit comments