- CHANGELOG.md:v2.8.0 条目(中英双语); - README.md:版本行 2.7.1→2.8.0 + 愿景第 6 条(知识可证明); - doc/releases/v2.8.0.md:双语发版说明(亮点/用法/已知限制); - skills/marqdo-dev/index.mq.md:新增 prove 任务(路径/目录模式/ require_lean/json;参数用 + 行声明升参,check 与 narrative-ratio 通过); - 设计文档 §12.5 标记已合入;发版链接统一指向 doc/releases/v2.8.0.md。
34 lines
1.8 KiB
Markdown
Executable File
34 lines
1.8 KiB
Markdown
Executable File
---
|
|
markup: occlusion
|
|
title: Draft and list editor
|
|
import:
|
|
controls: ../controls.mq.md
|
|
component: ext/web/component/index.mq.md
|
|
table: lib/table.mq.md
|
|
---
|
|
|
|
## nodes
|
|
|
|
| 返回 | 类型 | 说明 |
|
|
|---|---|---|
|
|
| result | list | Structured View rows for this component |
|
|
|
|
The editor contains one draft input, three draft actions, the export actions and an initially empty native list. The client owns records, stable identities and delegated deletion; no authored list HTML is stored here. Save persists only the draft under this origin. Copy and Download export current item text while list state remains in browser session memory.
|
|
|
|
We **heading = [Read the plain editor heading](component.markdown(text="## 待办"))** and **input = [Describe the exact draft target](controls.input(id="draft", hint="新项…"))** and **children = [Place input after its heading](table.concat(a=`heading`, b=`input`))**.
|
|
|
|
`actions` =
|
|
|
|
| @ | id | label | secondary |
|
|
|---|---|---|---|
|
|
| 1 | add | 添加 | False |
|
|
| 2 | save | 存草稿 | True |
|
|
| 3 | load | 读草稿 | True |
|
|
| 4 | copy-log | 复制列表 | True |
|
|
| 5 | dl-list | 下载列表 | True |
|
|
|
|
- [Describe each native action leaf](for actions as action)
|
|
We **button = [Keep this action separate from state](controls.button(id=access(action, "id"), label=access(action, "label"), secondary=access(action, "secondary")))** and **children = [Preserve the authored action order](table.concat(a=`children`, b=`button`))**.
|
|
We **empty = [Start the empty native list](table.empty_list())** and **attrs = [Retain the delegated list target](table.put(in=None, at="id", value="items"))** and **list = [Describe the list container](component.wrap(children=`empty`, kind="list", attrs=`attrs`, slot="items"))**.
|
|
Return *[Keep the list after its editing controls](table.concat(a=`children`, b=`list`))*.
|