|
@@ -1,3 +1,5 @@
|
|
|
+import OHeader from '@/components/o-header'
|
|
|
+import OSticky from '@/components/o-sticky'
|
|
|
import request from '@/helpers/request'
|
|
|
import { Tab, Tabs } from 'vant'
|
|
|
import { defineComponent, reactive } from 'vue'
|
|
@@ -9,7 +11,8 @@ export default defineComponent({
|
|
|
setup() {
|
|
|
const state = reactive({
|
|
|
loading: true,
|
|
|
- orchestraList: [] as any
|
|
|
+ orchestraList: [] as any,
|
|
|
+ height: 'auto'
|
|
|
})
|
|
|
// 获取乐团列表
|
|
|
const getOrchestras = async () => {
|
|
@@ -46,8 +49,17 @@ export default defineComponent({
|
|
|
getOrchestras()
|
|
|
return () => (
|
|
|
<div class={styles.train}>
|
|
|
+ <OSticky
|
|
|
+ position="top"
|
|
|
+ onGetHeight={(height: any) => {
|
|
|
+ document.documentElement.style.setProperty('--header-height', height + 'px')
|
|
|
+ state.height = height
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <OHeader />
|
|
|
+ </OSticky>
|
|
|
{!state.loading && (
|
|
|
- <Tabs sticky lineWidth={20} lineHeight={4} swipeable animated>
|
|
|
+ <Tabs sticky lineWidth={20} lineHeight={4} offsetTop={state.height} swipeable animated>
|
|
|
<Tab title="周报" name="WEEKLY">
|
|
|
<List type="WEEKLY" orchestraList={state.orchestraList} />
|
|
|
</Tab>
|