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
02e6308a
Commit
02e6308a
authored
May 19, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 通过url储存id
parent
0407444e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
221 additions
and
220 deletions
+221
-220
src/pages/main.vue
src/pages/main.vue
+12
-9
src/pages/tournament.vue
src/pages/tournament.vue
+209
-209
src/script/const.ts
src/script/const.ts
+0
-2
No files found.
src/pages/main.vue
View file @
02e6308a
...
@@ -231,7 +231,7 @@
...
@@ -231,7 +231,7 @@
</uni-pagination>
</uni-pagination>
</transition>
</transition>
<transition
name =
'switch'
>
<transition
name =
'switch'
>
<PageTournament
v-
show
=
'page.tournament'
/>
<PageTournament
v-
if
=
'page.tournament'
/>
</transition>
</transition>
</view>
</view>
</transition>
</transition>
...
@@ -247,10 +247,8 @@
...
@@ -247,10 +247,8 @@
import
Mycard
from
'
../script/mycard.ts
'
;
import
Mycard
from
'
../script/mycard.ts
'
;
import
emitter
from
'
../script/emitter.ts
'
import
emitter
from
'
../script/emitter.ts
'
import
{
import
{
selectTournament
,
updateTournament
,
updateTournament
,
tournamentInfo
,
tournamentInfo
,
tournamentExit
,
tournamentReload
tournamentReload
}
from
'
../script/const.ts
'
}
from
'
../script/const.ts
'
import
PageTournament
from
'
./tournament.vue
'
;
import
PageTournament
from
'
./tournament.vue
'
;
...
@@ -276,8 +274,8 @@
...
@@ -276,8 +274,8 @@
page
.
menu
=
false
;
page
.
menu
=
false
;
await
(
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
500
)));
await
(
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
500
)));
page
.
tournament
=
true
;
page
.
tournament
=
true
;
emitter
.
emit
(
selectTournament
,
search
.
result
.
tournaments
[
v
]
);
const
url
=
window
.
location
.
href
.
split
(
'
/?
'
);
tournament
.
init
(
search
.
result
.
tournaments
[
v
]);
window
.
location
.
replace
(
`
${
url
[
0
]}
/tournament/
${
search
.
result
.
tournaments
[
v
].
id
}
/?
${
url
[
1
]
??
''
}
`)
},
},
menu : async(): Promise<void> => {
menu : async(): Promise<void> => {
page.tournament = false;
page.tournament = false;
...
@@ -530,20 +528,25 @@
...
@@ -530,20 +528,25 @@
}
}
});
});
onBeforeMount
(()
=>
{
onBeforeMount(()
: void
=> {
Uniapp.chkScreen(size.get);
Uniapp.chkScreen(size.get);
search
.
on
();
document.addEventListener("click", page.show.clear);
document.addEventListener("click", page.show.clear);
emitter.on(tournamentInfo, page.show.drawer);
emitter.on(tournamentInfo, page.show.drawer);
emitter
.
on
(
tournamentExit
,
page
.
show
.
menu
);
// @ts-ignore
// @ts-ignore
emitter.on(tournamentReload, tournament.init);
emitter.on(tournamentReload, tournament.init);
const url = window.location.href.match(/tournament\/(\d+)[^\/]*\/\?/);
if (url && !isNaN(parseInt(url[1]))) {
page.menu = false;
page.tournament = true;
} else {
search.on();
}
});
});
onUnmounted(() => {
onUnmounted(() => {
document.removeEventListener("click", page.show.clear);
document.removeEventListener("click", page.show.clear);
emitter.off(tournamentInfo, page.show.drawer);
emitter.off(tournamentInfo, page.show.drawer);
emitter
.
off
(
tournamentExit
,
page
.
show
.
menu
);
// @ts-ignore
// @ts-ignore
emitter.off(tournamentReload, tournament.init);
emitter.off(tournamentReload, tournament.init);
});
});
...
...
src/pages/tournament.vue
View file @
02e6308a
This diff is collapsed.
Click to expand it.
src/script/const.ts
View file @
02e6308a
...
@@ -6,9 +6,7 @@ const tournamentExit = 'tournamentExit';
...
@@ -6,9 +6,7 @@ const tournamentExit = 'tournamentExit';
const
tournamentReload
=
'
tournamentReload
'
const
tournamentReload
=
'
tournamentReload
'
export
{
export
{
selectTournament
,
updateTournament
,
updateTournament
,
tournamentInfo
,
tournamentInfo
,
tournamentExit
,
tournamentReload
tournamentReload
};
};
\ 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