diff --git a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts index 62bd9061..279296bd 100644 --- a/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts +++ b/jeecgboot-vue3/src/components/jeecg/JVxeTable/src/hooks/useMethods.ts @@ -455,7 +455,9 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, /** 获取表格表单里的值 */ function getValues(callback, rowIds) { let tableData = getTableData({ rowIds: rowIds }); - callback('', tableData); + // update-begin--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正 + callback(tableData, tableData); + // update-end--author:liaozhiyang---date:20241227---for:【issues/7631】JVxeTable组件的getValues回调函数参数修正 } type getTableDataOptions = { @@ -638,7 +640,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, async function clearSelection() { const xTable = getXTable(); let event = { $table: xTable, target: instanceRef.value }; - if (props.rowSelectionType === JVxeTypes.rowRadio) { + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { await xTable.clearRadioRow(); handleVxeRadioChange(event); } else { @@ -653,7 +655,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, */ function getSelectionData(isFull?: boolean) { const xTable = getXTable(); - if (props.rowSelectionType === JVxeTypes.rowRadio) { + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { let row = xTable.getRadioRecord(isFull); if (isNull(row)) { return []; @@ -740,7 +742,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, async function removeSelection() { let xTable = getXTable(); let res; - if (props.rowSelectionType === JVxeTypes.rowRadio) { + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { res = await xTable.removeRadioRow(); } else { res = await xTable.removeCheckboxRow(); @@ -857,7 +859,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps, function getSelectedData(isFull?: boolean) { const xTable = getXTable(); let rows:any[] = [] - if (props.rowSelectionType === JVxeTypes.rowRadio) { + if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) { let row = xTable.getRadioRecord(isFull); if (isNull(row)) { return [];