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 @@
tournament.decks_loading = true;
try {
const zip = new JSZip();
for (const i of participant.array) {
if (!i.deck) continue;
console.log(i.deck.toYdkString())
const blob = new Blob([i.deck.toYdkString()], { type: 'text/plain;charset=utf-8' });
zip.file(`${i.qq ? i.qq.toString() + '-' : ''}${i.name}.ydk`, blob);
let copyValue = participant.copyValue;
if (copyValue == 0) copyValue = participant.array.length;
for (let i = 0; i < copyValue; i++) {
const p = participant.array[i];
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({
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