GithubHelp home page GithubHelp logo

滑动单元格问题 about vant HOT 4 CLOSED

youzan avatar youzan commented on April 30, 2024
滑动单元格问题

from vant.

Comments (4)

chenjiahan avatar chenjiahan commented on April 30, 2024

@YYQ8023 不是很理解你的意思,请问你的滑动单元格是自己实现的还是使用了 Vant 中的 CellSwipe 组件?

from vant.

llk2yq avatar llk2yq commented on April 30, 2024

@chenjiahan 使用了CellSwipe组件,这个组件也是通过修改 ‘van-cell-swipe__wrapper’这个元素的translate3d来实现效果的(?),修改的方式是touch事件(?),而我给这个cellswipe里面的内容加了一个click事件,点击之后修改translate3d值,来实现和touch相同的效果。可是问题是click修改translate3d之后,touch事件不起作用了,即不能再以滑动的方式滑回去。

from vant.

chenjiahan avatar chenjiahan commented on April 30, 2024

@YYQ8023 组件的 translate3d 是由内部变量控制的,不能直接在外部修改 DOM 上的 translate3d 值。你可以给 CellSwipe 组件提个 PR,加上你所需要的 click 事件

from vant.

llk2yq avatar llk2yq commented on April 30, 2024

@chenjiahan 好的,明白了。我再去review一下。

from vant.

Related Issues (20)

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.