mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [button] space is not added (#6361)
This commit is contained in:
@@ -77,8 +77,8 @@ const shouldAddSpace = computed(() => {
|
||||
if (autoInsertSpace.value && defaultSlot?.length === 1) {
|
||||
const slot = defaultSlot[0]
|
||||
if (slot?.type === Text) {
|
||||
const text = slot.children
|
||||
return /^\p{Unified_Ideograph}{2}$/u.test(text as string)
|
||||
const text = slot.children as string
|
||||
return /^\p{Unified_Ideograph}{2}$/u.test(text.trim())
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user