refactor(dnfs): JS代码节点改为在当前页面执行以支持页面特效

移除 iframe 沙箱方案,改为 new Function 在当前页面上下文执行,
代码可直接操作 document/window 对页面施加特效;console 输出捕获到下方区域。
This commit is contained in:
qing committed 2026-08-04 22:08:15 +08:00
1 parent 2918f2c83c
commit fed2d42472
4 files changed
+33 -48

No files matched your search

+10 -5
View File
@@ -526,13 +526,18 @@ input[type="button"]:disabled {
word-break: break-all;
}
.sp-image { display: block; max-width: 100%; border-radius: var(--radius-sm); }
.sp-run { margin-top: 0.5rem; }
.sp-run-frame {
width: 100%;
height: 120px;
.sp-run {
margin-top: 0.5rem;
max-height: 320px;
overflow: auto;
padding: 0.75rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg);
font-size: 0.78rem;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-all;
}
.sp-note { font-size: 0.82rem; color: var(--fg-secondary); margin-top: 0.4rem; }
#sp-panel { margin-top: 0.4rem; }