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 = '请输入静态默认值'; }