chore: slider to change width and height in image

This commit is contained in:
jialin
2024-12-02 08:20:30 +08:00
parent 412c6dadca
commit ec2cd29096
24 changed files with 500 additions and 283 deletions
@@ -356,3 +356,46 @@ export const ImageAdvancedParamsConfig: ParamsSchema[] = [
]
}
];
export const ImageCustomSizeConfig: ParamsSchema[] = [
{
type: 'Slider',
name: 'width',
label: {
text: 'playground.params.width',
isLocalized: true
},
attrs: {
min: 256,
max: 1792,
step: 64,
inputnumber: false
},
rules: [
{
required: true,
message: 'playground.params.width'
}
]
},
{
type: 'Slider',
name: 'height',
label: {
text: 'playground.params.height',
isLocalized: true
},
attrs: {
min: 256,
max: 1792,
step: 64,
inputnumber: false
},
rules: [
{
required: true,
message: 'playground.params.height'
}
]
}
];
+2 -2
View File
@@ -6,8 +6,8 @@ export default [
width: 'auto',
uid: 0,
span: 12,
loading: false,
progress: 60
loading: true,
progress: 30
},
{
dataUrl:
+5 -1
View File
@@ -46,7 +46,11 @@ export interface ParamsSchema {
};
defaultValue?: string | number | boolean;
required?: boolean;
rules: { required: boolean; message?: string }[];
rules: {
required: boolean;
message?: string;
formatter?: (value: any) => any;
}[];
placeholder?: React.ReactNode;
attrs?: Record<string, any>;
description?: {