From ccc2b674db34dc02cce9831dc821e282ec1db41d Mon Sep 17 00:00:00 2001 From: tnt group Date: Mon, 26 Feb 2024 10:40:44 +0800 Subject: [PATCH] fix(components): supplement the `NaiveUI` type --- src/components/advanced/table-header-operation.vue | 2 +- src/typings/naive-ui.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/advanced/table-header-operation.vue b/src/components/advanced/table-header-operation.vue index f773e8f0..f27554fe 100644 --- a/src/components/advanced/table-header-operation.vue +++ b/src/components/advanced/table-header-operation.vue @@ -6,7 +6,7 @@ defineOptions({ }); interface Props { - itemAlign?: 'stretch' | 'baseline' | 'start' | 'end' | 'center' | 'flex-end' | 'flex-start'; + itemAlign?: NaiveUI.Align; disabledDelete?: boolean; loading?: boolean; } diff --git a/src/typings/naive-ui.d.ts b/src/typings/naive-ui.d.ts index 1c6a2908..a3301ae9 100644 --- a/src/typings/naive-ui.d.ts +++ b/src/typings/naive-ui.d.ts @@ -1,3 +1,4 @@ declare namespace NaiveUI { type ThemeColor = 'default' | 'error' | 'primary' | 'info' | 'success' | 'warning'; + type Align = 'stretch' | 'baseline' | 'start' | 'end' | 'center' | 'flex-end' | 'flex-start'; }