Code Monkey home page Code Monkey logo

Comments (12)

afc163 avatar afc163 commented on June 19, 2024

给个 codepen 重现。

from steps.

afc163 avatar afc163 commented on June 19, 2024

我看 antd-mobile 里没有水平的 Steps,在哪遇到的。

from steps.

silentcloud avatar silentcloud commented on June 19, 2024

@afc163 新需求,这次新加的,外部用户需求 ant-design/ant-design-mobile#498

from steps.

afc163 avatar afc163 commented on June 19, 2024
-              ? null : -(this.state.lastStepOffsetWidth / lastIndex + 1);
+              ? null : -Math.floor(this.state.lastStepOffsetWidth / lastIndex);

@warmhug 试试本地 node_modules 里面

? null : -(this.state.lastStepOffsetWidth / lastIndex + 1);
这行改成上面这样行不行。

from steps.

warmhug avatar warmhug commented on June 19, 2024

不刷新了,不过计算位置不太对

from steps.

afc163 avatar afc163 commented on June 19, 2024

还是有问题,不知道为啥 marginRight 会影响最后一个元素的宽度计算。

from steps.

afc163 avatar afc163 commented on June 19, 2024

我本地重现了。

from steps.

afc163 avatar afc163 commented on June 19, 2024
-              ? null : -(this.state.lastStepOffsetWidth / lastIndex + 1);
+              ? null : -Math.round(this.state.lastStepOffsetWidth / lastIndex + 1);

这样改,我本地好了。

from steps.

afc163 avatar afc163 commented on June 19, 2024

你试试,没问题我发一个 patch。

from steps.

warmhug avatar warmhug commented on June 19, 2024

不换行了,图标位置不太对,是样式写法问题?
image

from steps.

afc163 avatar afc163 commented on June 19, 2024

图标位置好像和这个 bug 没关系,应该是样式实现问题。

from steps.

afc163 avatar afc163 commented on June 19, 2024

已发 2.2.1,重新安装。

from steps.

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.