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
11dddfa6
Commit
11dddfa6
authored
May 26, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8a1fb14e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
90 deletions
+121
-90
src/pages/drawer/creator.vue
src/pages/drawer/creator.vue
+5
-5
src/pages/drawer/setting.vue
src/pages/drawer/setting.vue
+100
-0
src/pages/main.vue
src/pages/main.vue
+8
-82
src/pages/pics.vue
src/pages/pics.vue
+7
-3
src/script/const.ts
src/script/const.ts
+1
-0
No files found.
src/pages/creator.vue
→
src/pages/
drawer/
creator.vue
View file @
11dddfa6
...
...
@@ -79,11 +79,11 @@
</template>
<
script
setup
lang =
'ts'
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
TournamentFindObject
,
ruleSettings
,
UserObject
}
from
'
../script/type.ts
'
;
import
{
Tabulator
,
User
}
from
'
../script/post.ts
'
;
import
Mycard
from
'
../script/mycard.ts
'
;
import
emitter
from
'
../script/emitter.ts
'
import
Const
from
'
../script/const.ts
'
import
{
TournamentFindObject
,
ruleSettings
,
UserObject
}
from
'
../
../
script/type.ts
'
;
import
{
Tabulator
,
User
}
from
'
../
../
script/post.ts
'
;
import
Mycard
from
'
../
../
script/mycard.ts
'
;
import
emitter
from
'
../
../
script/emitter.ts
'
import
Const
from
'
../
../
script/const.ts
'
let
create
=
reactive
({
name
:
''
,
...
...
src/pages/drawer/setting.vue
0 → 100644
View file @
11dddfa6
<
template
>
<uni-card
class =
'Setting'
v-if =
'tournament'
>
<uni-easyinput
type =
'text'
placeholder =
'比赛名称'
v-model =
'tournament.name'
:disabled =
'tournament.operatorChk()'
/>
<uni-easyinput
type =
'text'
placeholder =
'比赛描述'
v-model =
'tournament.description'
:disabled =
'tournament.operatorChk()'
/>
<uni-data-select
placeholder =
'可见性'
v-model =
'tournament.visibility.select'
:localdata =
'tournament.visibility.range'
:disabled =
'tournament.operatorChk()'
></uni-data-select>
<uni-data-select
placeholder =
'规则'
v-model =
'tournament.rule.select'
:localdata =
'tournament.rule.range'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
></uni-data-select>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<uni-easyinput
type =
'number'
placeholder =
'轮数'
v-model =
'tournament.rule.settings.rounds'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'tournament.rule.settings.winScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'tournament.rule.settings.drawScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'tournament.rule.settings.byeScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
</view>
<view
v-show =
"tournament.rule.select == 'SingleElimination'"
>
<checkbox-group
@
change =
'tournament.hasThirdPlaceMatch.select'
>
<label>
<checkbox
:checked =
'tournament.rule.settings.hasThirdPlaceMatch'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
季军赛
</label>
</checkbox-group>
</view>
<br>
<uni-card
id =
'collaborators'
title =
'协作者'
:is-full =
'true'
>
<uni-list>
<uni-list-chat
v-for =
'(i, v) in tournament.collaborators'
:avatarCircle =
'true'
:clickable =
true
:avatar =
'i.avatar'
:title =
'i.username'
:note =
"i.id >= 0 ? i.id.toString() : ''"
@
click =
'tournament.remove(v)'
>
<view>
<view
class =
'button'
>
<uni-icons
type =
'trash'
></uni-icons>
</view>
</view>
</uni-list-chat>
<uni-list-item>
<template
v-slot:header
>
<uni-forms>
<uni-forms-item
id =
'header'
>
<uni-easyinput
type =
'text'
placeholder =
'添加协作者'
v-model =
'tournament.collaborator'
:disabled =
'tournament.operatorChk()'
/>
</uni-forms-item>
</uni-forms>
</
template
>
<
template
v-slot:footer
>
<view
id =
'footer'
>
<view
class =
'button'
:style =
"
{ '--color' : '#409eff' }"
@click = 'tournament.add()'
>
<uni-icons
type =
'personadd'
></uni-icons>
</view>
</view>
</
template
>
</uni-list-item>
</uni-list>
</uni-card>
<br>
<view
class =
'button'
@
click =
'tournament.update()'
>
<view>
<span>
设置
</span>
<uni-icons
type =
'calendar'
></uni-icons>
</view>
</view>
</uni-card>
</template>
<
script
setup
lang =
'ts'
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
emitter
from
'
../../script/emitter.ts
'
;
import
Const
from
'
../../script/const.ts
'
let
tournament
;
const
init
=
(
t
)
:
void
=>
{
tournament
=
t
;
};
onBeforeMount
(()
:
void
=>
{
emitter
.
on
(
Const
.
searcherInit
,
init
)
});
onUnmounted
(()
:
void
=>
{
emitter
.
off
(
Const
.
searcherInit
,
init
)
});
</
script
>
\ No newline at end of file
src/pages/main.vue
View file @
11dddfa6
...
...
@@ -116,92 +116,13 @@
</uni-card>
</transition>
<transition
name =
'move_left'
>
<
uni-card
<
Setting
class =
'click'
id =
'drawer'
v-show =
'page.drawer && page.tournament && !page.create'
title =
'比赛设置'
:style =
"
{ '--size' : `${size.width > size.height ? size.width / 4 : size.width / 2}px` }"
>
<uni-easyinput
type =
'text'
placeholder =
'比赛名称'
v-model =
'tournament.name'
:disabled =
'tournament.operatorChk()'
/>
<uni-easyinput
type =
'text'
placeholder =
'比赛描述'
v-model =
'tournament.description'
:disabled =
'tournament.operatorChk()'
/>
<uni-data-select
placeholder =
'可见性'
v-model =
'tournament.visibility.select'
:localdata =
'tournament.visibility.range'
:disabled =
'tournament.operatorChk()'
></uni-data-select>
<uni-data-select
placeholder =
'规则'
v-model =
'tournament.rule.select'
:localdata =
'tournament.rule.range'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
></uni-data-select>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<uni-easyinput
type =
'number'
placeholder =
'轮数'
v-model =
'tournament.rule.settings.rounds'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'tournament.rule.settings.winScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'tournament.rule.settings.drawScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'tournament.rule.settings.byeScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
</view>
<view
v-show =
"tournament.rule.select == 'SingleElimination'"
>
<checkbox-group
@
change =
'tournament.hasThirdPlaceMatch.select'
>
<label>
<checkbox
:checked =
'tournament.rule.settings.hasThirdPlaceMatch'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
季军赛
</label>
</checkbox-group>
</view>
<br>
<uni-card
id =
'collaborators'
title =
'协作者'
:is-full =
'true'
>
<uni-list>
<uni-list-chat
v-for =
'(i, v) in tournament.collaborators'
:avatarCircle =
'true'
:clickable =
true
:avatar =
'i.avatar'
:title =
'i.username'
:note =
"i.id >= 0 ? i.id.toString() : ''"
@
click =
'tournament.remove(v)'
>
<view>
<view
class =
'button'
>
<uni-icons
type =
'trash'
></uni-icons>
</view>
</view>
</uni-list-chat>
<uni-list-item>
<template
v-slot:header
>
<uni-forms>
<uni-forms-item
id =
'header'
>
<uni-easyinput
type =
'text'
placeholder =
'添加协作者'
v-model =
'tournament.collaborator'
:disabled =
'tournament.operatorChk()'
/>
</uni-forms-item>
</uni-forms>
</
template
>
<
template
v-slot:footer
>
<view
id =
'footer'
>
<view
class =
'button'
:style =
"
{ '--color' : '#409eff' }"
@click = 'tournament.add()'
>
<uni-icons
type =
'personadd'
></uni-icons>
</view>
</view>
</
template
>
</uni-list-item>
</uni-list>
</uni-card>
<br>
<view
class =
'button'
@
click =
'tournament.update()'
>
<view>
<span>
设置
</span>
<uni-icons
type =
'calendar'
></uni-icons>
</view>
</view>
</uni-card>
>
</Setting>
</transition>
<transition
name =
'move_left'
>
<Create
...
...
@@ -263,8 +184,9 @@
import
emitter
from
'
../script/emitter.ts
'
import
Const
from
'
../script/const.ts
'
import
PageTournament
from
'
./tournament.vue
'
;
import
Create
from
'
./creator.vue
'
;
import
Create
from
'
./
drawer/
creator.vue
'
;
import
Pics
from
'
./pics.vue
'
;
import
Setting
from
'
./drawer/setting.vue
'
;
let
page
=
reactive
({
user
:
false
,
...
...
@@ -528,6 +450,10 @@
}
});
onMounted
(()
=>
{
emitter
.
emit
(
Const
.
searcherInit
,
tournament
);
});
onUnmounted
(()
=>
{
document
.
removeEventListener
(
"
click
"
,
page
.
show
.
clear
);
emitter
.
off
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
...
...
src/pages/pics.vue
View file @
11dddfa6
...
...
@@ -3,10 +3,10 @@
<transition
name =
'move_right'
>
<view
v-show =
'deck.participant'
>
<uni-card
:title =
"deck.main.length > 0 ? '主卡组' : '暂无主卡组'"
>
<image
class =
'deck_cards'
v-for =
'(i, v) in deck.main'
:src =
'
`https://cdn.233.momobako.com/ygopro/pics/$
{i}.jpg!half`
' mode = 'aspectFit' @error = 'changeImg.main(v)'>
</image>
<image
class =
'deck_cards'
v-for =
'(i, v) in deck.main'
:src =
'
getImg(i)
'
mode =
'aspectFit'
@
error =
'changeImg.main(v)'
></image>
</uni-card>
<uni-card
:title =
"deck.side.length > 0 ? '副卡组' : '暂无副卡组'"
>
<image
class =
'deck_cards'
v-for =
'(i, v) in deck.side'
:src =
'
`https://cdn.233.momobako.com/ygopro/pics/$
{i}.jpg!half`
' mode = 'aspectFit' @error = 'changeImg.main(v)'>
</image>
<image
class =
'deck_cards'
v-for =
'(i, v) in deck.side'
:src =
'
getImg(i)
'
mode =
'aspectFit'
@
error =
'changeImg.main(v)'
></image>
</uni-card>
</view>
</transition>
...
...
@@ -16,7 +16,11 @@
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
emitter
from
'
../script/emitter.ts
'
import
Const
from
'
../script/const.ts
'
import
Participant
from
'
../script/participant.ts
'
;
import
Participant
from
'
../script/participant.ts
'
;
const
getImg
=
(
i
:
number
)
=>
{
return
i
==
0
||
Math
.
floor
(
Math
.
log10
(
Math
.
abs
(
i
)))
<
8
?
`https://cdn.233.momobako.com/ygopro/pics/
${
i
}
.jpg!half`
:
`https://cdn02.moecube.com:444/ygopro-super-pre/data/pics/
${
i
}
.jpg`
};
const
changeImg
=
{
main
:
(
v
:
number
)
:
void
=>
{
...
...
src/script/const.ts
View file @
11dddfa6
...
...
@@ -5,6 +5,7 @@ class ConstData {
tournamentReload
=
'
tournamentReload
'
;
createOff
=
'
createOff
'
;
picsOpen
=
'
picsOpen
'
;
searcherInit
=
'
searcherInit
'
;
}
const
Const
=
new
ConstData
();
...
...
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