OriaTheme
GitHub

API 참조 · Vue 편집기 브리지

@oriatheme/vue-editor

Vue는 로컬 소스 ThemeEditor에 대한 구성 가능 및 자동 미리보기 조정을 제공합니다. 눈에 보이는 UI를 내보내지 않습니다.

패키지 및 환경

Vue 3.5 클라이언트 브리지; 로컬에 CLI가 설치된 ThemeEditor를 보이는 루트로 사용합니다.

bash
pnpm add @oriatheme/editor-core @oriatheme/vue-editor

소비자 프로젝트에서 이미 선택한 패키지 관리자와 잠금 파일을 사용하세요. 예제에서는 패키지 루트 내보내기만 사용합니다. src, dist 또는 레지스트리 템플릿에서 깊이 가져오지 마세요.

Exports

수출서명설명
provideThemeEditor(options | session) => ThemeEditorSession호출자 세션을 제공하거나 소유 세션을 만듭니다.
useThemeEditor() => { session, snapshot }읽기 전용 얕은 편집기 스냅샷 참조를 노출합니다.
useThemeEditorAutoPreview(runtime, mode?) => Readonly<ShallowRef<ThemeEditorAutoPreviewState>>유효한 개정을 통합하고 마지막 유효한 미리보기를 유지합니다.
re-exported editor-core typesThemeEditorOptions, ThemeEditorSession, …편의 유형/도메인 다시 내보내기; 동작은 편집기 코어에 남아 있습니다.
ts
import { provideThemeEditor, useThemeEditorAutoPreview } from "@oriatheme/vue-editor";

const session = provideThemeEditor(options);
const preview = useThemeEditorAutoPreview(runtime);

프로젝트에 표시되는 UI가 있습니다.

이 패키지는 완전한 편집기나 기본 CSS를 내보내지 않습니다. CLI를 사용하여 다중 파일 Vue 소스 구성 요소를 설치하고 편집기 코어/런타임 초안 및 원자 미리 보기 경계를 유지합니다.