Code Monkey home page Code Monkey logo

Comments (11)

Mt-Youya avatar Mt-Youya commented on July 23, 2024 1

demo 优化了下,把公用变量show改为用item.active,解决多个button点击判断问题

有用!

from element-plus.

Liao-js avatar Liao-js commented on July 23, 2024

建议用 nextTick 或者 setTimeout 来执行 hanlleClose

from element-plus.

Mt-Youya avatar Mt-Youya commented on July 23, 2024

建议用 nextTick 或者 setTimeout 来执行 hanlleClose

nextTick 没用

from element-plus.

chenxch avatar chenxch commented on July 23, 2024

1、可以尝试使用popover的可控模式
2、有个东西叫短链接,相比codesandbox来说playground是一个更快捷的提供repo的方式

from element-plus.

zhuminghuan avatar zhuminghuan commented on July 23, 2024

请问解决了吗

from element-plus.

Mt-Youya avatar Mt-Youya commented on July 23, 2024

请问解决了吗

@zhuminghuan 只能使用 setTimeout 执行 handleClose 了 code here
或者说 @chenxch 就像这位说的不用 dropdown 组件 而用 popover 组件 @zhuminghuan

from element-plus.

Mt-Youya avatar Mt-Youya commented on July 23, 2024

1、可以尝试使用popover的可控模式 2、有个东西叫短链接,相比codesandbox来说playground是一个更快捷的提供repo的方式

1、那这个dropdown 的这个bug是因为什么导致的呢? 或者说你们认为这个问题是dropdown 的特性吗?
2、短链接很好,于是我要再去别的网站把我写的demo playground再生成一下

from element-plus.

chenxch avatar chenxch commented on July 23, 2024

1.基于你的demo修改了下,看看是否解决你的问题demo (这不是可以提交么)

2.并不是一定要你使用的开个短连接生成的网站在边上,你说太长github不让提交,那就缩短就好了;bug repo就是为了方便他人快速查看,相对于codesandbox要跑一个工程来说playground来说是更有优势的,不再讨论这个playground与codesandbox的问题了

from element-plus.

Mt-Youya avatar Mt-Youya commented on July 23, 2024

@chenxch
我们的业务是 只要 dropdown 在open 的时候 点了几个select 然后button是 active的时候再点击 button 就 handleClose 而且 button 改为 !active
因为产品要的是 如果要取消 则全部清除, 而不是一个一个清除,所以在button是active的时候直接清除所有的状态
这里虽然可以使用 setTimeout 实现, 但是感觉不合理

2024-04-25.17-28-49.mp4

from element-plus.

chenxch avatar chenxch commented on July 23, 2024

@Mt-Youya 明白了哈,demo 试试这个

from element-plus.

chenxch avatar chenxch commented on July 23, 2024

demo 优化了下,把公用变量show改为用item.active,解决多个button点击判断问题

from element-plus.

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.