chore(瘦身): 用户端清掉 115 行引用不存在 handler 的注释模板与 0-importer shim
BrandConvertTab.vue 747 -> 633 行:两段注释掉的模板(模板管理 / 模板示例)引用的 10 个
handler 与 state(openTemplatePicker / saveCurrentTemplateAsDefault / removeCurrentTemplate /
handleTemplateFileChange / downloadTemplateXlsx / downloadTemplateZip / templateInputRef /
templateUploading / templateSavingDefault / templateDeleting)在本文件里一个都不存在——
块外使用 0 次、const|function 声明 0 处,恢复出来直接报错,属真死码。连带删掉只服务于它们的
7 条 CSS 规则与组选择器里那条死成员(.btn-delete, + .template-download-row { 合并)。
另删 src/shared/api/digital-human.ts(1 行 re-export shim,0 个 importer)。
双证:npm test(node --test)762 例全绿、npx vue-tsc --noEmit rc=0;
自检残留 9 个死名各 0 次、注释与花括号配对、活类名 opt-btn/empty-option/btn-delete 未误伤。
没有采纳同轮审计给的「digital-human 类型模块 157 行可删」:java-modules.ts:17 在 export * 它,
java-modules-reexport.test.ts 把它钉进再导出普查、modules-image-video.test.ts 真调其中函数——
那份结论同段里既说「FE src 0 引用」又说「re-export 走 java-modules」,两句互相矛盾。
This commit is contained in:
@@ -36,44 +36,6 @@
|
|||||||
<div v-if="!convertTemplates.length" class="empty-option">暂无可用模板</div>
|
<div v-if="!convertTemplates.length" class="empty-option">暂无可用模板</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="section-title">模板管理</div>
|
|
||||||
<div class="template-actions">
|
|
||||||
<button type="button" class="opt-btn" :disabled="templateUploading" @click="openTemplatePicker">
|
|
||||||
{{ templateUploading ? '上传中...' : '上传 txt 模板' }}
|
|
||||||
</button>
|
|
||||||
<button type="button" class="opt-btn small" :disabled="templateSavingDefault"
|
|
||||||
@click="saveCurrentTemplateAsDefault">
|
|
||||||
{{ templateSavingDefault ? '设置中...' : '设为默认模板' }}
|
|
||||||
</button>
|
|
||||||
<button type="button" class="opt-btn small danger" :disabled="!canDeleteCurrentTemplate || templateDeleting"
|
|
||||||
@click="removeCurrentTemplate">
|
|
||||||
{{ templateDeleting ? '删除中...' : '删除当前模板' }}
|
|
||||||
</button>
|
|
||||||
<input ref="templateInputRef" type="file" accept=".txt,text/plain" class="hidden-file-input"
|
|
||||||
@change="handleTemplateFileChange" />
|
|
||||||
<div class="template-actions-hint">
|
|
||||||
当前模板:{{ currentConvertTemplate?.templateName || '未加载模板' }}
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<!-- <div class="section-title">模板示例</div>
|
|
||||||
<div class="template-download-list">
|
|
||||||
<button type="button" class="template-download-row" @click="downloadTemplateXlsx">
|
|
||||||
<span class="template-download-icon" aria-hidden="true">XLSX</span>
|
|
||||||
<span class="template-download-text">
|
|
||||||
<span class="title">下载 Excel 模板示例</span>
|
|
||||||
<span class="hint">品牌文档格式_模板.xlsx</span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="template-download-row" @click="downloadTemplateZip">
|
|
||||||
<span class="template-download-icon" aria-hidden="true">ZIP</span>
|
|
||||||
<span class="template-download-text">
|
|
||||||
<span class="title">下载文件夹示例</span>
|
|
||||||
<span class="hint">模板2-以文件夹方式上传.zip</span>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="section-title">转换说明</div>
|
<div class="section-title">转换说明</div>
|
||||||
<div class="option-group">
|
<div class="option-group">
|
||||||
<label class="radio-item active">
|
<label class="radio-item active">
|
||||||
@@ -474,8 +436,7 @@ async function batchDeleteHistory(views: TaskItemView[]) {
|
|||||||
.opt-btn,
|
.opt-btn,
|
||||||
.btn-run,
|
.btn-run,
|
||||||
.download,
|
.download,
|
||||||
.btn-delete,
|
.btn-delete {
|
||||||
.template-download-row {
|
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
@@ -587,81 +548,6 @@ async function batchDeleteHistory(views: TaskItemView[]) {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-actions {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-actions-hint {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #5e6878;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden-file-input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-list {
|
|
||||||
display: grid;
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-row {
|
|
||||||
width: 100%;
|
|
||||||
padding: 14px 16px;
|
|
||||||
background: linear-gradient(135deg, #2e3a52 0%, #1f2b1f 100%);
|
|
||||||
border: 1px solid #2a3a2a;
|
|
||||||
border-radius: 10px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-row:hover {
|
|
||||||
border-color: #2e7d32;
|
|
||||||
background: linear-gradient(135deg, #2e3a52 0%, #243324 100%);
|
|
||||||
box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-icon {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: linear-gradient(145deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
color: #f5f8fc;
|
|
||||||
font-size: 11px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-text {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-text .title {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #f5f8fc;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-download-text .hint {
|
|
||||||
margin: 2px 0 0;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #5e6878;
|
|
||||||
}
|
|
||||||
|
|
||||||
.run-row {
|
.run-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export * from './types/modules/digital-human'
|
|
||||||
Reference in New Issue
Block a user