WakuwakuP / element-ui-el-table-draggable

Make 'el-table' of 'element UI' sortable.
https://www.npmjs.com/package/element-ui-el-table-draggable
MIT License
111 stars 19 forks source link

Drag columns of el-table #19

Open Bublikus opened 4 years ago

Bublikus commented 4 years ago

First of all I have to say thank you for this cool wrapper!

So, my question is: Do I have a chance to drag columns?

I suppose the main point is in this place:

const table = this.$children[0].$el.querySelector(
   ".el-table__body-wrapper tbody"
);

I tried to change it on the fly to smth like: ".el-table", but got an error of null element. Even after ".el-table__header-wrapper" all th were moving together.

Is there any solution?

WakuwakuP commented 4 years ago

I have no choice but to reply late.

This is Google Translate. I'm sorry if it is hard to read.

The "el-table" of "element-ui" is made up of chunks of rows. You need to change the structure of the DOM to move the mass of columns.

You may be able to use vue-handsontable.

jggj21 commented 4 years ago

Good day. First of all thank you very much for the time dedicated to this plugin, thank you very much. I'm presenting the same problem, I need to drag the columns and move them around. Is there any other way to work that part?