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
81c04526
Commit
81c04526
authored
May 21, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c56babd6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
12 deletions
+18
-12
src/pages/main.vue
src/pages/main.vue
+17
-11
src/pages/tournament.vue
src/pages/tournament.vue
+1
-1
No files found.
src/pages/main.vue
View file @
81c04526
...
@@ -122,29 +122,30 @@
...
@@ -122,29 +122,30 @@
title =
'比赛设置'
title =
'比赛设置'
:style =
"
{ '--size' : `${size.width > size.height ? size.width / 4 : size.width / 2}px` }"
:style =
"
{ '--size' : `${size.width > size.height ? size.width / 4 : size.width / 2}px` }"
>
>
<uni-easyinput
type =
'text'
placeholder =
'比赛名称'
v-model =
'tournament.name'
/>
<uni-easyinput
type =
'text'
placeholder =
'比赛名称'
v-model =
'tournament.name'
:disabled =
'tournament.operatorChk()'
/>
<uni-easyinput
type =
'text'
placeholder =
'比赛描述'
v-model =
'tournament.description'
/>
<uni-easyinput
type =
'text'
placeholder =
'比赛描述'
v-model =
'tournament.description'
:disabled =
'tournament.operatorChk()'
/>
<uni-data-select
<uni-data-select
placeholder =
'可见性'
placeholder =
'可见性'
v-model =
'tournament.visibility.select'
v-model =
'tournament.visibility.select'
:localdata =
'tournament.visibility.range'
:localdata =
'tournament.visibility.range'
:disabled =
'tournament.operatorChk()'
></uni-data-select>
></uni-data-select>
<uni-data-select
<uni-data-select
placeholder =
'规则'
placeholder =
'规则'
v-model =
'tournament.rule.select'
v-model =
'tournament.rule.select'
:localdata =
'tournament.rule.range'
:localdata =
'tournament.rule.range'
:disabled =
"tournament.this?.status != 'Ready'"
:disabled =
"tournament.this?.status != 'Ready'
|| tournament.operatorChk()
"
></uni-data-select>
></uni-data-select>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<uni-easyinput
type =
'number'
placeholder =
'轮数'
v-model =
'tournament.rule.settings.rounds'
:disabled =
"tournament.this?.status != 'Ready'"
/>
<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'"
/>
<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'"
/>
<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'"
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'tournament.rule.settings.byeScore'
:disabled =
"tournament.this?.status != 'Ready'
|| tournament.operatorChk()
"
/>
</view>
</view>
<view
v-show =
"tournament.rule.select == 'SingleElimination'"
>
<view
v-show =
"tournament.rule.select == 'SingleElimination'"
>
<checkbox-group
@
change =
'tournament.hasThirdPlaceMatch.select'
>
<checkbox-group
@
change =
'tournament.hasThirdPlaceMatch.select'
>
<label>
<label>
<checkbox
:checked =
'tournament.rule.settings.hasThirdPlaceMatch'
:disabled =
"tournament.this?.status != 'Ready'"
/>
季军赛
<checkbox
:checked =
'tournament.rule.settings.hasThirdPlaceMatch'
:disabled =
"tournament.this?.status != 'Ready'
|| tournament.operatorChk()
"
/>
季军赛
</label>
</label>
</checkbox-group>
</checkbox-group>
</view>
</view>
...
@@ -174,7 +175,7 @@
...
@@ -174,7 +175,7 @@
<template
v-slot:header
>
<template
v-slot:header
>
<uni-forms>
<uni-forms>
<uni-forms-item
id =
'header'
>
<uni-forms-item
id =
'header'
>
<uni-easyinput
type =
'text'
placeholder =
'添加协作者'
v-model =
'tournament.collaborator'
/>
<uni-easyinput
type =
'text'
placeholder =
'添加协作者'
v-model =
'tournament.collaborator'
:disabled =
'tournament.operatorChk()'
/>
</uni-forms-item>
</uni-forms-item>
</uni-forms>
</uni-forms>
</
template
>
</
template
>
...
@@ -476,6 +477,11 @@
...
@@ -476,6 +477,11 @@
}
finally
{
}
finally
{
tournament
.
collaborator
=
''
;
tournament
.
collaborator
=
''
;
}
}
},
operatorChk
:
()
:
boolean
=>
{
if
(
!
tournament
.
this
)
return
true
return
!
(
Mycard
.
id
>=
0
&&
(
Mycard
.
id
==
tournament
.
this
?.
creator
||
tournament
.
this
?.
collaborators
.
includes
(
Mycard
.
id
)))
}
}
});
});
...
@@ -504,7 +510,7 @@
...
@@ -504,7 +510,7 @@
document
.
addEventListener
(
"
click
"
,
page
.
show
.
clear
);
document
.
addEventListener
(
"
click
"
,
page
.
show
.
clear
);
emitter
.
on
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
emitter
.
on
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
// @ts-ignore
// @ts-ignore
emitter
.
on
(
tournamentReload
,
tournament
.
init
);
emitter
.
on
(
Const
.
tournamentReload
,
tournament
.
init
);
emitter
.
on
(
Const
.
createOff
,
creator
.
off
);
emitter
.
on
(
Const
.
createOff
,
creator
.
off
);
const
url
=
window
.
location
.
pathname
.
match
(
/
\/
tournament
\/([^\/]
+
)(?=\/
|$
)
/
);
const
url
=
window
.
location
.
pathname
.
match
(
/
\/
tournament
\/([^\/]
+
)(?=\/
|$
)
/
);
...
@@ -525,7 +531,7 @@
...
@@ -525,7 +531,7 @@
document
.
removeEventListener
(
"
click
"
,
page
.
show
.
clear
);
document
.
removeEventListener
(
"
click
"
,
page
.
show
.
clear
);
emitter
.
off
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
emitter
.
off
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
// @ts-ignore
// @ts-ignore
emitter
.
off
(
tournamentReload
,
tournament
.
init
);
emitter
.
off
(
Const
.
tournamentReload
,
tournament
.
init
);
emitter
.
off
(
Const
.
createOff
,
creator
.
off
);
emitter
.
off
(
Const
.
createOff
,
creator
.
off
);
});
});
...
...
src/pages/tournament.vue
View file @
81c04526
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
>
>
<uni-forms>
<uni-forms>
<view
class =
'button_list'
>
<view
class =
'button_list'
>
<view
class =
'button click'
@
click =
'
tournament.operatorChk(() =>
{ emitter.emit(Const.tournamentInfo); })
'>
<view
class =
'button click'
@
click =
'
() =>
{ emitter.emit(Const.tournamentInfo); }
'>
<span>
设置
</span>
<span>
设置
</span>
<uni-icons
type =
'info'
></uni-icons>
<uni-icons
type =
'info'
></uni-icons>
</view>
</view>
...
...
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