Răsfoiți Sursa

语音生成海报

jwyu 2 ani în urmă
părinte
comite
d7e7339b8c
2 a modificat fișierele cu 5 adăugiri și 15 ștergeri
  1. 1 1
      src/components/SharePoster.vue
  2. 4 14
      src/views/voice/List.vue

+ 1 - 1
src/components/SharePoster.vue

@@ -72,7 +72,7 @@ onLongPress(imgDom, onLongPressImg)
 
 <template>
     <div class="share-poster-wrap" @touchmove.prevent>
-        <div v-if="$store.state.platform!=='xcx'" @click="handleCreatePoster" >
+        <div v-if="$store.state.platform==='xcx'" @click="handleCreatePoster" >
             <slot v-if="props.isSlot"></slot>
             <img 
                 :style="props.style" 

+ 4 - 14
src/views/voice/List.vue

@@ -6,7 +6,6 @@ import {apiApplyPermission} from '@/api/user'
 import SelfList from '@/components/SelfList.vue'
 import SharePoster from '@/components/SharePoster.vue'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { useElementSize } from '@vueuse/core'
 import moment from 'moment'
 import { useRoute, useRouter } from 'vue-router'
 import { useStore } from 'vuex'
@@ -15,14 +14,6 @@ const router=useRouter()
 const route=useRoute()
 const store=useStore()
 
-//监听列表页面版心宽度
-const listPageEl=ref('')
-const {width}=useElementSize(listPageEl)
-
-//监听顶部筛选盒子的高度
-const topNavBoxEl=ref('')
-const {height}=useElementSize(topNavBoxEl)
-
 let noAuth=ref(null)//无权限数据
 
 // 获取板块列表
@@ -334,8 +325,8 @@ onActivated(()=>{
             <div class="global-main-btn btn" @click="handleApply" style="margin-bottom: 20px;">立即申请</div>
         </template>
     </div>
-    <div class="voice-list-page" :style="{paddingTop:height+20+'px'}" ref="listPageEl" v-else>
-        <div class="top-nav-list-box" :style="{width:width+'px'}" ref="topNavBoxEl">
+    <div class="voice-list-page" v-else>
+        <div class="top-nav-list-box">
             <span 
                 v-for="item in options" :key="item.id" 
                 :class="['multi-ellipsis item',item.id==listState.section_id&&'active']"
@@ -424,7 +415,6 @@ onActivated(()=>{
     }
 }
 .voice-list-page{
-    padding-top: 63px;
     .list-wrap{
         .item{
             padding: 20px;
@@ -494,12 +484,12 @@ onActivated(()=>{
     }
 
     .top-nav-list-box{
-        position: fixed;
+        position: sticky;
         top: 60px;
         padding: 20px;
         width: 100%;
-        max-width: 1240px;
         z-index: 10;
+        margin-top: -20px;
         background-color: #fff;
         border: 1px solid #F2F2F2;
         .item{