|
@@ -4,6 +4,7 @@ import Loader from '@/components/Loader.vue';
|
4
|
4
|
import ScrollDown from '@/components/ScrollDown.vue';
|
5
|
5
|
import Image from '@/components/Image.vue';
|
6
|
6
|
import { preload } from '@/utils/preload';
|
|
7
|
+import scroll from '@/utils/scroll'
|
7
|
8
|
|
8
|
9
|
const fixedLogo = './fixed-logo.png';
|
9
|
10
|
|
|
@@ -11,6 +12,7 @@ const loading = ref(true);
|
11
|
12
|
const percent = ref(0);
|
12
|
13
|
const resources = ref([]);
|
13
|
14
|
const fixedLogoHidden = ref(false);
|
|
15
|
+const unScroll = ref()
|
14
|
16
|
|
15
|
17
|
const updateCallback = (num) => {
|
16
|
18
|
percent.value = Math.round(num * 100);
|
|
@@ -22,13 +24,14 @@ const onClick = () => {
|
22
|
24
|
}
|
23
|
25
|
|
24
|
26
|
onMounted(() => {
|
25
|
|
- window.document.body.addEventListener('touchmove', () => {
|
|
27
|
+ const { onStart, onEnd } = scroll(window.document);
|
|
28
|
+
|
|
29
|
+ onStart(() => {
|
26
|
30
|
fixedLogoHidden.value = true;
|
27
|
31
|
})
|
28
|
|
- window.document.body.addEventListener('touchend', () => {
|
29
|
|
- setTimeout(() => {
|
|
32
|
+
|
|
33
|
+ onEnd(() => {
|
30
|
34
|
fixedLogoHidden.value = false;
|
31
|
|
- }, 600);
|
32
|
35
|
})
|
33
|
36
|
|
34
|
37
|
preload(updateCallback).then((res) => {
|