Giter Site home page Giter Site logo

xfy520 / vue3-seamless-scroll Goto Github PK

View Code? Open in Web Editor NEW
231.0 2.0 33.0 2.99 MB

Vue3.0 无缝滚动组件

Home Page: https://doc.wssio.com/opensource/vue3-seamless-scroll/

License: MIT License

HTML 30.78% TypeScript 38.79% JavaScript 4.36% Vue 26.07%
vue scroll infinite-scroll vue3-seamless-scroll seamless-scroll vue3

vue3-seamless-scroll's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue3-seamless-scroll's Issues

singleWaitTime无法生效

您好,我这边使用您的库,按照简介去使用的组建库,但是使用singleWaitTime无法生效,下面是我的代码,可以帮我看下是那里使用错误吗

 <Vue3SeamlessScroll
            :list="currentErrorInfo"
            :singleHeight="21"
            :singleWaitTime="3000"
            :step="0.5"
          >
            <ul class="swiper-container">
              <li
                class="single-content"
                v-for="(item, index) in currentErrorInfo"
                :key="index"
              >
                <span class="content-id">{{ item?.vehicleId }}</span>
                <span :class="['content-code', handleLevelClass(item?.level)]"
                  >[{{ item?.code }}]</span
                >
                <span class="content-sg">{{ item?.msg }}</span>
              </li>
            </ul>
          </Vue3SeamlessScroll>

鼠标悬浮停止后,加入手动滚动。

大大好,您的这个插件很方便好用,只是产品想要鼠标悬浮滚动停止后还能鼠标滑轮滚动。目前没有想到什么思路去再加入手动滚动。想请教下,能否在使用您的插件的情况下,再去实现这个功能。如果不行的话,之后只能参考您的源码在封装一个组件了。

绑定事件无效

给列表的每个dom元素绑定点击事件,只有第一次循环才生效。比如一个世界国家列表,第一次见到“**”时点击事件生效,当一直滚动下去,之后看见的“**”就不生效了

部分低端机型会报错:globalThis is not define

用了vue3-seamless-scroll 之后,部分手机报了错误:globalThis is not define,如果没猜错的话,应该是兼容没做好
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) : typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Vue3SeamlessScroll = {}, global.Vue)); })
这个问题希望能解决一下。
PS:另外说一下我的解决办法,我是直接在html头部加了 js 做的兼容:
!(function (t) { function e() { var e = this || self; (e.globalThis = e), delete t.prototype._T_; } "object" != typeof globalThis && (this ? e() : (t.defineProperty(t.prototype, "_T_", { configurable: !0, get: e, }), _T_)); })(Object)

感谢作者的付出,插件挺好用的。赞!

08 - switch控制切换

我仔细看了文档,没发现有这块,请问开发者这个原来的功能还有嘛?感谢开源

如何在滚动表单上面加个表头啊?

滚动表单的效果挺好的,但是没有表头挺遗憾的,自己在vue3-seamless-scroll外面加了个div表头,但是跟表格里面相应的内容对不齐,希望能更新个有表头的

滚动内容绑定点击事件,点击事件不生效

        <ul class="cont">
          <vue3-seamless-scroll :list="list" class="scroll" :step="0.2" :hover="true">
              <li class="cont-li" v-for="item in list" style="white-space: no-wrap; overflow: hidden;text-overflow: ellipsis;word-break: break-all;width: 100%; cursor: pointer;">
                <span style="color: #ffc900; margin-right: 8px;display: inline-block;">{{item.createTime}}</span>
                <span style="white-space: no-wrap; overflow: hidden;text-overflow: ellipsis; display: inline-block;width: 160px;white-space: nowrap;">{{item.eventSourceName || item.eventRemark}}</span>
                <a style="float: right;margin-right: 5px;color: #00dfff; text-decoration: underline;" @click="handleClick(item)">详情</a>
              </li>
          </vue3-seamless-scroll>
        </ul>

有一定量的元素handleClick不生效,:hover属性也是

[error] update from 1.1.5 to 1.2.0

我的项目以前安装的是 1.1.5 版本的,今天项目打包的时候自动更新到了 1.2.0,出现了滚动区域渲染失败的情况。

页面区域空白,控制台报了一连串 Vue 的 warning。

具体问题我暂时没时间去看,直接切回 1.1.5 版本并锁定之后,就正常了。

最后,感谢作者的项目让我提高了搬砖的效率。

copyNum失效

当copyNum设置为动态的时候,copyNum在某个时刻设置的数据不生效

添加V-model

提个小建议使用 V-model控制是否开始滚动
这样场景能够更加多变

动画问题

滚动不平滑,没有vue2版本的平滑,一卡一卡的

bug

开启hover鼠标滚轮滚动时,且页面中有滚动条,在组件内容区滚动应该优先滚动组件内容区,而不是优先滚动页面

opentouch

想在移动端开启滚动的时候可以滑动屏幕,之前的openTouch属性没了吗?

vue3+ts项目中全局注册提示缺少参数options

TS报错

如图,查看index.d.ts文件,发现有一个options对象,里面有个name属性,请问是用来干嘛的?文档里好像没写明用途。
`declare module 'vue3-seamless-scroll' {
export const Vue3SeamlessScroll: import('vue').DefineComponent < OptionsType, OptionsType, OptionsType, OptionsType, OptionsType,
OptionsType, OptionsType, OptionsType, OptionsType, OptionsType, OptionsType, OptionsType >

const install: (app: import('vue').App, options: {
name?: string
}) => unknown;
export default install;
}`

左右滚动的时候好像有点问题

对应组件的代码如下,图片都是同一张

<script setup lang="ts">
import util from '@/common/utils/util'
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'

let data = [
  util.getImg('icon.svg'),
  util.getImg('icon.svg'),
  util.getImg('icon.svg'),
  util.getImg('icon.svg'),
  util.getImg('icon.svg'),
  util.getImg('icon.svg'),
]
</script>
<template>
  <div>
    <div class="knight-scroll">
      <vue3-seamless-scroll :list="data" direction="left">
        <span
          ><img v-for="(item, index) in data" :src="item" :key="index" /> </span
      ></vue3-seamless-scroll>
    </div>
  </div>
</template>
<style scoped lang="scss">
.knight-scroll {
  background-color: black;
  overflow: hidden;
  width: 100%;
}

img {
  margin-left: 50px;
}
</style>

出来的效果是这样的,是不是我哪里设置错了
图片

这样确实会滚动,但是和我想的差别有点大哈哈

滚动失效

页面加载时,vue3-seamless-scroll组件的数据在setup中已经被赋予新的值了,但是有了新值后vue3-seamless-scroll组件的可见性是不可见的(使用v-show来控制可见性),需要等页面其他数据或组件都准备好后,才能设置vue3-seamless-scroll组件的可见性为可见,在这种情况下,滚动会失效

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.