mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
form组件外观调整
This commit is contained in:
parent
84121a20a8
commit
a6d6a68ad1
@ -1086,7 +1086,7 @@ export class FormPlugin extends BasePlugin {
|
||||
title: '外观',
|
||||
body: getSchemaTpl('collapseGroup', [
|
||||
{
|
||||
title: '布局',
|
||||
title: '基本',
|
||||
body: [
|
||||
getSchemaTpl('formItemMode', {
|
||||
isForm: true,
|
||||
@ -1117,12 +1117,7 @@ export class FormPlugin extends BasePlugin {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
body: [
|
||||
getSchemaTpl('switch', {
|
||||
name: 'wrapWithPanel',
|
||||
label: tipedLabel(
|
||||
@ -1141,11 +1136,6 @@ export class FormPlugin extends BasePlugin {
|
||||
})
|
||||
]
|
||||
},
|
||||
...getSchemaTpl('theme:common', {
|
||||
classname: 'formControlClassName',
|
||||
baseTitle: 'form样式',
|
||||
exclude: ['layout'],
|
||||
extra: [
|
||||
getSchemaTpl('theme:base', {
|
||||
classname: 'panelControlClassName',
|
||||
title: 'Panel样式',
|
||||
@ -1165,9 +1155,21 @@ export class FormPlugin extends BasePlugin {
|
||||
classname: 'actionsControlClassName',
|
||||
title: '操作区样式',
|
||||
visibleOn: isWrapped
|
||||
})
|
||||
]
|
||||
}),
|
||||
getSchemaTpl('theme:base', {
|
||||
classname: 'formControlClassName',
|
||||
title: '表单样式',
|
||||
hiddenOn: isWrapped
|
||||
}),
|
||||
{
|
||||
title: '自定义样式',
|
||||
body: [
|
||||
{
|
||||
type: 'theme-cssCode',
|
||||
label: false
|
||||
}
|
||||
]
|
||||
},
|
||||
/** */
|
||||
getSchemaTpl('style:classNames', {
|
||||
isFormItem: false,
|
||||
|
@ -118,7 +118,8 @@ setSchemaTpl(
|
||||
body: [
|
||||
getSchemaTpl('leftFixed'),
|
||||
getSchemaTpl('leftRate'),
|
||||
getSchemaTpl('labelAlign')
|
||||
getSchemaTpl('labelAlign'),
|
||||
{}
|
||||
]
|
||||
})
|
||||
];
|
||||
|
@ -591,6 +591,7 @@ setSchemaTpl(
|
||||
classname?: string;
|
||||
title?: string;
|
||||
hiddenOn?: string;
|
||||
visibleOn?: string;
|
||||
hidePaddingAndMargin?: boolean;
|
||||
}) => {
|
||||
const {
|
||||
@ -599,6 +600,7 @@ setSchemaTpl(
|
||||
classname = 'baseControlClassName',
|
||||
title = '基本样式',
|
||||
hiddenOn,
|
||||
visibleOn,
|
||||
hidePaddingAndMargin
|
||||
} = option;
|
||||
const curHidePaddingAndMargin = hidePaddingAndMargin ?? false;
|
||||
@ -614,11 +616,6 @@ setSchemaTpl(
|
||||
name: `themeCss.${classname}.radius:${state}`,
|
||||
state
|
||||
}),
|
||||
getSchemaTpl('theme:paddingAndMargin', {
|
||||
visibleOn: visibleOn,
|
||||
name: `themeCss.${classname}.padding-and-margin:${state}`,
|
||||
state
|
||||
}),
|
||||
!curHidePaddingAndMargin
|
||||
? getSchemaTpl('theme:paddingAndMargin', {
|
||||
visibleOn: visibleOn,
|
||||
@ -690,7 +687,8 @@ setSchemaTpl(
|
||||
title,
|
||||
collapsed,
|
||||
body: styles,
|
||||
hiddenOn
|
||||
hiddenOn,
|
||||
visibleOn
|
||||
};
|
||||
}
|
||||
);
|
||||
|
@ -282,7 +282,7 @@ export class ParseThemeData {
|
||||
|
||||
// 解析组件通用方法
|
||||
parseComponentCommon(component: any) {
|
||||
if (component.token) {
|
||||
if (component.token && component.body) {
|
||||
// 有token时结束递归
|
||||
const token = component.token;
|
||||
for (let key in component.body) {
|
||||
|
@ -9,6 +9,7 @@ $ns: cxd-;
|
||||
padding: 0 px2rem(8px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
.ThemeSelectContent-theme {
|
||||
background-color: #f7f8fa;
|
||||
border-radius: 2px;
|
||||
|
@ -378,7 +378,7 @@
|
||||
.#{$ns}NumberControl-single-unit {
|
||||
cursor: default;
|
||||
text-align: center;
|
||||
min-width: unset;
|
||||
min-width: unset !important;
|
||||
padding: 0 var(--inputNumber-base-default-unit-paddingLeft);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user