핵심 기능

Headless 지원

Univer 시트의 핵심은 스프레드 시트 편집기와 편집기가 필요한 구성 요소로 구성되어 있습니다 : 공식 엔진, 렌더링 엔진, 번호 포맷 엔진, 디자인 시스템 및 UI 구성 요소 라이브러리. 이 부품은 광범위한 스프레드 시트 형식과 실제 작업 책이 포함 된 복잡한 작업을 지원합니다.

기능

핵심 특징 세트 덮개:

  • 스프레드시트 렌더링: 시트 콘텐츠, 커서 및 선택을 그리십시오.
  • 셀 스타일링: 폰트, 색상, 국경 및 세포의 정렬을 설정합니다.
  • 공식 계산: 수학, 통계, 텍스트 및 날짜 기능을 포함하여 거의 모든 Excel 기능에 대한 지원과 함께 공식을 추가하고 계산합니다.
  • 번호 포맷: 통화, 비율, 날짜 및 값에 다른 번호 형식을 적용합니다.
  • 격자판과 언 팬: 큰 datasets를 읽고 편집하게 쉬운 만드는 격자판 및 언 팬을 보여주십시오.
  • 기본 스타일: 스프레드 시트에 기본 글꼴, 크기, 색상 및 기타 스타일을 설정합니다.
  • 플러그인 시스템: 수식, 이미지 및 차트 플러그인과 같은 사용자 정의 플러그인의 추가를 허용한다. 플러그인 시스템은 Univer의 핵심 건축 기능 중 하나입니다.

플러그인 모드

설치

Shell
pnpm add @univerjs/core @univerjs/design @univerjs/engine-render @univerjs/engine-formula @univerjs/ui @univerjs/docs @univerjs/docs-ui @univerjs/sheets @univerjs/sheets-ui @univerjs/sheets-formula @univerjs/sheets-formula-ui @univerjs/sheets-numfmt @univerjs/sheets-numfmt-ui

사용법

TypeScript
import { LocaleType, mergeLocales, Univer } from '@univerjs/core'import DesignEnUS from '@univerjs/design/locale/en-US'import { UniverDocsPlugin } from '@univerjs/docs'import { UniverDocsUIPlugin } from '@univerjs/docs-ui'import DocsUIEnUS from '@univerjs/docs-ui/locale/en-US'import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'import { UniverRenderEnginePlugin } from '@univerjs/engine-render'import { UniverSheetsPlugin } from '@univerjs/sheets'import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula'import { UniverSheetsFormulaUIPlugin } from '@univerjs/sheets-formula-ui'import SheetsFormulaUIEnUS from '@univerjs/sheets-formula-ui/locale/en-US'import { UniverSheetsNumfmtPlugin } from '@univerjs/sheets-numfmt'import { UniverSheetsNumfmtUIPlugin } from '@univerjs/sheets-numfmt-ui'import SheetsNumfmtUIEnUS from '@univerjs/sheets-numfmt-ui/locale/en-US'import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'import SheetsUIEnUS from '@univerjs/sheets-ui/locale/en-US'import SheetsEnUS from '@univerjs/sheets/locale/en-US'import { UniverUIPlugin } from '@univerjs/ui'import UIEnUS from '@univerjs/ui/locale/en-US'import '@univerjs/design/lib/index.css'import '@univerjs/ui/lib/index.css'import '@univerjs/docs-ui/lib/index.css'import '@univerjs/sheets-ui/lib/index.css'import '@univerjs/sheets-formula-ui/lib/index.css'import '@univerjs/sheets-numfmt-ui/lib/index.css'import '@univerjs/engine-formula/facade'import '@univerjs/ui/facade'import '@univerjs/docs-ui/facade'import '@univerjs/sheets/facade'import '@univerjs/sheets-ui/facade'import '@univerjs/sheets-formula/facade'import '@univerjs/sheets-numfmt/facade'const univer = new Univer({  locale: LocaleType.EN_US,  locales: {    [LocaleType.EN_US]: mergeLocales(      DesignEnUS,      UIEnUS,      DocsUIEnUS,      SheetsEnUS,      SheetsUIEnUS,      SheetsFormulaUIEnUS,      SheetsNumfmtUIEnUS,    ),  },})univer.registerPlugin(UniverRenderEnginePlugin)univer.registerPlugin(UniverFormulaEnginePlugin)univer.registerPlugin(UniverUIPlugin, {  container: 'app',})univer.registerPlugin(UniverDocsPlugin)univer.registerPlugin(UniverDocsUIPlugin)univer.registerPlugin(UniverSheetsPlugin)univer.registerPlugin(UniverSheetsUIPlugin)univer.registerPlugin(UniverSheetsFormulaPlugin)univer.registerPlugin(UniverSheetsFormulaUIPlugin)univer.registerPlugin(UniverSheetsNumfmtPlugin)univer.registerPlugin(UniverSheetsNumfmtUIPlugin)

플러그인 설정

@univerjs/core

이 패키지는 Univer 코어 라이브러리입니다. 그것은 Univer 인스턴스를 생성하고 테마와 로컬과 같은 기본 기능을 관리합니다.

  • theme
    Theme기본값: defaultTheme
    편집기 테마입니다.
    • [palette]
      object
      • [shade]
        string
        색상 이름과 농도를 키로 사용하는 팔레트입니다. defaultTheme을 참고하세요.
  • darkMode
    boolean기본값: false
    시작할 때 다크 모드를 사용합니다.
  • locale
    LocaleType
    메뉴와 대화상자의 언어입니다.
  • region
    LocaleType기본값: locale
    서식에 사용하는 지역입니다.
  • locales
    Record<string, ILanguagePack>
    언어별 번역 리소스입니다.
    • [locale]
      ILanguagePack
      로캘 값을 키로 사용하는 번역 팩입니다.
  • logLevel
    LogLevel기본값: LogLevel.INFO
    로그 상세 수준입니다.

참고: Univer

@univerjs/engine-render

연출 엔진은 장 내용, scrollbars, 커서 및 선택을 그립니다. 그것은 UniverRenderEnginePlugin를 수출합니다.

참고: @univerjs/engine-render

@univerjs/engine-formula

공식 엔진 계산 및 공정 공식, 그리고 그것은 UniverFormulaEnginePlugin를 수출합니다.

참고: @univerjs/engine-formula

@univerjs/design

디자인 시스템은 기본 구성 요소와 스타일을 제공합니다.

참고: UI 장

@univerjs/ui

이 패키지는 UI 기반 및 수출 UniverUIPlugin를 제공합니다.

UniverUIPlugin는 기본 레이아웃에 대한 옵션을 허용합니다.

  • container
    string | HTMLElement
    편집기가 마운트될 요소입니다.
  • header
    boolean기본값: true
    헤더를 표시합니다.
  • toolbar
    boolean기본값: true
    도구 모음을 표시합니다.
  • ribbonType
    RibbonType기본값: 'classic'
    리본 레이아웃을 선택합니다.
  • contextMenu
    boolean기본값: true
    컨텍스트 메뉴를 활성화합니다.
  • disableAutoFocus
    true
    시작에 autofocus를 비활성화합니다.
  • menu
    Record<string, object>
    메뉴 항목의 순서, 위치, 표시 여부를 설정합니다.
    • [id]
      object
      메뉴 항목, 리본 탭 또는 그룹의 재정의 설정입니다.
  • customFontFamily
    IFontConfig[] | object
    드롭다운에 글꼴을 추가합니다.
    • list
      IFontConfig[]
      드롭다운에 글꼴을 추가합니다.
      • value
        string
        CSS에서 사용하는 글꼴 이름입니다.
      • label
        string
        표시 이름 또는 번역 키입니다.
      • category
        FontCategory
        글꼴 분류입니다. sans-serif, serif, monospace, display, handwriting을 사용할 수 있습니다.
    • override
      boolean기본값: false
      기본 글꼴 목록을 지정한 목록으로 바꿉니다.
  • override
    [DependencyIdentifier, Provider | null][]
    Overrides는 의존성을 주사했습니다.
    • [0]
      DependencyIdentifier
      교체할 의존성 식별자입니다.
    • [1]
      Provider | null
      교체할 공급자입니다. null로 의존성을 제거합니다.

특정 메뉴 항목의 가시성을 제어하기 위해 menu를 사용합니다.

TypeScript
univer.registerPlugin(UniverUIPlugin, {  menu: {    'sheet.command.set-range-bold': {      hidden: true,    },    'sheet.command.set-range-italic': {      hidden: true,      disabled: true,    },  },})

키, 'sheet.command.set-range-bold' 및 'sheet.command.set-range-italic' 모두, 메뉴 항목 ID입니다; 메뉴 항목 ID 목록는 아래 전체 목록을 포함합니다.

참고: @univerjs/ui

@univerjs/docs

이 패키지는 Univer Docs 및 수출 UniverDocsPlugin에 대한 핵심 플러그인입니다.

참고: @univerjs/docs

@univerjs/docs-ui

이 패키지는 Univer Docs에 대한 UI 플러그인입니다. 문서 편집기 및 내보내기 UniverDocsUIPlugin의 UI 구성 요소 및 상호 작용을 추가합니다.

참고: @univerjs/docs-ui

@univerjs/sheets

이 패키지는 Univer 시트의 핵심 플러그인입니다. 그것은 스프레드 시트 편집기의 핵심 기능을 제공하고 UniverSheetsPlugin를 수출합니다.

UniverSheetsPlugin는 또한 편집자를 위한 몇몇 선택권을 받아들입니다:

  • isRowStylePrecedeColumnStyle
    boolean기본값: false
    열 스타일을 오버라이드 할 수 있습니다.
  • autoHeightForMergedCells
    boolean기본값: false
    자동으로 병합된 세포의 행 높이를 조정합니다.
  • freezeSync
    boolean기본값: true
    협업 중 냉동 팬을 동기화합니다.
  • textLineGap
    number기본값: 0
    셀 안의 추가 줄 간격(픽셀)입니다.

참고: @univerjs/sheets

@univerjs/sheets-ui

이 패키지는 Univer 시트에 대한 UI 플러그인입니다. 그것은 스프레드 시트 편집기 및 내보내기 UniverSheetsUIPlugin의 UI 구성 요소 및 상호 작용을 추가합니다.

UniverSheetsUIPlugin는 편집기 UI를 변경하는 옵션을 허용합니다.

  • formulaBar
    boolean기본값: true
    공식 표시 줄을 표시합니다.
  • clipboardConfig
    object
    과거 후 옵션 버튼을 숨기기.
    • hidePasteOptions
      boolean기본값: false
      과거 후 옵션 버튼을 숨기기.
  • scrollConfig
    object
    scrollbars를 구성합니다.
    • mainScene
      Scene
      스크롤바가 연결된 장면입니다.
    • thumbMargin
      number기본값: 2
      트랙과 손잡이 사이의 여백입니다. 단위는 픽셀입니다.
    • thumbLengthRatio
      number기본값: 1
      손잡이 길이의 배율입니다.
    • thumbBackgroundColor
      string기본값: 'gray.300'
      손잡이 색입니다.
    • thumbHoverBackgroundColor
      string기본값: 'gray.400'
      가리킬 때의 손잡이 색입니다.
    • thumbActiveBackgroundColor
      string기본값: 'gray.500'
      드래그할 때의 손잡이 색입니다.
    • trackBackgroundColor
      string기본값: 'gray.0'
      트랙 배경색입니다.
    • trackBorderColor
      string기본값: 'gray.0'
      트랙 테두리 색입니다.
    • barSize
      number기본값: 10
      트랙 두께입니다. 단위는 픽셀입니다.
    • barBorder
      number기본값: 1
      트랙 테두리 두께입니다. 단위는 픽셀입니다.
    • enableHorizontal
      boolean기본값: true
      수평 스크롤 표시.
    • enableVertical
      boolean기본값: true
      수직 scrollbar를 표시합니다.
    • hideTrackWhenUnscrollable
      boolean기본값: false
      그 축이 과잉이 없을 때 트랙을 숨깁니다.
    • minThumbSizeH
      number기본값: 17
      가로 손잡이의 최소 너비입니다. 단위는 픽셀입니다.
    • minThumbSizeV
      number기본값: 17
      세로 손잡이의 최소 높이입니다. 단위는 픽셀입니다.
  • protectedRangeShadow
    boolean | 'always' | 'non-editable' | 'non-viewable' | 'none'기본값: true
    보호된 범위가 음영될 때 선택.
  • protectedRangeUserSelector
    object
    보호된 범위의 사용자를 위한 선택기를 사용자 지정합니다.
    • component
      ComponentType<IPermissionDetailUserPartProps>
      사용자를 선택하는 컴포넌트입니다.
    • framework
      string
      컴포넌트의 프레임워크입니다. 예를 들어 react입니다.
  • disableForceStringAlert
    boolean기본값: false
    텍스트로 저장된 값에 대한 경고를 숨기기.
  • disableForceStringMark
    boolean기본값: false
    텍스트로 저장되는 값에 대한 감적을 숨깁니다.
  • maxAutoHeightCount
    number기본값: 1000
    몇 줄이 자동으로 재사이즈 될 수 있는 제한.
  • allowArrowKeyWrapOnSheetBoundary
    boolean기본값: true
    작업 시트 가장자리에 화살표 키 탐색을 포장합니다.
  • selectionAnimation
    boolean기본값: true
    데스크탑에서 셀을 클릭 할 때 선택. 시스템 모션 설정을 재구성합니다.
  • enableFillHandle
    boolean기본값: true
    데스크톱 채우기 핸들을 표시합니다. 채우기 명령은 사용할 수 있습니다.
  • warnBeforeDragOverwrite
    boolean기본값: true
    기존 콘텐츠에 대한 범위를 드래그하기 전에 확인. 유효성 및 undo 여전히 적용 이동.

참고: @univerjs/sheets-ui

모바일 지원

모바일 편집기를 먼저 구성하십시오. 이 페이지의 플러그인 모드 설정에서 동일한 패키지에서 모바일 내보내기로 아래 데스크탑 등록을 대체하고 문서 열기을 수행하십시오. 모델 플러그인, 스타일, 로컬 및 Facade 가져 오기를 유지하고 두 변형을 등록하지 마십시오.

패키지데스크톱 등록모바일 등록
@univerjs/sheets-formula-uiUniverSheetsFormulaUIPluginUniverSheetsFormulaMobileUIPlugin
@univerjs/sheets-numfmt-uiUniverSheetsNumfmtUIPluginUniverSheetsNumfmtMobileUIPlugin

프리셋 모드

설치

Shell
pnpm add @univerjs/presets @univerjs/preset-sheets-core

사용법

TypeScript
import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core'import UniverPresetSheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US'import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets'import '@univerjs/preset-sheets-core/lib/index.css'const { univerAPI } = createUniver({  locale: LocaleType.EN_US,  locales: {    [LocaleType.EN_US]: mergeLocales(UniverPresetSheetsCoreEnUS),  },  presets: [UniverSheetsCorePreset()],})univerAPI.createWorkbook({})

프리셋 설정

@univerjs/presets

Univer 응용 프로그램 및 재 수출 @univerjs/핵심 및 @univerjs/디자인의 모든 방법 및 개체를 구축하기위한 createUniver를 제공합니다.

createUniver 테마, 언어, 사전 설정 및 기타 옵션을 포함하는 구성 객체를 허용합니다. 그것은 반환 Univer 이름 * univer 그리고, FUniver 이름 * univerAPI호출에 사용되는, Facade API.

  • theme
    Theme기본값: defaultTheme
    편집기 테마입니다.
    • [palette]
      object
      • [shade]
        string
        색상 이름과 농도를 키로 사용하는 팔레트입니다. defaultTheme을 참고하세요.
  • darkMode
    boolean기본값: false
    시작할 때 다크 모드를 사용합니다.
  • locale
    LocaleType
    메뉴와 대화상자의 언어입니다.
  • region
    LocaleType기본값: locale
    서식에 사용하는 지역입니다.
  • locales
    Record<string, ILanguagePack>
    언어별 번역 리소스입니다.
    • [locale]
      ILanguagePack
      로캘 값을 키로 사용하는 번역 팩입니다.
  • logLevel
    LogLevel기본값: LogLevel.WARN
    로그 상세 수준입니다.
  • presets
    (IPreset | [IPreset, IPresetOptions])[]
    등록할 프리셋입니다.
    • [0]
      IPreset
      프리셋 팩터리가 반환하는 프리셋입니다.
    • [1]
      IPresetOptions
      프리셋의 플러그인 등록을 지연합니다.
      • lazy
        boolean
        프리셋의 플러그인 등록을 지연합니다.
    • lazy
      boolean
      프리셋의 플러그인 등록을 지연합니다.
  • plugins
    (PluginCtor | [PluginCtor, object])[]
    추가 플러그인과 각 설정입니다.
    • [0]
      PluginCtor
      플러그인 생성자입니다.
    • [1]
      object
      플러그인 생성자에 전달할 설정입니다.

참고: createUniver

@univerjs/preset-sheets-core

이 패키지는 Univer 시트의 코어 프리셋입니다. 그것은 문서 편집기, 공식 엔진 및 렌더링 엔진과 같은 스프레드 시트가 필요한 구성 요소를 묶습니다.

  • container
    string | HTMLElement기본값: 'app'
    편집기가 마운트될 요소입니다.
  • header
    boolean기본값: true
    헤더를 표시합니다.
  • toolbar
    boolean기본값: true
    도구 모음을 표시합니다.
  • ribbonType
    RibbonType기본값: 'classic'
    리본 레이아웃을 선택합니다.
  • contextMenu
    boolean기본값: true
    컨텍스트 메뉴를 활성화합니다.
  • disableAutoFocus
    true
    시작에 autofocus를 비활성화합니다.
  • menu
    Record<string, object>
    메뉴 항목의 순서, 위치, 표시 여부를 설정합니다.
    • [id]
      object
      메뉴 항목, 리본 탭 또는 그룹의 재정의 설정입니다.
  • customFontFamily
    IFontConfig[] | object
    드롭다운에 글꼴을 추가합니다.
    • list
      IFontConfig[]
      드롭다운에 글꼴을 추가합니다.
      • value
        string
        CSS에서 사용하는 글꼴 이름입니다.
      • label
        string
        표시 이름 또는 번역 키입니다.
      • category
        FontCategory
        글꼴 분류입니다. sans-serif, serif, monospace, display, handwriting을 사용할 수 있습니다.
    • override
      boolean기본값: false
      기본 글꼴 목록을 지정한 목록으로 바꿉니다.
  • formulaBar
    boolean기본값: true
    공식 표시 줄을 표시합니다.
  • disableTextFormatAlert
    boolean기본값: false
    텍스트 형식 경고를 숨기기.
  • disableTextFormatMark
    boolean기본값: false
    텍스트 형식 마커를 숨기기.
  • sheets
    object
    이 기능의 설정입니다.
    • isRowStylePrecedeColumnStyle
      boolean기본값: false
      열 스타일을 오버라이드 할 수 있습니다.
    • autoHeightForMergedCells
      boolean기본값: false
      자동으로 병합된 세포의 행 높이를 조정합니다.
    • freezeSync
      boolean기본값: true
      협업 중 냉동 팬을 동기화합니다.
    • textLineGap
      number기본값: 0
      셀 안의 추가 줄 간격(픽셀)입니다.
    • clipboardConfig
      object
      과거 후 옵션 버튼을 숨기기.
      • hidePasteOptions
        boolean기본값: false
        과거 후 옵션 버튼을 숨기기.
    • scrollConfig
      object
      scrollbars를 구성합니다.
    • protectedRangeShadow
      boolean | 'always' | 'non-editable' | 'non-viewable' | 'none'기본값: true
      보호된 범위가 음영될 때 선택.
    • protectedRangeUserSelector
      object
      보호된 범위의 사용자를 위한 선택기를 사용자 지정합니다.
      • component
        ComponentType<IPermissionDetailUserPartProps>
        사용자를 선택하는 컴포넌트입니다.
      • framework
        string
        컴포넌트의 프레임워크입니다. 예를 들어 react입니다.
    • disableForceStringAlert
      boolean기본값: false
      텍스트로 저장된 값에 대한 경고를 숨기기.
    • disableForceStringMark
      boolean기본값: false
      텍스트로 저장되는 값에 대한 감적을 숨깁니다.
    • maxAutoHeightCount
      number기본값: 1000
      몇 줄이 자동으로 재사이즈 될 수 있는 제한.
    • allowArrowKeyWrapOnSheetBoundary
      boolean기본값: true
      작업 시트 가장자리에 화살표 키 탐색을 포장합니다.
    • selectionAnimation
      boolean기본값: true
      데스크탑에서 셀을 클릭 할 때 선택. 시스템 모션 설정을 재구성합니다.
    • enableFillHandle
      boolean기본값: true
      데스크톱 채우기 핸들을 표시합니다. 채우기 명령은 사용할 수 있습니다.
    • warnBeforeDragOverwrite
      boolean기본값: true
      기존 콘텐츠에 대한 범위를 드래그하기 전에 확인. 유효성 및 undo 여전히 적용 이동.
  • docs
    object
    이 기능의 설정입니다.
    • hasScroll
      boolean
      Docs scrollbars를 보여줍니다.
  • formula
    object
    공식 기능, 설명, 계산 모드 및 화면 팁 설정을 수락합니다.
    • function
      [Ctor<BaseFunction>, string][]
      사용자 정의 수식 구현입니다.
      • [0]
        Ctor<BaseFunction>
        수식 클래스입니다.
      • [1]
        string
        수식에서 사용하는 함수 이름입니다.
    • description
      object[]
      편집기에 표시할 함수 설명입니다.
    • initialFormulaComputing
      CalculationMode기본값: CalculationMode.WHEN_EMPTY
      통합 문서를 열 때 수식을 계산하는 방식입니다.
    • functionScreenTips
      boolean기본값: true
      편집 공식을 하는 동안 기능 힌트를 표시합니다.
  • workerURL
    string | URL | Worker
    브라우저 Worker에서 수식을 계산합니다.

특정 메뉴 항목의 가시성을 제어하기 위해 menu를 사용합니다.

TypeScript
UniverSheetsCorePreset({  menu: {    'sheet.command.set-range-bold': {      hidden: true,    },    'sheet.command.set-range-italic': {      hidden: true,      disabled: true,    },  },})

키, 'sheet.command.set-range-bold' 및 'sheet.command.set-range-italic' 모두, 메뉴 항목 ID입니다; 메뉴 항목 ID 목록는 아래 전체 목록을 포함합니다.

참고: @univerjs/preset-sheets-core

도구 모음 레이아웃과 RibbonType

IUniverSheetsCorePresetConfig 또는 IUniverUIConfig에서 ribbonType를 설정하여 툴바 레이아웃을 선택합니다.

4개의 형태가 있습니다:

  • classic: 기본 레이아웃. 그룹은 위 줄을 차지하고 도구 모음은 아래에서 실행되며, 기존 레이아웃의 사용자가 예상되는 것을 일치시킵니다.
  • grid: 탭을 유지하고 두 줄 그리드에서 각 그룹의 도구를 배치합니다. 한 번에 더 많은 도구를 볼 수있는 데스크탑 레이아웃을 적합합니다.
  • collapsed: 그룹과 툴바를 동시에 배치할 때 수직 공간을 절약할 수 있습니다.
  • simple: 그룹을 제거하고 단일 평면 목록에 모든 도구를 배치, 이미 각 버튼을 수행하는 것을 알고 사용자.

grid 리본은 충분한 폭을 가지고있을 때, 전체 그룹은 더 보기로 이동하고 그들의 통제는 조밀한 배치로 전환합니다. 그들은 콘테이너가 폭 넓게 할 때 돌려보냅니다. 이것은 유효한 폭을 자동적으로 따르고, 그래서 주요 리본을 위한 기존하는 gridLayout 유지합니다. 과잉 메뉴는 동일한 명령, 무능한 상태 및 허가 체크를 유지합니다.

menu의 핵심은 ribbon.insert, ribbon.start.format 또는 메뉴 항목 ID와 같은 그룹과 같은 리본 탭이 될 수 있습니다.

order는 낮은에서 높은까지 siblings를 분류합니다: 탭 내의 탭, 그룹 내의 그룹, 그리고 그룹 내의 품목 또는 submenu. 그것은 다른 그룹으로 메뉴 항목을 이동하지 않습니다. 문자열 키의 경우 RibbonPosition 및 @univerjs/ui에 의해 수출된 그룹 enums를 사용할 수 있습니다.

현재 모드에 대한 기존 초기화에 이러한 옵션이 있습니다. 다른 플러그인, Locale, 테마, 컨테이너 설정 유지, 같은 플러그인을 두 번 등록하지 마십시오.

TypeScript
import type { MenuConfig } from '@univerjs/ui'const menu: MenuConfig = {  'ribbon.insert': { order: -1 },  'ribbon.start.format': { order: -1 },  'sheet.command.set-range-font-family': {    order: 0,    gridLayout: { row: 1, column: 1, width: 160 },  },}
TypeScript
import { UniverUIPlugin } from '@univerjs/ui'univer.registerPlugin(UniverUIPlugin, {  ribbonType: 'grid',  menu,})

선택 및 드래그

워크시트 경계에서 키보드 이동

allowArrowKeyWrapOnSheetBoundary는 워크 시트 가장자리에서 다음 행 또는 열에 화살표 키 랩을 결정합니다. 그것은 true에 기본적으로 설정; 가장자리에 정지 false로 설정. 입력 / 트랙 사이클링 선택 범위 내에서 영향을받지 않습니다. 미리 설정 모드에서, sheets 아래 설정; 플러그인 모드에서, UniverSheetsUIPlugin에서 직접 전달.

selectionAnimation: false는 셀 사이의 선택 이동 할 때 선택 개요 애니메이션을 비활성화합니다. 시스템 감소 모션 선호도가 우선합니다. enableFillHandle: false는 명령과 Facade API를 채우면서 채우기 핸들을 숨깁니다. warnBeforeDragOverwrite: false는 기존 콘텐츠를 드래그하기 전에 확인 프롬프트를 건너 뛸 수 있습니다. 유효성 및 undo/redo를 여전히 적용하십시오. true의 모든 세 가지 옵션 기본값으로 전달하십시오. sheets에서 UniverSheetsCorePreset 또는 UniverSheetsUIPlugin에 직접 전달하십시오.

TypeScript
univer.registerPlugin(UniverSheetsUIPlugin, {  allowArrowKeyWrapOnSheetBoundary: false,  selectionAnimation: false,  enableFillHandle: false,  warnBeforeDragOverwrite: false,})

런타임 업데이트

공개 Facade는 변경 사항을 병합하고 UI를 즉시 새로 고침합니다. 이전 값 또는 스키마 기본값을 유지하고, 오버라이드는 나중에 등록 된 메뉴에 적용됩니다. 플러그인 모드에서 @univerjs/ui/facade를 먼저 가져 가라.

TypeScript
import '@univerjs/ui/facade'univerAPI.updateMenuConfig({  'sheet.command.set-range-bold': {    order: 0,    gridLayout: { row: 2, column: 2 },  },  'sheet.command.set-range-italic': {    gridLayout: { row: 2, column: 1 },  },})

gridLayout는 단지 ribbonType: 'grid'를 가진 효력이 있습니다. 각 그룹에는 2개의 줄 및 row 및 column 시작이 있습니다 1. 협조는 명시되어 있습니다, 그래서 단지 order만 바꾸는 것은 명시적으로 두는 단추를 이동하지 않습니다. 2개의 단추가 교환될 때, 둘 다 개정되어야 합니다, 또는 그들은 오버랩. 선택적인 분야는 화소에 있는 크기와 더불어 rowSpan, columnSpan, showLabel, width 및 iconSize입니다. IRibbonGridLayout는 constraints 및 과태를 목록으로 만듭니다.

사용자 정의 메뉴 배치

createMenu()와 createSubmenu()는 또한 order 및 gridLayout를 받아들입니다. submenu에, 이 분야는 팝업의 내용 보다는 오히려 리본 방아쇠를 둡니다. 뒤에 오는 예는 역사 그룹의 제 3의 란에 있는 단추를 추가합니다:

TypeScript
univerAPI  .createMenu({    id: 'custom-action',    title: 'Custom action',    action: () => console.log('Custom action clicked'),    order: 4,    gridLayout: { row: 1, column: 3, showLabel: true, width: 96 },  })  .appendTo('ribbon.start.history')

아래 표는 바탕 화면 메뉴 항목을 구성합니다. 항목은 여러 곳에서 나타날 수 있으며, 열 및 열 헤더는 일부 셀 컨텍스트 메뉴 항목을 재사용합니다. 해당 플러그인이 등록 될 때 기능 메뉴 만 나타납니다. 가시도는 권한과 현재 선택에 따라 다릅니다. 모바일 전용 ID는 결국 별도로 나열됩니다.

메뉴 항목의 DOM 요소에 data-u-command 속성은 메뉴 항목 ID입니다. menu 구성은 이 메뉴 항목 ID를 사용하며, 항목이 호출되는 명령 ID와 다릅니다.

도구 모음 메뉴 항목

메뉴 항목 ID메뉴 항목 이름
univer.command.undo실행 취소
univer.command.redo다시 실행
ui.operation.activate-format-painter서식 복사
sheet.command.set-range-bold굵게
sheet.command.set-range-italic기울임꼴
sheet.command.set-range-underline밑줄
sheet.command.set-range-stroke취소선
sheet.command.set-range-font-family글꼴
sheet.command.set-range-fontsize글꼴 size
sheet.command.set-range-text-color텍스트 색
sheet.command.set-background-color채우기 색
sheet.command.set-border-basic테두리
sheet.command.set-horizontal-text-align가로 맞춤
sheet.command.set-vertical-text-align세로 맞춤
sheet.command.set-text-wrap텍스트 줄 바꿈
sheet.command.set-text-rotation텍스트 회전
sheet.command.add-worksheet-merge셀 병합
sheet.command.add-worksheet-merge-all셀 병합 - 모두 병합
sheet.command.add-worksheet-merge-vertical셀 병합 - 세로 병합
sheet.command.add-worksheet-merge-horizontal셀 병합 - 가로 병합
sheet.command.remove-worksheet-merge셀 병합 - 병합 취소
sheet.operation.open.conditional.formatting.panel조건부 서식
formula-ui.operation.insert-function.common자주 쓰는 함수
formula-ui.operation.more-functions함수 - More 함수
sheet.menu.sheets-sort정렬
sheet.command.sort-range-asc정렬 - Ascending
sheet.command.sort-range-asc-ext정렬 - 오름차순 범위 확장
sheet.command.sort-range-desc정렬 - Descending
sheet.command.sort-range-desc-ext정렬 - 내림차순 범위 확장
sheet.command.sort-range-custom정렬 - Custom 정렬
sheet.menu.image이미지
sheet.command.insert-float-image이미지 - Float 이미지
sheet.command.insert-cell-image이미지 - Cell 이미지
sheet.command.numfmt.set.currency통화
sheet.command.numfmt.add.decimal.command소수 자릿수 늘리기
sheet.command.numfmt.subtract.decimal.command소수 자릿수 줄이기
sheet.command.numfmt.set.percent백분율
sheet.operation.open.numfmt.panel숫자 서식
sheet.menu.data-validation데이터 유효성 검사
data-validation.operation.open-validation-panel데이터 유효성 검사 - 데이터 유효성 검사 management
data-validation.command.addRuleAndOpen데이터 유효성 검사 - 규칙 추가
sheet.command.smart-toggle-filter필터 전환
sheet.command.clear-filter-criteria필터 전환 - 필터 조건 지우기
sheet.command.re-calc-filter필터 전환 - 필터 조건 다시 계산
sheet.operation.open-pivot-table-range-selector-panel피벗 테이블
sheet.menu.print인쇄
sheet.operation.print-open인쇄 - 인쇄
sheet.operation.open-print-grid-sidebar인쇄 - 인쇄 Layout
sheet.command.menu-insert-chart차트 삽입
sheet.command.add-range-protection-from-toolbar보호
univer.operation.toggle-edit-history편집 기록
sheet.operation.open-sparkline-selectorSparkline
sheet.operation.toggle-comment-panel댓글 관리
sheet.operation.insert-hyper-link-toolbar링크 삽입
ui.operation.open-find-dialog찾기 및 바꾸기
base-ui.operation.toggle-shortcut-panel단축키 패널 전환
sheet.command.add-data-bar-conditional-rule데이터 막대
sheet.command.add-icon-set-conditional-rule아이콘 집합
sheet.operation.toggle-crosshair-highlight십자선 강조
data-validation.command.insert-quick-rule체크박스
sheet.menu.quick-dropdown목록
sheet.menu.quick-date날짜
sheet.menu.worksheet-background-image배경 이미지
sheet.command.add-worksheet-background-image배경 이미지 추가
sheet.command.delete-worksheet-background-image배경 이미지 삭제
formula-ui.operation.insert-function.financial재무
formula-ui.operation.insert-function.logical논리
formula-ui.operation.insert-function.text텍스트
formula-ui.operation.insert-function.date날짜 및 시간
formula-ui.operation.insert-function.lookup찾기 및 참조
formula-ui.operation.insert-function.math수학 및 삼각 함수
formula-ui.operation.insert-function.statistical통계
formula-ui.operation.insert-function.engineering공학
formula-ui.operation.insert-function.information정보
formula-ui.operation.insert-function.database데이터베이스
sheets-formula-ui.operation.calculation-options계산 옵션
sheet.operation.open-table-selector표
sheet.menu.paste붙여넣기
sheet.command.set-range-font-increase글꼴 크기 증가
sheet.command.set-range-font-decrease글꼴 크기 감소
sheet.command.reset-range-text-color텍스트 색상 - 초기화
sheet.command.reset-background-color채우기 색상 - 초기화
sheet.command.set-shrink-to-fit셀에 맞춤
sheet.toolbar.sheet-frozen고정
sheet.menu.zoom-ratio확대/축소
sheet.command.toggle-gridlines눈금선 표시/숨기기
base-ui.operation.toggle-fullscreen전체 화면
ui.command.clear-formatting서식 지우기
ui.operation.open-feature-search기능 검색
sheet.toolbar.dimension-outline.group그룹
sheet.command.menu-insert-pivot-chart피벗 차트
sheet.pivot-chart.insert피벗 차트
sheet.command.menu-insert-shape도형 삽입
sheet.operation.open-shape-object-list-panel레이어
sheet.operation.open-slicer-insert-dialog슬라이서 삽입
sheet.menu.insert-timeline타임라인 삽입

컨텍스트 메뉴 항목

메뉴 항목 ID메뉴 항목 이름
sheet.command.copy복사
sheet.command.cut잘라내기
sheet.command.paste붙여넣기
sheet.menu.copy-special복사 Special
sheet.command.copy-formula-only선택하여 복사 - 수식만 복사
sheet.menu.paste-special붙여넣기 Special
sheet.command.paste-value붙여넣기 Special - 붙여넣기 Value
sheet.command.paste-format붙여넣기 Special - 붙여넣기 Format
sheet.command.paste-col-width붙여넣기 Special - 붙여넣기 열 너비
sheet.command.paste-besides-border붙여넣기 Special - 붙여넣기 Besides 테두리 Styles
sheet.command.paste-formula붙여넣기 Special - 붙여넣기 Formula
sheet.menu.clear-selection지우기
sheet.command.clear-selection-content지우기 - 지우기 Contents
sheet.command.clear-selection-format지우기 - 지우기 Formats
sheet.command.clear-selection-all지우기 - 지우기 All
sheet.contextMenu.text-to-numberText to Number
sheet.menu.cell-insert삽입
sheet.command.insert-row-before삽입 - 앞에 행 삽입
sheet.command.insert-col-before삽입 - 앞에 열 삽입
sheet.command.insert-range-move-right-confirm삽입 - 오른쪽으로 이동
sheet.command.insert-range-move-down-confirm삽입 - 아래로 이동
sheet.menu.delete삭제
sheet.command.remove-row-confirm선택한 행 삭제
sheet.command.remove-col-confirm선택한 열 삭제
sheet.command.delete-range-move-left-confirm삭제 - 왼쪽으로 이동
sheet.command.delete-range-move-up-confirm삭제 - Move Up
sheet.menu.sheet-frozen고정
sheet.command.set-selection-frozen고정 - 고정
sheet.command.set-row-frozen고정 - 이 행까지 고정
sheet.command.set-col-frozen고정 - 이 열까지 고정
sheet.command.cancel-frozen고정 - 고정 취소
sheet.contextMenu.permission행과 열 보호
sheet.command.add-range-protection-from-context-menu행과 열 보호 - 보호 범위 추가
sheet.command.set-range-protection-from-context-menu행과 열 보호 - 보호 범위 설정
sheet.command.delete-range-protection-from-context-menu행과 열 보호 - 보호 범위 제거
sheet.command.view-sheet-permission-from-context-menu행과 열 보호 - 모든 보호 범위 보기
sheet.menu.sheets-sort-ctx정렬
sheet.command.sort-range-asc-ctx정렬 - Ascending
sheet.command.sort-range-asc-ext-ctx정렬 - 오름차순 범위 확장
sheet.command.sort-range-desc-ctx정렬 - Descending
sheet.command.sort-range-desc-ext-ctx정렬 - 내림차순 범위 확장
sheet.command.sort-range-custom-ctx정렬 - Custom 정렬
sheet.operation.show-comment-modal댓글 추가
sheet.operation.insert-hyper-link링크 삽입
sheet.operation.screenshot복사 as picture
sheet.command.save-cell-images셀 이미지 저장
sheet.operation.add-note-popup노트 추가
sheet.command.delete-note노트 삭제
sheet.command.toggle-note-popup노트 표시/숨기기
sheet.table.context-insert_menu-id표 삽입
sheet.command.table-insert-row표 행 삽입
sheet.command.table-insert-col표 열 삽입
sheet.table.context-remove_menu-id표 제거
sheet.command.table-remove-row표 행 삭제
sheet.command.table-remove-col표 열 삭제
sheet.command.set-first-row-frozen첫 번째 행 고정
sheet.command.set-first-column-frozen첫 번째 열 고정
sheet.sparkline.context-menu-id스파크라인
sheet.operation.open-sparkline-panel스파크라인 편집
sheet.command.remove-sparkline스파크라인 지우기

컨텍스트 메뉴 항목 - 행 머리글

메뉴 항목 ID메뉴 항목 이름
sheet.command.insert-multi-rows-above앞에 행 삽입
sheet.command.insert-multi-rows-after뒤에 행 삽입
sheet.command.hide-row-confirm선택한 행 숨기기
sheet.command.set-selected-rows-visible숨긴 행 표시
sheet.command.set-row-height행 높이
sheet.command.set-row-is-auto-height데이터에 맞춤
sheet.row-header-menu.sheet-frozen고정
sheet.contextMenu.dimension-outline그룹

컨텍스트 메뉴 항목 - 열 머리글

메뉴 항목 ID메뉴 항목 이름
sheet.command.insert-multi-cols-before앞에 열 삽입
sheet.command.insert-multi-cols-right뒤에 열 삽입
sheet.command.hide-col-confirm선택한 열 숨기기
sheet.command.set-selected-cols-visible숨긴 열 표시
sheet.command.set-worksheet-col-width열 너비
sheet.command.set-col-auto-width데이터에 맞춤
sheet.column-header-menu.sheet-frozen고정
sheet.contextMenu.dimension-outline그룹

컨텍스트 메뉴 항목 - 시트 탭

메뉴 항목 ID메뉴 항목 이름
sheet.command.remove-sheet-confirm삭제
sheet.command.copy-sheet복사
sheet.operation.rename-sheet이름 변경
sheet.command.set-tab-color색상 변경
sheet.command.set-worksheet-hidden숨기기
ui-sheet.command.show-menu-list보이기
sheet.command.add-range-protection-from-sheet-bar시트 보호
sheet.command.delete-worksheet-protection-from-sheet-bar시트 보호 해제
sheet.command.change-sheet-protection-from-sheet-bar시트 권한 변경
sheet.command.view-sheet-permission-from-sheet-bar모든 보호 범위 보기

피벗 테이블 및 피벗 차트 컨텍스트 메뉴 항목

메뉴 항목 ID메뉴 항목 이름
sheet.pivot-chart.expand-collapse확장/축소
sheet.pivot.context-menu.date-group?? ??
sheet.pivot.context-menu.excel-date-group날짜 그룹화
sheet.pivot.context-menu.number-group숫자 그룹화
sheet.pivot.context-menu.manual-group항목 그룹화
sheet.pivot.context-menu.manual-rename그룹 이름 바꾸기
sheet.pivot.context-menu.manual-ungroup그룹 해제
sheet.pivot.context-menu.show-data-as값 표시 형식
sheet.pivot.context-menu.value-filter값 필터
sheet.pivot.context-menu.date-group.year?? ?? - 년
sheet.pivot.context-menu.date-group.year-quarter?? ?? - 년-분기
sheet.pivot.context-menu.date-group.quarter?? ?? - 분기
sheet.pivot.context-menu.date-group.year-month?? ?? - 년-월
sheet.pivot.context-menu.date-group.month?? ?? - 월
sheet.pivot.context-menu.date-group.month-date?? ?? - 월-일
sheet.pivot.context-menu.date-group.year-month-date?? ?? - 년-월-일
sheet.pivot.context-menu.date-group.date?? ?? - 일
sheet.pivot.context-menu.date-group.hour?? ?? - 시
sheet.pivot.context-menu.date-group.minute?? ?? - 분
sheet.pivot.context-menu.date-group.hour-minute?? ?? - 시-분
sheet.pivot.context-menu.show-data-as.1값 표시 형식 - 계산 안 함
sheet.pivot.context-menu.show-data-as.4값 표시 형식 - 총합계 비율
sheet.pivot.context-menu.show-data-as.3값 표시 형식 - 행 합계 비율
sheet.pivot.context-menu.show-data-as.2값 표시 형식 - 열 합계 비율
sheet.pivot.context-menu.show-data-as.6값 표시 형식 - 상위 행 합계 비율
sheet.pivot.context-menu.show-data-as.5값 표시 형식 - 상위 열 합계 비율
sheet.pivot.context-menu.show-data-as.8값 표시 형식 - 인덱스
sheet.pivot.context-menu.show-data-as.14값 표시 형식 - 상위 합계 비율
sheet.pivot.context-menu.show-data-as.13값 표시 형식 - 비율
sheet.pivot.context-menu.show-data-as.9값 표시 형식 - 기준값과의 차이
sheet.pivot.context-menu.show-data-as.10값 표시 형식 - 기준값과의 차이 비율
sheet.pivot.context-menu.show-data-as.11값 표시 형식 - 누계
sheet.pivot.context-menu.show-data-as.12값 표시 형식 - 누계 비율
sheet.pivot.context-menu.show-data-as.15값 표시 형식 - 작은 값부터 순위
sheet.pivot.context-menu.show-data-as.16값 표시 형식 - 큰 값부터 순위

그리기 및 차트 메뉴 항목

메뉴 항목 ID메뉴 항목 이름
contextMenu.drawing-group그룹
drawing.operation.set-drawing-group그룹화
drawing.operation.cancel-drawing-group그룹 해제
contextMenu.drawing-arrange정렬
drawing.operation.set-drawing-arrange-front맨 앞으로 가져오기
drawing.operation.set-drawing-arrange-forward앞으로 가져오기
drawing.operation.set-drawing-arrange-back맨 뒤로 보내기
drawing.operation.set-drawing-arrange-backward뒤로 보내기
contextMenu.drawing-align맞춤
sheet.operation.set-drawing-align-left왼쪽 맞춤
sheet.operation.set-drawing-align-center가운데 맞춤
sheet.operation.set-drawing-align-right오른쪽 맞춤
sheet.operation.set-drawing-align-top위쪽 맞춤
sheet.operation.set-drawing-align-middle가운데 맞춤
sheet.operation.set-drawing-align-bottom아래쪽 맞춤
sheet.operation.set-drawing-align-horizon수평 간격 균등 분배
sheet.operation.set-drawing-align-vertical수직 간격 균등 분배
sheet.operation.add-drawing-comment댓글 추가
sheet.command.chart.open-focused-panel차트 패널 열기
sheet.command.chart.copy-focused-chart복사
sheet.command.chart.export-focused-image이미지로 내보내기
sheet.command.chart.delete-focused-chart차트 삭제

상황별 리본 메뉴 항목

이 컨트롤은 일치 모양, 슬라이서, 또는 타임 라인이 선택 될 때 나타납니다.

메뉴 항목 ID메뉴 항목 이름
sheet.operation.apply-shape-quick-style빠른 스타일
sheet.operation.update-shape-type도형 변경
sheets-shape-ui.ribbon.shape-format.style-control도형 스타일 컨트롤
sheets-shape-ui.ribbon.shape-format.text-control도형 텍스트 컨트롤
sheet.menu.shape.flip-horizontal가로 뒤집기
sheet.menu.shape.flip-vertical세로 뒤집기
sheets-shape-ui.ribbon.shape-format.arrange-forward앞으로 보내기
sheets-shape-ui.ribbon.shape-format.arrange-backward뒤로 보내기
sheets-shape-ui.ribbon.shape-format.arrange-front맨 앞으로
sheets-shape-ui.ribbon.shape-format.arrange-back맨 뒤로
sheets-shape-ui.ribbon.shape-format.formula-control수식 도형 컨트롤
sheet.operation.open-sheet-shape-format-panel도형 서식
shape-editor-ui.operation.toggle-floating-toolbar플로팅 도구 모음
sheet.menu.slicer-quick-style빠른 스타일
sheet.menu.slicer-settings슬라이서 설정
sheet.menu.timeline-settings타임라인 설정
sheet.menu.slicer-connections보고서 연결

모바일 전용 메뉴 항목

메뉴 항목 ID메뉴 항목 이름
sheet.menu.mobile.crosshair-highlight십자선 강조
sheet.menu.mobile.numfmt숫자 서식
sheet.command.set-once-format-painter서식 페인트

이 가이드는 어떠셨나요?

© 2026 DreamNum Co., Ltd.