File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
packages/pro/search/src/composables Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -120,20 +120,21 @@ export function useSegmentStates(
120120 const key = props . searchItem ! . key
121121 const validateRes = validateSearchState ( key )
122122
123+ const valueName = searchDataTypes . find ( name => ! ! segmentStates . value [ name ] )
124+ const searchValue = convertStateToValue ( key )
125+ const _segmentStates = segmentStates . value
126+
123127 if ( ! validateRes ) {
124128 removeSearchState ( key )
125129 } else {
126130 updateSearchValues ( )
127131 }
128132
129- const valueName = searchDataTypes . find ( name => ! ! segmentStates . value [ name ] )
130- const searchValue = convertStateToValue ( key )
131-
132133 callEmit ( proSearchProps . onItemConfirm , {
133134 ...( searchValue ?? { } ) ,
134135 nameInput : searchValue ?. name ?? '' ,
135- operatorInput : segmentStates . value . operator ?. input ,
136- valueInput : valueName && segmentStates . value [ valueName ] ?. input ,
136+ operatorInput : _segmentStates . operator ?. input ,
137+ valueInput : valueName && _segmentStates [ valueName ] ?. input ,
137138 removed : ! validateRes ,
138139 } )
139140
You can’t perform that action at this time.
0 commit comments