优化:将路由改为Hash模式,大屏预览新窗口打开,修复滚动条问题

This commit is contained in:
yuantao
2026-01-16 18:20:15 +08:00
parent 46756f2501
commit e2f9871199
4 changed files with 23 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(),
history: createWebHashHistory(),
routes: [
{
path: '/',

View File

@@ -223,9 +223,9 @@ onMounted(async () => {
await store.initialize()
})
// 跳转到大屏展示页面
// 跳转到大屏展示页面(新窗口)
const goToDisplay = () => {
router.push('/display')
window.open('/#/display', '_blank')
}
// 快捷键指南

View File

@@ -281,14 +281,17 @@ onUnmounted(() => {
align-items: center;
justify-content: center;
overflow: hidden;
padding: 0 40px;
padding: 0;
box-sizing: border-box;
}
.scroll-list {
display: grid;
gap: 30px;
width: 100%;
width: calc(100% - 80px);
max-width: 1600px;
padding: 0 40px;
box-sizing: border-box;
}
.scroll-item {
@@ -307,8 +310,9 @@ onUnmounted(() => {
.scroll-name {
white-space: pre-line;
word-wrap: break-word;
word-break: break-all;
word-break: break-word;
width: 100%;
overflow-wrap: break-word;
}
/* 结果模式 */
@@ -319,15 +323,18 @@ onUnmounted(() => {
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 40px;
padding: 0;
box-sizing: border-box;
}
.winners-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 30px;
width: 100%;
width: calc(100% - 80px);
max-width: 1600px;
padding: 0 40px;
box-sizing: border-box;
}
.winner-item {
@@ -346,7 +353,8 @@ onUnmounted(() => {
.winner-name {
white-space: pre-line;
word-wrap: break-word;
word-break: break-all;
word-break: break-word;
width: 100%;
overflow-wrap: break-word;
}
</style>

View File

@@ -4,11 +4,12 @@ import path from 'path'
export default defineConfig({
plugins: [vue()],
base: '.',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@utils': path.resolve(__dirname, './utils')
'@utils': path.resolve(__dirname, './utils'),
},
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
}
})
extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
},
})