API 參考
definePresentation
宣告 presentation.tsx 的標題與根 React component。
presentation.tsx
export default definePresentation({
title: "季度更新",
component: function Presentation() {
return <Deck title="季度更新">...</Deck>;
},
});屬性參考
屬性值應保持字面且可序列化,才能由 Canvas、Inspector、驗證與匯出流程可靠處理。
| API | 屬性 | 型別/值 | 必要 | 說明 |
|---|---|---|---|---|
| definePresentation | title | string | 是 | 簡報標題,應與 Deck 的 title 一致。 |
| component | React component | 是 | 回傳唯一 Deck 根節點的 React 元件。 |
必要欄位
title 是簡報標題;component 是回傳唯一 Deck 根節點的 React function。
只使用一次
presentation.tsx 必須預設匯出 definePresentation(...);definePresentation 與 Deck 的 title 請保持一致。