瀏覽代碼

列表滚动实现

ming 1 年之前
父節點
當前提交
df641012cb
共有 2 個文件被更改,包括 17 次插入10 次删除
  1. 1 1
      package.json
  2. 16 9
      src/views/security-plan.vue

+ 1 - 1
package.json

@@ -32,8 +32,8 @@
         "vue": "^3.0.11",
         "vue-amap": "^0.5.10",
         "vue-router": "^4.0.0-0",
-        "vue-seamless-scroll": "^1.1.23",
         "vue-video-player": "^5.0.2",
+        "vue3-seamless-scroll": "^2.0.1",
         "vuedraggable": "^2.24.3",
         "vuex": "^4.0.0-0"
     },

+ 16 - 9
src/views/security-plan.vue

@@ -371,12 +371,14 @@
                  <div class="dailyNewSec">
                     <h4 style="display: flex">疏导区每日动态</h4>
                     <div class="dailyItem ">
-                        <el-row>
-                            <el-col v-for="(item,index) in dailyArray" :key="index">
-                                <a target="_blank" @click="openPdf(item.url)">{{ item.title }}</a>
-                            </el-col>
-                        </el-row>
-                       
+                        
+                        <Vue3SeamlessScroll :list="dailyArray" :step=".1" :hover="true">
+                            <el-row>
+                                <el-col v-for="(item,index) in dailyArray" :key="index">
+                                    <a target="_blank" @click="openPdf(item.url)">{{ item.title }}</a>
+                                </el-col>
+                            </el-row>
+                        </Vue3SeamlessScroll>
 
                         <!-- <el-row>
                             <el-col><a href="http://32.0.15.107:8080/mhvi/20231031.pdf" target="_blank">第七期 第六届中国国际进口博览会每日工作动态</a></el-col>
@@ -938,13 +940,16 @@ import linstener from "@c/mixins/linstener";
 import map from "@c/mixins/map-data1";
 import gauge from "@c/gauge/index6";
 // import map from "@c/mixins/map-gaode-public";
+
+import { Vue3SeamlessScroll } from "vue3-seamless-scroll";
+
 import category from "@c/category/index22";
 import unitBox from "@c/unitBox/index";
 import CountTo from "@/components/count-to/index.js";
 import Hls from "hls.js";
 export default {
     mixins: [linstener, map],
-    components: { category, gauge, CountTo,unitBox },
+    components: { category, gauge, CountTo,unitBox ,Vue3SeamlessScroll },
     data() {
         return {
             check: 1,
@@ -3396,14 +3401,16 @@ export default {
                 line-height:.375rem;
                 font-size:.175rem;
                 width:58%;
-                // margin:0 auto;
                 height:60%;
-                overflow-y:scroll;
+                overflow-y:hidden;
                 display: inline-block;
+                
                 a{
                     color:#fff;
                     border-bottom:1px solid #fff;
                 //     text-decoration: none;
+                    text-decoration: none;
+                    cursor:pointer
                 }
             }
         }