Files
marqdo/tests/ext/web-form-slot-smoke.mq.md
T
cflmyandCursor fb6254e501 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>
2026-09-09 16:52:41 +08:00

1.2 KiB


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<div id="qd-note-form-mount">" 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

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
  2. has_form 1. order_ok

    print text=slot-ok 2. * print text=slot-order-fail

> print text=slot-form-fail

print text=slot-mount-fail