Code Monkey home page Code Monkey logo

Comments (4)

vvpvvp avatar vvpvvp commented on May 22, 2024

其实heyui的栅格和其他的不太一样,能列举一下应用场景吗?
当时由于没有想到真实的应用场景,所以,就没有添加这种属性。

from heyui.

fanzouguo avatar fanzouguo commented on May 22, 2024

主要还是在布局场景,比如说需要以下的布局样式,
default
在目前的情况下,只能将中间的 Col宽度设为 14,然后再自己去处理这个 Col 内的元素,使其只占 14 cell 中的 4 cell,而我实际需要的只是 width=4,在这种情况下,可能会存在 与上一行对齐上的困扰,比如 4 / 14 不能整除,也无法通过固定的 px 等方式去处理。

from heyui.

fanzouguo avatar fanzouguo commented on May 22, 2024

补充说明一下,这个问题本来是在表单布局的时候遇到的。由于目前 form最多支持 3 列,遇到更多列的时候,只能改用 row 布局,但并非每行存在的列元素都一样多,需要控制位置时,就遇到了这个需求。

from heyui.

vvpvvp avatar vvpvvp commented on May 22, 2024

如果是这样的需求,我建议使用:

<Row>
<Col :width="6"></Col>
<Col :width="4"></Col>
<Col :width="10"></Col>
<Col :width="4"></Col>
</Row>

from heyui.

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.