Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore(style): optimize data-validation padding (#5159)

ZhangWeif4f43d49d340
diff --git a/packages/drawing-ui/src/services/drawing-render.service.ts b/packages/drawing-ui/src/services/drawing-render.service.ts
index 01625fb15b..8caedfa5ad 100644
--- a/packages/drawing-ui/src/services/drawing-render.service.ts
+++ b/packages/drawing-ui/src/services/drawing-render.service.ts
@@ -218,8 +218,6 @@ export class DrawingRenderService {
// const adjustSize = this._adjustImageSize(width, height, screenWidth, screenHeight);
this._galleryService.open({
images: [src],
- // width: adjustSize.width,
- // height: adjustSize.height,
onOpenChange: (open) => {
if (!open) {
this._galleryService.close();
diff --git a/packages/sheets-data-validation-ui/src/views/components/detail/index.tsx b/packages/sheets-data-validation-ui/src/views/components/detail/index.tsx
index b51115f701..78aa0fb298 100644
--- a/packages/sheets-data-validation-ui/src/views/components/detail/index.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/detail/index.tsx
@@ -311,27 +311,25 @@ export function DataValidationDetail() {
: null}
{FormulaInput && !shouldHideFormula
? (
- <FormLayout>
- <FormulaInput
- key={key + localRule.type}
- isTwoFormula={isTwoFormula}
- value={{
- formula1: localRule.formula1,
- formula2: localRule.formula2,
- }}
- onChange={(value: any) => {
- handleUpdateRuleSetting({
- ...baseRule,
- ...value,
- });
- }}
- showError={showError}
- validResult={validator.validatorFormula(localRule, unitId, subUnitId)}
- unitId={unitId}
- subUnitId={subUnitId}
- ruleId={ruleId}
- />
- </FormLayout>
+ <FormulaInput
+ key={key + localRule.type}
+ isTwoFormula={isTwoFormula}
+ value={{
+ formula1: localRule.formula1,
+ formula2: localRule.formula2,
+ }}
+ onChange={(value: any) => {
+ handleUpdateRuleSetting({
+ ...baseRule,
+ ...value,
+ });
+ }}
+ showError={showError}
+ validResult={validator.validatorFormula(localRule, unitId, subUnitId)}
+ unitId={unitId}
+ subUnitId={subUnitId}
+ ruleId={ruleId}
+ />
)
: null}
<FormLayout>
diff --git a/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx b/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
index d5dc2361df..47210af6a4 100644
--- a/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
+++ b/packages/sheets-data-validation-ui/src/views/components/formula-input/ListFormulaInput.tsx
@@ -359,7 +359,7 @@ export function ListFormulaInput(props: IFormulaInputProps) {
</FormLayout>
{isFormulaStr === '1'
? (
- <>
+ <FormLayout error={(formula1Res || localError) || undefined}>
<FormulaEditor
ref={formulaEditorRef}
className={`
@@ -375,7 +375,6 @@ export function ListFormulaInput(props: IFormulaInputProps) {
unitId={unitId}
subUnitId={subUnitId}
isFocus={isFocusFormulaEditor}
- errorText={(formula1Res || localError) || undefined}
isSupportAcrossSheet
onFocus={() => isFocusFormulaEditorSet(true)}
onChange={(v = '') => {
@@ -398,7 +397,7 @@ export function ListFormulaInput(props: IFormulaInputProps) {
})}
</div>
)}
- </>
+ </FormLayout>
)
: (
<FormLayout error={formula1Res}>