fix:添加页面缓存
This commit is contained in:
parent
ab4be9ad69
commit
bf4d4e3b9e
@ -66,8 +66,8 @@ function addIframe() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main {
|
||||||
margin-top: var(--app-header-height) + 34px;
|
// margin-top: var(--app-header-height) + 34px;
|
||||||
height: calc(100vh - var(--app-header-height) - 34px);
|
height: calc(100vh - var(--app-header-height));
|
||||||
min-height: 0px;
|
min-height: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
|
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
|
||||||
<div :class="{ 'fixed-header': fixedHeader }">
|
<div :class="{ 'fixed-header': fixedHeader }">
|
||||||
<navbar @setLayout="setLayout" />
|
<navbar @setLayout="setLayout" />
|
||||||
<tags-view v-if="needTagsView" />
|
<tags-view v-if="needTagsView" v-show="false"/>
|
||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
<settings ref="settingRef" />
|
<settings ref="settingRef" />
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 是否显示 tagsView
|
* 是否显示 tagsView
|
||||||
*/
|
*/
|
||||||
tagsView: false,
|
tagsView: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示页签图标
|
* 显示页签图标
|
||||||
|
|||||||
@ -8,13 +8,30 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="VideoScript">
|
<script setup name="VideoScript">
|
||||||
import { ref } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import soccer from './components/soccer.vue'
|
import soccer from './components/soccer.vue'
|
||||||
import basketball from './components/basketball.vue'
|
import basketball from './components/basketball.vue'
|
||||||
|
|
||||||
const activeName = ref('soccer')
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
// 从URL参数获取activeName,如果没有则默认为'soccer'
|
||||||
|
const activeName = ref(route.query.tab || 'soccer')
|
||||||
|
|
||||||
|
// 监听activeName变化,更新URL参数
|
||||||
|
watch(activeName, (newVal) => {
|
||||||
|
router.replace({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
tab: newVal
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
const handleClick = (tab, event) => {
|
const handleClick = (tab, event) => {
|
||||||
console.log(tab, event)
|
console.log('点击标签页:', tab.props.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user