GithubHelp home page GithubHelp logo

Comments (3)

linxz avatar linxz commented on July 29, 2024

有 loading 并不一定是不可点击,如果想要不可点击的话,可以考虑加载禁用的属性。
不知道这样的处理方式是否能够满足你的需求呢?

from mini-ali-ui.

closertb avatar closertb commented on July 29, 2024

有 loading 并不一定是不可点击,如果想要不可点击的话,可以考虑加载禁用的属性。
不知道这样的处理方式是否能够满足你的需求呢?

目前确实是这样处理的。但从antd 与 antd-mobile 的交互上,都将loading 默认禁用,小程序以前没写过,不知道这样的设计的出发点在什么场景呢?

from mini-ali-ui.

linxz avatar linxz commented on July 29, 2024

有 loading 并不一定是不可点击,如果想要不可点击的话,可以考虑加载禁用的属性。
不知道这样的处理方式是否能够满足你的需求呢?

目前确实是这样处理的。但从antd 与 antd-mobile 的交互上,都将loading 默认禁用,小程序以前没写过,不知道这样的设计的出发点在什么场景呢?

理论上,loading 是加载的过程,不建议用户再有更多的操作,不过在 button 中已有 disabled 属性作为依托,在考虑可能会有场景在 loading 的过程做其他操作,因此这里并未对 loading 状态做禁用处理,而是把这个主动权交给开发者自行决定。

<button type="primary" loading disabled>Loading</button>

image

如上即可在 loading 状态下禁用 button。

from mini-ali-ui.

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.