API參考·Vue編輯器橋
@oriatheme/vue-editor
Vue 為本機來源 ThemeEditor 提供可組合和自動預覽協調;它不會匯出可見的 UI。包裝及環境
Vue 3.5客戶端橋接器;使用本地 CLI 安裝的 ThemeEditor 作為可見根。
bash
pnpm add @oriatheme/editor-core @oriatheme/vue-editorbash
npm install @oriatheme/editor-core @oriatheme/vue-editorbash
yarn add @oriatheme/editor-core @oriatheme/vue-editorbash
bun 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 types | ThemeEditorOptions, ThemeEditorSession, … | 便利類型/域再匯出;行為仍保留在編輯器核心中。 |
ts
import { provideThemeEditor, useThemeEditorAutoPreview } from "@oriatheme/vue-editor";
const session = provideThemeEditor(options);
const preview = useThemeEditorAutoPreview(runtime);可見的 UI 存在於您的專案中
此套件匯出沒有完整的編輯器或預設的CSS。使用 CLI 安裝多檔案 Vue 來源元件並保留編輯器核心/執行時間草稿和原子預覽邊界。