Vxe UI vue vxe-table v3.10+ 分享实现拖拽行调整顺序、列拖拽调整顺序的用法
安装
npm install vxe-pc-ui@3.3.0 vxe-table@3.11.0
main.js
import Vue from 'vue'
// ...
// 完整导入 UI 组件库
import VxeUI from 'vxe-pc-ui'
import 'vxe-pc-ui/lib/style.css'
// ...
// 完整导入 表格库
import VxeUITable from 'vxe-table'
import 'vxe-table/lib/style.css'
// ...
Vue.use(VxeUI)
Vue.use(VxeUITable)
//...
列拖拽
通过工具栏启用 custom 自定义列功能,默认就只差拖拽排序、冻结列等功能。
<template>
<div>
<vxe-grid v-bind="gridOptions"></vxe-grid>
</div>
</template>
<script setup>
import {
reactive } from 'vue'
const gridOptions = reactive(