|
@@ -9,18 +9,17 @@ import {
|
|
|
watch
|
|
|
} from 'vue';
|
|
|
import styles from './index.module.less';
|
|
|
-import { useRoute, useRouter } from 'vue-router';
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
import request from '@/helpers/request';
|
|
|
-import { useEventListener, useScroll, useWindowScroll } from '@vueuse/core';
|
|
|
+import { useEventListener, useWindowScroll } from '@vueuse/core';
|
|
|
import MEmpty from '@/components/m-empty';
|
|
|
-import { Button, showToast } from 'vant';
|
|
|
+import { Button } from 'vant';
|
|
|
import { browser } from '@/helpers/utils';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'unit-detail',
|
|
|
setup() {
|
|
|
const route = useRoute();
|
|
|
- const { isScrolling } = useScroll(document, { behavior: 'smooth' });
|
|
|
|
|
|
const forms = reactive({
|
|
|
detailId: route.query.detailId,
|
|
@@ -31,21 +30,9 @@ export default defineComponent({
|
|
|
title: ' ',
|
|
|
listKnowledge: [] as any,
|
|
|
prevDetailId: '',
|
|
|
- nextDetailId: '',
|
|
|
- scrollingStatus: false
|
|
|
+ nextDetailId: ''
|
|
|
});
|
|
|
|
|
|
- watch(
|
|
|
- () => isScrolling.value,
|
|
|
- () => {
|
|
|
- let timer;
|
|
|
- clearTimeout(timer);
|
|
|
- timer = setTimeout(() => {
|
|
|
- forms.scrollingStatus = isScrolling.value;
|
|
|
- }, 100);
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
const getList = async () => {
|
|
|
forms.loading = true;
|
|
|
try {
|
|
@@ -274,11 +261,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
|
|
|
<MSticky position="bottom">
|
|
|
- <div
|
|
|
- class={[
|
|
|
- styles.stickBtnGroup,
|
|
|
- forms.scrollingStatus ? styles.stickHide : ''
|
|
|
- ]}>
|
|
|
+ <div class={[styles.stickBtnGroup]}>
|
|
|
<Button
|
|
|
round
|
|
|
class={styles.prevBtn}
|