From 094917aad4b05c6053b868e294216140d8d771e8 Mon Sep 17 00:00:00 2001 From: jiatianqi Date: Thu, 1 Sep 2022 15:45:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:amis-saas-5534=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E4=BC=9A=E8=A7=A6=E5=8F=91=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=85=AC=E5=BC=8F=E5=80=BC=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I332b8f53762f0dcaa02f80082f36b3a2cf6e0cc1 --- packages/amis-editor/package.json | 4 +++- packages/amis-editor/src/renderer/FormulaControl.tsx | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/amis-editor/package.json b/packages/amis-editor/package.json index 77d9bed34..888c38700 100644 --- a/packages/amis-editor/package.json +++ b/packages/amis-editor/package.json @@ -23,7 +23,9 @@ ], "lint-staged": { "{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}": [ - "prettier --write", + "prettier --write" + ], + "{src,scss,examples}/**/**/*.{scss}": [ "stylelint" ] }, diff --git a/packages/amis-editor/src/renderer/FormulaControl.tsx b/packages/amis-editor/src/renderer/FormulaControl.tsx index b4e5ead5b..3c0e65344 100644 --- a/packages/amis-editor/src/renderer/FormulaControl.tsx +++ b/packages/amis-editor/src/renderer/FormulaControl.tsx @@ -288,7 +288,7 @@ export default class FormulaControl extends React.Component< if (rendererSchema) { curRendererSchema = Object.assign({}, rendererSchema, data, { type: rendererSchema.type ?? data.type, - value: this.props.value ?? rendererSchema.value ?? data.value + value: this.props.value ?? rendererSchema.value }); // 默认要剔除的字段 @@ -349,7 +349,8 @@ export default class FormulaControl extends React.Component< // 设置统一的占位提示 if (curRendererSchema.type === 'select') { curRendererSchema.placeholder = '请选择默认值'; - curRendererSchema.inputClassName= 'ae-editor-FormulaControl-select-style' + curRendererSchema.inputClassName = + 'ae-editor-FormulaControl-select-style'; } else { curRendererSchema.placeholder = '请输入静态默认值'; }