Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

怎么用sortable实现el-table行拖动样式

html

<el-table tooltip-effect="light" :row-key="getRowKeyscx" :data="cxl" height="242"  width="1000" :show-header="false" @selection-change="cxd" ref="tablecx" class="tablecx">
<el-table-column type="selection"  width="50" style="margin-left: 10px"></el-table-column>
<el-table-column >
    <template>
        <img src="../../assets/images/exam/tuodong.png" height="14" width="20" style="" />
    </template>
</el-table-column>
</el-table>

js

const table = document.querySelector('.tablerx tbody')
            Sortable.create(table, {
              onEnd: evt => {  //监听拖动结束事件
                this.rxpx(evt.oldIndex,evt.newIndex)//执行排序
              }
            })

怎么改成实现这样的效果
image


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

或者有什么样例网页吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...