|
@@ -98,9 +98,9 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
|
click: () => {
|
|
|
// 使用存储的选中行
|
|
|
const selection = context.selectedRows || [];
|
|
|
- console.log('选中的行:', selection);
|
|
|
+ console.log('选中的行:', context);
|
|
|
|
|
|
- if (!selection || selection.length === 0) {
|
|
|
+ if (!selection || selection.length === 0||selection.length==undefined) {
|
|
|
warningMessage('请先选择要操作的职位');
|
|
|
return;
|
|
|
}
|
|
@@ -119,9 +119,9 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp
|
|
|
click: () => {
|
|
|
// 使用存储的选中行
|
|
|
const selection = context.selectedRows || [];
|
|
|
- console.log('选中的行:', selection);
|
|
|
+ console.log('选中的行:', selection.length);
|
|
|
|
|
|
- if (!selection || selection.length === 0) {
|
|
|
+ if (!selection || selection.length === 0 ||selection.length==undefined) {
|
|
|
warningMessage('请先选择要操作的职位');
|
|
|
return;
|
|
|
}
|