Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another-web
Commits
468d8419
You need to sign in or sign up before continuing.
Commit
468d8419
authored
Nov 02, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
追加卡组批量导出
parent
f91d0f06
Pipeline
#41411
passed with stages
in 1 minute and 47 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
9 deletions
+44
-9
package-lock.json
package-lock.json
+1
-0
src/pages/pics.vue
src/pages/pics.vue
+3
-3
src/pages/tournament.vue
src/pages/tournament.vue
+37
-3
src/script/download.js
src/script/download.js
+3
-3
No files found.
package-lock.json
View file @
468d8419
...
...
@@ -8348,6 +8348,7 @@
"version"
:
"3.10.1"
,
"resolved"
:
"https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz"
,
"integrity"
:
"sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g=="
,
"license"
:
"(MIT OR GPL-3.0-or-later)"
,
"dependencies"
:
{
"lie"
:
"~3.3.0"
,
"pako"
:
"~1.0.2"
,
...
...
src/pages/pics.vue
View file @
468d8419
...
...
@@ -104,8 +104,8 @@
deck
.
blob
=
undefined
;
url
.
custom
=
''
;
},
clickClear
:
(
e
)
:
void
=>
{
let
element
=
e
.
targe
t
;
clickClear
:
(
e
:
MouseEvent
)
:
void
=>
{
let
element
:
HTMLElement
|
null
=
e
.
target
as
HTMLElemen
t
;
while
(
element
)
{
if
([
'
deckbutton
'
].
includes
(
element
.
id
)
||
element
.
classList
.
contains
(
'
Pics
'
))
return
undefined
;
...
...
@@ -114,7 +114,7 @@
deck
.
off
();
},
download
:
()
:
void
=>
{
Download
.
start
(
deck
.
blob
,
`
${
deck
.
participant
?.
name
}
`);
Download
.
start
(
deck
.
blob
,
`
${
deck
.
participant
?.
name
}
`
, '.ydk'
);
}
});
...
...
src/pages/tournament.vue
View file @
468d8419
...
...
@@ -89,6 +89,14 @@
>
新建单淘赛
</view>
<view
class =
'button'
id =
'decks'
@
click =
'tournament.decks'
v-show =
'tournament.operatorChk()'
>
导出卡组
</view>
</div>
</view>
<view>
...
...
@@ -360,10 +368,12 @@
import
{
TournamentCreateObject
,
MatchUpdateObject
,
TournamentGet
,
ParticipantUpdateObject
}
from
'
../script/type.ts
'
import
MatchTree
from
'
./matchTree.vue
'
;
import
svgDeck
from
'
./svg/svgDeck.vue
'
;
import
svgCards
from
'
./svg/svgCards.vue
'
;
import
Download
from
'
../script/download.js
'
;
import
JSZip
from
'
jszip
'
;
let
tournament
=
reactive
({
this
:
undefined
as
undefined
|
Tournament
,
decks_loading
:
false
,
status
:
{
text
:
new
Map
([
[
'
Ready
'
,
'
准备中
'
],
...
...
@@ -519,6 +529,30 @@
t
:
tournament
.
this
,
value
:
participant
.
copyValue
}
);
}
,
decks
:
async
()
:
Promise
<
void
>
=>
{
if
(
!
tournament
.
this
||
tournament
.
decks_loading
)
return
;
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
);
}
const
content
=
await
zip
.
generateAsync
({
type
:
"
blob
"
,
compressionOptions
:
{
level
:
9
}
}
);
Download
.
start
(
content
,
`${tournament.this.name
}
`
,
'
.zip
'
);
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
tournament
.
decks_loading
=
false
;
}
}
}
);
...
...
@@ -729,8 +763,8 @@
}
else
UniApp
.
error
(
'
请重试或检查网络设置
'
,
'
刷新失败
'
);
}
,
clickClear
:
(
e
)
:
void
=>
{
let
element
=
e
.
targe
t
;
clickClear
:
(
e
:
MouseEvent
)
:
void
=>
{
let
element
:
HTMLElement
|
null
=
e
.
target
as
HTMLElemen
t
;
while
(
element
)
{
if
([
'
body
'
].
includes
(
element
.
id
)
||
element
.
classList
.
contains
(
'
match
'
))
return
undefined
;
...
...
src/script/download.js
View file @
468d8419
class
DownloadFile
{
start
=
async
(
blob
,
fileName
)
=>
{
start
=
async
(
blob
,
fileName
,
exName
)
=>
{
// #ifdef H5
if
(
window
.
showSaveFilePicker
)
{
let
opts
=
{
suggestedName
:
`
${
fileName
}
.ydk
`
,
suggestedName
:
`
${
fileName
}
${
exName
}
`
,
types
:
[{
description
:
''
,
accept
:
{
'
application/octet-stream
'
:
[
'
.ydk
'
]
'
application/octet-stream
'
:
[
exName
]
}
}],
excludeAcceptAllOption
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment