Commit 7635ef2c authored by xiaoye's avatar xiaoye

Update tournament.vue

parent 18a1ecb3
Pipeline #41550 passed with stages
in 1 minute and 6 seconds
...@@ -535,11 +535,13 @@ ...@@ -535,11 +535,13 @@
tournament.decks_loading = true; tournament.decks_loading = true;
try { try {
const zip = new JSZip(); const zip = new JSZip();
for (const i of participant.array) { let copyValue = participant.copyValue;
if (!i.deck) continue; if (copyValue == 0) copyValue = participant.array.length;
console.log(i.deck.toYdkString()) for (let i = 0; i < copyValue; i++) {
const blob = new Blob([i.deck.toYdkString()], { type: 'text/plain;charset=utf-8' }); const p = participant.array[i];
zip.file(`${i.qq ? i.qq.toString() + '-' : ''}${i.name}.ydk`, blob); if (!p.deck) continue;
const blob = new Blob([p.deck.toYdkString()], { type: 'text/plain;charset=utf-8' });
zip.file(`${p.qq ? p.qq.toString() + '-' : ''}${p.name}.ydk`, blob);
} }
const content = await zip.generateAsync({ const content = await zip.generateAsync({
type: "blob", type: "blob",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment