refactor(md-deck): pos string and yaml copy output
Replace per-axis x1/y1/x2/y2 layer fields with a single pos string (x1,y1-x2,y2) matching the compact layers format. When a deck is configured via a yaml/tag codeblock (data-config), the copy button now emits a yaml/tag block serialized from current store state so template layers round-trip.
This commit is contained in:
@@ -29,23 +29,19 @@ data-config:
|
||||
grid: 5x5
|
||||
layers:
|
||||
- prop: title
|
||||
x1: 1
|
||||
y1: 1
|
||||
x2: 5
|
||||
y2: 1
|
||||
pos: 1,1-5,1
|
||||
font: 12
|
||||
- template: |
|
||||
**{{name}}** — {{type}}
|
||||
{{description}}
|
||||
x1: 1
|
||||
y1: 3
|
||||
x2: 5
|
||||
y2: 8
|
||||
pos: 1,3-5,8
|
||||
font: 3
|
||||
align: l
|
||||
```
|
||||
````
|
||||
|
||||
`pos` 为网格位置 `x1,y1-x2,y2`(1-based,与紧凑 layers 字符串同格式)。
|
||||
|
||||
## 图层格式
|
||||
|
||||
`layers` 属性格式为 `字段:起始行,起始列-结束列,字号`,多个图层用空格分隔:
|
||||
|
||||
Reference in New Issue
Block a user