From 1f1e735d48d03e46c0e5eb435e40c154d45d0424 Mon Sep 17 00:00:00 2001 From: raojinlin Date: Mon, 26 Feb 2024 12:13:06 +0800 Subject: [PATCH] Use NSpace itemStyle set lineHeight --- frontend/src/components/dialogs/NewKeyDialog.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/dialogs/NewKeyDialog.vue b/frontend/src/components/dialogs/NewKeyDialog.vue index c08d4c2..0924402 100644 --- a/frontend/src/components/dialogs/NewKeyDialog.vue +++ b/frontend/src/components/dialogs/NewKeyDialog.vue @@ -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, ], }, )