Code Monkey home page Code Monkey logo

Comments (2)

warmthsea avatar warmthsea commented on June 26, 2024

建议根据 input 的值手动控制 tooltip 的展示

from element-plus.

xuyimingwork avatar xuyimingwork commented on June 26, 2024

建议根据 input 的值手动控制 tooltip 的展示

当前的 tooltip 没法依据单个 cell 的内容来控制显示隐藏。

  • 可能可以在 el-input 内添加一个 display: none 的 div 来表示 el-input 的 value 值?这样就能取到 innerText 了,但是这样影响会比较大,可能不是一个好方案。
    • 比如 el-select 在单选情况下 input 值没有,innerText 就没有,而在多选情况下,因为用 tag 表示值,所以 innerText 有值,就能展示
  • 另一个比较简单的解决方式就是在渲染 cell 的 tooltip 时将 innerText 为空的 tooltip 添加 disabled 属性,因为为空情况下也没有显示 tooltip 的意义。

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.