Commit ada59fc9 authored by zhengke's avatar zhengke

回到顶部

parent e133ddb2
<template>
<div class="BackTopBox animate__animated animate__fadeInUp">
<img class="cursor-pointer" src="../../assets//img/backtop.png"
style="height: 58px;"
@click="BackTop"/>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, reactive } from 'vue'
const emit = defineEmits<{
(event: 'BackTop'): void,
}>()
const BackTop = () =>{
emit('BackTop')
}
</script>
<style lang="scss" scoped>
.BackTopBox{
position: fixed;
right: 5vw;
bottom: 5vw;
z-index: 15;
}
</style>
\ No newline at end of file
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
</div> </div>
<div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded" <div v-else-if="dataList.length == 0 && !loading" class="q-mt-lg bg-white rounded"
style="padding: 3.1vw 10px;"> style="padding: 3.68vw 0;">
<el-empty description="暂无数据" :image="noDataImg(1)" /> <el-empty description="暂无数据" :image="noDataImg(1)" />
</div> </div>
<div v-if='queryObj.pageCount == queryObj.pageIndex && !loading' class="text-center q-pt-lg"><img :src="noDataImg(2)" width="118" /></div> <div v-if='queryObj.pageCount == queryObj.pageIndex && !loading' class="text-center q-pt-lg"><img :src="noDataImg(2)" width="118" /></div>
...@@ -226,6 +226,8 @@ ...@@ -226,6 +226,8 @@
@next="next"/> @next="next"/>
<!-- vip购买提示 --> <!-- vip购买提示 -->
<vipFooter v-if="!userInfo.iv&&!userInfo.it&&!userInfo.OpenPrompt" @close="closeVip"></vipFooter> <vipFooter v-if="!userInfo.iv&&!userInfo.it&&!userInfo.OpenPrompt" @close="closeVip"></vipFooter>
<!-- 到顶部 -->
<BackTop v-if="marketRef&&marketRef.scrollTop>800" @BackTop="goBackTop"></BackTop>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
...@@ -246,6 +248,7 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas' ...@@ -246,6 +248,7 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
import foote from '@/components/footer/index.vue'; import foote from '@/components/footer/index.vue';
import temDetails from "@/components/home/temDetails.vue"; import temDetails from "@/components/home/temDetails.vue";
import vipFooter from "@/components/home/vipFooter.vue"; import vipFooter from "@/components/home/vipFooter.vue";
import BackTop from "@/components/home/BackTop.vue";
import { LazyImg, Waterfall } from 'vue-waterfall-plugin-next' import { LazyImg, Waterfall } from 'vue-waterfall-plugin-next'
import 'vue-waterfall-plugin-next/dist/style.css' import 'vue-waterfall-plugin-next/dist/style.css'
...@@ -336,6 +339,10 @@ const loadProps = reactive({ ...@@ -336,6 +339,10 @@ const loadProps = reactive({
error error
}) })
const goBackTop = () => {
marketRef.value.scrollTop = 0
}
const errorImg = (res:any)=>{ const errorImg = (res:any)=>{
console.log(res,'===') console.log(res,'===')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment