Docs

API 參考

Table

呈現精確查閱數值或結構化比較。

presentation.tsx

<Table id="owners" x={9} y={28} w={82} h={48} cells="市場|訊號|負責人;北區|上升|Ava" fontSize={12} />

屬性參考

屬性值應保持字面且可序列化,才能由 Canvas、Inspector、驗證與匯出流程可靠處理。

API屬性型別/值必要說明
所有原生圖層共用 propsidstring是穩定且唯一的圖層識別字。每個可見的原生圖層都必須提供。
xnumber是相對於投影片畫布左側的位置百分比。
ynumber是相對於投影片畫布頂端的位置百分比。
wnumber是圖層寬度,單位為畫布百分比。
hnumber是圖層高度,單位為畫布百分比。
groupIdstring—在不加入 wrapper 元素的情況下,將原生子圖層編組。
groupNamestring—在 Workbench 顯示的群組名稱。
sharedIdstring—連接相鄰 Morph 投影片中的同型圖層;在同一張投影片內必須唯一。
rotationnumber—順時針旋轉角度。
opacitynumber—圖層不透明度,範圍為 0 到 1。
motionJSON string—版本化的宣告式動作序列 JSON 字串;仍須保留完整的靜態最終畫面。
interactionJSON string—版本化的點擊互動 JSON 字串,可用於投影片導覽或連結。
Tablecellsstring是儲存格資料:直線分隔欄、分號分隔列。
rowsnumber—列數,範圍為 1 到 50。
columns / colsnumber—欄數,範圍為 1 到 50。
columnLabels / rowLabelsstring—序列化的欄或列標籤。
columnWidths / rowHeightsstring—序列化的比例軌道尺寸。
cellOverridesJSON string—由 Workbench 建立的逐格視覺覆寫。
fontFamily / fontSize / fontWeightstring | number—表格字體樣式;fontSize 單位為 point。
color / textColorcolor string—表格文字顏色。
background / backgroundColor / bgcolor string—表格背景顏色。
cellBackground / stripeBackgroundcolor string—儲存格底色與交錯列底色。
borderColor / borderWidth / borderStylecolor | number | solid | dashed | dotted—表格邊框樣式。
textAlign / textVerticalAlignleft | center | right / top | middle | bottom—儲存格對齊。
cellPaddingX / cellPaddingYnumber—儲存格水平與垂直內距,單位為像素。

必要語法

使用 id、x、y、w、h 與 cells;cells 用直線分隔欄位,用分號分隔列。

格式設定

需要時可使用 rows、columns、fontSize、fontWeight、background、cellBackground、stripeBackground、borderColor 與 borderWidth。Table 適合用在使用者必須精確檢查的數值。