fix(components): [input] class bind error corresponding to dynamic slot (#17194)

This commit is contained in:
btea 2024-06-15 12:40:06 +08:00 committed by GitHub
parent a80ea63700
commit 39ac0b5a0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,13 @@
<template>
<div
v-bind="containerAttrs"
:class="containerKls"
:class="[
containerKls,
{
[nsInput.bm('group', 'append')]: $slots.append,
[nsInput.bm('group', 'prepend')]: $slots.prepend,
},
]"
:style="containerStyle"
:role="containerRole"
@mouseenter="handleMouseEnter"
@ -216,8 +222,6 @@ const containerKls = computed(() => [
nsInput.is('exceed', inputExceed.value),
{
[nsInput.b('group')]: slots.prepend || slots.append,
[nsInput.bm('group', 'append')]: slots.append,
[nsInput.bm('group', 'prepend')]: slots.prepend,
[nsInput.m('prefix')]: slots.prefix || props.prefixIcon,
[nsInput.m('suffix')]:
slots.suffix || props.suffixIcon || props.clearable || props.showPassword,