fix: GAP-11 form slot mount and GAP-12 MARQDO_EXT import hint
compose_form/表单装配 can inject into intro via target/表单插槽; unresolved ext/ imports hint to set MARQDO_EXT when unset. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
cf9d96477b
commit
fb6254e501
9 files changed
+278
-33
No files matched your search
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: web form slot smoke
|
||||
description: compose_form target= mounts form inside intro HTML (GAP-11).
|
||||
import web:ext/web/web.mq.md
|
||||
import json:lib/json.mq.md
|
||||
import text:lib/text.mq.md
|
||||
---
|
||||
|
||||
# main
|
||||
|
||||
`fields` =
|
||||
|
||||
| 字段 | 标签 | 类型 | 必填 | 默认 |
|
||||
|------|------|------|------|------|
|
||||
| title | Title | text | true | |
|
||||
|
||||
*f = > web.form table="notes" action="insert"*
|
||||
*f = > `f`.fields fields=`fields`*
|
||||
|
||||
*intro = "<div class=\"cols\"><section id=\"left\">voice</section><div id=\"qd-note-form-mount\"></div></div>"*
|
||||
*page = > web.page title="Slot" intro=`intro`*
|
||||
*page = > `page`.compose_form id="note" form=`f` target="#qd-note-form-mount"*
|
||||
|
||||
*tgt = > json.get value=`page` key="form_target"*
|
||||
1. `tgt`
|
||||
> print text=target-ok
|
||||
2. *
|
||||
> print text=target-fail
|
||||
|
||||
*html = > `page`.render*
|
||||
*`has_mount` = > text.contains text=`html` sub="qd-note-form-mount"*
|
||||
*`has_form` = > text.contains text=`html` sub="site-form"*
|
||||
*`order_ok` = > text.contains text=`html` sub="qd-note-form-mount\"><div class=\"site-form\""*
|
||||
1. `has_mount`
|
||||
1. `has_form`
|
||||
1. `order_ok`
|
||||
> print text=slot-ok
|
||||
2. *
|
||||
> print text=slot-order-fail
|
||||
2. *
|
||||
> print text=slot-form-fail
|
||||
2. *
|
||||
> print text=slot-mount-fail
|
||||
Reference in new issue
Block a user