chore: slider to change width and height in image
This commit is contained in:
@@ -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'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -6,8 +6,8 @@ export default [
|
||||
width: 'auto',
|
||||
uid: 0,
|
||||
span: 12,
|
||||
loading: false,
|
||||
progress: 60
|
||||
loading: true,
|
||||
progress: 30
|
||||
},
|
||||
{
|
||||
dataUrl:
|
||||
|
||||
@@ -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?: {
|
||||
|
||||
Reference in New Issue
Block a user