iter: b05 文档站 props 表补齐默认值列(df 字段),manifest 驱动链路核查闭环
This commit is contained in:
@@ -191,9 +191,9 @@ var ORDER={skin-dom:0,'headless-core':1,'design-tokens':2};
|
||||
function esc(s){return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>')}
|
||||
function propsTable(c){
|
||||
var rows=(c.props||[]).map(function(p){
|
||||
return '<tr><td><code>'+esc(p.n)+'</code></td><td><code>'+esc(p.t)+'</code></td><td>'+(p.r?'必填':'否')+'</td><td>'+esc(p.d||'')+(p.k?'(回调)':'')+'</td></tr>';
|
||||
return '<tr><td><code>'+esc(p.n)+'</code></td><td><code>'+esc(p.t)+'</code></td><td>'+(p.r?'必填':'否')+'</td><td>'+(p.df?'<code>'+esc(p.df)+'</code>':'—')+'</td><td>'+esc(p.d||'')+(p.k?'(回调)':'')+'</td></tr>';
|
||||
}).join('');
|
||||
return '<table class="props"><tr><th>参数</th><th>类型</th><th>必填</th><th>说明</th></tr>'+rows+'</table>';
|
||||
return '<table class="props"><tr><th>参数</th><th>类型</th><th>必填</th><th>默认值</th><th>说明</th></tr>'+rows+'</table>';
|
||||
}
|
||||
function compBlock(c){
|
||||
var steps=(c.steps||[]).map(function(s){return '<li>'+esc(s)+'</li>'}).join('');
|
||||
@@ -289,7 +289,7 @@ function renderAgentDocs(index, tokens) {
|
||||
if (c.props?.length) {
|
||||
lines.push('参数:', '');
|
||||
for (const prop of c.props) {
|
||||
const marks = [prop.r ? '必填' : '', prop.k ? '回调' : ''].filter(Boolean).join(',');
|
||||
const marks = [prop.r ? '必填' : '', prop.k ? '回调' : '', prop.df ? `默认 ${prop.df}` : ''].filter(Boolean).join(',');
|
||||
lines.push(`- ${prop.n}${marks ? `(${marks})` : ''}:${prop.t}${prop.d ? ` —— ${prop.d}` : ''}`);
|
||||
}
|
||||
lines.push('');
|
||||
|
||||
Reference in New Issue
Block a user