File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,14 @@ const usePanels = () => {
37
37
const field = collapseField . query ( collapseField . address . concat ( name ) ) . take ( )
38
38
if ( field ?. display === 'none' || field ?. display === 'hidden' ) return
39
39
if ( schema [ 'x-component' ] ?. indexOf ( 'CollapsePanel' ) > - 1 ) {
40
+ const key =
41
+ field ?. componentProps ?. key || schema ?. [ 'x-component-props' ] ?. key || name
40
42
panels . push ( {
41
43
name,
42
44
props : {
43
45
...schema ?. [ 'x-component-props' ] ,
44
- key : schema ?. [ 'x-component-props' ] ?. key || name ,
46
+ ...field ?. componentProps ,
47
+ key,
45
48
} ,
46
49
schema,
47
50
} )
Original file line number Diff line number Diff line change @@ -43,11 +43,14 @@ const useTabs = () => {
43
43
const field = tabsField . query ( tabsField . address . concat ( name ) ) . take ( )
44
44
if ( field ?. display === 'none' || field ?. display === 'hidden' ) return
45
45
if ( schema [ 'x-component' ] ?. indexOf ( 'TabPane' ) > - 1 ) {
46
+ const key =
47
+ field ?. componentProps ?. key || schema ?. [ 'x-component-props' ] ?. key || name
46
48
tabs . push ( {
47
49
name,
48
50
props : {
49
- key : schema ?. [ 'x-component-props' ] ?. key || name ,
50
51
...schema ?. [ 'x-component-props' ] ,
52
+ ...field ?. componentProps ,
53
+ key,
51
54
} ,
52
55
schema,
53
56
} )
You can’t perform that action at this time.
0 commit comments