mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-09-02 10:25:56 +00:00
【issues/7631】JVxeTable组件的getValues回调函数参数修正 ---
【issues/7624】JVxeTable 单选删除不生效 ---
This commit is contained in:
@@ -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 [];
|
||||
|
Reference in New Issue
Block a user