Skip to content

Commit

Permalink
fix(amis-editor): 对齐方式配置项和themeCss中的样式配置保持同步
Browse files Browse the repository at this point in the history
  • Loading branch information
wibetter committed Jan 15, 2024
1 parent 1b8bc71 commit 9056a9e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/amis-editor/src/tpl/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ setSchemaTpl(
}
);

// 居中显示
// 对齐方式
setSchemaTpl(
'layout:margin-center',
(config?: {
Expand Down Expand Up @@ -1172,6 +1172,16 @@ setSchemaTpl(
value: 'auto 0px auto auto'
}
],
pipeIn: config?.pipeIn
? config?.pipeIn
: (value: any, data: any) => {
let themeCssValue =
data.data?.themeCss?.baseControlClassName?.[
'padding-and-margin:default'
]?.margin;
return value || themeCssValue;
},
pipeOut: config?.pipeOut,
onChange: (value: string, oldValue: string, model: any, form: any) => {
if (
form?.data?.style?.position === 'fixed' ||
Expand Down

0 comments on commit 9056a9e

Please sign in to comment.