From 3b30e36ba7d5d0e8784021118817ca2c8ff557c8 Mon Sep 17 00:00:00 2001 From: WANJIN Date: Fri, 24 Mar 2023 19:19:58 +0900 Subject: [PATCH] fix(dynamic field more type): do not inherit css to children (#341) --- .../dynamic-field/PDynamicField.stories.mdx | 41 +++++++++++++++---- .../dynamic-field/templates/more/index.vue | 7 +++- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/src/data-display/dynamic/dynamic-field/PDynamicField.stories.mdx b/src/data-display/dynamic/dynamic-field/PDynamicField.stories.mdx index 5b05ea0ba..0559f6a58 100644 --- a/src/data-display/dynamic/dynamic-field/PDynamicField.stories.mdx +++ b/src/data-display/dynamic/dynamic-field/PDynamicField.stories.mdx @@ -533,7 +533,17 @@ interface MoreOptions extends CommonOptions { components: { PDynamicField }, template: `
- +

+

field type: more > layout: popup > layout: item

+ +

+
+ `, + setup() { + return { + rawOptions: { sub_key: 'info', layout: { type: 'popup', @@ -545,12 +555,29 @@ interface MoreOptions extends CommonOptions { } }, postfix: '(Jung)' - }" :data="{ id: 'j', name: 'sulmo', info: { weight: '83.5 kg', height: '179.3cm' } }" - :type-options="{ displayKey: 'name' }" - > -

- - `, + }, + itemOptions: { + layout: { + type: 'popup', + options: { + layout: { + type: 'items', + options: { + fields: [ + { key: 'id', label: 'ID', type: 'text' }, + { key: 'name', label: 'Name', type: 'text' }, + { key: 'info', label: 'Info', type: 'dict' } + ] + } + } + } + }, + postfix: '(Jung)' + }, + data: { id: 'j', name: 'sulmo', info: { weight: '83.5 kg', height: '179.3cm' } }, + typeOptions: { displayKey: 'name' } + } + } }} diff --git a/src/data-display/dynamic/dynamic-field/templates/more/index.vue b/src/data-display/dynamic/dynamic-field/templates/more/index.vue index da3f7d843..24c381b1d 100644 --- a/src/data-display/dynamic/dynamic-field/templates/more/index.vue +++ b/src/data-display/dynamic/dynamic-field/templates/more/index.vue @@ -1,6 +1,7 @@