From 1a73d5bdc9d2c4ea8ce058df916e278f5d6e22d6 Mon Sep 17 00:00:00 2001 From: Tyh2001 <1469442737@qq.com> Date: Thu, 4 Jan 2024 16:36:48 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_hooks/use-button/index.ts | 8 +++--- .../_hooks/use-message-work/index.ts | 6 ++-- packages/fighting-design/alert/src/alert.vue | 4 +-- packages/fighting-design/aside/src/aside.vue | 4 +-- .../avatar-group/src/avatar-group.vue | 4 +-- .../fighting-design/avatar/src/avatar.vue | 10 +++---- .../fighting-design/back-top/src/back-top.vue | 4 +-- packages/fighting-design/badge/src/badge.vue | 4 +-- packages/fighting-design/box/src/box.vue | 4 +-- .../breadcrumb-item/src/breadcrumb-item.vue | 4 +-- .../fighting-design/button/src/button.vue | 14 +++++----- .../fighting-design/calendar/src/calendar.vue | 4 +-- packages/fighting-design/card/src/card.vue | 4 +-- .../checkbox-group/src/checkbox-group.vue | 4 +-- .../close-btn/src/close-btn.vue | 6 ++-- .../date-picker/src/date-picker.vue | 8 +++--- .../fighting-design/dialog/src/dialog.vue | 4 +-- .../fighting-design/divider/src/divider.vue | 11 ++------ .../fighting-design/drawer/src/drawer.vue | 4 +-- .../fighting-design/dropdown/src/dropdown.vue | 8 +++--- packages/fighting-design/empty/src/empty.vue | 4 +-- .../expand-card/src/expand-card.vue | 4 +-- .../fighting-design/footer/src/footer.vue | 4 +-- .../form-item/src/form-item.vue | 4 +-- .../fighting-design/header/src/header.vue | 4 +-- packages/fighting-design/image/src/image.vue | 10 +++---- .../input-number/src/input-number.vue | 26 ++++++++--------- packages/fighting-design/input/src/input.vue | 28 ++++++++----------- packages/fighting-design/link/src/link.vue | 8 +++--- .../list-item/src/list-item.vue | 4 +-- packages/fighting-design/list/src/list.vue | 4 +-- .../fighting-design/loading/src/loading.vue | 6 ++-- packages/fighting-design/main/src/main.vue | 4 +-- .../menu-item/src/menu-item.vue | 4 +-- .../fighting-design/message/src/message.vue | 4 +-- .../pagination/src/pagination.vue | 21 +++----------- .../progress/components/line/index.vue | 6 ++-- .../radio-group/src/radio-group.vue | 4 +-- packages/fighting-design/radio/src/radio.vue | 9 +----- packages/fighting-design/rate/src/rate.vue | 2 +- .../fighting-design/ripple/src/ripple.vue | 4 +-- .../fighting-design/select/src/select.vue | 16 +++++------ .../fighting-design/skeleton/src/skeleton.vue | 4 +-- .../fighting-design/slider/src/slider.vue | 4 +-- packages/fighting-design/space/src/space.vue | 4 +-- .../sticky-card/src/sticky-card.vue | 4 +-- .../fighting-design/svg-icon/src/svg-icon.vue | 10 ++----- packages/fighting-design/swap/src/swap.vue | 2 +- .../fighting-design/switch/src/switch.vue | 4 +-- packages/fighting-design/table/src/table.vue | 4 +-- packages/fighting-design/tabs/src/tabs.vue | 4 +-- packages/fighting-design/tag/src/tag.vue | 6 ++-- packages/fighting-design/text/src/text.vue | 4 +-- .../fighting-design/textarea/src/textarea.vue | 16 +++++------ .../time-picker/src/time-picker.vue | 13 +++------ .../toolbar-item/src/toolbar-item.vue | 9 ++---- .../fighting-design/toolbar/src/toolbar.vue | 4 +-- .../fighting-design/tooltip/src/tooltip.vue | 4 +-- .../fighting-design/up-load/src/up-load.vue | 8 +++--- 59 files changed, 177 insertions(+), 226 deletions(-) diff --git a/packages/fighting-design/_hooks/use-button/index.ts b/packages/fighting-design/_hooks/use-button/index.ts index 652d66da93..48414a9edb 100644 --- a/packages/fighting-design/_hooks/use-button/index.ts +++ b/packages/fighting-design/_hooks/use-button/index.ts @@ -11,11 +11,11 @@ import type { ClassList } from '../../_interface' * useButton 返回值类型接口 * * @param { Object } classList 类名列表 - * @param { Object } styleList 样式列表 + * @param { Object } style 样式列表 */ export interface UseButtonReturn { classList: ComputedRef - styleList: ComputedRef + style: ComputedRef } /** @@ -65,7 +65,7 @@ export const useButton = (prop: ButtonProps): UseButtonReturn => { }) /** 样式列表 */ - const styleList = computed((): CSSProperties => { + const style = computed((): CSSProperties => { const { color, fontColor, shadow, fontSize } = prop if (prop.color) { @@ -90,6 +90,6 @@ export const useButton = (prop: ButtonProps): UseButtonReturn => { return { classList, - styleList + style } } diff --git a/packages/fighting-design/_hooks/use-message-work/index.ts b/packages/fighting-design/_hooks/use-message-work/index.ts index ade4e1810b..43ac602412 100644 --- a/packages/fighting-design/_hooks/use-message-work/index.ts +++ b/packages/fighting-design/_hooks/use-message-work/index.ts @@ -6,7 +6,7 @@ import type { ClassList } from '../../_interface' export interface UseMessageWorkReturn { classList: ComputedRef - styleList: ComputedRef + style: ComputedRef visible: Ref isPosition: ComputedRef offsetStyle: ComputedRef @@ -44,7 +44,7 @@ export const useMessageWork = ( const classList = classes(['type', 'placement', 'round'], `f-${name}`) /** 样式列表 */ - const styleList = styles(['color', 'background', 'zIndex'], 'zIndex') + const style = styles(['color', 'background', 'zIndex'], 'zIndex') /** * 判断方位 @@ -120,7 +120,7 @@ export const useMessageWork = ( return { classList, - styleList, + style, visible, isPosition, offsetStyle, diff --git a/packages/fighting-design/alert/src/alert.vue b/packages/fighting-design/alert/src/alert.vue index e06ccbe37c..f625920cd4 100644 --- a/packages/fighting-design/alert/src/alert.vue +++ b/packages/fighting-design/alert/src/alert.vue @@ -27,7 +27,7 @@ ) /** 样式列表 */ - const styleList = styles(['fontSize', 'color', 'background', 'titleSize', 'titleColor']) + const style = styles(['fontSize', 'color', 'background', 'titleSize', 'titleColor']) /** * 点击关闭按钮 @@ -52,7 +52,7 @@