|
@@ -1,4 +1,4 @@
|
|
|
-import { defineComponent, reactive } from 'vue';
|
|
|
+import { defineComponent, onMounted, reactive, ref } from 'vue';
|
|
|
import styles from './index.module.less';
|
|
|
import MHeader from '@/components/m-header';
|
|
|
import MFooter from '@/components/m-footer';
|
|
@@ -10,6 +10,7 @@ import PianoRoom from './piano-room';
|
|
|
import MusicRoom from './music-room';
|
|
|
import CoTenant from './co-tenant';
|
|
|
import CoPerson from './co-person';
|
|
|
+import { useScroll } from '@vueuse/core';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'home-page',
|
|
@@ -18,8 +19,11 @@ export default defineComponent({
|
|
|
activeTab: 1,
|
|
|
banner: aiBanner
|
|
|
});
|
|
|
+ const homeRef = ref<HTMLElement | null>(null);
|
|
|
+ // const { x, y, isScrolling, arrivedState, directions } = useScroll(homeRef);
|
|
|
+
|
|
|
return () => (
|
|
|
- <div class={styles.home}>
|
|
|
+ <div class={styles.home} ref={homeRef}>
|
|
|
<MHeader />
|
|
|
|
|
|
<div class={styles.banner}>
|
|
@@ -32,6 +36,8 @@ export default defineComponent({
|
|
|
class={styles.tabs}
|
|
|
lineHeight={0}
|
|
|
shrink
|
|
|
+ // sticky
|
|
|
+ // swipeable
|
|
|
onUpdate:active={(val: number) => {
|
|
|
if (val === 1) {
|
|
|
state.banner = aiBanner;
|
|
@@ -48,7 +54,7 @@ export default defineComponent({
|
|
|
'https://oss.dayaedu.com/klx/1699439359542banner.png';
|
|
|
}
|
|
|
}}>
|
|
|
- <Tab title=" 小酷Ai " name={1}>
|
|
|
+ <Tab title={'小酷Ai' + y.value} name={1}>
|
|
|
<CoAi />
|
|
|
</Tab>
|
|
|
<Tab title="云酷琴房" name={2}>
|