mirror of https://github.com/jeecgboot/jeecg-boot
【issues/7631】JVxeTable组件的getValues回调函数参数修正 ---
【issues/7624】JVxeTable 单选删除不生效 ---dependabot/npm_and_yarn/jeecgboot-vue3/vite-6.0.9
parent
266f49e72f
commit
a2a3ff6709
|
@ -455,7 +455,9 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
|
||||||
/** 获取表格表单里的值 */
|
/** 获取表格表单里的值 */
|
||||||
function getValues(callback, rowIds) {
|
function getValues(callback, rowIds) {
|
||||||
let tableData = getTableData({ rowIds: 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 = {
|
type getTableDataOptions = {
|
||||||
|
@ -638,7 +640,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
|
||||||
async function clearSelection() {
|
async function clearSelection() {
|
||||||
const xTable = getXTable();
|
const xTable = getXTable();
|
||||||
let event = { $table: xTable, target: instanceRef.value };
|
let event = { $table: xTable, target: instanceRef.value };
|
||||||
if (props.rowSelectionType === JVxeTypes.rowRadio) {
|
if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
|
||||||
await xTable.clearRadioRow();
|
await xTable.clearRadioRow();
|
||||||
handleVxeRadioChange(event);
|
handleVxeRadioChange(event);
|
||||||
} else {
|
} else {
|
||||||
|
@ -653,7 +655,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
|
||||||
*/
|
*/
|
||||||
function getSelectionData(isFull?: boolean) {
|
function getSelectionData(isFull?: boolean) {
|
||||||
const xTable = getXTable();
|
const xTable = getXTable();
|
||||||
if (props.rowSelectionType === JVxeTypes.rowRadio) {
|
if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
|
||||||
let row = xTable.getRadioRecord(isFull);
|
let row = xTable.getRadioRecord(isFull);
|
||||||
if (isNull(row)) {
|
if (isNull(row)) {
|
||||||
return [];
|
return [];
|
||||||
|
@ -740,7 +742,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
|
||||||
async function removeSelection() {
|
async function removeSelection() {
|
||||||
let xTable = getXTable();
|
let xTable = getXTable();
|
||||||
let res;
|
let res;
|
||||||
if (props.rowSelectionType === JVxeTypes.rowRadio) {
|
if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
|
||||||
res = await xTable.removeRadioRow();
|
res = await xTable.removeRadioRow();
|
||||||
} else {
|
} else {
|
||||||
res = await xTable.removeCheckboxRow();
|
res = await xTable.removeCheckboxRow();
|
||||||
|
@ -857,7 +859,7 @@ export function useMethods(props: JVxeTableProps, { emit }, data: JVxeDataProps,
|
||||||
function getSelectedData(isFull?: boolean) {
|
function getSelectedData(isFull?: boolean) {
|
||||||
const xTable = getXTable();
|
const xTable = getXTable();
|
||||||
let rows:any[] = []
|
let rows:any[] = []
|
||||||
if (props.rowSelectionType === JVxeTypes.rowRadio) {
|
if (['radio', JVxeTypes.rowRadio].includes(props.rowSelectionType ?? '')) {
|
||||||
let row = xTable.getRadioRecord(isFull);
|
let row = xTable.getRadioRecord(isFull);
|
||||||
if (isNull(row)) {
|
if (isNull(row)) {
|
||||||
return [];
|
return [];
|
||||||
|
|
Loading…
Reference in New Issue