: : : 发表:2025-04-29 01:46:55
浏览:
1. HTML		<head>
    <link rel="stylesheet" href="css/tableDrag.css">
    <script src="js/jquery-1.11.0.min.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/iview.min.js"></script>
    <script src="js/table-data.js"></script>
</html>
2. CSS<style>     #info {         background:#f8f8f9;         border: 1px solid #f8f8f9;         width: 100px;         height: 30px;         position: absolute;         top: 0;         eft: 0;         display: none;     }     .no-select-text {         user-select: none;         -moz-user-select: none;         -webkit-user-select: none;     }     body .ivu-table-header th{         cursor: move;     } </style>
3. HTML<body> <h2 style="text-align: center">可拖动列,拖动行改变age和address值位置</h2> <div id="tableDrop" style="width: 600px;margin: 0 auto;"> <i-table width="500" border ref="currentRowTable" :columns="columns1" :data="data" :draggable="true" @on-drag-drop="onDragDrop"></i-table> <div id="info"></div> <div id="triangle"> <div class="arrow arrow-down"></div> <div class="arrow arrow-up"></div> </div> </div> </body>
TOP