Skip to content

Commit 30ce798

Browse files
committed
fix(settings): fix settings dataSource locales
1 parent 3838e44 commit 30ce798

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

packages/playground/src/main.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,25 @@ GlobalRegistry.registerDesignerProps({
4545
'x-decorator': 'FormItem',
4646
'x-component': 'Input',
4747
},
48-
'style.width': {
48+
49+
hidden: {
4950
type: 'string',
5051
'x-decorator': 'FormItem',
51-
'x-component': 'SizeInput',
52+
'x-component': 'Switch',
5253
},
53-
'style.height': {
54-
type: 'string',
54+
default: {
5555
'x-decorator': 'FormItem',
56-
'x-component': 'SizeInput',
56+
'x-component': 'ValueInput',
5757
},
58-
hidden: {
58+
'style.width': {
5959
type: 'string',
6060
'x-decorator': 'FormItem',
61-
'x-component': 'Switch',
61+
'x-component': 'SizeInput',
6262
},
63-
default: {
63+
'style.height': {
64+
type: 'string',
6465
'x-decorator': 'FormItem',
65-
'x-component': 'ValueInput',
66+
'x-component': 'SizeInput',
6667
},
6768
'style.display': {
6869
'x-component': 'DisplayStyleSetter',

packages/react-settings-form/src/effects/useLocales.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const useLocales = () => {
3535
field.dataSource = field.dataSource.map((item, index) => {
3636
return {
3737
...item,
38-
label: item.label || locales.dataSource[index],
38+
label: locales.dataSource[index] || item.label,
3939
}
4040
})
4141
}

0 commit comments

Comments
 (0)