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
5b77ab4b
Commit
5b77ab4b
authored
May 20, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
b4db05ce
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
209 additions
and
71 deletions
+209
-71
src/pages/main.vue
src/pages/main.vue
+11
-3
src/pages/tournament.vue
src/pages/tournament.vue
+107
-31
src/script/match.ts
src/script/match.ts
+2
-2
src/script/post.ts
src/script/post.ts
+21
-8
src/script/type.ts
src/script/type.ts
+9
-2
src/style/tournament.scss
src/style/tournament.scss
+59
-25
No files found.
src/pages/main.vue
View file @
5b77ab4b
...
@@ -447,12 +447,12 @@
...
@@ -447,12 +447,12 @@
total
:
0
,
total
:
0
,
tournaments
:
[]
as
Array
<
Tournament
>
tournaments
:
[]
as
Array
<
Tournament
>
},
},
on
:
async
()
:
Promise
<
void
>
=>
{
on
:
async
(
Data
:
TournamentFindObject
=
search
.
info
)
:
Promise
<
void
>
=>
{
page
.
drawer
=
false
;
page
.
drawer
=
false
;
if
(
search
.
result
.
total
>
0
)
{
if
(
search
.
result
.
total
>
0
)
{
search
.
result
.
total
=
0
;
search
.
result
.
total
=
0
;
}
}
const
result
=
await
Tabulator
.
Tournament
.
FindALL
(
Mycard
.
token
,
search
.
info
);
const
result
=
await
Tabulator
.
Tournament
.
FindALL
(
Mycard
.
token
,
Data
);
search
.
result
.
total
=
result
.
total
;
search
.
result
.
total
=
result
.
total
;
search
.
result
.
tournaments
=
result
.
tournaments
;
search
.
result
.
tournaments
=
result
.
tournaments
;
},
},
...
@@ -598,7 +598,15 @@
...
@@ -598,7 +598,15 @@
if
(
page
.
tournament
)
if
(
page
.
tournament
)
page
.
show
.
menu
();
page
.
show
.
menu
();
create
.
clear
();
create
.
clear
();
await
search
.
on
();
await
search
.
on
({
pageCount
:
1
,
id
:
0
,
creator
:
Mycard
.
id
>=
0
?
Mycard
.
id
:
0
,
name
:
''
,
rule
:
''
,
visibility
:
''
,
status
:
''
}
as
TournamentFindObject
);
}
}
},
},
remove
:
(
v
:
number
)
:
void
=>
{
remove
:
(
v
:
number
)
:
void
=>
{
...
...
src/pages/tournament.vue
View file @
5b77ab4b
This diff is collapsed.
Click to expand it.
src/script/match.ts
View file @
5b77ab4b
...
@@ -11,7 +11,7 @@ class Match {
...
@@ -11,7 +11,7 @@ class Match {
player2Score
:
number
;
player2Score
:
number
;
player1Id
:
number
;
player1Id
:
number
;
player2Id
:
number
;
player2Id
:
number
;
winnerId
:
number
;
winnerId
:
number
|
null
;
childMatchId
:
number
;
childMatchId
:
number
;
constructor
(
obj
:
MatchObject
)
{
constructor
(
obj
:
MatchObject
)
{
...
@@ -24,7 +24,7 @@ class Match {
...
@@ -24,7 +24,7 @@ class Match {
this
.
player2Id
=
obj
.
player2Id
;
this
.
player2Id
=
obj
.
player2Id
;
this
.
player1Score
=
obj
.
player1Score
;
this
.
player1Score
=
obj
.
player1Score
;
this
.
player2Score
=
obj
.
player2Score
;
this
.
player2Score
=
obj
.
player2Score
;
this
.
winnerId
=
obj
.
winnerId
;
this
.
winnerId
=
obj
.
winnerId
as
number
|
null
;
this
.
childMatchId
=
obj
.
childMatchId
;
this
.
childMatchId
=
obj
.
childMatchId
;
}
}
...
...
src/script/post.ts
View file @
5b77ab4b
...
@@ -20,7 +20,8 @@ import {
...
@@ -20,7 +20,8 @@ import {
AllTournament
,
AllTournament
,
AllParticipant
,
AllParticipant
,
AllMatch
,
AllMatch
,
UserObject
UserObject
,
TournamentAParticipant
}
from
'
./type.ts
'
}
from
'
./type.ts
'
class
TabulatorAPI
{
class
TabulatorAPI
{
...
@@ -76,7 +77,7 @@ class TabulatorAPI {
...
@@ -76,7 +77,7 @@ class TabulatorAPI {
return
false
;
return
false
;
}
}
},
},
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Tournament
|
undefined
>
=>
{
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Tournament
AParticipant
>
=>
{
let
response
:
{
let
response
:
{
data
:
{
data
:
{
data
:
TournamentObject
;
data
:
TournamentObject
;
...
@@ -88,11 +89,27 @@ class TabulatorAPI {
...
@@ -88,11 +89,27 @@ class TabulatorAPI {
'
x-user-token
'
:
token
'
x-user-token
'
:
token
}
}
});
});
return
new
Tournament
(
response
.
data
.
data
);
let
participants
:
Array
<
Participant
>
=
[];
response
.
data
.
data
.
participants
.
forEach
((
i
:
ParticipantObject
)
=>
{
participants
.
push
(
new
Participant
(
i
));
});
return
{
tournament
:
new
Tournament
(
response
.
data
.
data
),
participant
:
{
participants
:
participants
,
total
:
participants
.
length
}
};
}
}
catch
(
error
)
{
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
return
undefined
;
return
{
tournament
:
undefined
,
participant
:
{
participants
:
[],
total
:
0
}
};
}
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
...
@@ -153,7 +170,6 @@ class TabulatorAPI {
...
@@ -153,7 +170,6 @@ class TabulatorAPI {
'
x-user-token
'
:
token
'
x-user-token
'
:
token
}
}
});
});
console
.
log
(
response
)
return
response
.
data
.
success
;
return
response
.
data
.
success
;
}
}
catch
(
error
)
{
catch
(
error
)
{
...
@@ -173,7 +189,6 @@ class TabulatorAPI {
...
@@ -173,7 +189,6 @@ class TabulatorAPI {
'
x-user-token
'
:
token
'
x-user-token
'
:
token
}
}
});
});
console
.
log
(
response
)
return
response
.
data
.
success
;
return
response
.
data
.
success
;
}
}
catch
(
error
)
{
catch
(
error
)
{
...
@@ -193,7 +208,6 @@ class TabulatorAPI {
...
@@ -193,7 +208,6 @@ class TabulatorAPI {
'
x-user-token
'
:
token
'
x-user-token
'
:
token
}
}
});
});
console
.
log
(
response
)
return
response
.
data
.
success
;
return
response
.
data
.
success
;
}
}
catch
(
error
)
{
catch
(
error
)
{
...
@@ -213,7 +227,6 @@ class TabulatorAPI {
...
@@ -213,7 +227,6 @@ class TabulatorAPI {
'
x-user-token
'
:
token
'
x-user-token
'
:
token
}
}
});
});
console
.
log
(
response
)
return
response
.
data
.
success
;
return
response
.
data
.
success
;
}
}
catch
(
error
)
{
catch
(
error
)
{
...
...
src/script/type.ts
View file @
5b77ab4b
...
@@ -22,7 +22,7 @@ interface MatchFindObject {
...
@@ -22,7 +22,7 @@ interface MatchFindObject {
interface
MatchUpdateObject
{
interface
MatchUpdateObject
{
player1Score
:
number
;
player1Score
:
number
;
player2Score
:
number
;
player2Score
:
number
;
winnerId
:
number
;
winnerId
:
number
|
null
|
undefined
;
}
}
interface
MatchObject
extends
MatchUpdateObject
{
interface
MatchObject
extends
MatchUpdateObject
{
...
@@ -142,10 +142,16 @@ interface AllTournament extends All {
...
@@ -142,10 +142,16 @@ interface AllTournament extends All {
interface
AllParticipant
extends
All
{
interface
AllParticipant
extends
All
{
participants
:
Array
<
Participant
>
;
participants
:
Array
<
Participant
>
;
}
}
interface
AllMatch
extends
All
{
interface
AllMatch
extends
All
{
matchs
:
Array
<
Match
>
;
matchs
:
Array
<
Match
>
;
}
}
interface
TournamentAParticipant
{
tournament
:
Tournament
|
undefined
;
participant
:
AllParticipant
}
interface
UserObject
{
interface
UserObject
{
avatar
:
string
avatar
:
string
id
:
777668
id
:
777668
...
@@ -171,5 +177,6 @@ export {
...
@@ -171,5 +177,6 @@ export {
AllParticipant
,
AllParticipant
,
AllMatch
,
AllMatch
,
ruleSettings
,
ruleSettings
,
UserObject
UserObject
,
TournamentAParticipant
}
}
\ No newline at end of file
src/style/tournament.scss
View file @
5b77ab4b
...
@@ -17,37 +17,40 @@
...
@@ -17,37 +17,40 @@
}
}
}
}
#body
{
position
:
relative
;
width
:
80%
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1fr
);
grid-template-rows
:
1fr
;
justify-content
:
center
;
transition
:
all
0
.3s
ease
;
#left
{
justify-self
:
left
;
}
#center
{
justify-self
:
center
;
}
#right
{
justify-self
:
right
;
}
}
:deep
(
.uni-list-item
)
{
:deep
(
.uni-list-item
)
{
.small
{
margin-top
:
6rpx
;
color
:
#999
;
font-size
:
12px
;
overflow
:
hidden
;
}
#header
{
#header
{
min-width
:
30%
;
min-width
:
30%
;
.rank
{
margin-top
:
6rpx
;
color
:
#999
;
font-size
:
12px
;
overflow
:
hidden
;
}
}
}
#body
{
#body
{
position
:
relative
;
width
:
100%
;
display
:
grid
;
grid-template-columns
:
repeat
(
3
,
1fr
);
grid-template-rows
:
1fr
;
justify-content
:
center
;
transition
:
all
0
.3s
ease
;
#left
{
justify-self
:
left
;
}
#center
{
justify-self
:
center
;
}
#right
{
justify-self
:
right
;
}
&
:hover
{
&
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
scale
:
(
1
.05
);
scale
:
(
1
.05
);
}
}
}
}
#footer
{
#footer
{
.button
{
.button
{
...
@@ -63,10 +66,41 @@
...
@@ -63,10 +66,41 @@
}
}
.match
{
.match
{
border
:
1px
solid
gray
;
position
:
absolute
;
position
:
absolute
;
z-index
:
1
;
z-index
:
1
;
top
:
var
(
--
top
);
top
:
var
(
--
top
);
left
:
100%
;
// left : 100%;
width
:
100%
;
background-color
:
white
;
display
:
grid
;
justify-content
:
center
;
justify-items
:
center
;
.button
{
border
:
1px
solid
#409eff
;
display
:
flex
;
justify-content
:
center
;
width
:
80%
;
&
:hover
{
background-color
:
#e6e6e6
;
cursor
:
pointer
;
}
}
#score
{
display
:
flex
;
justify-content
:
center
;
justify-items
:
center
;
column-gap
:
10%
;
margin
:
3%
;
}
}
:deep
(
#matchList
)
{
#footer
{
width
:
20%
;
display
:
flex
;
flex-direction
:
row-reverse
;
}
}
}
}
}
}
}
\ No newline at end of file
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