TierListMaker:修订间差异
来自卡厄思梦境WIKI
无编辑摘要 标签:手工回退 |
无编辑摘要 |
||
| 第45行: | 第45行: | ||
display: flex; | display: flex; | ||
gap: 6px; | gap: 6px; | ||
} | |||
/* 导出时隐藏工具按钮 */ | |||
.exporting .tier-tools { | |||
display: none !important; | |||
} | } | ||
.color-toggle { | .color-toggle { | ||
| 第68行: | 第72行: | ||
gap: 6px; | gap: 6px; | ||
align-items: flex-start; | align-items: flex-start; | ||
padding: 4px; | |||
} | } | ||
.tier-dropzone.pool { | .tier-dropzone.pool { | ||
| 第74行: | 第79行: | ||
border-radius: 6px; | border-radius: 6px; | ||
background: #fafafa; | background: #fafafa; | ||
} | |||
/* 导出时隐藏角色池 */ | |||
.exporting .pool-wrapper { | |||
display: none !important; | |||
} | } | ||
.pool-wrapper { margin-top: 12px; } | .pool-wrapper { margin-top: 12px; } | ||
| 第150行: | 第159行: | ||
outline: none; | outline: none; | ||
cursor: text; | cursor: text; | ||
} | } | ||
</style> | </style> | ||
| 第428行: | 第432行: | ||
return; | return; | ||
} | } | ||
// 添加导出样式类 | |||
maker.classList.add('exporting'); | maker.classList.add('exporting'); | ||
prepareImagesForExport(table); | prepareImagesForExport(table); | ||
ensureHtml2Canvas(function() { | ensureHtml2Canvas(function() { | ||
html2canvas(table, { | // 稍微延迟以确保CSS生效 | ||
setTimeout(function() { | |||
html2canvas(table, { | |||
backgroundColor: '#ffffff', | |||
scale: 2, | |||
useCORS: true, | |||
allowTaint: false, | |||
imageTimeout: 15000 | |||
}).then(function(canvas) { | |||
downloadCanvas(canvas); | |||
}).catch(function(err) { | |||
console.error('html2canvas 失败', err); | |||
alert('保存PNG失败:' + (err && err.message ? err.message : '未知错误')); | |||
}); | }).finally(function() { | ||
maker.classList.remove('exporting'); | |||
}); | |||
}, 100); | |||
}); | }); | ||
} | } | ||
| 第493行: | 第503行: | ||
} | } | ||
n.querySelectorAll && n.querySelectorAll('.avatar-frame').forEach(makeDraggable); | n.querySelectorAll && n.querySelectorAll('.avatar-frame').forEach(makeDraggable); | ||
if (pool.contains(n)) cleanupEmptyPlaceholdersIn(pool); | if (pool.contains(n)) cleanupEmptyPlaceholdersIn(pool); | ||
} | } | ||