8888 v-if =" isShowMultipleInput()"
8989 ref =" inputRef"
9090 v-model =" pattern"
91- :style =" inputStyle"
91+ :style =" { ... inputStyle, paddingLeft: labels.length ? '4px' : 0 } "
9292 :multiple =" multiple"
9393 @focus =" handleFocus"
9494 @blur =" handleRootBlur"
@@ -216,7 +216,6 @@ export default defineComponent({
216216 const focusColor = computed (() => props .focusColor )
217217 const isEmptyModelValue = computed (() => isEmpty (props .modelValue ))
218218 const cursor = computed (() => (props .disabled || props .readonly ? ' ' : ' pointer' ))
219- const offsetY = ref (0 )
220219 const { bindForm, form } = useForm ()
221220 const { length, options, bindOptions } = useOptions ()
222221 const { label, labels, computeLabel, getSelectedValue } = useSelectController ({
@@ -236,6 +235,20 @@ export default defineComponent({
236235 const disabled = computed (() => form ?.disabled .value || props .disabled )
237236 const menuEl = ref <HTMLElement | null >(null )
238237 const menuRef = ref <InstanceType <typeof VarMenu > | null >(null )
238+
239+ let _offsetY = 0
240+
241+ const offsetY = computed ({
242+ get() {
243+ // adaptive to the 1px line of standard variant when filterable is true
244+ return _offsetY + (props .filterable && props .variant === ' standard' ? 1 : 0 )
245+ },
246+
247+ set(v ) {
248+ _offsetY = v
249+ },
250+ })
251+
239252 const placement = computed (() => (props .variant === ' outlined' || props .filterable ? ' bottom' : ' cover-top' ))
240253 const placeholderColor = computed (() => {
241254 const { hint, blurColor, focusColor } = props
0 commit comments