Giter VIP home page Giter VIP logo

Comments (4)

calvinchan22 avatar calvinchan22 commented on September 25, 2024 1

想要实现表格高度自适应 改一下样式就好了吧 el-table本身也是支持设置height

主要我没整明白el-table怎么去自适应不同分辨率下的高度,比如说2k屏下可能查询条件就一行,但是1080下查询条件就会变成两行,写固定height的话这种情况要么超出去要么少一节。有没有大致思路方向我再去学习下看看。

我理解你现在的问题点在于 头部的搜索栏在低分辨率下会导致换行,高分辨率和低分辨率下高度不一致

1.用Y轴的三栏布局,表格外面还是要套一层div 设置flex:1,el-table height设置100%,可以实现表格高度自适应不会出现全屏滚动,但是解决不了搜索换行的问题

2.搜索换行可以自己封装一个展开,收起的容器去做
3.如果要兼容1080,就不建议表格高度自适应了,因为1080下 搜索筛选项过多,可能表格内部可视区域就2条数据,滚动就很鸡肋了

from gin-vue-admin.

calvinchan22 avatar calvinchan22 commented on September 25, 2024

想要实现表格高度自适应 改一下样式就好了吧 el-table本身也是支持设置height

from gin-vue-admin.

juneyx avatar juneyx commented on September 25, 2024

想要实现表格高度自适应 改一下样式就好了吧 el-table本身也是支持设置height

主要我没整明白el-table怎么去自适应不同分辨率下的高度,比如说2k屏下可能查询条件就一行,但是1080下查询条件就会变成两行,写固定height的话这种情况要么超出去要么少一节。有没有大致思路方向我再去学习下看看。

from gin-vue-admin.

juneyx avatar juneyx commented on September 25, 2024

我理解你现在的问题点在于 头部的搜索栏在低分辨率下会导致换行,高分辨率和低分辨率下高度不一致

1.用Y轴的三栏布局,表格外面还是要套一层div 设置flex:1,el-table height设置100%,可以实现表格高度自适应不会出现全屏滚动,但是解决不了搜索换行的问题

2.搜索换行可以自己封装一个展开,收起的容器去做 3.如果要兼容1080,就不建议表格高度自适应了,因为1080下 搜索筛选项过多,可能表格内部可视区域就2条数据,滚动就很鸡肋了

3.如果要兼容1080,就不建议表格高度自适应了,因为1080下 搜索筛选项过多,可能表格内部可视区域就2条数据,滚动就很鸡肋了

感谢指导,我去试试看

from gin-vue-admin.

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.