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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore: fix style of defined name input padding and margin (#3803)
lumixbbc47945efd3
diff --git a/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx b/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsxindex ee164d0f8a..ca77b6638f 100644--- a/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx+++ b/packages/sheets-ui/src/views/defined-name/DefinedNameInput.tsx@@ -231,18 +231,21 @@ export const DefinedNameInput = (props: IDefinedNameInputProps) => {/>)}{typeValue !== 'range' && (- <TextEditor- key={`${inputId}-editor`}- value={formulaOrRefStringValue}- onValid={setValidFormulaOrRange}- onChange={formulaEditorChange}- id={createInternalEditorID(`${inputId}-editor`)}- placeholder={localeService.t('definedName.inputFormulaPlaceholder')}- openForSheetUnitId={unitId}- onlyInputFormula={true}- style={{ width: '99%' }}- canvasStyle={{ fontSize: 10 }}- />+ <div className="univer-defined-name-input-formula-selector-text-wrap">+ <TextEditor+ key={`${inputId}-editor`}+ value={formulaOrRefStringValue}+ onValid={setValidFormulaOrRange}+ onChange={formulaEditorChange}+ id={createInternalEditorID(`${inputId}-editor`)}+ placeholder={localeService.t('definedName.inputFormulaPlaceholder')}+ openForSheetUnitId={unitId}+ onlyInputFormula={true}+ // style={{ width: '99%' }}+ className="univer-defined-name-input-text-editor-container"+ canvasStyle={{ fontSize: 10 }}+ />+ </div>)}<div>diff --git a/packages/sheets-ui/src/views/defined-name/index.module.less b/packages/sheets-ui/src/views/defined-name/index.module.lessindex 18aa2814be..12e19269dd 100644--- a/packages/sheets-ui/src/views/defined-name/index.module.less+++ b/packages/sheets-ui/src/views/defined-name/index.module.less@@ -257,8 +257,26 @@padding-bottom: 5px;& > div {- width: 100%;- margin-top: 5px;+ // check docs-ui/src/components/editor/index.module.less .text-editor-validation-error+ margin-top: 16px;+ }++ // univer-defined-name-input+ &-formula-selector-text-wrap {+ margin-top: 16px;+ height: 100%;+ position: relative;+ padding: 0 0 0 6px;+ border: 1px solid rgb(var(--border-color));+ transition: all 0.15s;+ border-radius: var(--border-radius-base);+ }++ &-text-editor-container {+ position: relative;+ width: 95%;+ height: 30px;+ user-select: none;}&-validation {