【issues/7631】JVxeTable组件的getValues回调函数参数修正 ---

【issues/7624】JVxeTable 单选删除不生效 ---
dependabot/npm_and_yarn/jeecgboot-vue3/vite-6.0.9
JEECG 2025-01-13 20:22:13 +08:00
parent 266f49e72f
commit a2a3ff6709
1 changed files with 7 additions and 5 deletions

View File

@ -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---forissues/7631JVxeTablegetValues
callback(tableData, tableData);
// update-end--author:liaozhiyang---date:20241227---forissues/7631JVxeTablegetValues
}
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 [];