Use NSpace itemStyle set lineHeight

This commit is contained in:
raojinlin 2024-02-26 12:13:06 +08:00
parent 2ec3c73271
commit 1f1e735d48
1 changed files with 9 additions and 6 deletions

View File

@ -93,7 +93,14 @@ watchEffect(() => {
const renderTypeLabel = (option) => {
return h(
NSpace,
{ align: 'center', inline: true, size: 3 },
{
align: 'center',
inline: true,
size: 3,
itemStyle: {
lineHeight: 'var(--n-blank-height)',
},
},
{
default: () => [
h('div', {
@ -105,11 +112,7 @@ const renderTypeLabel = (option) => {
border: '2px solid white',
},
}),
h('div', {
style: {
'line-height': 'var(--n-blank-height)',
}
}, option.value),
option.value,
],
},
)