chore: preview field use switch

This commit is contained in:
jialin
2025-05-14 14:54:32 +08:00
parent f951358db4
commit 18cb82a0fe
8 changed files with 85 additions and 27 deletions
+2 -9
View File
@@ -423,6 +423,7 @@ export const ImageAdvancedParamsConfig: ParamsSchema[] = [
isLocalized: true
},
attrs: {
scaleSize: true,
trim: false,
autoSize: { minRows: 2, maxRows: 2 }
},
@@ -433,20 +434,12 @@ export const ImageAdvancedParamsConfig: ParamsSchema[] = [
]
},
{
type: 'Select',
type: 'Switch',
name: 'preview',
options: [
{ label: 'Faster', value: 'preview_faster' },
{ label: 'Normal', value: 'preview' },
{ label: 'common.options.none', value: null, locale: true }
],
label: {
text: 'Preview',
isLocalized: false
},
attrs: {
allowNull: true
},
rules: [
{
required: false
+2 -1
View File
@@ -29,7 +29,8 @@ type SchemaType =
| 'Slider'
| 'TextArea'
| 'Checkbox'
| 'Textarea';
| 'Textarea'
| 'Switch';
export interface ParamsSchema {
type: SchemaType;