|
|
@ -6,6 +6,13 @@
|
|
|
|
import 'element-plus/es/components/table/style/css';
|
|
|
|
import 'element-plus/es/components/table/style/css';
|
|
|
|
import Sortable from 'sortablejs';
|
|
|
|
import Sortable from 'sortablejs';
|
|
|
|
const props = defineProps({
|
|
|
|
const props = defineProps({
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 是否可拖拽排序
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
sortable: {
|
|
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
|
|
default: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 拖拽表格唯一标识,用于区分多个拖拽区域互相拖拽时数据来源
|
|
|
|
* 拖拽表格唯一标识,用于区分多个拖拽区域互相拖拽时数据来源
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -138,7 +145,7 @@
|
|
|
|
sortable.value = new Sortable(el, {
|
|
|
|
sortable.value = new Sortable(el, {
|
|
|
|
group: props.group,
|
|
|
|
group: props.group,
|
|
|
|
sort: props.sort,
|
|
|
|
sort: props.sort,
|
|
|
|
disabled: props.disabled,
|
|
|
|
disabled: !props.sortable || props.disabled,
|
|
|
|
animation: props.animation,
|
|
|
|
animation: props.animation,
|
|
|
|
draggable: '.' + props.draggable,
|
|
|
|
draggable: '.' + props.draggable,
|
|
|
|
handle: props.handle,
|
|
|
|
handle: props.handle,
|
|
|
|