feat: layer docs
This commit is contained in:
@@ -29,6 +29,32 @@ export interface DeckFrontmatter {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段样式配置
|
||||
*
|
||||
* 位置按照卡牌网格,安排 x,y,w,h 四个整数
|
||||
* 如 5x8 网格中 1,1,5,8 表示覆盖整个卡牌的区域
|
||||
*
|
||||
* 字体使用 f:8 来表示 8mm 字体
|
||||
*
|
||||
* 朝向使用 u:n/w/s/e 表示字段的上侧朝向北西南东
|
||||
*/
|
||||
export interface CardFieldStyle {
|
||||
/**
|
||||
* 位置:[x, y, w, h] 网格坐标和尺寸
|
||||
* 例如:[1, 1, 5, 8] 表示从 (1,1) 开始,宽 5 格,高 8 格
|
||||
*/
|
||||
pos?: [number, number, number, number];
|
||||
/**
|
||||
* 字体大小:格式 "f:8" 表示 8mm 字体
|
||||
*/
|
||||
font?: string;
|
||||
/**
|
||||
* 朝向:上侧朝向 "n" | "w" | "s" | "e"(北/西/南/东)
|
||||
*/
|
||||
up?: 'n' | 'w' | 's' | 'e';
|
||||
}
|
||||
|
||||
/**
|
||||
* 卡牌字段定义
|
||||
*/
|
||||
@@ -36,6 +62,7 @@ export interface CardField {
|
||||
name: string;
|
||||
description?: string;
|
||||
examples?: string[];
|
||||
style?: CardFieldStyle;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user