导出后的html隐藏按钮
This commit is contained in:
@@ -53,6 +53,7 @@ function renderBootScript(config, mode) {
|
||||
'window.APP_PROJECT = ' + safeJsonForScript(project) + ';',
|
||||
"window.APP_MODE = '" + mode + "';",
|
||||
'window.__INITIAL_CONFIG__ = ' + safeJsonForScript(config) + ';',
|
||||
"document.documentElement.setAttribute('data-app-mode', window.APP_MODE);",
|
||||
'</script>'
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
@@ -410,11 +410,13 @@ a{color:#3370ff;text-decoration:none}
|
||||
.custom-date-range-config{padding:10px;background:var(--bg);border-radius:4px}
|
||||
.data-load-banner{background:#fff7e6;border-bottom:1px solid #ffd591;color:#ad6800;padding:10px 16px;font-size:13px;line-height:1.5;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
|
||||
.data-load-banner.hidden{display:none !important}
|
||||
html[data-app-mode="standalone"] .platform-only{display:none !important}
|
||||
</style>
|
||||
<script id="app-boot">
|
||||
window.APP_PROJECT = { id: 'approval_of_design', label: '飞书审批配置服务' };
|
||||
window.APP_MODE = 'server';
|
||||
window.__INITIAL_CONFIG__ = null;
|
||||
document.documentElement.setAttribute('data-app-mode', window.APP_MODE);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -442,9 +444,9 @@ window.__INITIAL_CONFIG__ = null;
|
||||
</div>
|
||||
</div>
|
||||
<div class="create-approval-header-right">
|
||||
<input type="file" id="import-html-input" accept=".html,text/html" hidden onchange="importHtmlFile(this)">
|
||||
<button type="button" class="ud-btn ud-btn--text ud-btn--sm" id="btn-import-html" onclick="document.getElementById('import-html-input').click()">导入</button>
|
||||
<button type="button" class="ud-btn ud-btn--filled ud-btn--sm" id="btn-export-html" onclick="exportConfiguredHtml()">导出 审批流设计文档</button>
|
||||
<input type="file" id="import-html-input" class="platform-only" accept=".html,text/html" hidden onchange="importHtmlFile(this)">
|
||||
<button type="button" class="ud-btn ud-btn--text ud-btn--sm platform-only" id="btn-import-html" onclick="document.getElementById('import-html-input').click()">导入</button>
|
||||
<button type="button" class="ud-btn ud-btn--filled ud-btn--sm platform-only" id="btn-export-html" onclick="exportConfiguredHtml()">导出 审批流设计文档</button>
|
||||
<div class="page-contact-hint">如您有疑问可联系TH818部门人员</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4094,7 +4096,8 @@ function buildStandaloneHtml(config) {
|
||||
boot.textContent = [
|
||||
'window.APP_PROJECT = ' + JSON.stringify(window.APP_PROJECT || { id: 'approval_of_design', label: '飞书审批配置' }) + ';',
|
||||
"window.APP_MODE = 'standalone';",
|
||||
'window.__INITIAL_CONFIG__ = ' + JSON.stringify(config) + ';'
|
||||
'window.__INITIAL_CONFIG__ = ' + JSON.stringify(config) + ';',
|
||||
"document.documentElement.setAttribute('data-app-mode', window.APP_MODE);"
|
||||
].join('\n');
|
||||
}
|
||||
return '<!DOCTYPE html>\n' + clone.outerHTML;
|
||||
@@ -4126,7 +4129,7 @@ async function exportConfiguredHtml() {
|
||||
} catch (e) {
|
||||
alert('导出失败:' + (e.message || e));
|
||||
} finally {
|
||||
if (btn) { btn.disabled = false; btn.textContent = '保存并下载 HTML'; }
|
||||
if (btn) { btn.disabled = false; btn.textContent = '导出 审批流设计文档'; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user