ElementU table component Table is highly adaptive

If you are building the management background, the menu bar is placed horizontally to the top of the entire View, below are some components of the search box, and then at the bottom is a table to present data, then when zooming the browser window, you need to implement the table component Table Highly adaptive.

You can do it in the following ways:

setTimeout(() => {
      this.customTableHeight = window.innerHeight - this.$refs.table.$el.offsetTop;
    }, 100);

Then bind customTableHeight to the table component:

:height="customTableHeight" ref="table"

Of course don't forget to declare the variable in data.

Guess you like

Origin blog.51cto.com/xvjunjie/2539764