fix: 表格组件enableDrag字段替换成draggable

This commit is contained in:
teukkk 2024-06-25 18:13:08 +08:00 committed by Craftsman
parent 45124ddd5e
commit e212c80a3d
22 changed files with 6 additions and 27 deletions

View File

@ -66,7 +66,6 @@ export default function useTableProps<T>(
selectorStatus: SelectAllEnum.NONE, // 选择器状态 selectorStatus: SelectAllEnum.NONE, // 选择器状态
showSelectorAll: true, // 是否显示全选 showSelectorAll: true, // 是否显示全选
/** end */ /** end */
enableDrag: false, // 是否可拖拽
showSetting: false, // 是否展示列选择器 showSetting: false, // 是否展示列选择器
columnResizable: true, columnResizable: true,
pagination: false, // 禁用 arco-table 的分页 pagination: false, // 禁用 arco-table 的分页
@ -114,11 +113,6 @@ export default function useTableProps<T>(
}; };
} }
// 是否可拖拽
if (propsRes.value.enableDrag) {
propsRes.value.draggable = { type: 'handle' };
}
// 加载效果 // 加载效果
const setLoading = (status: boolean) => { const setLoading = (status: boolean) => {
propsRes.value.loading = status; propsRes.value.loading = status;

View File

@ -191,7 +191,6 @@
columns, columns,
scroll: { x: '100%' }, scroll: { x: '100%' },
heightUsed: 310, heightUsed: 310,
enableDrag: false,
}); });
const innerVisible = ref(false); const innerVisible = ref(false);

View File

@ -218,7 +218,7 @@
size: 'default', size: 'default',
showSetting: false, showSetting: false,
showPagination: false, showPagination: false,
enableDrag: true, draggable: { type: 'handle' },
}); });
// //

View File

@ -838,7 +838,7 @@
selectable: true, selectable: true,
showSetting: true, showSetting: true,
heightUsed: 236, heightUsed: 236,
enableDrag: true, draggable: { type: 'handle' },
showSubdirectory: true, showSubdirectory: true,
paginationSize: 'mini', paginationSize: 'mini',
}, },

View File

@ -232,7 +232,7 @@
selectable: true, selectable: true,
showSetting: true, showSetting: true,
heightUsed: 380, heightUsed: 380,
enableDrag: true, draggable: { type: 'handle' },
showSubdirectory: true, showSubdirectory: true,
}, },
(record) => ({ (record) => ({

View File

@ -99,7 +99,6 @@
columns: props.bugColumns, columns: props.bugColumns,
scroll: { x: '100%' }, scroll: { x: '100%' },
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}); });
const innerKeyword = useVModel(props, 'keyword', emit); const innerKeyword = useVModel(props, 'keyword', emit);

View File

@ -149,7 +149,6 @@
selectable: true, selectable: true,
showSelectorAll: props.showSelectorAll, showSelectorAll: props.showSelectorAll,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}, },
(record) => { (record) => {
return { return {

View File

@ -295,7 +295,7 @@
} = useTable(getLinkedCaseBugList, { } = useTable(getLinkedCaseBugList, {
columns: testPlanColumns, columns: testPlanColumns,
heightUsed: 354, heightUsed: 354,
enableDrag: true, draggable: { type: 'handle' },
}); });
function initTableParams() { function initTableParams() {

View File

@ -181,7 +181,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
showSelectorAll: false, showSelectorAll: false,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}); });
const innerVisible = ref(false); const innerVisible = ref(false);

View File

@ -133,7 +133,7 @@
tableKey: TableKeyEnum.CASE_MANAGEMENT_TAB_REVIEW, tableKey: TableKeyEnum.CASE_MANAGEMENT_TAB_REVIEW,
scroll: { x: '100%' }, scroll: { x: '100%' },
heightUsed: 360, heightUsed: 360,
enableDrag: true, draggable: { type: 'handle' },
}); });
async function initData() { async function initData() {

View File

@ -159,7 +159,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
selectable: false, selectable: false,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}); });
const form = ref({ const form = ref({

View File

@ -162,7 +162,6 @@
selectable: false, selectable: false,
noDisable: true, noDisable: true,
showSetting: false, showSetting: false,
enableDrag: false,
}); });
function getParams() { function getParams() {

View File

@ -144,7 +144,6 @@
tableKey: TableKeyEnum.CASE_MANAGEMENT_TAB_TEST_PLAN, tableKey: TableKeyEnum.CASE_MANAGEMENT_TAB_TEST_PLAN,
scroll: { x: '100%' }, scroll: { x: '100%' },
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}, },
(item) => { (item) => {
return { return {

View File

@ -178,7 +178,7 @@
noDisable: true, noDisable: true,
showSetting: true, showSetting: true,
showPagination: false, showPagination: false,
enableDrag: true, draggable: { type: 'handle' },
showMode: false, showMode: false,
heightUsed: 644, heightUsed: 644,
debug: true, debug: true,

View File

@ -104,7 +104,6 @@
noDisable: true, noDisable: true,
showSetting: false, showSetting: false,
showPagination: false, showPagination: false,
enableDrag: false,
showMode: false, showMode: false,
heightUsed: 644, heightUsed: 644,
debug: true, debug: true,

View File

@ -394,7 +394,6 @@
showSetting: true, showSetting: true,
selectable: hasOperationPermission.value, selectable: hasOperationPermission.value,
heightUsed: 330, heightUsed: 330,
enableDrag: false,
showSelectAll: true, showSelectAll: true,
} }
); );

View File

@ -432,7 +432,6 @@
showSetting: true, showSetting: true,
selectable: hasOperationPermission.value, selectable: hasOperationPermission.value,
heightUsed: 300, heightUsed: 300,
enableDrag: false,
showSelectorAll: true, showSelectorAll: true,
}, },
// eslint-disable-next-line no-return-assign // eslint-disable-next-line no-return-assign

View File

@ -346,7 +346,6 @@
showSetting: true, showSetting: true,
selectable: hasOperationPermission.value, selectable: hasOperationPermission.value,
heightUsed: 330, heightUsed: 330,
enableDrag: false,
showSelectAll: true, showSelectAll: true,
} }
); );

View File

@ -169,7 +169,6 @@
size: 'default', size: 'default',
showSetting: true, showSetting: true,
showPagination: false, showPagination: false,
enableDrag: false,
}); });
const addStep = () => {}; const addStep = () => {};

View File

@ -56,7 +56,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
showSelectorAll: false, showSelectorAll: false,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
showPagination: false, showPagination: false,
}); });

View File

@ -144,7 +144,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
showSelectorAll: false, showSelectorAll: false,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
}); });
const count = computed(() => { const count = computed(() => {

View File

@ -76,7 +76,6 @@
scroll: { x: '100%' }, scroll: { x: '100%' },
showSelectorAll: false, showSelectorAll: false,
heightUsed: 340, heightUsed: 340,
enableDrag: false,
showPagination: false, showPagination: false,
}); });
const { propsRes, propsEvent, setLoading } = useTable(undefined, tableProps.value); const { propsRes, propsEvent, setLoading } = useTable(undefined, tableProps.value);