fix(编辑器): foreach_account 当容器渲染 —— 就地编辑/通用编辑器都能展开循环里的步骤
用户反馈"你只是打包成了一个动作,里面具体的步骤我也看不到":两个编辑器都把**容器类型写死** 成 loop/group/if_el,新的 foreach_account 被当叶子渲染 → 发布流程整段折叠成一步、改不了。 · release.js:就地编辑的嵌套渲染条件加上 foreach_account(then/else/children 都展开) · editor.js:卡片样式、子步骤渲染、参数表单三处都认 foreach_account(参数:跑哪天/指定日期/ 最多几个号/失败也再试 + 说明"数据源是计划表、不需要账号维护"),并留注释提醒加新容器要改三处 · 实测:把 _rpStepRow/_rpStepRows 抽出来在 node 里跑一遍,循环体与 then/else 全部渲染出来 ✓
This commit is contained in:
@@ -876,8 +876,11 @@ function _rpStepRow(s, path, total, idx) {
|
||||
var fields = _RP_FIELDS[s.type] || [];
|
||||
var body = fields.map(function (f) { return _rpField(s.type, p, f, path); }).join('');
|
||||
// 条件判断:命中/未命中两个分支**照样能就地编辑**(发布流程就藏在 then 里)
|
||||
// foreach_account(循环本机待发的号)也是容器 —— 不列进来的话,发布流程整段会被折叠成
|
||||
// 一个"看不见里面"的步骤(实测踩过:用户打开就地编辑发现改不了)
|
||||
var nested = '';
|
||||
if (s.type === 'if_el' || s.type === 'loop' || s.type === 'group') {
|
||||
if (s.type === 'if_el' || s.type === 'loop' || s.type === 'group'
|
||||
|| s.type === 'foreach_account') {
|
||||
[['then', '命中时(then)'], ['else', '没命中时(else)'], ['children', '里面的步骤']].forEach(function (pair) {
|
||||
var k = pair[0];
|
||||
if (!(p[k] instanceof Array)) return;
|
||||
|
||||
Reference in New Issue
Block a user