mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:29:24 +08:00
fix(amis-editor): flex-setting 改成 flex-layout-setting
This commit is contained in:
parent
4a89b2c387
commit
aeffa830c3
@ -13,22 +13,22 @@ const directionText: any = {
|
||||
'row': ['左对齐', '右对齐', '顶部对齐', '底部对齐'],
|
||||
'column': ['顶部对齐', '底部对齐', '左对齐', '右对齐'],
|
||||
'row-reverse': ['右对齐', '左对齐', '顶部对齐', '底部对齐'],
|
||||
'column-reverse': ['底部对齐', '顶部对齐', '左对齐', '右对齐'],
|
||||
}
|
||||
'column-reverse': ['底部对齐', '顶部对齐', '左对齐', '右对齐']
|
||||
};
|
||||
|
||||
const scaleX: any = {
|
||||
'row': '',
|
||||
'column': 'scaleX-90',
|
||||
'row-reverse': 'scaleX-180',
|
||||
'column-reverse': 'scaleX-270',
|
||||
}
|
||||
'column-reverse': 'scaleX-270'
|
||||
};
|
||||
|
||||
const scaleY: any = {
|
||||
'row': '',
|
||||
'column': 'scaleX-270',
|
||||
'row-reverse': '',
|
||||
'column-reverse': 'scaleX-270',
|
||||
}
|
||||
'column-reverse': 'scaleX-270'
|
||||
};
|
||||
|
||||
interface FlexSettingControlProps extends FormControlProps {
|
||||
onChange: (value: PlainObject) => void;
|
||||
@ -116,7 +116,7 @@ const getFlexItem = (props: FlexSettingControlProps) => {
|
||||
iconClassName: scaleY[curDirection]
|
||||
},
|
||||
{
|
||||
label: directionText[curDirection][3],
|
||||
label: directionText[curDirection][3],
|
||||
value: 'flex-end',
|
||||
icon: 'aFlexEnd',
|
||||
iconClassName: scaleY[curDirection]
|
||||
@ -197,6 +197,6 @@ export default class FlexSettingControl extends React.Component<FlexSettingContr
|
||||
}
|
||||
|
||||
@FormItem({
|
||||
type: 'flex-setting'
|
||||
type: 'flex-layout-setting'
|
||||
})
|
||||
export class FlexSettingControlRenderer extends FlexSettingControl {}
|
||||
|
@ -1483,7 +1483,7 @@ setSchemaTpl(
|
||||
alignItems?: string;
|
||||
}) => {
|
||||
return {
|
||||
type: 'flex-setting',
|
||||
type: 'flex-layout-setting',
|
||||
name: config?.name || 'style',
|
||||
mode: 'vertical', // horizontal、vertical
|
||||
label: config?.label ?? false,
|
||||
|
Loading…
Reference in New Issue
Block a user