From d4be481ec85194fae2818bfa1d63ad7db9c054a9 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 10 May 2024 12:47:23 +0300 Subject: [PATCH] Fixed #5719 - Fieldset: #legend updates --- components/lib/fieldset/Fieldset.d.ts | 9 +++- components/lib/fieldset/Fieldset.vue | 43 +++++++++---------- .../lib/fieldset/style/FieldsetStyle.js | 9 +++- doc/common/apidoc/index.json | 22 ++++++---- 4 files changed, 49 insertions(+), 34 deletions(-) diff --git a/components/lib/fieldset/Fieldset.d.ts b/components/lib/fieldset/Fieldset.d.ts index 2c065f47f..c0c6f6d62 100755 --- a/components/lib/fieldset/Fieldset.d.ts +++ b/components/lib/fieldset/Fieldset.d.ts @@ -177,8 +177,15 @@ export interface FieldsetSlots { default: () => VNode[]; /** * Custom legend template. + * @param {Object} scope - legend slot's params. */ - legend: () => VNode[]; + legend(scope: { + /** + * Toggle function. + * @param {Event} event - Browser event + */ + toggleCallback: (event: Event) => void; + }): VNode[]; /** * @deprecated since v4.0. Use the 'toggleicon' slot instead. * Custom toggler icon template. diff --git a/components/lib/fieldset/Fieldset.vue b/components/lib/fieldset/Fieldset.vue index 6ba4164a5..424116e8b 100755 --- a/components/lib/fieldset/Fieldset.vue +++ b/components/lib/fieldset/Fieldset.vue @@ -1,30 +1,27 @@