From 608162613ca90fb5ea30d51a410ef3576326c185 Mon Sep 17 00:00:00 2001 From: Tyh2001 <1469442737@qq.com> Date: Mon, 8 May 2023 08:51:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ .../fighting-design/_hooks/use-global/index.ts | 2 +- .../time-picker/src/time-picker.vue | 14 +++++++------- packages/fighting-design/trigger/src/trigger.vue | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a474f93c38..027387fe10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ 中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md) +## 0.36.0 (2023-05-08) + **优化** - 优化 `f-trigger` 和 `f-dropdown` 样式细节 diff --git a/packages/fighting-design/_hooks/use-global/index.ts b/packages/fighting-design/_hooks/use-global/index.ts index caec5bb197..99963e1115 100644 --- a/packages/fighting-design/_hooks/use-global/index.ts +++ b/packages/fighting-design/_hooks/use-global/index.ts @@ -44,7 +44,7 @@ export interface UseGlobalReturn { * @param { Object } prop 组件的 prop * @returns { Object } 根据优先级返回需要的参数 */ -export const useGlobal = (prop?: UseGlobalProp): UseGlobalReturn => { +export const useGlobal = (prop?: Partial): UseGlobalReturn => { /** 获取全局配置组件注入的依赖项 */ const global: FightingGlobalProps | null = inject(FIGHTING_GLOBAL_PROPS_KEY, null) diff --git a/packages/fighting-design/time-picker/src/time-picker.vue b/packages/fighting-design/time-picker/src/time-picker.vue index de9e93490f..6451e262ee 100644 --- a/packages/fighting-design/time-picker/src/time-picker.vue +++ b/packages/fighting-design/time-picker/src/time-picker.vue @@ -46,7 +46,7 @@ * * @param { boolean | 'now' } [target = true] 点击的是否为确定 */ - const onConfirm = (target: boolean | 'now' = true): void => { + const onConfirm = (evt: MouseEvent, target: boolean | 'now' = true): void => { /** * 如果为真说明点击的是确定按钮 * @@ -74,7 +74,7 @@ * 如果非布尔值类型,咋代表点击的是当前时间,则不需要关闭 */ if (isBoolean(target)) { - ;(triggerInstance.value as TriggerInstance).handelClose() + (triggerInstance.value as TriggerInstance).handelClose(evt) } } @@ -220,11 +220,11 @@
- 当前 - 取消 - 确定 + 当前 + 取消 + + 确定 +
diff --git a/packages/fighting-design/trigger/src/trigger.vue b/packages/fighting-design/trigger/src/trigger.vue index 1c0b91481f..b0b8f02456 100644 --- a/packages/fighting-design/trigger/src/trigger.vue +++ b/packages/fighting-design/trigger/src/trigger.vue @@ -31,7 +31,7 @@ }) /** 向外导出关闭方法 */ - defineExpose({ visible }) + defineExpose({ handelClose })