mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
fix: 图片组件优化:调整预览标题位置;优化上传组件文件提及限制提示;修复编辑器拖拽后修改宽高无效的问题
This commit is contained in:
parent
0c59ce4f12
commit
ce31550bda
@ -372,7 +372,19 @@ export class ImageControlPlugin extends BasePlugin {
|
||||
getSchemaTpl('switch', {
|
||||
name: 'limit',
|
||||
label: '图片限制',
|
||||
pipeIn: (value: any) => !!value
|
||||
pipeIn: (value: any) => !!value,
|
||||
onChange: (
|
||||
value: any,
|
||||
oldValue: boolean,
|
||||
model: any,
|
||||
form: any
|
||||
) => {
|
||||
if (!value) {
|
||||
form.setValues({
|
||||
maxSize: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
{
|
||||
|
@ -190,12 +190,30 @@ export class ImagePlugin extends BasePlugin {
|
||||
{
|
||||
name: 'width',
|
||||
label: '宽度',
|
||||
type: 'input-number'
|
||||
type: 'input-number',
|
||||
onChange: (value: any) => {
|
||||
const node = context.node;
|
||||
node.updateState({
|
||||
width: value
|
||||
});
|
||||
requestAnimationFrame(() => {
|
||||
node.calculateHighlightBox();
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'height',
|
||||
label: '高度',
|
||||
type: 'input-number'
|
||||
type: 'input-number',
|
||||
onChange: (value: any) => {
|
||||
const node = context.node;
|
||||
node.updateState({
|
||||
height: value
|
||||
});
|
||||
requestAnimationFrame(() => {
|
||||
node.calculateHighlightBox();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
isUnderField
|
||||
|
@ -17,6 +17,7 @@
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
max-width: 1010px !important;
|
||||
padding-top: 0;
|
||||
|
||||
&-close {
|
||||
position: absolute;
|
||||
@ -36,12 +37,13 @@
|
||||
}
|
||||
|
||||
&-title {
|
||||
height: px2rem(30px);
|
||||
height: px2rem(18px);
|
||||
vertical-align: top;
|
||||
line-height: px2rem(30px);
|
||||
line-height: px2rem(18px);
|
||||
font-size: px2rem(12px);
|
||||
color: var(--white);
|
||||
text-align: center;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
&-main {
|
||||
|
@ -1671,7 +1671,6 @@ export default class ImageControl extends React.Component<
|
||||
accept={accept}
|
||||
multiple={dropMultiple}
|
||||
disabled={disabled}
|
||||
maxSize={crop ? undefined : maxSize}
|
||||
>
|
||||
{({
|
||||
getRootProps,
|
||||
|
Loading…
Reference in New Issue
Block a user