✨ 全局支持表格单列文字拖选复制

This commit is contained in:
caojia
2026-10-10 14:22:58 +08:00
parent eeaea52c17
commit b071d76c96
5 changed files with 309 additions and 8 deletions
@@ -1,5 +1,5 @@
<template>
<div class="basic-table">
<div class="basic-table" v-text-drag-copy="props.textDragCopy">
<!-- 搜索栏 -->
<basic-form
v-if="searchColumns.length"
@@ -126,6 +126,7 @@
* :columns="columns"
* :search-columns="searchColumns"
* :query="listPost"
* :text-drag-copy="false" // 可关闭表格文字拖选复制
* @add="handleAdd"
* >
* <template #toolbar="{ selection, ids }">
@@ -220,6 +221,11 @@ const props = defineProps({
type: Boolean,
default: true
},
// 是否支持在同一列中拖选文字并复制(特殊交互表格可关闭)
textDragCopy: {
type: Boolean,
default: true
},
// 是否显示默认新增按钮(无 toolbar 插槽时生效)
showAdd: {
type: Boolean,