mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
fix(amis-editor): x轴和y轴滚动模式改为默认超出显示
This commit is contained in:
parent
94dc726cad
commit
d2b4f89acc
@ -204,34 +204,30 @@ export class ContainerPlugin extends LayoutBasePlugin {
|
|||||||
// 自由容器不需要 display 相关配置项
|
// 自由容器不需要 display 相关配置项
|
||||||
...(!isFreeContainer ? displayTpl : []),
|
...(!isFreeContainer ? displayTpl : []),
|
||||||
|
|
||||||
isFlexItem
|
...(isFlexItem
|
||||||
? getSchemaTpl('layout:flex', {
|
? [
|
||||||
|
getSchemaTpl('layout:flex', {
|
||||||
isFlexColumnItem,
|
isFlexColumnItem,
|
||||||
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-grow', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-grow', {
|
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
||||||
})
|
})
|
||||||
: null,
|
]
|
||||||
|
: []),
|
||||||
|
|
||||||
getSchemaTpl('layout:overflow-x', {
|
getSchemaTpl('layout:overflow-x', {
|
||||||
visibleOn: `${
|
visibleOn: `${
|
||||||
|
@ -113,34 +113,30 @@ export class FlexPluginBase extends LayoutBasePlugin {
|
|||||||
|
|
||||||
getSchemaTpl('layout:flex-wrap'),
|
getSchemaTpl('layout:flex-wrap'),
|
||||||
|
|
||||||
isFlexItem
|
...(isFlexItem
|
||||||
? getSchemaTpl('layout:flex', {
|
? [
|
||||||
|
getSchemaTpl('layout:flex', {
|
||||||
isFlexColumnItem,
|
isFlexColumnItem,
|
||||||
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-grow', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-grow', {
|
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
||||||
})
|
})
|
||||||
: null,
|
]
|
||||||
|
: []),
|
||||||
|
|
||||||
getSchemaTpl('layout:overflow-x', {
|
getSchemaTpl('layout:overflow-x', {
|
||||||
visibleOn: `${
|
visibleOn: `${
|
||||||
|
@ -78,34 +78,30 @@ export class WrapperPlugin extends LayoutBasePlugin {
|
|||||||
'data.style && (data.style.display === "flex" || data.style.display === "inline-flex")'
|
'data.style && (data.style.display === "flex" || data.style.display === "inline-flex")'
|
||||||
}),
|
}),
|
||||||
|
|
||||||
isFlexItem
|
...(isFlexItem
|
||||||
? getSchemaTpl('layout:flex', {
|
? [
|
||||||
|
getSchemaTpl('layout:flex', {
|
||||||
isFlexColumnItem,
|
isFlexColumnItem,
|
||||||
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
label: isFlexColumnItem ? '高度设置' : '宽度设置',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-grow', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-grow', {
|
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
'data.style && data.style.flex === "1 1 auto" && (data.style.position === "static" || data.style.position === "relative")'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
label: isFlexColumnItem ? '弹性高度' : '弹性宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "1 1 auto"'
|
||||||
})
|
}),
|
||||||
: null,
|
getSchemaTpl('layout:flex-basis', {
|
||||||
isFlexItem
|
|
||||||
? getSchemaTpl('layout:flex-basis', {
|
|
||||||
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
label: isFlexColumnItem ? '固定高度' : '固定宽度',
|
||||||
visibleOn:
|
visibleOn:
|
||||||
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
'data.style && (data.style.position === "static" || data.style.position === "relative") && data.style.flex === "0 0 150px"'
|
||||||
})
|
})
|
||||||
: null,
|
]
|
||||||
|
: []),
|
||||||
|
|
||||||
getSchemaTpl('layout:overflow-x', {
|
getSchemaTpl('layout:overflow-x', {
|
||||||
visibleOn: `${
|
visibleOn: `${
|
||||||
|
@ -599,6 +599,9 @@ setSchemaTpl(
|
|||||||
// 适配
|
// 适配
|
||||||
form.setValueByName('style.flexGrow', undefined);
|
form.setValueByName('style.flexGrow', undefined);
|
||||||
form.setValueByName('style.flexBasis', undefined);
|
form.setValueByName('style.flexBasis', undefined);
|
||||||
|
form.setValueByName('style.overflowX', undefined);
|
||||||
|
form.setValueByName('style.overflowY', undefined);
|
||||||
|
form.setValueByName('style.overflow', undefined);
|
||||||
|
|
||||||
if (config?.isFlexColumnItem) {
|
if (config?.isFlexColumnItem) {
|
||||||
form.setValueByName('style.height', undefined);
|
form.setValueByName('style.height', undefined);
|
||||||
@ -893,7 +896,7 @@ setSchemaTpl(
|
|||||||
config?.label ||
|
config?.label ||
|
||||||
tipedLabel(' x轴滚动模式', '用于设置水平方向的滚动模式'),
|
tipedLabel(' x轴滚动模式', '用于设置水平方向的滚动模式'),
|
||||||
name: config?.name || 'style.overflowX',
|
name: config?.name || 'style.overflowX',
|
||||||
value: config?.value || 'auto',
|
value: config?.value || 'visible',
|
||||||
visibleOn: config?.visibleOn,
|
visibleOn: config?.visibleOn,
|
||||||
pipeIn: config?.pipeIn,
|
pipeIn: config?.pipeIn,
|
||||||
pipeOut: config?.pipeOut,
|
pipeOut: config?.pipeOut,
|
||||||
@ -1099,7 +1102,7 @@ setSchemaTpl(
|
|||||||
config?.label ||
|
config?.label ||
|
||||||
tipedLabel(' y轴滚动模式', '用于设置垂直方向的滚动模式'),
|
tipedLabel(' y轴滚动模式', '用于设置垂直方向的滚动模式'),
|
||||||
name: config?.name || 'style.overflowY',
|
name: config?.name || 'style.overflowY',
|
||||||
value: config?.value || 'auto',
|
value: config?.value || 'visible',
|
||||||
visibleOn: config?.visibleOn,
|
visibleOn: config?.visibleOn,
|
||||||
pipeIn: config?.pipeIn,
|
pipeIn: config?.pipeIn,
|
||||||
pipeOut: config?.pipeOut,
|
pipeOut: config?.pipeOut,
|
||||||
|
Loading…
Reference in New Issue
Block a user